public.blade.php 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge" />
  6. <meta name="viewport" content="width=device-width, initial-scale=1" />
  7. <meta name="csrf-token" content="{{ csrf_token() }}" />
  8. <title>@yield('seo_title',Setting()->get('website_name'))</title>
  9. <meta name="keywords" content="@yield('seo_keyword',parse_seo_template('seo_index_keyword','default'))" />
  10. <meta name="description" content="@yield('seo_description',parse_seo_template('seo_index_description','default'))" />
  11. <meta name="author" content="Tipask Team" />
  12. <meta name="copyright" content="2018 tipask.com" />
  13. {!! Setting()->get('website_header') !!}
  14. <!-- Bootstrap -->
  15. <link href="{{ asset('/static/css/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" />
  16. <link href="{{ asset('/static/css/font-awesome/css/font-awesome.min.css') }}" rel="stylesheet" />
  17. <link href="{{ asset('/css/default/global.css')}}?v={{ config('tipask.release') }}" rel="stylesheet" />
  18. <link href="{{ asset('/css/default/skins/'.config('tipask.skin').'.css')}}?v={{ config('tipask.release') }}" rel="stylesheet" />
  19. @yield('css')
  20. <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
  21. <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
  22. <!--[if lt IE 9]>
  23. <script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
  24. <script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
  25. <![endif]-->
  26. </head>
  27. <body>
  28. <div class="global-nav mb-50">
  29. <nav class="navbar navbar-inverse navbar-fixed-top">
  30. <div class="container nav">
  31. <div class="visible-xs header-response">
  32. <a href="{{ route('auth.search.show') }}" style="display:block"><i class="fa fa-search" aria-hidden="true"></i></a>
  33. <div class="m-header-logo m-header-logo-response"><h1><a href="/" style="height:34px; background-size: auto 44px;"></a></h1></div>
  34. @if(Auth()->check())
  35. <a href="{{ route('auth.space.index',['user_id'=>Auth()->user()->id]) }}" class="pull-right login-btn"><i class="fa fa-user" aria-hidden="true"></i></a>
  36. @else
  37. <a href="{{ route('auth.user.login') }}" class="pull-right login-btn"><i class="fa fa-user" aria-hidden="true"></i></a>
  38. @endif
  39. <div class="bottom-nav">
  40. <div class="opts">
  41. <a class="opts-group @if(request()->route()->getName() == 'auth.doing.index') active @endif" href="{{ route('auth.doing.index') }}"><i class="fa fa-paper-plane" aria-hidden="true"></i><span>发现</span></a>
  42. <a class="opts-group @if(request()->route()->getName() == 'website.ask') active @endif" href="{{ route('website.ask') }}"><i class="fa fa-question-circle" aria-hidden="true"></i><span>问答</span></a>
  43. <div class="opts-group">
  44. <div class="btn-group dropup">
  45. <i class="fa fa-plus dropdown hoverDropdown" data-toggle="dropdown" aria-hidden="true" aria-expanded="false"><span>发起</span></i>
  46. <ul class="dropdown-menu">
  47. <li><a href="{{ route('ask.question.create') }}">提问</a></li>
  48. <li><a href="{{ route('blog.article.create') }}">文章</a></li>
  49. </ul>
  50. </div>
  51. </div>
  52. <a class="opts-group @if(request()->route()->getName() == 'website.blog') active @endif" href="{{ route('website.blog') }}"><i class="fa fa-newspaper-o" aria-hidden="true"></i><span>文章</span></a>
  53. <div class="opts-group">
  54. <div class="btn-group dropup">
  55. <i class="fa fa-bars dropdown hoverDropdown" data-toggle="dropdown" aria-hidden="true" aria-expanded="false"><span>更多</span></i>
  56. <ul class="dropdown-menu">
  57. <li><a href="{{ route('website.experts') }}">专家</a></li>
  58. <li><a href="{{ route('website.topic') }}">话题</a></li>
  59. <li><a href="{{ route('auth.top.coins') }}">财富榜</a></li>
  60. <li><a href="{{ route('website.shop') }}">商城</a></li>
  61. @if(Auth()->check())
  62. <li><a href="{{ route('auth.user.logout') }}">退出</a></li>
  63. @endif
  64. </ul>
  65. </div>
  66. </div>
  67. </div>
  68. </div>
  69. </div>
  70. <div class="row hidden-xs">
  71. <div class="col-sm-8 col-md-9 col-lg-9">
  72. <div class="navbar-header">
  73. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#global-navbar">
  74. <span class="sr-only">Toggle navigation</span>
  75. <span class="icon-bar"></span>
  76. <span class="icon-bar"></span>
  77. <span class="icon-bar"></span>
  78. </button>
  79. <div class="logo"><a class="navbar-brand logo" href="{{ route('website.index') }}"></a></div>
  80. </div>
  81. <div class="collapse navbar-collapse" id="global-navbar">
  82. <ul class="nav navbar-nav">
  83. <li @if(request()->route()->getName() == 'website.index') class="active" @endif><a href="{{ route('website.index') }}">首页 <span class="sr-only">(current)</span></a></li>
  84. @if(Auth()->check())
  85. <li @if(request()->route()->getName() == 'auth.doing.index') class="active" @endif><a href="{{ route('auth.doing.index') }}">发现</a></li>
  86. @endif
  87. <li @if(request()->route()->getName() == 'website.ask') class="active" @endif><a href="{{ route('website.ask') }}">问答</a></li>
  88. <li @if(request()->route()->getName() == 'website.blog') class="active" @endif><a href="{{ route('website.blog') }}">文章</a></li>
  89. <li @if(request()->route()->getName() == 'website.topic') class="active" @endif><a href="{{ route('website.topic') }}">话题</a></li>
  90. {{-- <li @if(request()->route()->getName() == 'website.shop') class="active" @endif><a href="{{ route('website.shop') }}">商城</a></li>--}}
  91. </ul>
  92. <form role="search" id="top-search-form" action="{{ route('auth.search.index') }}" method="GET" class="navbar-form hidden-sm hidden-xs pull-right">
  93. <span class="btn btn-link"><span class="sr-only">搜索</span><span class="glyphicon glyphicon-search"></span></span>
  94. <input type="text" name="word" id="searchBox" class="form-control" placeholder="{{ Setting()->get('search_placeholder','') }}" />
  95. </form>
  96. </div>
  97. </div>
  98. <div class="col-sm-4 col-md-3 col-lg-3 text-right">
  99. @if ( Auth()->guest() )
  100. <ul class="nav navbar-nav navbar-right">
  101. <li><a href="{{ route('auth.user.login') }}">登录</a></li>
  102. {{-- <li><a href="{{ route('auth.user.register') }}">注册</a></li>--}}
  103. </ul>
  104. @else
  105. <ul class="nav navbar-nav user-menu navbar-right">
  106. <li><a href="{{ route('auth.notification.index') }}" class="active" id="unread_notifications"><span class="fa fa-bell-o fa-lg"></span></a></li>
  107. <li><a href="{{ route('auth.message.index') }}" class="active" id="unread_messages"><i class="fa fa-envelope-o fa-lg"></i></a></li>
  108. <li class="dropdown user-avatar">
  109. <a href="{{ route('auth.profile.base') }}" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
  110. <img class="avatar-32 mr-5" alt="{{ Auth()->user()->name }}" src="{{ Auth()->user()->qrcode }}" id="top_img">
  111. <span>{{ Auth()->user()->name }}</span>
  112. </a>
  113. <ul class="dropdown-menu" role="menu">
  114. @can('admin.login')
  115. <li><a href="{{ route('admin.index.index') }}">系统设置</a></li>
  116. <li class="divider"></li>
  117. @endif
  118. <li><a href="{{ route('auth.space.index',['user_id'=>Auth()->user()->id]) }}">我的主页</a></li>
  119. @if(config('pay.open'))
  120. <li><a href="{{ route('auth.profile.charge') }}">金币管理</a></li>
  121. @endif
  122. <li><a href="{{ route('auth.notification.index') }}">我的私信</a></li>
  123. <li><a href="{{ route('auth.profile.base') }}">账号设置</a></li>
  124. <li><a href="{{ route('auth.draft.index') }}">草稿箱</a></li>
  125. <li class="divider"></li>
  126. <li><a href="{{ route('auth.user.logout') }}">退出</a></li>
  127. </ul>
  128. </li>
  129. </ul>
  130. @endif
  131. </div>
  132. </div>
  133. </div>
  134. </nav>
  135. </div>
  136. <div class="top-alert mt-60 clearfix text-center">
  137. <!--[if lt IE 9]>
  138. <div class="alert alert-danger topframe" role="alert">你的浏览器实在<strong>太太太太太太旧了</strong>,放学别走,升级完浏览器再说
  139. <a target="_blank" class="alert-link" href="http://browsehappy.com">立即升级</a>
  140. </div>
  141. <![endif]-->
  142. @if ( session('message') )
  143. <div class="alert @if(session('message_type')===1) alert-danger @else alert-success @endif alert-dismissible" role="alert" id="alert_message">
  144. <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  145. {{ session('message') }}
  146. </div>
  147. @endif
  148. @if(Auth()->check() && Auth()->user()->status === 0)
  149. @if(Auth()->user()->created_at->diffInMinutes() < 5)
  150. {{-- <div class="alert alert-success" role="alert">--}}
  151. {{-- 一封注册验证邮件已经发到您的邮箱 {{ Auth()->user()->email }} ,请前往邮箱完成注册.<a href="javascript:void(0);" class="send-mail btn btn-default btn-xs ml-5" onclick="$('#email_validate').modal('show');">遇到问题 <i class="fa fa-question"></i></a>--}}
  152. {{-- <button type="button" class="close"></button>--}}
  153. {{-- </div>--}}
  154. @else
  155. {{-- <div class="alert alert-warning topframe" role="alert">--}}
  156. {{-- 你的邮箱 {{ Auth()->user()->email }} 尚未验证,部分功能将无法使用 <a href="javascript:void(0);" class="send-mail btn btn-default btn-xs ml-5" onclick="$('#email_validate').modal('show');">遇到问题 <i class="fa fa-question"></i></a>--}}
  157. {{-- <button type="button" class="close"></button>--}}
  158. {{-- </div>--}}
  159. @endif
  160. @endif
  161. </div>
  162. <div class="wrap">
  163. @yield('jumbotron')
  164. @yield('container')
  165. <div class="container">
  166. @yield('content')
  167. </div>
  168. </div>
  169. <footer id="footer">
  170. <div class="container">
  171. @if(request()->route()->getName() == 'website.index')
  172. <ul class="list-unstyled list-inline">
  173. <li>友情链接</li>
  174. @foreach($friendshipLinks as $link)
  175. <li><a target="_blank" href="{{ $link->url }}" title="{{ $link->slogan }}">{{ $link->name }}</a></li>
  176. @endforeach
  177. </ul>
  178. @endif
  179. {{-- <div class="text-center">--}}
  180. {{-- <a href="{{ route('website.index') }}">{{ Setting()->get('website_name') }}</a><span class="span-line">|</span>--}}
  181. {{-- <a href="mailto:{{ Setting()->get('website_admin_email') }}" target="_blank">联系我们</a><span class="span-line">|</span>--}}
  182. {{-- @if( Setting()->get('website_icp') )--}}
  183. {{-- <a href="http://www.miibeian.gov.cn" target="_blank">{{ Setting()->get('website_icp') }}</a><span class="span-line">|</span>--}}
  184. {{-- @endif--}}
  185. {{-- <a href="{{ route('website.sitemap') }}">sitemap</a>--}}
  186. {{-- </div>--}}
  187. {{-- <div class="copyright mt-10">--}}
  188. {{-- Powered By <a href="http://www.tipask.com" target="_blank">{{ Config('tipask.version') }}</a> Release {{ config('tipask.release') }} ©2009-{{ gmdate('Y') }} tipask.com--}}
  189. {{-- </div>--}}
  190. </div>
  191. </footer>
  192. @if(Auth()->check() && Auth()->user()->status===0)
  193. <div id="email_validate" class="modal in" tabindex="-1" role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="false">
  194. <div class="modal-dialog">
  195. <div class="modal-content ">
  196. <div class="modal-header">
  197. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
  198. <h4 class="modal-title">请激活邮箱</h4>
  199. </div>
  200. <div class="modal-body clearfix">
  201. <div class="alert alert-warning">
  202. 为了正常使用提问、回答、撰写文章等功能,请验证你的邮箱、激活账号
  203. </div>
  204. <div class="mt-30 mb-30">
  205. <span class="text-muted activate-label pull-left">你的注册邮箱:</span>
  206. <span>
  207. <strong class="h4 session-mail">{{ Auth()->user()->email }}</strong>
  208. <a href="{{ route('auth.profile.email') }}" class="ml-10">修改</a>
  209. </span>
  210. </div>
  211. <p class="text-muted">
  212. 如果你没收到激活邮件,请注意检查垃圾箱,或者
  213. <a href="javascript:void(0);" class="send-email-token">重新发送激活邮件</a>
  214. </p>
  215. <div class="send-email-tips" style="display: none">
  216. <div class="alert alert-success">一封验证邮件已经发送至 <strong>{{ Auth()->user()->email }}</strong>,请登录邮箱根据提示完成操作</div>
  217. </div>
  218. </div>
  219. </div>
  220. </div>
  221. </div>
  222. @endif
  223. <div class="modal fade" id="sendTo_message_model" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel">
  224. <div class="modal-dialog" role="document">
  225. <div class="modal-content">
  226. <div class="modal-header">
  227. <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
  228. <h4 class="modal-title" id="exampleModalLabel">发送私信</h4>
  229. </div>
  230. <div class="modal-body">
  231. <form name="messageForm" id="sendTo_message_form">
  232. <input type="hidden" name="_token" value="{{ csrf_token() }}">
  233. <input type="hidden" id="to_user_id" name="to_user_id" value="0" />
  234. <div class="form-group">
  235. <label for="to_user_name" class="control-label">发给:</label>
  236. <span id="to_user_name"></span>
  237. </div>
  238. <div class="form-group">
  239. <label for="message-text" class="control-label">内容:</label>
  240. <textarea class="form-control" id="message-text" name="content"></textarea>
  241. </div>
  242. </form>
  243. </div>
  244. <div class="modal-footer">
  245. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  246. <button type="button" class="btn btn-primary" id="sendTo_submit">发送</button>
  247. </div>
  248. </div>
  249. </div>
  250. </div>
  251. <!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
  252. <script src="{{ asset('/static/js/jquery.min.js') }}"></script>
  253. <!-- Include all compiled plugins (below), or include individual files as needed -->
  254. <script src="{{ asset('/static/css/bootstrap/js/bootstrap.min.js') }}"></script>
  255. <script type="text/javascript">
  256. var is_login = Boolean("{{ Auth()->check() }}");
  257. </script>
  258. <script src="{{ asset('js/global.js') }}?v={{ config('tipask.release') }}"></script>
  259. @yield('script')
  260. {!! Setting()->get('website_footer') !!}
  261. </body>
  262. </html>