> 백엔드 개발 > PHP 튜토리얼 > CoreThink 테마 개발 (8) H-ui를 활용하여 사용자 로그인 전후의 블로그 테마 개발

CoreThink 테마 개발 (8) H-ui를 활용하여 사용자 로그인 전후의 블로그 테마 개발

WBOY
풀어 주다: 2016-07-29 08:50:45
원래의
1365명이 탐색했습니다.

휘 고마워요 코어씽크 고마워요!

렌더링:
CoreThink 테마 개발 (8) H-ui를 활용하여 사용자 로그인 전후의 블로그 테마 개발
로그인 후
CoreThink 테마 개발 (8) H-ui를 활용하여 사용자 로그인 전후의 블로그 테마 개발
로그인 양식
CoreThink 테마 개발 (8) H-ui를 활용하여 사용자 로그인 전후의 블로그 테마 개발
로그인 후 드롭다운 메뉴를 만들고 싶은데 할 수 없어서 정상적으로 표시됩니다. . .
전체 탐색경로 탐색에서는 먼저 모듈을 탐색한 후 모듈이 전경에 표시되도록 허용합니다. 그런 다음 사용자가 로그인했는지 여부를 판단합니다. 이미 로그인한 경우 개인 센터가 표시되고, 그렇지 않으면 로그인이 표시됩니다. 및 등록 버튼이 표시됩니다.
코드:

<code><span>nav</span><span>class</span>=<span>"breadcrumb"</span>><span>div</span><span>class</span>=<span>"container"</span>><span>span</span><span>class</span>=<span>"c-gray en"</span>><span>i</span><span>class</span>=<span>"Hui-iconfont"</span>><span><span>i</span>></span><span>a</span><span>href</span>=<span>"#"</span>>您好,欢迎来到 {:C('WEB_SITE_TITLE')} !<span><span>a</span>></span><span><!-- 系统模块导航 开始--></span><span>opencmf:nav_list</span><span>name</span>=<span>"vo"</span><span>pid</span>=<span>"0"</span>><span>a</span><span>target</span>=<span>"{$vo.target}"</span><span>href</span>=<span>"{$vo.href}"</span>><span>span</span>> {$vo.title}<span><span>span</span>></span><span><span>a</span>></span><span><span>opencmf:nav_list</span>></span><span><!-- 系统模块导航 结束--></span><span><span>span</span>></span><span>present</span><span>name</span>=<span>"_user_auth"</span>><span>a</span><span>href</span>=<span>"#"</span> ><span>img</span><span>class</span>=<span>"round"</span><span>src</span>=<span>"{$_user_auth.avatar|get_cover='avatar'}"</span><span>height</span>=<span>"30px"</span><span>width</span>=<span>"30px"</span><span>alt</span>=<span>"{$_user_auth.nickname}"</span> /><span>span</span>>{$_user_auth.nickname}
                           <span>span</span>>
                               {$_new_message}
                           <span><span>span</span>></span><span><!-- 新消息数量 --></span><span><span>span</span>></span><span>span</span><span>class</span>=<span>"caret"</span>><span><span>span</span>></span><span><span>a</span>></span><span>a</span><span>href</span>=<span>"{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"</span>><span>span</span><span>class</span>=<span>"label label-secondary radius"</span>>个人主页<span><span>span</span>></span><span><span>a</span>></span><span>volist</span><span>name</span>=<span>"_user_nav_main"</span><span>id</span>=<span>"vo_nav"</span>><span>a</span><span>href</span>=<span>"{:U($vo_nav['url'], null, true, true)}"</span><span>class</span>=<span>"{$vo_nav.class}"</span>><span>span</span><span>class</span>=<span>"label label-secondary radius"</span>>
                            {$vo_nav.title}<span><span>span</span>></span><span><span>a</span>></span><span><span>volist</span>></span><span>a</span><span>href</span>=<span>"{:U('User/User/logout', null, true, true)}"</span><span>class</span>=<span>"ajax-get"</span>><span>span</span><span>class</span>=<span>"label label-danger radius"</span>>注销登录<span><span>span</span>></span><span><span>a</span>></span><span>else</span>/><span>a</span><span>class</span>=<span>"btn btn-success-outline radius"</span><span>data-toggle</span>=<span>"modal"</span><span>href</span>=<span>"#register-modal"</span>>注册<span><span>a</span>></span><span>a</span><span>class</span>=<span>"btn btn-danger-outline radius"</span><span>data-toggle</span>=<span>"modal"</span><span>href</span>=<span>"#login-modal"</span>>登录<span><span>a</span>></span><span><span>present</span>></span><span><span>div</span>></span><span><span>nav</span>></span></code>
로그인 후 복사

Blog/Home/Public/layout.html

<code><span><span>html</span>></span><span>head</span>><span>meta</span><span>charset</span>=<span>"utf-8"</span>><span>meta</span><span>name</span>=<span>"renderer"</span><span>content</span>=<span>"webkit|ie-comp|ie-stand"</span>><span>meta</span><span>http-equiv</span>=<span>"X-UA-Compatible"</span><span>content</span>=<span>"IE=edge"</span>><span>meta</span><span>name</span>=<span>"viewport"</span><span>content</span>=<span>"width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"</span>/><span>meta</span><span>http-equiv</span>=<span>"Cache-Control"</span><span>content</span>=<span>"no-siteapp"</span>/><span><!--[if lt IE 9]>
    <script type="text/javascript" src="__HOME_LIBS__/html5.js"></script>
    <script type="text/javascript" src="__HOME_LIBS__/respond.min.js"></script>
    <script type="text/javascript" src="__HOME_LIBS__/PIE_IE678.js"></script>
    <![endif]--></span><span>link</span><span>rel</span>=<span>"stylesheet"</span><span>type</span>=<span>"text/css"</span><span>href</span>=<span>"__HOME_CSS__/H-ui.min.css"</span>/><span>link</span><span>rel</span>=<span>"stylesheet"</span><span>type</span>=<span>"text/css"</span><span>href</span>=<span>"__HOME_LIBS__/Hui-iconfont/1.0.7/iconfont.css"</span>/><span>link</span><span>rel</span>=<span>"stylesheet"</span><span>type</span>=<span>"text/css"</span><span>href</span>=<span>"__HOME_LIBS__/icheck/icheck.css"</span>/><span>link</span><span>rel</span>=<span>"stylesheet"</span><span>type</span>=<span>"text/css"</span><span>href</span>=<span>"__HOME_CSS__/style.css"</span>/><span><!--[if IE 6]>
    <script type="text/javascript" src="__HOME_LIBS__/DD_belatedPNG_0.0.8a-min.js"></script>
    <script>DD_belatedPNG.fix('*');</script>
    <![endif]--></span><span>block</span><span>name</span>=<span>"title"</span>><span>title</span>>{:C('WEB_SITE_TITLE')}<span><span>title</span>></span><span><span>block</span>></span><span>meta</span><span>name</span>=<span>"keywords"</span><span>content</span>=<span>"关键词,5个左右,单个8汉字以内"</span>><span>meta</span><span>name</span>=<span>"description"</span><span>content</span>=<span>"网站描述,字数尽量空制在80个汉字,160个字符以内!"</span>><span><span>head</span>></span><span>body</span>><span>div</span><span>class</span>=<span>"clearfix hook hook-page-header"</span>>
    {:hook('PageHeader')} <span><!-- 文档开始钩子 --></span><span><span>div</span>></span><span><!-- 页面导航,支持二级菜单 --></span><span>header</span><span>class</span>=<span>"navbar-wrapper"</span>><span>div</span><span>class</span>=<span>"navbar navbar-black navbar-fixed-top"</span>><span>div</span><span>class</span>=<span>"container cl"</span>><span>a</span><span>class</span>=<span>"logo navbar-logo hidden-xs"</span><span>href</span>=<span>"/aboutHui.shtml"</span>>{:C('WEB_SITE_TITLE')}<span><span>a</span>></span><span>a</span><span>class</span>=<span>"logo navbar-logo-m visible-xs"</span><span>href</span>=<span>"/aboutHui.shtml"</span>>H-ui<span><span>a</span>></span><span>span</span><span>class</span>=<span>"logo navbar-slogan hidden-xs"</span>>{:C('WEB_SITE_SLOGAN')}<span><span>span</span>></span><span>a</span><span>aria-hidden</span>=<span>"false"</span><span>class</span>=<span>"nav-toggle Hui-iconfont visible-xs"</span><span>href</span>=<span>"javascript:;"</span>><span><span>a</span>></span><span>nav</span><span>class</span>=<span>"nav navbar-nav nav-collapse"</span><span>role</span>=<span>"navigation"</span><span>id</span>=<span>"Hui-navbar"</span>><span>ul</span><span>class</span>=<span>"cl"</span>><span>li</span>><span>a</span><span>href</span>=<span>"{:C('HOME_PAGE')}"</span>>首页<span><span>a</span>></span><span><span>li</span>></span><span>cms:category_list</span><span>name</span>=<span>"vo"</span><span>pid</span>=<span>"0"</span><span>group</span>=<span>"1"</span>><span>php</span>>if($vo['_child']):<span><span>php</span>></span><span>li</span><span>class</span>=<span>"dropDown dropDown_hover"</span>><span>a</span><span>href</span>=<span>"{$vo.href}"</span><span>class</span>=<span>"dropDown_A"</span><span>data-toggle</span>=<span>"dropdown"</span><span>role</span>=<span>"button"</span>>
                                {$vo.title} <span>span</span><span>class</span>=<span>"caret"</span>><span><span>span</span>></span><span><span>a</span>></span><span>ul</span><span>class</span>=<span>"dropDown-menu menu radius box-shadow"</span>><span>volist</span><span>name</span>=<span>"vo._child"</span><span>id</span>=<span>"vo1"</span>><span>li</span>><span>a</span><span>href</span>=<span>"{$vo1.href}"</span>>{$vo1.title}<span><span>a</span>></span><span><span>li</span>></span><span><span>volist</span>></span><span><span>ul</span>></span><span><span>li</span>></span><span>php</span>>else:<span><span>php</span>></span><span>li</span>><span>a</span><span>href</span>=<span>"{$vo.href}"</span>><span>span</span>> {$vo.title}<span><span>span</span>></span><span><span>a</span>></span><span><span>li</span>></span><span>php</span>>endif;<span><span>php</span>></span><span><span>cms:category_list</span>></span><span><span>ul</span>></span><span><span>nav</span>></span><span>nav</span><span>class</span>=<span>"navbar-userbar hidden-xs"</span>><span><span>nav</span>></span><span><span>div</span>></span><span><span>div</span>></span><span><span>header</span>></span><span>nav</span><span>class</span>=<span>"breadcrumb"</span>><span>div</span><span>class</span>=<span>"container"</span>><span>span</span><span>class</span>=<span>"c-gray en"</span>><span>i</span><span>class</span>=<span>"Hui-iconfont"</span>><span><span>i</span>></span><span>a</span><span>href</span>=<span>"#"</span>>您好,欢迎来到 {:C('WEB_SITE_TITLE')} !<span><span>a</span>></span><span><!-- 系统模块导航 开始--></span><span>opencmf:nav_list</span><span>name</span>=<span>"vo"</span><span>pid</span>=<span>"0"</span>><span>a</span><span>target</span>=<span>"{$vo.target}"</span><span>href</span>=<span>"{$vo.href}"</span>><span>span</span>> {$vo.title}<span><span>span</span>></span><span><span>a</span>></span><span><span>opencmf:nav_list</span>></span><span><!-- 系统模块导航 结束--></span><span><span>span</span>></span><span>present</span><span>name</span>=<span>"_user_auth"</span>><span>a</span><span>href</span>=<span>"#"</span> ><span>img</span><span>class</span>=<span>"round"</span><span>src</span>=<span>"{$_user_auth.avatar|get_cover='avatar'}"</span><span>height</span>=<span>"30px"</span><span>width</span>=<span>"30px"</span><span>alt</span>=<span>"{$_user_auth.nickname}"</span> /><span>span</span>>{$_user_auth.nickname}
                           <span>span</span>>
                               {$_new_message}
                           <span><span>span</span>></span><span><!-- 新消息数量 --></span><span><span>span</span>></span><span>span</span><span>class</span>=<span>"caret"</span>><span><span>span</span>></span><span><span>a</span>></span><span>a</span><span>href</span>=<span>"{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"</span>><span>span</span><span>class</span>=<span>"label label-secondary radius"</span>>个人主页<span><span>span</span>></span><span><span>a</span>></span><span>volist</span><span>name</span>=<span>"_user_nav_main"</span><span>id</span>=<span>"vo_nav"</span>><span>a</span><span>href</span>=<span>"{:U($vo_nav['url'], null, true, true)}"</span><span>class</span>=<span>"{$vo_nav.class}"</span>><span>span</span><span>class</span>=<span>"label label-secondary radius"</span>>
                            {$vo_nav.title}<span><span>span</span>></span><span><span>a</span>></span><span><span>volist</span>></span><span>a</span><span>href</span>=<span>"{:U('User/User/logout', null, true, true)}"</span><span>class</span>=<span>"ajax-get"</span>><span>span</span><span>class</span>=<span>"label label-danger radius"</span>>注销登录<span><span>span</span>></span><span><span>a</span>></span><span>else</span>/><span>a</span><span>class</span>=<span>"btn btn-success-outline radius"</span><span>data-toggle</span>=<span>"modal"</span><span>href</span>=<span>"#register-modal"</span>>注册<span><span>a</span>></span><span>a</span><span>class</span>=<span>"btn btn-danger-outline radius"</span><span>data-toggle</span>=<span>"modal"</span><span>href</span>=<span>"#login-modal"</span>>登录<span><span>a</span>></span><span><span>present</span>></span><span><span>div</span>></span><span><span>nav</span>></span><span>block</span><span>name</span>=<span>"main"</span>><span><span>block</span>></span><span><!--页脚--></span><span>footer</span><span>class</span>=<span>"footer mt-20"</span>><span>div</span><span>class</span>=<span>"container"</span>><span>p</span>>{:C('WEB_SITE_COPYRIGHT')} <span>br</span>><span>a</span><span>rel</span>=<span>"nofollow"</span><span>target</span>=<span>"_blank"</span><span>href</span>=<span>"http://www.miitbeian.gov.cn/"</span>>
                {:C('WEB_SITE_ICP')}
            <span><span>a</span>></span><span><span>p</span>></span><span><span>div</span>></span><span><span>footer</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/jquery/1.9.1/jquery.min.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/layer/2.1/layer.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/laypage/1.2/laypage.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/My97DatePicker/WdatePicker.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/icheck/jquery.icheck.min.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/bootstrap-Switch/bootstrapSwitch.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/Validform/5.3.2/Validform.min.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/Validform/5.3.2/passwordStrength-min.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_JS__/H-ui.js"</span>><span><span>script</span>></span><span>script</span>><span><span>var</span> navigation = responsiveNav(<span>"Hui-navbar"</span>, {customToggle: <span>".nav-toggle"</span>});

    $(<span><span>function</span><span>()</span> {</span>
        $(<span>'.skin-minimal input'</span>).iCheck({
            checkboxClass: <span>'icheckbox-blue'</span>,
            radioClass: <span>'iradio-blue'</span>,
            increaseArea: <span>'20%'</span>
        });
        $(<span>"#demoform"</span>).Validform({
            tiptype: <span>2</span>
        });
    });
</span><span><span>script</span>></span><span><span>block</span>></span><span>div</span><span>class</span>=<span>"clearfix hook hook-page-footer"</span>>
    {:hook('PageFooter')} <span><!-- 文档末尾钩子 --></span><span><span>div</span>></span><span>include</span><span>file</span>=<span>"$_user_login_modal"</span>/><span><!-- 登录弹窗 --></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modalmanager.js"</span>><span><span>script</span>></span><span>script</span><span>type</span>=<span>"text/javascript"</span><span>src</span>=<span>"__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modal.js"</span>><span><span>script</span>></span><span>block</span><span>name</span>=<span>"script"</span>><span><span>block</span>></span><span><span>body</span>></span><span><span>html</span>></span><span><!--H-ui前端框架提供前端技术支持 h-ui.net @2015-8-4 --></span></code>
로그인 후 복사

마크다운은 정말 사용하기 쉽습니다

:)

' ) .addClass('사전 번호 매기기').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

위 내용은 Think와 사용자 로그인을 포함하여 사용자 로그인 전후의 블로그 테마를 개발하기 위해 H-ui를 이용한 CoreThink 테마 개발(8)을 소개한 내용입니다. PHP 튜토리얼에 관심이 있는 친구들에게 도움이 되길 바랍니다.

관련 라벨:
원천:php.cn
본 웹사이트의 성명
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.
인기 튜토리얼
더>
최신 다운로드
더>
웹 효과
웹사이트 소스 코드
웹사이트 자료
프론트엔드 템플릿