Skip to content

Commit

Permalink
Setup default home page
Browse files Browse the repository at this point in the history
  • Loading branch information
vagrant committed Apr 11, 2018
1 parent a961a84 commit 2bb7d8d
Show file tree
Hide file tree
Showing 19 changed files with 421 additions and 18 deletions.
12 changes: 6 additions & 6 deletions public/css/app.css
Original file line number Diff line number Diff line change
Expand Up @@ -8463,31 +8463,31 @@ body {

/* Topic Index Page */

.topics-index-page .categories-show-page .topic-list .nav > li > a {
.topics-index-page .categories-show-page .root-page .topic-list .nav > li > a {
position: relative;
display: block;
padding: 5px 14px;
font-size: 0.9em;
}

.topics-index-page .categories-show-page .topic-list a {
.topics-index-page .categories-show-page .root-page .topic-list a {
color: #444444;
}

.topics-index-page .categories-show-page .topic-list .meta {
.topics-index-page .categories-show-page .root-page .topic-list .meta {
font-size: 0.9em;
color: #b3b3b3;
}

.topics-index-page .categories-show-page .topic-list .meta a {
.topics-index-page .categories-show-page .root-page .topic-list .meta a {
color: #b3b3b3;
}

.topics-index-page .categories-show-page .topic-list .badge {
.topics-index-page .categories-show-page .root-page .topic-list .badge {
background-color: #d8d8d8;
}

.topics-index-page .categories-show-page .topic-list hr {
.topics-index-page .categories-show-page .root-page .topic-list hr {
margin-top: 12px;
margin-bottom: 12px;
border: 0;
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/sass/app.scss
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ body {
}

/* Topic Index Page */
.topics-index-page .categories-show-page {
.topics-index-page .categories-show-page .root-page {
.topic-list {
.nav > li > a {
position: relative;
Expand Down
3 changes: 2 additions & 1 deletion routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
|
*/

Route::get ( '/' , 'PagesController@root' )->name ( 'root' );
Route::get ( '/' , 'TopicsController@index' )->name ( 'root' );

//Auth::routes();
// Authentication Routes...
Expand Down Expand Up @@ -47,3 +47,4 @@

Route::get ( 'permission-denied' , 'PagesController@permissionDenied' )->name ( 'permission-denied' );


2 changes: 0 additions & 2 deletions storage/app/public/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions storage/framework/cache/.gitignore

This file was deleted.

Binary file not shown.
Binary file not shown.
2 changes: 0 additions & 2 deletions storage/framework/sessions/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions storage/framework/testing/.gitignore

This file was deleted.

2 changes: 0 additions & 2 deletions storage/framework/views/.gitignore

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<div class="panel panel-default">
<div class="panel-body">
<a href="<?php echo e(route('topics.create')); ?>" class="btn btn-success btn-block" aria-label="Left Align">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> 新建帖子
</a>
</div>
</div>

<?php if(count($active_users)): ?>
<div class="panel panel-default">
<div class="panel-body active-users">

<div class="text-center">活跃用户</div>
<hr>
<?php $__currentLoopData = $active_users; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $active_user): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<a class="media" href="<?php echo e(route('users.show', $active_user->id)); ?>">
<div class="media-left media-middle">
<img src="<?php echo e($active_user->avatar); ?>" width="24px" height="24px"
class="img-circle media-object">
</div>

<div class="media-body">
<span class="media-heading"><?php echo e($active_user->name); ?></span>
</div>
</a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

</div>
</div>
<?php endif; ?>

<?php if(count($links)): ?>
<div class="panel panel-default">
<div class="panel-body active-users">

<div class="text-center">资源推荐</div>
<hr>
<?php $__currentLoopData = $links; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $link): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<a class="media" href="<?php echo e($link->link); ?>">
<div class="media-body">
<span class="media-heading"><?php echo e($link->title); ?></span>
</div>
</a>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

</div>
</div>
<?php endif; ?>
109 changes: 109 additions & 0 deletions storage/framework/views/710bcf0e3348cb9f7a5eb864aea95996ac7ad282.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
<nav class="navbar navbar-default navbar-static-top">
<div class="container">
<div class="navbar-header">

<!-- Collapsed Hamburger -->
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
data-target="#app-navbar-collapse">
<span class="sr-only">Toggle Navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>

<!-- Branding Image -->
<a class="navbar-brand" href="<?php echo e(url('/')); ?>">
LaraBBS
</a>
</div>

<div class="collapse navbar-collapse" id="app-navbar-collapse">
<!-- Left Side Of Navbar -->
<ul class="nav navbar-nav">
<li class="<?php echo e(active_class(if_route('topics.index'))); ?>"><a href="<?php echo e(route('topics.index')); ?>">话题</a>
</li>
<li class="<?php echo e(active_class((if_route('categories.show') && if_route_param('category', 1)))); ?>"><a
href="<?php echo e(route('categories.show', 1)); ?>">分享</a></li>
<li class="<?php echo e(active_class((if_route('categories.show') && if_route_param('category', 2)))); ?>"><a
href="<?php echo e(route('categories.show', 2)); ?>">教程</a></li>
<li class="<?php echo e(active_class((if_route('categories.show') && if_route_param('category', 3)))); ?>"><a
href="<?php echo e(route('categories.show', 3)); ?>">问答</a></li>
<li class="<?php echo e(active_class((if_route('categories.show') && if_route_param('category', 4)))); ?>"><a
href="<?php echo e(route('categories.show', 4)); ?>">公告</a></li>
</ul>

<!-- Right Side Of Navbar -->
<ul class="nav navbar-nav navbar-right">
<!-- Authentication Links -->
<?php if(auth()->guard()->guest()): ?>
<li><a href="<?php echo e(route('login')); ?>">登录</a></li>
<li><a href="<?php echo e(route('register')); ?>">注册</a></li>
<?php else: ?>
<li>
<a href="<?php echo e(route('topics.create')); ?>">
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
</a>
</li>

<li>
<a href="<?php echo e(route('notifications.index')); ?>" class="notifications-badge"
style="margin-top: -2px;">
<span class="badge badge-<?php echo e(Auth::user()->notification_count > 0 ? 'hint' : 'fade'); ?> "
title="消息提醒">
<?php echo e(Auth::user()->notification_count); ?>

</span>
</a>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">
<span class="user-avatar pull-left" style="margin-right:8px; margin-top:-5px;">
<img src="<?php echo e(Auth::user()->avatar); ?>" class="img-responsive img-circle" width="30px"
height="30px">
</span>
<?php echo e(Auth::user()->name); ?> <span class="caret"></span>
</a>

<ul class="dropdown-menu" role="menu">
<?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('manage_contents')): ?>
<li>
<a href="<?php echo e(url(config('administrator.uri'))); ?>">
<span class="glyphicon glyphicon-dashboard" aria-hidden="true"></span>
管理后台
</a>
</li>
<?php endif; ?>

<li>
<a href="<?php echo e(route('users.show', Auth::id())); ?>">
<span class="glyphicon glyphicon-user" aria-hidden="true"></span>
个人中心
</a>
</li>
<li>
<a href="<?php echo e(route('users.edit', Auth::id())); ?>">
<span class="glyphicon glyphicon-edit" aria-hidden="true"></span>
编辑资料
</a>
</li>
<li>
<a href="<?php echo e(route('logout')); ?>"
onclick="event.preventDefault();
document.getElementById('logout-form').submit();">
<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span>
退出登录
</a>

<form id="logout-form" action="<?php echo e(route('logout')); ?>" method="POST"
style="display: none;">
<?php echo e(csrf_field()); ?>

</form>
</li>
</ul>
</li>
<?php endif; ?>
</ul>
</div>
</div>
</nav>
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<footer class="footer">
<div class="container">
<p class="pull-left">
由 <a href="http://weibo.com/u/1837553744?is_hot=1" target="_blank">Cui</a> 设计和编码 <span
style="color: #e27575;font-size: 14px;">❤</span>
</p>

<p class="pull-right"><a href="mailto:<?php echo e(setting('contact_email')); ?>">联系我们</a></p>
</div>
</footer>
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?php $__env->startSection('title', isset($category) ? $category->name : '话题列表'); ?>

<?php $__env->startSection('content'); ?>

<div class="row">
<div class="col-lg-9 col-md-9 topic-list">
<?php if(isset($category)): ?>
<div class="alert alert-info" role="alert">
<?php echo e($category->name); ?><?php echo e($category->description); ?>

</div>
<?php endif; ?>

<div class="panel panel-default">

<div class="panel-heading">
<ul class="nav nav-pills">
<li class="<?php echo e(active_class( ! if_query('order', 'recent') )); ?>"><a href="<?php echo e(Request::url()); ?>?order=default">最后回复</a></li>
<li class="<?php echo e(active_class(if_query('order', 'recent'))); ?>"><a href="<?php echo e(Request::url()); ?>?order=recent">最新发布</a></li>
</ul>
</div>

<div class="panel-body">

<?php echo $__env->make('topics._topic_list', ['topics' => $topics], array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<?php echo $topics->render(); ?>

</div>
</div>
</div>

<div class="col-lg-3 col-md-3 sidebar panel panel-default panel-heading">
<?php echo $__env->make('topics._sidebar', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>
</div>

<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="<?php echo e(app()->getLocale()); ?>">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<!-- CSRF Token -->
<meta name="csrf-token" content="<?php echo e(csrf_token()); ?>">

<title><?php echo $__env->yieldContent('title', 'LaraBBS'); ?> - <?php echo e(setting('site_name', 'Laravel 进阶教程')); ?></title>
<meta name="description" content="<?php echo $__env->yieldContent('description', setting('seo_description', 'LaraBBS 爱好者社区。')); ?>"/>
<meta name="keyword" content="<?php echo $__env->yieldContent('keyword', setting('seo_keyword', 'LaraBBS,社区,论坛,开发者论坛')); ?>"/>

<!-- Styles -->
<link href="<?php echo e(asset('css/app.css')); ?>" rel="stylesheet">
<?php echo $__env->yieldContent('styles'); ?>
</head>

<body>
<div id="app" class="<?php echo e(route_class()); ?>-page">

<?php echo $__env->make('layouts._header', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>

<div class="container">

<?php echo $__env->make('layouts._message', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php echo $__env->yieldContent('content'); ?>

</div>

<?php echo $__env->make('layouts._footer', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
</div>

<?php if(app()->isLocal()): ?>
<?php echo $__env->make('sudosu::user-selector', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<?php endif; ?>
<!-- Scripts -->
<script src="<?php echo e(asset('js/app.js')); ?>"></script>
<?php echo $__env->yieldContent('scripts'); ?>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php if($paginator->hasPages()): ?>
<ul class="pagination">

<?php if($paginator->onFirstPage()): ?>
<li class="disabled"><span>&laquo;</span></li>
<?php else: ?>
<li><a href="<?php echo e($paginator->previousPageUrl()); ?>" rel="prev">&laquo;</a></li>
<?php endif; ?>


<?php $__currentLoopData = $elements; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $element): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>

<?php if(is_string($element)): ?>
<li class="disabled"><span><?php echo e($element); ?></span></li>
<?php endif; ?>


<?php if(is_array($element)): ?>
<?php $__currentLoopData = $element; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page => $url): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
<?php if($page == $paginator->currentPage()): ?>
<li class="active"><span><?php echo e($page); ?></span></li>
<?php else: ?>
<li><a href="<?php echo e($url); ?>"><?php echo e($page); ?></a></li>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
<?php endif; ?>
<?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>


<?php if($paginator->hasMorePages()): ?>
<li><a href="<?php echo e($paginator->nextPageUrl()); ?>" rel="next">&raquo;</a></li>
<?php else: ?>
<li class="disabled"><span>&raquo;</span></li>
<?php endif; ?>
</ul>
<?php endif; ?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?php if(Session::has('message')): ?>
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo e(Session::get('message')); ?>

</div>
<?php endif; ?>

<?php if(Session::has('success')): ?>
<div class="alert alert-success">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo e(Session::get('success')); ?>

</div>
<?php endif; ?>

<?php if(Session::has('danger')): ?>
<div class="alert alert-danger">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
<?php echo e(Session::get('danger')); ?>

</div>
<?php endif; ?>
Loading

0 comments on commit 2bb7d8d

Please sign in to comment.