CoreThink主題開發(八)使用H-ui開發部落格主題之使用者登入之前及登入之後

WBOY
發布: 2016-07-29 08:50:45
原創
1331 人瀏覽過

感謝H-ui、感謝CoreThink!

效果圖:
CoreThink主題開發(八)使用H-ui開發部落格主題之使用者登入之前及登入之後
登入之後
CoreThink主題開發(八)使用H-ui開發部落格主題之使用者登入之前及登入之後
登入窗體
CoreThink主題開發(八)使用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>
登入後複製

markdown 確實很好用

:)

').addClass('pre-numbering').hide(); $(this).addClass('has-numbering').parent().append($numbering); for (i = 1; i ').text(i)); }; $numbering.fadeIn(1700); }); });

以上就介紹了CoreThink主題開發(八)使用H-ui開發博客主題之用戶登入之前及登入之後,包括了think,用戶登入方面的內容,希望對PHP教程有興趣的朋友有所幫助。

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板