CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后

WBOY
Freigeben: 2016-07-29 08:50:45
Original
1329 Leute haben es durchsucht

感谢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>
Nach dem Login kopieren

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>
Nach dem Login kopieren

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教程有兴趣的朋友有所帮助。

Verwandte Etiketten:
Quelle:php.cn
Erklärung dieser Website
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage