当前位置:Gxlcms > PHP教程 > CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后

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

时间:2021-07-01 10:21:17 帮助过:24人阅读

感谢H-ui、感谢CoreThink!

效果图:
CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后
登录之后
CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后
登录窗体
CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后
想做登录之后的下拉菜单的,实在做不出来了,就一般显示了。。。
整个面包屑导航这里,先遍历模块,并且是允许前台显示的模块,之后就是判断用户是否已经登录,已经登录了,就显示个人中心,否则就显示登录和注册按钮。
代码:

<navclass="breadcrumb"><divclass="container"><spanclass="c-gray en"><iclass="Hui-iconfont">i><ahref="#">您好,欢迎来到 {:C('WEB_SITE_TITLE')} !a><opencmf:nav_listname="vo"pid="0"><atarget="{$vo.target}"href="{$vo.href}"><span> {$vo.title}span>a>opencmf:nav_list>span><presentname="_user_auth"><ahref="#" ><imgclass="round"src="{$_user_auth.avatar|get_cover='avatar'}"height="30px"width="30px"alt="{$_user_auth.nickname}" /><span>{$_user_auth.nickname}
                           <span>
                               {$_new_message}
                           span>span><spanclass="caret">span>a><ahref="{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"><spanclass="label label-secondary radius">个人主页span>a><volistname="_user_nav_main"id="vo_nav"><ahref="{:U($vo_nav['url'], null, true, true)}"class="{$vo_nav.class}"><spanclass="label label-secondary radius">
                            {$vo_nav.title}span>a>volist><ahref="{:U('User/User/logout', null, true, true)}"class="ajax-get"><spanclass="label label-danger radius">注销登录span>a><else/><aclass="btn btn-success-outline radius"data-toggle="modal"href="#register-modal">注册a><aclass="btn btn-danger-outline radius"data-toggle="modal"href="#login-modal">登录a>present>div>nav>

Blog/Home/Public/layout.html

<html><head><metacharset="utf-8"><metaname="renderer"content="webkit|ie-comp|ie-stand"><metahttp-equiv="X-UA-Compatible"content="IE=edge"><metaname="viewport"content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/><metahttp-equiv="Cache-Control"content="no-siteapp"/><linkrel="stylesheet"type="text/css"href="__HOME_CSS__/H-ui.min.css"/><linkrel="stylesheet"type="text/css"href="__HOME_LIBS__/Hui-iconfont/1.0.7/iconfont.css"/><linkrel="stylesheet"type="text/css"href="__HOME_LIBS__/icheck/icheck.css"/><linkrel="stylesheet"type="text/css"href="__HOME_CSS__/style.css"/><blockname="title"><title>{:C('WEB_SITE_TITLE')}title>block><metaname="keywords"content="关键词,5个左右,单个8汉字以内"><metaname="description"content="网站描述,字数尽量空制在80个汉字,160个字符以内!">head><body><divclass="clearfix hook hook-page-header">
    {:hook('PageHeader')} div><headerclass="navbar-wrapper"><divclass="navbar navbar-black navbar-fixed-top"><divclass="container cl"><aclass="logo navbar-logo hidden-xs"href="/aboutHui.shtml">{:C('WEB_SITE_TITLE')}a><aclass="logo navbar-logo-m visible-xs"href="/aboutHui.shtml">H-uia><spanclass="logo navbar-slogan hidden-xs">{:C('WEB_SITE_SLOGAN')}span><aaria-hidden="false"class="nav-toggle Hui-iconfont visible-xs"href="javascript:;">a><navclass="nav navbar-nav nav-collapse"role="navigation"id="Hui-navbar"><ulclass="cl"><li><ahref="{:C('HOME_PAGE')}">首页a>li><cms:category_listname="vo"pid="0"group="1"><php>if($vo['_child']):php><liclass="dropDown dropDown_hover"><ahref="{$vo.href}"class="dropDown_A"data-toggle="dropdown"role="button">
                                {$vo.title} <spanclass="caret">span>a><ulclass="dropDown-menu menu radius box-shadow"><volistname="vo._child"id="vo1"><li><ahref="{$vo1.href}">{$vo1.title}a>li>volist>ul>li><php>else:php><li><ahref="{$vo.href}"><span> {$vo.title}span>a>li><php>endif;php>cms:category_list>ul>nav><navclass="navbar-userbar hidden-xs">nav>div>div>header><navclass="breadcrumb"><divclass="container"><spanclass="c-gray en"><iclass="Hui-iconfont">i><ahref="#">您好,欢迎来到 {:C('WEB_SITE_TITLE')} !a><opencmf:nav_listname="vo"pid="0"><atarget="{$vo.target}"href="{$vo.href}"><span> {$vo.title}span>a>opencmf:nav_list>span><presentname="_user_auth"><ahref="#" ><imgclass="round"src="{$_user_auth.avatar|get_cover='avatar'}"height="30px"width="30px"alt="{$_user_auth.nickname}" /><span>{$_user_auth.nickname}
                           <span>
                               {$_new_message}
                           span>span><spanclass="caret">span>a><ahref="{:U('User/Index/home', array('uid' => $_user_auth['uid']), true, true)}"><spanclass="label label-secondary radius">个人主页span>a><volistname="_user_nav_main"id="vo_nav"><ahref="{:U($vo_nav['url'], null, true, true)}"class="{$vo_nav.class}"><spanclass="label label-secondary radius">
                            {$vo_nav.title}span>a>volist><ahref="{:U('User/User/logout', null, true, true)}"class="ajax-get"><spanclass="label label-danger radius">注销登录span>a><else/><aclass="btn btn-success-outline radius"data-toggle="modal"href="#register-modal">注册a><aclass="btn btn-danger-outline radius"data-toggle="modal"href="#login-modal">登录a>present>div>nav><blockname="main">block><footerclass="footer mt-20"><divclass="container"><p>{:C('WEB_SITE_COPYRIGHT')} <br><arel="nofollow"target="_blank"href="http://www.miitbeian.gov.cn/">
                {:C('WEB_SITE_ICP')}
            a>p>div>footer><scripttype="text/javascript"src="__HOME_LIBS__/jquery/1.9.1/jquery.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/layer/2.1/layer.js">script><scripttype="text/javascript"src="__HOME_LIBS__/laypage/1.2/laypage.js">script><scripttype="text/javascript"src="__HOME_LIBS__/My97DatePicker/WdatePicker.js">script><scripttype="text/javascript"src="__HOME_LIBS__/icheck/jquery.icheck.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-Switch/bootstrapSwitch.js">script><scripttype="text/javascript"src="__HOME_LIBS__/Validform/5.3.2/Validform.min.js">script><scripttype="text/javascript"src="__HOME_LIBS__/Validform/5.3.2/passwordStrength-min.js">script><scripttype="text/javascript"src="__HOME_JS__/H-ui.js">script><script>var navigation = responsiveNav("Hui-navbar", {customToggle: ".nav-toggle"});

    $(function() {
        $('.skin-minimal input').iCheck({
            checkboxClass: 'icheckbox-blue',
            radioClass: 'iradio-blue',
            increaseArea: '20%'
        });
        $("#demoform").Validform({
            tiptype: 2
        });
    });
script>block><divclass="clearfix hook hook-page-footer">
    {:hook('PageFooter')} div><includefile="$_user_login_modal"/><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modalmanager.js">script><scripttype="text/javascript"src="__HOME_LIBS__/bootstrap-modal/2.2.4/bootstrap-modal.js">script><blockname="script">block>body>html>

markdown 确实很好用

:)

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

    以上就介绍了CoreThink主题开发(八)使用H-ui开发博客主题之用户登录之前及登录之后,包括了think,用户登录方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

  • 人气教程排行