Updated styles for auth and books views.

Also added sourcemaps to gulp sass build
This commit is contained in:
Dan Brown 2017-08-26 13:24:55 +01:00
parent 3da8c01c1f
commit 8fcbe44d3e
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
24 changed files with 291 additions and 229 deletions

View File

@ -39,8 +39,14 @@ class BookController extends Controller
$books = $this->entityRepo->getAllPaginated('book', 20); $books = $this->entityRepo->getAllPaginated('book', 20);
$recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false; $recents = $this->signedIn ? $this->entityRepo->getRecentlyViewed('book', 4, 0) : false;
$popular = $this->entityRepo->getPopular('book', 4, 0); $popular = $this->entityRepo->getPopular('book', 4, 0);
$new = $this->entityRepo->getRecentlyCreated('book', 4, 0);
$this->setPageTitle('Books'); $this->setPageTitle('Books');
return view('books/index', ['books' => $books, 'recents' => $recents, 'popular' => $popular]); return view('books/index', [
'books' => $books,
'recents' => $recents,
'popular' => $popular,
'new' => $new
]);
} }
/** /**

View File

@ -3,16 +3,20 @@
const argv = require('yargs').argv; const argv = require('yargs').argv;
const gulp = require('gulp'), const gulp = require('gulp'),
plumber = require('gulp-plumber'); plumber = require('gulp-plumber');
const autoprefixer = require('gulp-autoprefixer'); const autoprefixer = require('gulp-autoprefixer');
const uglify = require('gulp-uglify');
const minifycss = require('gulp-clean-css'); const minifycss = require('gulp-clean-css');
const sass = require('gulp-sass'); const sass = require('gulp-sass');
const sourcemaps = require('gulp-sourcemaps');
const browserify = require("browserify"); const browserify = require("browserify");
const source = require('vinyl-source-stream'); const source = require('vinyl-source-stream');
const buffer = require('vinyl-buffer'); const buffer = require('vinyl-buffer');
const babelify = require("babelify"); const babelify = require("babelify");
const watchify = require("watchify"); const watchify = require("watchify");
const envify = require("envify"); const envify = require("envify");
const uglify = require('gulp-uglify');
const gutil = require("gulp-util"); const gutil = require("gulp-util");
const liveReload = require('gulp-livereload'); const liveReload = require('gulp-livereload');
@ -21,6 +25,7 @@ let isProduction = argv.production || process.env.NODE_ENV === 'production';
gulp.task('styles', () => { gulp.task('styles', () => {
let chain = gulp.src(['resources/assets/sass/**/*.scss']) let chain = gulp.src(['resources/assets/sass/**/*.scss'])
.pipe(sourcemaps.init())
.pipe(plumber({ .pipe(plumber({
errorHandler: function (error) { errorHandler: function (error) {
console.log(error.message); console.log(error.message);
@ -29,6 +34,7 @@ gulp.task('styles', () => {
.pipe(sass()) .pipe(sass())
.pipe(autoprefixer('last 2 versions')); .pipe(autoprefixer('last 2 versions'));
if (isProduction) chain = chain.pipe(minifycss()); if (isProduction) chain = chain.pipe(minifycss());
chain = chain.pipe(sourcemaps.write());
return chain.pipe(gulp.dest('public/css/')).pipe(liveReload()); return chain.pipe(gulp.dest('public/css/')).pipe(liveReload());
}); });

View File

@ -36,6 +36,7 @@
"clipboard": "^1.7.1", "clipboard": "^1.7.1",
"codemirror": "^5.26.0", "codemirror": "^5.26.0",
"dropzone": "^4.0.1", "dropzone": "^4.0.1",
"gulp-sourcemaps": "^2.6.1",
"gulp-util": "^3.0.8", "gulp-util": "^3.0.8",
"markdown-it": "^8.3.1", "markdown-it": "^8.3.1",
"markdown-it-task-lists": "^2.0.0", "markdown-it-task-lists": "^2.0.0",

View File

@ -195,7 +195,13 @@
font-weight: 400; font-weight: 400;
text-transform: uppercase; text-transform: uppercase;
} }
.body { .body, p.empty-text {
padding: $-m; padding: $-m;
} }
} }
.well {
background-color: #F8F8F8;
padding: $-m;
border: 1px solid #DDD;
}

View File

@ -2,9 +2,10 @@
@mixin generate-button-colors($textColor, $backgroundColor) { @mixin generate-button-colors($textColor, $backgroundColor) {
background-color: $backgroundColor; background-color: $backgroundColor;
color: $textColor; color: $textColor;
text-transform: uppercase;
&:hover { &:hover {
background-color: lighten($backgroundColor, 8%); background-color: lighten($backgroundColor, 8%);
box-shadow: $bs-med; //box-shadow: $bs-med;
text-decoration: none; text-decoration: none;
color: $textColor; color: $textColor;
} }
@ -26,16 +27,16 @@ $button-border-radius: 2px;
text-decoration: none; text-decoration: none;
font-size: $fs-m; font-size: $fs-m;
line-height: 1.4em; line-height: 1.4em;
padding: $-xs $-m; padding: $-xs*1.3 $-m;
margin: $-xs $-xs $-xs 0; margin: $-xs $-xs $-xs 0;
display: inline-block; display: inline-block;
border: none; border: none;
font-weight: 500; font-weight: 400;
outline: 0; outline: 0;
border-radius: $button-border-radius; border-radius: $button-border-radius;
cursor: pointer; cursor: pointer;
transition: all ease-in-out 120ms; transition: all ease-in-out 120ms;
box-shadow: 0 0.5px 1.5px 0 rgba(0, 0, 0, 0.21); box-shadow: 0;
@include generate-button-colors(#EEE, $primary); @include generate-button-colors(#EEE, $primary);
} }
@ -51,13 +52,39 @@ $button-border-radius: 2px;
@include generate-button-colors(#EEE, $secondary); @include generate-button-colors(#EEE, $secondary);
} }
&.muted { &.muted {
@include generate-button-colors(#EEE, #888); @include generate-button-colors(#EEE, #AAA);
} }
&.muted-light { &.muted-light {
@include generate-button-colors(#666, #e4e4e4); @include generate-button-colors(#666, #e4e4e4);
} }
} }
.button.outline {
background-color: transparent;
color: #888;
border: 1px solid #DDD;
&:hover, &:focus, &:active {
box-shadow: none;
background-color: #EEE;
}
&.page {
border-color: $color-page;
color: $color-page;
&:hover, &:focus, &:active {
background-color: $color-page;
color: #FFF;
}
}
&.chapter {
border-color: $color-chapter;
color: $color-chapter;
&:hover, &:focus, &:active {
background-color: $color-chapter;
color: #FFF;
}
}
}
.text-button { .text-button {
@extend .link; @extend .link;
background-color: transparent; background-color: transparent;

View File

@ -2,14 +2,13 @@
.input-base { .input-base {
background-color: #FFF; background-color: #FFF;
border-radius: 3px; border-radius: 3px;
border: 1px solid #CCC; border: 1px solid #D4D4D4;
display: inline-block; display: inline-block;
font-size: $fs-s; font-size: $fs-s;
padding: $-xs; padding: $-xs*1.5;
color: #222; color: #666;
width: 250px; width: 250px;
max-width: 100%; max-width: 100%;
//-webkit-appearance:none;
&.neg, &.invalid { &.neg, &.invalid {
border: 1px solid $negative; border: 1px solid $negative;
} }
@ -84,8 +83,9 @@ label {
display: block; display: block;
line-height: 1.4em; line-height: 1.4em;
font-size: 0.94em; font-size: 0.94em;
font-weight: 500; font-weight: 400;
color: #666; color: #999;
text-transform: uppercase;
padding-bottom: 2px; padding-bottom: 2px;
margin-bottom: 0.2em; margin-bottom: 0.2em;
&.inline { &.inline {
@ -186,28 +186,15 @@ input:checked + .toggle-switch {
} }
.inline-input-style { .inline-input-style {
border: 2px dotted #BBB;
display: block; display: block;
width: 100%; width: 100%;
padding: $-xs $-s; padding: $-s;
}
.title-input .input {
width: 100%;
}
.title-input label, .description-input label{
margin-top: $-m;
color: #666;
} }
.title-input input[type="text"] { .title-input input[type="text"] {
@extend h1;
@extend .inline-input-style; @extend .inline-input-style;
margin-top: 0; margin-top: 0;
padding-right: 0; font-size: 2em;
width: 100%;
color: #444;
} }
.title-input.page-title { .title-input.page-title {

View File

@ -9,6 +9,9 @@ html {
&.flexbox { &.flexbox {
overflow-y: hidden; overflow-y: hidden;
} }
&.shaded {
background-color: #F2F2F2;
}
} }
body { body {

View File

@ -239,6 +239,9 @@
.left + .right { .left + .right {
margin-left: 30px + $-s; margin-left: 30px + $-s;
} }
&:last-of-type {
border-bottom: 0;
}
} }
ul.pagination { ul.pagination {
@ -291,9 +294,6 @@ ul.pagination {
h4 { h4 {
margin: 0; margin: 0;
} }
p {
margin: $-xs 0 0 0;
}
hr { hr {
margin: 0; margin: 0;
} }
@ -310,7 +310,7 @@ ul.pagination {
} }
} }
.card .entity-list-item { .card .entity-list-item, .card .activity-list-item {
padding-left: $-m; padding-left: $-m;
padding-right: $-m; padding-right: $-m;
} }
@ -323,9 +323,11 @@ ul.pagination {
.entity-item-snippet { .entity-item-snippet {
display: none; display: none;
} }
p { .entity-list-item p {
font-size: $fs-m * 0.8; font-size: $fs-m * 0.8;
padding-top: $-xs; padding-top: $-xs;
}
p {
margin: 0; margin: 0;
} }
> p.empty-text { > p.empty-text {

View File

@ -2,7 +2,7 @@
* Fonts * Fonts
*/ */
body, button, input, select, label { body, button, input, select, label, textarea {
font-family: $text; font-family: $text;
} }
.Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base { .Codemirror, pre, #markdown-editor-input, .editor-toolbar, .code-base {

View File

@ -217,22 +217,15 @@ $btt-size: 40px;
} }
.center-box { .center-box {
margin: $-xl auto 0 auto; margin: $-xxl auto 0 auto;
padding: $-m $-xxl $-xl $-xxl;
width: 420px; width: 420px;
max-width: 100%; max-width: 100%;
display: inline-block; display: inline-block;
text-align: left; text-align: left;
vertical-align: top; vertical-align: top;
//border: 1px solid #DDD;
input { input {
width: 100%; width: 100%;
} }
&.login {
background-color: #EEE;
box-shadow: 0 0 2px 0 rgba(0, 0, 0, 0.1);
border: 1px solid #DDD;
}
} }

View File

@ -73,11 +73,13 @@ return [
'books_empty' => 'No books have been created', 'books_empty' => 'No books have been created',
'books_popular' => 'Popular Books', 'books_popular' => 'Popular Books',
'books_recent' => 'Recent Books', 'books_recent' => 'Recent Books',
'books_new' => 'New Books',
'books_popular_empty' => 'The most popular books will appear here.', 'books_popular_empty' => 'The most popular books will appear here.',
'books_new_empty' => 'The most recently created books will appear here.',
'books_create' => 'Create New Book', 'books_create' => 'Create New Book',
'books_delete' => 'Delete Book', 'books_delete' => 'Delete Book',
'books_delete_named' => 'Delete Book :bookName', 'books_delete_named' => 'Delete Book :bookName',
'books_delete_explain' => 'This will delete the book with the name \':bookName\', All pages and chapters will be removed.', 'books_delete_explain' => 'This will delete the book with the name \':bookName\'. All pages and chapters will be removed.',
'books_delete_confirmation' => 'Are you sure you want to delete this book?', 'books_delete_confirmation' => 'Are you sure you want to delete this book?',
'books_edit' => 'Edit Book', 'books_edit' => 'Edit Book',
'books_edit_named' => 'Edit Book :bookName', 'books_edit_named' => 'Edit Book :bookName',

View File

@ -9,9 +9,10 @@
@section('content') @section('content')
<div class="text-center"> <div class="text-center">
<div class="center-box"> <div class="card center-box">
<h1>{{ title_case(trans('auth.log_in')) }}</h1> <h3><i class="zmdi zmdi-sign-in"></i> {{ title_case(trans('auth.log_in')) }}</h3>
<div class="body">
<form action="{{ baseUrl("/login") }}" method="POST" id="login-form"> <form action="{{ baseUrl("/login") }}" method="POST" id="login-form">
{!! csrf_field() !!} {!! csrf_field() !!}
@ -41,5 +42,6 @@
@endif @endif
</div> </div>
</div> </div>
</div>
@stop @stop

View File

@ -7,9 +7,9 @@
@section('content') @section('content')
<div class="text-center"> <div class="text-center">
<div class="center-box"> <div class="card center-box">
<h1>{{ title_case(trans('auth.sign_up')) }}</h1> <h3><i class="zmdi zmdi-account-add"></i> {{ title_case(trans('auth.sign_up')) }}</h3>
<div class="body">
<form action="{{ baseUrl("/register") }}" method="POST"> <form action="{{ baseUrl("/register") }}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
@ -44,6 +44,7 @@
@endif @endif
</div> </div>
</div> </div>
</div>
@stop @stop

View File

@ -1,12 +1,27 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="col-sm-8 faded">
<div class="breadcrumbs">
<a href="{{ baseUrl('/books') }}" class="text-button"><i class="zmdi zmdi-book"></i>{{ trans('entities.books') }}</a>
<span class="sep">&raquo;</span>
<a href="{{ baseUrl('/books/create') }}" class="text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a>
</div>
</div>
@stop
<div class="container small" ng-non-bindable> @section('body')
<h1>{{ trans('entities.books_create') }}</h1>
<div ng-non-bindable class="container small">
<p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-plus"></i> {{ trans('entities.books_create') }}</h3>
<div class="body">
<form action="{{ baseUrl("/books") }}" method="POST"> <form action="{{ baseUrl("/books") }}" method="POST">
@include('books/form') @include('books/form')
</form> </form>
</div>
</div>
</div> </div>
@stop @stop

View File

@ -1,28 +1,30 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded"> <div class="col-sm-12 faded">
@include('books._breadcrumbs', ['book' => $book]) @include('books._breadcrumbs', ['book' => $book])
</div> </div>
</div> @stop
</div>
</div> @section('body')
<div class="container small" ng-non-bindable> <div class="container small" ng-non-bindable>
<h1>{{ trans('entities.books_delete') }}</h1> <p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-delete"></i> {{ trans('entities.books_delete') }}</h3>
<div class="body">
<p>{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}</p> <p>{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}</p>
<p class="text-neg">{{ trans('entities.books_delete_confirmation') }}</p> <p class="text-neg">{{ trans('entities.books_delete_confirmation') }}</p>
<form action="{{$book->getUrl()}}" method="POST"> <form action="{{$book->getUrl()}}" method="POST">
{!! csrf_field() !!} {!! csrf_field() !!}
<input type="hidden" name="_method" value="DELETE"> <input type="hidden" name="_method" value="DELETE">
<a href="{{$book->getUrl()}}" class="button">{{ trans('common.cancel') }}</a> <a href="{{$book->getUrl()}}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button neg">{{ trans('common.confirm') }}</button> <button type="submit" class="button neg">{{ trans('common.confirm') }}</button>
</form> </form>
</div> </div>
</div>
</div>
@stop @stop

View File

@ -1,23 +1,24 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded"> <div class="col-sm-12 faded">
@include('books._breadcrumbs', ['book' => $book]) @include('books._breadcrumbs', ['book' => $book])
</div> </div>
</div> @stop
</div>
</div> @section('body')
<div class="container small" ng-non-bindable> <div class="container small" ng-non-bindable>
<h1>{{ trans('entities.books_edit') }}</h1> <p>&nbsp;</p>
<div class="card">
<h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.books_edit') }}</h3>
<div class="body">
<form action="{{ $book->getUrl() }}" method="POST"> <form action="{{ $book->getUrl() }}" method="POST">
<input type="hidden" name="_method" value="PUT"> <input type="hidden" name="_method" value="PUT">
@include('books/form', ['model' => $book]) @include('books/form', ['model' => $book])
</form> </form>
</div> </div>
</div>
</div>
@stop @stop

View File

@ -10,7 +10,7 @@
@include('form/textarea', ['name' => 'description']) @include('form/textarea', ['name' => 'description'])
</div> </div>
<div class="form-group"> <div class="form-group text-right">
<a href="{{ isset($book) ? $book->getUrl() : baseUrl('/books') }}" class="button muted">{{ trans('common.cancel') }}</a> <a href="{{ isset($book) ? $book->getUrl() : baseUrl('/books') }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('entities.books_save') }}</button> <button type="submit" class="button pos">{{ trans('entities.books_save') }}</button>
</div> </div>

View File

@ -27,6 +27,15 @@
<div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div> <div class="body text-muted">{{ trans('entities.books_popular_empty') }}</div>
@endif @endif
</div> </div>
<div id="new" class="card">
<h3><i class="zmdi zmdi-star-circle"></i> {{ trans('entities.books_new') }}</h3>
@if(count($popular) > 0)
@include('partials/entity-list', ['entities' => $new, 'style' => 'compact'])
@else
<div class="body text-muted">{{ trans('entities.books_new_empty') }}</div>
@endif
</div>
@stop @stop
@section('body') @section('body')

View File

@ -1,21 +1,20 @@
@extends('base') @extends('simple-layout')
@section('content') @section('toolbar')
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded"> <div class="col-sm-12 faded">
@include('books._breadcrumbs', ['book' => $book]) @include('books._breadcrumbs', ['book' => $book])
</div> </div>
</div> @stop
</div>
</div>
@section('body')
<div class="container" ng-non-bindable> <div class="container" ng-non-bindable>
<h1>{{ trans('entities.books_permissions') }}</h1> <div class="card">
<h3>{{ trans('entities.books_permissions') }}</h3>
<div class="body">
@include('form/restriction-form', ['model' => $book]) @include('form/restriction-form', ['model' => $book])
</div> </div>
</div>
</div>
@stop @stop

View File

@ -71,10 +71,8 @@
@if(count($activity) > 0) @if(count($activity) > 0)
<div class="activity card"> <div class="activity card">
<h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3> <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3>
<div class="body">
@include('partials/activity-list', ['activity' => $activity]) @include('partials/activity-list', ['activity' => $activity])
</div> </div>
</div>
@endif @endif
<div class="card"> <div class="card">
@ -97,10 +95,9 @@
<h1>{{$book->name}}</h1> <h1>{{$book->name}}</h1>
<div class="book-content" v-show="!searching"> <div class="book-content" v-show="!searching">
<p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p> <p class="text-muted" v-pre>{!! nl2br(e($book->description)) !!}</p>
@if(count($bookChildren) > 0)
<div class="page-list" v-pre> <div class="page-list" v-pre>
<hr> <hr>
@if(count($bookChildren) > 0)
@foreach($bookChildren as $childElement) @foreach($bookChildren as $childElement)
@if($childElement->isA('chapter')) @if($childElement->isA('chapter'))
@include('chapters/list-item', ['chapter' => $childElement]) @include('chapters/list-item', ['chapter' => $childElement])
@ -109,22 +106,22 @@
@endif @endif
<hr> <hr>
@endforeach @endforeach
</div>
@else @else
<p class="text-muted">{{ trans('entities.books_empty_contents') }}</p> <div class="well">
<p> <p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p>
@if(userCan('page-create', $book)) @if(userCan('page-create', $book))
<a href="{{ $book->getUrl('/page/create') }}" class="text-page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a> <a href="{{ $book->getUrl('/page/create') }}" class="button outline page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a>
@endif @endif
@if(userCan('page-create', $book) && userCan('chapter-create', $book)) @if(userCan('page-create', $book) && userCan('chapter-create', $book))
&nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em>&nbsp;&nbsp;&nbsp;
@endif @endif
@if(userCan('chapter-create', $book)) @if(userCan('chapter-create', $book))
<a href="{{ $book->getUrl('/chapter/create') }}" class="text-chapter"><i class="zmdi zmdi-collection-bookmark"></i>{{ trans('entities.books_empty_add_chapter') }}</a> <a href="{{ $book->getUrl('/chapter/create') }}" class="button outline chapter"><i class="zmdi zmdi-collection-bookmark"></i>{{ trans('entities.books_empty_add_chapter') }}</a>
@endif
</p>
<hr>
@endif @endif
</div> </div>
@endif
</div> </div>
<div class="search-results" v-cloak v-show="searching"> <div class="search-results" v-cloak v-show="searching">
<h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3> <h3 class="text-muted">{{ trans('entities.search_results') }} <a v-if="searching" v-on:click="clearSearch()" class="text-small"><i class="zmdi zmdi-close"></i>{{ trans('entities.search_clear') }}</a></h3>

View File

@ -1,34 +1,45 @@
@extends('base') @extends('simple-layout')
@section('head') @section('head')
<script src="{{ baseUrl("/libs/jquery-sortable/jquery-sortable.min.js") }}"></script> <script src="{{ baseUrl("/libs/jquery-sortable/jquery-sortable.min.js") }}"></script>
@stop @stop
@section('content') @section('toolbar')
<div class="faded-small toolbar">
<div class="container">
<div class="row">
<div class="col-sm-12 faded"> <div class="col-sm-12 faded">
@include('books._breadcrumbs', ['book' => $book]) @include('books._breadcrumbs', ['book' => $book])
</div> </div>
</div> @stop
</div>
</div> @section('body')
<div class="container" ng-non-bindable> <div class="container" ng-non-bindable>
<h1>{{ trans('entities.books_sort') }}</h1>
<div class="row"> <div class="row">
<div class="col-md-8" id="sort-boxes"> <div class="col-md-8">
<div class="card">
<h3><i class="zmdi zmdi-sort"></i> {{ trans('entities.books_sort') }}</h3>
<div class="body">
<div id="sort-boxes">
@include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren]) @include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren])
</div> </div>
<form action="{{ $book->getUrl('/sort') }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
<input type="hidden" id="sort-tree-input" name="sort-tree">
<div class="list">
<a href="{{ $book->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<button class="button pos" type="submit">{{ trans('entities.books_sort_save') }}</button>
</div>
</form>
</div>
</div>
</div>
@if(count($books) > 1) @if(count($books) > 1)
<div class="col-md-4"> <div class="col-md-4">
<h3>{{ trans('entities.books_sort_show_other') }}</h3> <div class="card">
<div id="additional-books"> <h3><i class="zmdi zmdi-book"></i> {{ trans('entities.books_sort_show_other') }}</h3>
<div class="body" id="additional-books">
@foreach($books as $otherBook) @foreach($books as $otherBook)
@if($otherBook->id !== $book->id) @if($otherBook->id !== $book->id)
<div> <div>
@ -38,19 +49,11 @@
@endforeach @endforeach
</div> </div>
</div> </div>
</div>
@endif @endif
</div> </div>
<form action="{{ $book->getUrl('/sort') }}" method="POST">
{!! csrf_field() !!}
<input type="hidden" name="_method" value="PUT">
<input type="hidden" id="sort-tree-input" name="sort-tree">
<div class="list">
<a href="{{ $book->getUrl() }}" class="button muted">{{ trans('common.cancel') }}</a>
<button class="button pos" type="submit">{{ trans('entities.books_sort_save') }}</button>
</div>
</form>
</div> </div>

View File

@ -27,6 +27,8 @@
@endforeach @endforeach
</table> </table>
<a href="{{ $model->getUrl() }}" class="button muted">{{ trans('common.cancel') }}</a> <div class="text-right">
<a href="{{ $model->getUrl() }}" class="button outline">{{ trans('common.cancel') }}</a>
<button type="submit" class="button pos">{{ trans('entities.permissions_save') }}</button> <button type="submit" class="button pos">{{ trans('entities.permissions_save') }}</button>
</div>
</form> </form>

View File

@ -16,13 +16,13 @@
<div class="col-sm-4"> <div class="col-sm-4">
@if(count($draftPages) > 0) @if(count($draftPages) > 0)
<div id="recent-drafts" class="card"> <div id="recent-drafts" class="card">
<h3>{{ trans('entities.my_recent_drafts') }}</h3> <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.my_recent_drafts') }}</h3>
@include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact']) @include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact'])
</div> </div>
@endif @endif
<div class="card"> <div class="card">
<h3>{{ trans('entities.' . ($signedIn ? 'my_recently_viewed' : 'books_recent')) }}</h3> <h3><i class="zmdi zmdi-{{ $signedIn ? 'eye' : 'star-circle' }}"></i> {{ trans('entities.' . ($signedIn ? 'my_recently_viewed' : 'books_recent')) }}</h3>
@include('partials/entity-list', [ @include('partials/entity-list', [
'entities' => $recents, 'entities' => $recents,
'style' => 'compact', 'style' => 'compact',
@ -33,7 +33,7 @@
<div class="col-sm-4"> <div class="col-sm-4">
<div class="card"> <div class="card">
<h3><a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3> <h3><i class="zmdi zmdi-file"></i> <a class="no-color" href="{{ baseUrl("/pages/recently-updated") }}">{{ trans('entities.recently_updated_pages') }}</a></h3>
<div id="recently-updated-pages"> <div id="recently-updated-pages">
@include('partials/entity-list', [ @include('partials/entity-list', [
'entities' => $recentlyUpdatedPages, 'entities' => $recentlyUpdatedPages,
@ -46,12 +46,10 @@
<div class="col-sm-4" id="recent-activity"> <div class="col-sm-4" id="recent-activity">
<div class="card"> <div class="card">
<h3>{{ trans('entities.recent_activity') }}</h3> <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3>
<div class="body">
@include('partials/activity-list', ['activity' => $activity]) @include('partials/activity-list', ['activity' => $activity])
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html class="shaded">
<head> <head>
<title>{{ setting('app-name') }}</title> <title>{{ setting('app-name') }}</title>
@ -23,12 +23,12 @@
{!! setting('app-custom-head') !!} {!! setting('app-custom-head') !!}
@endif @endif
</head> </head>
<body class="@yield('body-class')" ng-app="bookStack"> <body class="@yield('body-class')">
@include('partials.notifications') @include('partials.notifications')
<header id="header"> <header id="header">
<div class="container"> <div class="container fluid">
<div class="row"> <div class="row">
<div class="col-sm-6"> <div class="col-sm-6">