From 5ab39bfd5afb763395f1af5548518f377d002f5a Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 17 Feb 2018 13:30:52 +0000 Subject: [PATCH 1/2] Started migration to SVG icons --- app/helpers.php | 3 ++ readme.md | 1 + resources/assets/icons/add.svg | 4 +++ resources/assets/icons/{ => auth}/azure.svg | 0 .../assets/icons/{ => auth}/facebook.svg | 0 resources/assets/icons/{ => auth}/github.svg | 0 resources/assets/icons/{ => auth}/gitlab.svg | 0 resources/assets/icons/{ => auth}/google.svg | 0 resources/assets/icons/{ => auth}/okta.svg | 0 resources/assets/icons/{ => auth}/slack.svg | 0 resources/assets/icons/{ => auth}/twitch.svg | 0 resources/assets/icons/{ => auth}/twitter.svg | 0 resources/assets/icons/book.svg | 4 +++ resources/assets/icons/chapter.svg | 4 +++ resources/assets/icons/delete.svg | 4 +++ resources/assets/icons/edit.svg | 4 +++ resources/assets/icons/login.svg | 4 +++ resources/assets/icons/new-user.svg | 4 +++ resources/assets/icons/page.svg | 4 +++ resources/assets/icons/search.svg | 4 +++ resources/assets/icons/time.svg | 5 ++++ resources/assets/sass/_blocks.scss | 1 + resources/assets/sass/_buttons.scss | 1 + resources/assets/sass/_header.scss | 6 ++++ resources/assets/sass/_lists.scss | 29 ++++++++++++++----- resources/assets/sass/_text.scss | 29 +++++++++++++++++++ resources/views/auth/login.blade.php | 10 +++---- .../views/auth/passwords/email.blade.php | 4 +-- .../views/auth/passwords/reset.blade.php | 4 +-- .../views/auth/register-confirm.blade.php | 2 +- resources/views/auth/register.blade.php | 6 ++-- resources/views/base.blade.php | 6 ++-- resources/views/books/_breadcrumbs.blade.php | 2 +- resources/views/books/create.blade.php | 6 ++-- resources/views/books/delete.blade.php | 2 +- resources/views/books/edit.blade.php | 2 +- resources/views/books/index.blade.php | 4 +-- resources/views/books/list-item.blade.php | 2 +- resources/views/books/show.blade.php | 16 +++++----- resources/views/books/sort-box.blade.php | 4 +-- resources/views/books/sort.blade.php | 4 +-- .../views/chapters/_breadcrumbs.blade.php | 4 +-- resources/views/chapters/create.blade.php | 6 ++-- resources/views/chapters/delete.blade.php | 2 +- resources/views/chapters/edit.blade.php | 2 +- resources/views/chapters/list-item.blade.php | 8 ++--- resources/views/chapters/show.blade.php | 12 ++++---- resources/views/comments/comment.blade.php | 6 ++-- .../views/components/image-manager.blade.php | 4 +-- resources/views/errors/404.blade.php | 6 ++-- resources/views/home-custom.blade.php | 4 +-- resources/views/home.blade.php | 4 +-- resources/views/pages/_breadcrumbs.blade.php | 4 +-- resources/views/pages/delete.blade.php | 2 +- resources/views/pages/form-toolbox.blade.php | 2 +- resources/views/pages/form.blade.php | 4 +-- resources/views/pages/list-item.blade.php | 12 ++++---- resources/views/pages/show.blade.php | 4 +-- .../views/partials/activity-item.blade.php | 2 +- resources/views/partials/book-tree.blade.php | 10 +++---- .../views/partials/custom-styles.blade.php | 1 + resources/views/search/all.blade.php | 2 +- .../views/search/entity-search-list.blade.php | 2 +- .../views/settings/roles/delete.blade.php | 2 +- resources/views/users/delete.blade.php | 2 +- resources/views/users/edit.blade.php | 2 +- resources/views/users/profile.blade.php | 2 +- 67 files changed, 196 insertions(+), 100 deletions(-) create mode 100644 resources/assets/icons/add.svg rename resources/assets/icons/{ => auth}/azure.svg (100%) rename resources/assets/icons/{ => auth}/facebook.svg (100%) rename resources/assets/icons/{ => auth}/github.svg (100%) rename resources/assets/icons/{ => auth}/gitlab.svg (100%) rename resources/assets/icons/{ => auth}/google.svg (100%) rename resources/assets/icons/{ => auth}/okta.svg (100%) rename resources/assets/icons/{ => auth}/slack.svg (100%) rename resources/assets/icons/{ => auth}/twitch.svg (100%) rename resources/assets/icons/{ => auth}/twitter.svg (100%) create mode 100644 resources/assets/icons/book.svg create mode 100644 resources/assets/icons/chapter.svg create mode 100644 resources/assets/icons/delete.svg create mode 100644 resources/assets/icons/edit.svg create mode 100644 resources/assets/icons/login.svg create mode 100644 resources/assets/icons/new-user.svg create mode 100644 resources/assets/icons/page.svg create mode 100644 resources/assets/icons/search.svg create mode 100644 resources/assets/icons/time.svg diff --git a/app/helpers.php b/app/helpers.php index c087e3509..d801edb1a 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -155,6 +155,9 @@ function theme_path($path = '') */ function icon($name, $attrs = []) { + $attrs = array_merge($attrs, [ + 'class' => 'svg-icon' + ]); $attrString = ' '; foreach ($attrs as $attrName => $attr) { $attrString .= $attrName . '="' . $attr . '" '; diff --git a/readme.md b/readme.md index 97438d4bf..d3013eca4 100644 --- a/readme.md +++ b/readme.md @@ -104,6 +104,7 @@ These are the great open-source projects used to help build BookStack: * [Axios](https://github.com/mzabriskie/axios) * [jQuery Sortable](https://johnny.github.io/jquery-sortable/) * [Material Design Iconic Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html) +* [Google Material Icons](https://material.io/icons/) * [Dropzone.js](http://www.dropzonejs.com/) * [clipboard.js](https://clipboardjs.com/) * [TinyColorPicker](http://www.dematte.at/tinyColorPicker/index.html) diff --git a/resources/assets/icons/add.svg b/resources/assets/icons/add.svg new file mode 100644 index 000000000..75e3753dc --- /dev/null +++ b/resources/assets/icons/add.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/azure.svg b/resources/assets/icons/auth/azure.svg similarity index 100% rename from resources/assets/icons/azure.svg rename to resources/assets/icons/auth/azure.svg diff --git a/resources/assets/icons/facebook.svg b/resources/assets/icons/auth/facebook.svg similarity index 100% rename from resources/assets/icons/facebook.svg rename to resources/assets/icons/auth/facebook.svg diff --git a/resources/assets/icons/github.svg b/resources/assets/icons/auth/github.svg similarity index 100% rename from resources/assets/icons/github.svg rename to resources/assets/icons/auth/github.svg diff --git a/resources/assets/icons/gitlab.svg b/resources/assets/icons/auth/gitlab.svg similarity index 100% rename from resources/assets/icons/gitlab.svg rename to resources/assets/icons/auth/gitlab.svg diff --git a/resources/assets/icons/google.svg b/resources/assets/icons/auth/google.svg similarity index 100% rename from resources/assets/icons/google.svg rename to resources/assets/icons/auth/google.svg diff --git a/resources/assets/icons/okta.svg b/resources/assets/icons/auth/okta.svg similarity index 100% rename from resources/assets/icons/okta.svg rename to resources/assets/icons/auth/okta.svg diff --git a/resources/assets/icons/slack.svg b/resources/assets/icons/auth/slack.svg similarity index 100% rename from resources/assets/icons/slack.svg rename to resources/assets/icons/auth/slack.svg diff --git a/resources/assets/icons/twitch.svg b/resources/assets/icons/auth/twitch.svg similarity index 100% rename from resources/assets/icons/twitch.svg rename to resources/assets/icons/auth/twitch.svg diff --git a/resources/assets/icons/twitter.svg b/resources/assets/icons/auth/twitter.svg similarity index 100% rename from resources/assets/icons/twitter.svg rename to resources/assets/icons/auth/twitter.svg diff --git a/resources/assets/icons/book.svg b/resources/assets/icons/book.svg new file mode 100644 index 000000000..ce6cd5d94 --- /dev/null +++ b/resources/assets/icons/book.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/chapter.svg b/resources/assets/icons/chapter.svg new file mode 100644 index 000000000..199917db7 --- /dev/null +++ b/resources/assets/icons/chapter.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/delete.svg b/resources/assets/icons/delete.svg new file mode 100644 index 000000000..fdaba0111 --- /dev/null +++ b/resources/assets/icons/delete.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/edit.svg b/resources/assets/icons/edit.svg new file mode 100644 index 000000000..d4be98b38 --- /dev/null +++ b/resources/assets/icons/edit.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/login.svg b/resources/assets/icons/login.svg new file mode 100644 index 000000000..b122b44a2 --- /dev/null +++ b/resources/assets/icons/login.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/new-user.svg b/resources/assets/icons/new-user.svg new file mode 100644 index 000000000..b58fcd548 --- /dev/null +++ b/resources/assets/icons/new-user.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/page.svg b/resources/assets/icons/page.svg new file mode 100644 index 000000000..1df12d85d --- /dev/null +++ b/resources/assets/icons/page.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/search.svg b/resources/assets/icons/search.svg new file mode 100644 index 000000000..490937044 --- /dev/null +++ b/resources/assets/icons/search.svg @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/resources/assets/icons/time.svg b/resources/assets/icons/time.svg new file mode 100644 index 000000000..2b6e2820e --- /dev/null +++ b/resources/assets/icons/time.svg @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss index c277de99a..ff5322774 100644 --- a/resources/assets/sass/_blocks.scss +++ b/resources/assets/sass/_blocks.scss @@ -192,6 +192,7 @@ margin: 0; font-size: $fs-s; color: #888; + fill: #888; font-weight: 400; text-transform: uppercase; } diff --git a/resources/assets/sass/_buttons.scss b/resources/assets/sass/_buttons.scss index f9c6d9b9a..7dd1c6410 100644 --- a/resources/assets/sass/_buttons.scss +++ b/resources/assets/sass/_buttons.scss @@ -2,6 +2,7 @@ @mixin generate-button-colors($textColor, $backgroundColor) { background-color: $backgroundColor; color: $textColor; + fill: $textColor; text-transform: uppercase; border: 1px solid $backgroundColor; vertical-align: top; diff --git a/resources/assets/sass/_header.scss b/resources/assets/sass/_header.scss index b9d9d68ef..9efff7774 100644 --- a/resources/assets/sass/_header.scss +++ b/resources/assets/sass/_header.scss @@ -8,6 +8,7 @@ header { top: 0; background-color: $primary-dark; color: #fff; + fill: #fff; .padded { padding: $-m; } @@ -24,6 +25,7 @@ header { display: inline-block; padding: $-m $-l; color: #FFF; + fill: #FFF; &:last-child { padding-right: 0; } @@ -93,6 +95,7 @@ header .search-box { } button { color: #EEE; + fill: #EEE; } ::-webkit-input-placeholder { /* Chrome/Opera/Safari */ color: #DDD; @@ -149,6 +152,7 @@ header .search-box { .faded { a, button, span, span > div { color: #666; + fill: #666; } .text-button { opacity: 0.5; @@ -167,6 +171,7 @@ header .search-box { .faded-small { color: #000; + fill: #000; font-size: 0.9em; background-color: $primary-faded; } @@ -230,6 +235,7 @@ header .search-box { padding: $-m; display: inline-block; color: #666; + fill: #666; cursor: pointer; &.selected { border-bottom: 2px solid $primary; diff --git a/resources/assets/sass/_lists.scss b/resources/assets/sass/_lists.scss index 5f06e1da9..986edc5c7 100644 --- a/resources/assets/sass/_lists.scss +++ b/resources/assets/sass/_lists.scss @@ -37,6 +37,7 @@ border-left: 5px solid $color-page-draft; .text-page { color: $color-page-draft; + fill: $color-page-draft; } } .chapter { @@ -119,6 +120,7 @@ } a.bold { color: #EEE !important; + fill: #EEE !important; } ul { list-style: none; @@ -126,16 +128,26 @@ } .book { color: $color-book !important; + fill: $color-book !important; &.selected { background-color: rgba($color-book, 0.29); } } .chapter { color: $color-chapter !important; + fill: $color-chapter !important; &.selected { background-color: rgba($color-chapter, 0.12); } } + .page { + color: $color-page !important; + fill: $color-page !important; + border-bottom: none; + &.selected { + background-color: rgba($color-page, 0.1); + } + } [chapter-toggle] { padding-left: $-s; } @@ -149,18 +161,12 @@ border-left: 5px solid $color-page; margin: 10px 10px; } - .page { - color: $color-page !important; - border-bottom: none; - &.selected { - background-color: rgba($color-page, 0.1); - } - } .list-item-page.draft { border-left: 5px solid $color-page-draft; } .page.draft .page, .list-item-page.draft a.page { color: $color-page-draft !important; + fill: $color-page-draft !important; } .sub-menu { display: none; @@ -217,6 +223,7 @@ .activity-list-item { padding: $-s 0; color: #888; + fill: #888; border-bottom: 1px solid #EEE; font-size: 0.9em; .left { @@ -254,6 +261,7 @@ ul.pagination { border: 1px solid #CCC; margin-left: -1px; color: #888; + fill: #888; user-select: none; &.disabled { cursor: not-allowed; @@ -262,10 +270,12 @@ ul.pagination { li.active span { background-color: rgba($primary, 0.8); color: #EEE; + fill: #EEE; border-color: rgba($primary, 0.8); } a { color: $primary; + fill: $primary; } } @@ -293,6 +303,7 @@ ul.pagination { } .page.draft .text-page { color: $color-page-draft; + fill: $color-page-draft; } } @@ -346,12 +357,14 @@ ul.pagination { min-width: 180px; padding: $-xs 0; color: #555; + fill: #555; text-align: left !important; &.wide { min-width: 220px; } .text-muted { color: #999; + fill: #999; } li.padded { padding: $-xs $-m; @@ -361,6 +374,7 @@ ul.pagination { display: block; padding: $-xs $-m; color: #555; + fill: #555; &:hover { text-decoration: none; background-color: #EEE; @@ -411,6 +425,7 @@ ul.pagination { width: 100%; line-height: 1.2; color: #009688;; + fill: #009688;; text-decoration: none; } p { diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index 4309acc21..ec389286e 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -220,71 +220,92 @@ pre code { */ p.pos, p .pos, span.pos, .text-pos { color: $positive; + fill: $positive; &:hover { color: $positive; + fill: $positive; } } p.neg, p .neg, span.neg, .text-neg { color: $negative; + fill: $negative; &:hover { color: $negative; + fill: $negative; } } p.muted, p .muted, span.muted, .text-muted { color: lighten($text-dark, 26%); + fill: lighten($text-dark, 26%); &.small, .small { color: lighten($text-dark, 32%); + fill: lighten($text-dark, 32%); } } p.primary, p .primary, span.primary, .text-primary { color: $primary; + fill: $primary; &:hover { color: $primary; + fill: $primary; } } p.secondary, p .secondary, span.secondary, .text-secondary { color: $secondary; + fill: $secondary; &:hover { color: $secondary; + fill: $secondary; } } .text-book { color: $color-book; + fill: $color-book; &:hover { color: $color-book; + fill: $color-book; } } .text-page { color: $color-page; + fill: $color-page; &:hover { color: $color-page; + fill: $color-page; } &.draft { color: $color-page-draft; + fill: $color-page-draft; } &.draft:hover { color: $color-page-draft; + fill: $color-page-draft; } } .text-chapter { color: $color-chapter; + fill: $color-chapter; &:hover { color: $color-chapter; + fill: $color-chapter; } } .faded .text-book:hover { color: $color-book !important; + fill: $color-book !important; } .faded .text-chapter:hover { color: $color-chapter !important; + fill: $color-chapter !important; } .faded .text-page:hover { color: $color-page !important; + fill: $color-page !important; } span.highlight { @@ -390,3 +411,11 @@ i { padding-right: $-xs; } +.svg-icon { + width: 1em; + display: inline-block; + position: relative; + bottom: -0.105em; + margin-right: $-xs; +} + diff --git a/resources/views/auth/login.blade.php b/resources/views/auth/login.blade.php index dda733645..f3847bb04 100644 --- a/resources/views/auth/login.blade.php +++ b/resources/views/auth/login.blade.php @@ -2,7 +2,7 @@ @section('header-buttons') @if(setting('registration-enabled', false)) - {{ trans('auth.sign_up') }} + @icon('new-user') {{ trans('auth.sign_up') }} @endif @stop @@ -10,13 +10,12 @@
-

{{ title_case(trans('auth.log_in')) }}

+

@icon('login') {{ title_case(trans('auth.log_in')) }}

{!! csrf_field() !!} - @include('auth/forms/login/' . $authMethod)
@@ -25,9 +24,8 @@
-
- +
@@ -35,7 +33,7 @@
@foreach($socialDrivers as $driver => $name) - @icon($driver) + @icon('auth/' . $driver) {{ trans('auth.log_in_with', ['socialDriver' => $name]) }} @endforeach diff --git a/resources/views/auth/passwords/email.blade.php b/resources/views/auth/passwords/email.blade.php index 07bd2c383..6722dc441 100644 --- a/resources/views/auth/passwords/email.blade.php +++ b/resources/views/auth/passwords/email.blade.php @@ -1,9 +1,9 @@ @extends('public') @section('header-buttons') - {{ trans('auth.log_in') }} + @icon('login') {{ trans('auth.log_in') }} @if(setting('registration-enabled')) - {{ trans('auth.sign_up') }} + @icon('new-user') {{ trans('auth.sign_up') }} @endif @stop diff --git a/resources/views/auth/passwords/reset.blade.php b/resources/views/auth/passwords/reset.blade.php index a463eef45..f76a1d7c2 100644 --- a/resources/views/auth/passwords/reset.blade.php +++ b/resources/views/auth/passwords/reset.blade.php @@ -1,9 +1,9 @@ @extends('public') @section('header-buttons') - {{ trans('auth.log_in') }} + @icon('login') {{ trans('auth.log_in') }} @if(setting('registration-enabled')) - {{ trans('auth.sign_up') }} + @icon('new-user') {{ trans('auth.sign_up') }} @endif @stop diff --git a/resources/views/auth/register-confirm.blade.php b/resources/views/auth/register-confirm.blade.php index 5d945ef81..c3ebcf1ab 100644 --- a/resources/views/auth/register-confirm.blade.php +++ b/resources/views/auth/register-confirm.blade.php @@ -2,7 +2,7 @@ @section('header-buttons') @if(!$signedIn) - {{ trans('auth.log_in') }} + @icon('login') {{ trans('auth.log_in') }} @endif @stop diff --git a/resources/views/auth/register.blade.php b/resources/views/auth/register.blade.php index 7b319d30c..900b394e3 100644 --- a/resources/views/auth/register.blade.php +++ b/resources/views/auth/register.blade.php @@ -1,14 +1,14 @@ @extends('public') @section('header-buttons') - {{ trans('auth.log_in') }} + @icon('login') {{ trans('auth.log_in') }} @stop @section('content')
-

{{ title_case(trans('auth.sign_up')) }}

+

@icon('new-user') {{ title_case(trans('auth.sign_up')) }}

{!! csrf_field() !!} @@ -37,7 +37,7 @@
@foreach($socialDrivers as $driver => $name) - @icon($driver) + @icon('auth/' . $driver) {{ trans('auth.sign_up_with', ['socialDriver' => $name]) }} @endforeach diff --git a/resources/views/base.blade.php b/resources/views/base.blade.php index edbd6a096..ab47745e6 100644 --- a/resources/views/base.blade.php +++ b/resources/views/base.blade.php @@ -50,17 +50,17 @@
@if(signedInUser()) diff --git a/resources/views/books/_breadcrumbs.blade.php b/resources/views/books/_breadcrumbs.blade.php index e588127ce..e4ecc36c6 100644 --- a/resources/views/books/_breadcrumbs.blade.php +++ b/resources/views/books/_breadcrumbs.blade.php @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/resources/views/books/create.blade.php b/resources/views/books/create.blade.php index 4798459c2..eb0664ad8 100644 --- a/resources/views/books/create.blade.php +++ b/resources/views/books/create.blade.php @@ -3,9 +3,9 @@ @section('toolbar') @stop @@ -15,7 +15,7 @@

 

-

{{ trans('entities.books_create') }}

+

@icon('add') {{ trans('entities.books_create') }}

@include('books/form') diff --git a/resources/views/books/delete.blade.php b/resources/views/books/delete.blade.php index 9bcb1cfc6..7aeaf6fae 100644 --- a/resources/views/books/delete.blade.php +++ b/resources/views/books/delete.blade.php @@ -11,7 +11,7 @@

 

-

{{ trans('entities.books_delete') }}

+

@icon('delete') {{ trans('entities.books_delete') }}

{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}

{{ trans('entities.books_delete_confirmation') }}

diff --git a/resources/views/books/edit.blade.php b/resources/views/books/edit.blade.php index 6bf285f95..0f61512db 100644 --- a/resources/views/books/edit.blade.php +++ b/resources/views/books/edit.blade.php @@ -11,7 +11,7 @@

 

-

{{ trans('entities.books_edit') }}

+

@icon('edit') {{ trans('entities.books_edit') }}

diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index 0d8a5fad9..6b9c62e6c 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -18,7 +18,7 @@
@if($currentUser->can('book-create-all')) - {{ trans('entities.books_create') }} + @icon('add'){{ trans('entities.books_create') }} @endif
@@ -78,7 +78,7 @@ @else

{{ trans('entities.books_empty') }}

@if(userCan('books-create-all')) - {{ trans('entities.create_one_now') }} + @icon('edit'){{ trans('entities.create_one_now') }} @endif @endif
diff --git a/resources/views/books/list-item.blade.php b/resources/views/books/list-item.blade.php index a77ceee94..05d7e90ef 100644 --- a/resources/views/books/list-item.blade.php +++ b/resources/views/books/list-item.blade.php @@ -1,5 +1,5 @@
-

{{$book->name}}

+

@icon('book'){{$book->name}}

@if(isset($book->searchSnippet))

{!! $book->searchSnippet !!}

diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index ea4a079e8..e03cc1913 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -15,24 +15,24 @@ @if(userCan('page-create', $book)) - {{ trans('entities.pages_new') }} + @icon('add'){{ trans('entities.pages_new') }} @endif @if(userCan('chapter-create', $book)) - {{ trans('entities.chapters_new') }} + @icon('add'){{ trans('entities.chapters_new') }} @endif @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) @@ -47,7 +47,7 @@
- +
@@ -70,7 +70,7 @@ @if(count($activity) > 0)
-

{{ trans('entities.recent_activity') }}

+

@icon('time') {{ trans('entities.recent_activity') }}

@include('partials/activity-list', ['activity' => $activity])
@endif @@ -111,13 +111,13 @@

{{ trans('entities.books_empty_contents') }}

@if(userCan('page-create', $book)) - {{ trans('entities.books_empty_create_page') }} + @icon('page'){{ trans('entities.books_empty_create_page') }} @endif @if(userCan('page-create', $book) && userCan('chapter-create', $book))   -{{ trans('entities.books_empty_or') }}-    @endif @if(userCan('chapter-create', $book)) - {{ trans('entities.books_empty_add_chapter') }} + @icon('chapter'){{ trans('entities.books_empty_add_chapter') }} @endif
@endif diff --git a/resources/views/books/sort-box.blade.php b/resources/views/books/sort-box.blade.php index 4177633ad..cd43be4a7 100644 --- a/resources/views/books/sort-box.blade.php +++ b/resources/views/books/sort-box.blade.php @@ -1,5 +1,5 @@
-

{{ $book->name }}

+

@icon('book'){{ $book->name }}

    @foreach($bookChildren as $bookChild)
  • @@ -8,7 +8,7 @@
      @foreach($bookChild->pages as $page)
    • - + @icon('page') {{ $page->name }}
    • @endforeach diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php index ebabb90ce..7aecab9a4 100644 --- a/resources/views/books/sort.blade.php +++ b/resources/views/books/sort.blade.php @@ -38,12 +38,12 @@ @if(count($books) > 1)
      -

      {{ trans('entities.books_sort_show_other') }}

      +

      @icon('book') {{ trans('entities.books_sort_show_other') }}

      @foreach($books as $otherBook) @if($otherBook->id !== $book->id) @endif @endforeach diff --git a/resources/views/chapters/_breadcrumbs.blade.php b/resources/views/chapters/_breadcrumbs.blade.php index 418168461..279f1c1a4 100644 --- a/resources/views/chapters/_breadcrumbs.blade.php +++ b/resources/views/chapters/_breadcrumbs.blade.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/resources/views/chapters/create.blade.php b/resources/views/chapters/create.blade.php index 8b2e2f667..37f4ff633 100644 --- a/resources/views/chapters/create.blade.php +++ b/resources/views/chapters/create.blade.php @@ -3,9 +3,9 @@ @section('toolbar') @stop @@ -14,7 +14,7 @@
      -

      {{ trans('entities.chapters_create') }}

      +

      @icon('add') {{ trans('entities.chapters_create') }}

      @include('chapters/form') diff --git a/resources/views/chapters/delete.blade.php b/resources/views/chapters/delete.blade.php index 3ea64044a..062849d29 100644 --- a/resources/views/chapters/delete.blade.php +++ b/resources/views/chapters/delete.blade.php @@ -11,7 +11,7 @@

       

      -

      {{ trans('entities.chapters_delete') }}

      +

      @icon('delete') {{ trans('entities.chapters_delete') }}

      {{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}

      diff --git a/resources/views/chapters/edit.blade.php b/resources/views/chapters/edit.blade.php index b97be6831..c52f7bafe 100644 --- a/resources/views/chapters/edit.blade.php +++ b/resources/views/chapters/edit.blade.php @@ -11,7 +11,7 @@

       

      -

      {{ trans('entities.chapters_edit') }}

      +

      @icon('edit') {{ trans('entities.chapters_edit') }}

      diff --git a/resources/views/chapters/list-item.blade.php b/resources/views/chapters/list-item.blade.php index 3b1f84258..32c2b3952 100644 --- a/resources/views/chapters/list-item.blade.php +++ b/resources/views/chapters/list-item.blade.php @@ -2,12 +2,12 @@

      @if (isset($showPath) && $showPath) - {{ $chapter->book->getShortName() }} + @icon('book'){{ $chapter->book->getShortName() }}   »   @endif - {{ $chapter->name }} + @icon('chapter'){{ $chapter->name }}

      @@ -21,10 +21,10 @@ @if(!isset($hidePages) && count($chapter->pages) > 0) -

      {{ trans_choice('entities.x_pages', $chapter->pages->count()) }}

      +

      @icon('page') {{ trans_choice('entities.x_pages', $chapter->pages->count()) }}

      @foreach($chapter->pages as $page) -
      {{$page->name}}
      +
      @icon('page'){{$page->name}}
      @endforeach
      @endif diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index 8ad287bfc..07ede6c0d 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -15,10 +15,10 @@
    @if(userCan('page-create', $chapter)) - {{ trans('entities.pages_new') }} + @icon('add'){{ trans('entities.pages_new') }} @endif @if(userCan('chapter-update', $chapter)) - {{ trans('common.edit') }} + @icon('edit'){{ trans('common.edit') }} @endif @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter))
  • {{ trans('entities.permissions') }}
  • @endif @if(userCan('chapter-delete', $chapter)) -
  • {{ trans('common.delete') }}
  • +
  • @icon('delete'){{ trans('common.delete') }}
  • @endif
@@ -51,7 +51,7 @@
- +
@@ -114,13 +114,13 @@

{{ trans('entities.chapters_empty') }}

@if(userCan('page-create', $chapter)) - {{ trans('entities.books_empty_create_page') }} + @icon('page'){{ trans('entities.books_empty_create_page') }} @endif @if(userCan('page-create', $chapter) && userCan('book-update', $book))   -{{ trans('entities.books_empty_or') }}-     @endif @if(userCan('book-update', $book)) - {{ trans('entities.books_empty_sort_current_book') }} + @icon('book'){{ trans('entities.books_empty_sort_current_book') }} @endif

diff --git a/resources/views/comments/comment.blade.php b/resources/views/comments/comment.blade.php index ad5310760..37b40d579 100644 --- a/resources/views/comments/comment.blade.php +++ b/resources/views/comments/comment.blade.php @@ -3,7 +3,7 @@
@if(userCan('comment-update', $comment)) - + @endif @if(userCan('comment-create-all')) @@ -11,10 +11,10 @@ @if(userCan('comment-delete', $comment)) @endif diff --git a/resources/views/components/image-manager.blade.php b/resources/views/components/image-manager.blade.php index a21f14099..8c4b46da0 100644 --- a/resources/views/components/image-manager.blade.php +++ b/resources/views/components/image-manager.blade.php @@ -21,7 +21,7 @@
@@ -70,7 +70,7 @@
- +
+ @else - + @endif
@@ -27,13 +27,13 @@ @section('sidebar') @if($recents)
-

{{ trans('entities.recently_viewed') }}

+

@icon('view') {{ trans('entities.recently_viewed') }}

@include('partials/entity-list', ['entities' => $recents, 'style' => 'compact'])
@endif
-

{{ trans('entities.books_new') }}

+

@icon('star-circle') {{ trans('entities.books_new') }}

@if(count($popular) > 0) @include('partials/entity-list', ['entities' => $new, 'style' => 'compact']) @else diff --git a/resources/views/books/restrictions.blade.php b/resources/views/books/restrictions.blade.php index 5c7604c86..b85396933 100644 --- a/resources/views/books/restrictions.blade.php +++ b/resources/views/books/restrictions.blade.php @@ -11,7 +11,7 @@

 

-

{{ trans('entities.books_permissions') }}

+

<@icon('lock') {{ trans('entities.books_permissions') }}

@include('form/restriction-form', ['model' => $book])
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index e03cc1913..611fc1727 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -7,7 +7,7 @@
-
{{ trans('entities.export') }}
+
@icon('export'){{ trans('entities.export') }}
@if($book->restricted)
-

{{ trans('entities.permissions') }}

+

@icon('permission') {{ trans('entities.permissions') }}

@if(userCan('restrictions-manage', $book)) - {{ trans('entities.books_permissions_active') }} + @icon('lock'){{ trans('entities.books_permissions_active') }} @else - {{ trans('entities.books_permissions_active') }} + @icon('lock'){{ trans('entities.books_permissions_active') }} @endif

@@ -76,7 +76,7 @@ @endif
-

{{ trans('common.details') }}

+

@icon('info') {{ trans('common.details') }}

@include('partials.entity-meta', ['entity' => $book])
@@ -124,7 +124,7 @@
-

{{ trans('entities.search_results') }} {{ trans('entities.search_clear') }}

+

{{ trans('entities.search_results') }} @icon('close'){{ trans('entities.search_clear') }}

@include('partials/loading-icon')
diff --git a/resources/views/books/sort-box.blade.php b/resources/views/books/sort-box.blade.php index cd43be4a7..d79bbd95e 100644 --- a/resources/views/books/sort-box.blade.php +++ b/resources/views/books/sort-box.blade.php @@ -3,7 +3,7 @@
    @foreach($bookChildren as $bookChild)
  • - {{ $bookChild->name }} + @icon($bookChild->isA('chapter') ? 'chapter' : 'page'){{ $bookChild->name }} @if($bookChild->isA('chapter'))
      @foreach($bookChild->pages as $page) diff --git a/resources/views/books/sort.blade.php b/resources/views/books/sort.blade.php index 7aecab9a4..b7e156b67 100644 --- a/resources/views/books/sort.blade.php +++ b/resources/views/books/sort.blade.php @@ -17,7 +17,7 @@
      -

      {{ trans('entities.books_sort') }}

      +

      @icon('sort') {{ trans('entities.books_sort') }}

      @include('books/sort-box', ['book' => $book, 'bookChildren' => $bookChildren]) diff --git a/resources/views/chapters/list-item.blade.php b/resources/views/chapters/list-item.blade.php index 32c2b3952..e5d8b207c 100644 --- a/resources/views/chapters/list-item.blade.php +++ b/resources/views/chapters/list-item.blade.php @@ -21,7 +21,7 @@ @if(!isset($hidePages) && count($chapter->pages) > 0) -

      @icon('page') {{ trans_choice('entities.x_pages', $chapter->pages->count()) }}

      +

      @icon('caret-right') @icon('page') {{ trans_choice('entities.x_pages', $chapter->pages->count()) }}

      @foreach($chapter->pages as $page)
      @icon('page'){{$page->name}}
      diff --git a/resources/views/chapters/move.blade.php b/resources/views/chapters/move.blade.php index a656c4fae..f43373324 100644 --- a/resources/views/chapters/move.blade.php +++ b/resources/views/chapters/move.blade.php @@ -11,7 +11,7 @@
      -

      {{ trans('entities.chapters_move') }}

      +

      @icon('folder') {{ trans('entities.chapters_move') }}

      {!! csrf_field() !!} diff --git a/resources/views/chapters/restrictions.blade.php b/resources/views/chapters/restrictions.blade.php index c2981c68a..d892d30d5 100644 --- a/resources/views/chapters/restrictions.blade.php +++ b/resources/views/chapters/restrictions.blade.php @@ -11,7 +11,7 @@

       

      -

      {{ trans('entities.chapters_permissions') }}

      +

      @icon('lock') {{ trans('entities.chapters_permissions') }}

      @include('form/restriction-form', ['model' => $chapter])
      diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index 07ede6c0d..ef6987bb1 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -7,7 +7,7 @@
      -
      {{ trans('entities.export') }}
      +
      @icon('export'){{ trans('entities.export') }}
      @if($book->restricted || $chapter->restricted)
      -

      {{ trans('entities.permissions') }}

      +

      @icon('permission') {{ trans('entities.permissions') }}

      @if($book->restricted)

      @if(userCan('restrictions-manage', $book)) - {{ trans('entities.books_permissions_active') }} + @icon('lock'){{ trans('entities.books_permissions_active') }} @else - {{ trans('entities.books_permissions_active') }} + @icon('lock'){{ trans('entities.books_permissions_active') }} @endif

      @endif @@ -74,9 +74,9 @@ @if($chapter->restricted)

      @if(userCan('restrictions-manage', $chapter)) - {{ trans('entities.chapters_permissions_active') }} + @icon('lock'){{ trans('entities.chapters_permissions_active') }} @else - {{ trans('entities.chapters_permissions_active') }} + @icon('lock'){{ trans('entities.chapters_permissions_active') }} @endif

      @endif @@ -85,7 +85,7 @@ @endif
      -

      {{ trans('common.details') }}

      +

      @icon('info') {{ trans('common.details') }}

      @include('partials.entity-meta', ['entity' => $chapter])
      @@ -128,7 +128,7 @@
      -

      {{ trans('entities.search_results') }} {{ trans('entities.search_clear') }}

      +

      {{ trans('entities.search_results') }} @icon('close'){{ trans('entities.search_clear') }}

      @include('partials/loading-icon')
      diff --git a/resources/views/comments/comment.blade.php b/resources/views/comments/comment.blade.php index 37b40d579..29d1292c2 100644 --- a/resources/views/comments/comment.blade.php +++ b/resources/views/comments/comment.blade.php @@ -6,7 +6,7 @@ @endif @if(userCan('comment-create-all')) - + @endif @if(userCan('comment-delete', $comment)) diff --git a/resources/views/comments/comments.blade.php b/resources/views/comments/comments.blade.php index a5d6d3d6e..8186070c3 100644 --- a/resources/views/comments/comments.blade.php +++ b/resources/views/comments/comments.blade.php @@ -11,7 +11,7 @@ @if(userCan('comment-create-all'))
- +
@@ -87,12 +87,12 @@ {{ trans('entities.pages_md_editor') }}
@if(config('services.drawio')) - +  |  @endif - +  |  - +
diff --git a/resources/views/pages/move.blade.php b/resources/views/pages/move.blade.php index 8f934a30e..9785af357 100644 --- a/resources/views/pages/move.blade.php +++ b/resources/views/pages/move.blade.php @@ -11,7 +11,7 @@

 

-

{{ trans('entities.pages_move') }}

+

@icon('folder') {{ trans('entities.pages_move') }}

{!! csrf_field() !!} diff --git a/resources/views/pages/restrictions.blade.php b/resources/views/pages/restrictions.blade.php index 8f0e5353d..03253a6b3 100644 --- a/resources/views/pages/restrictions.blade.php +++ b/resources/views/pages/restrictions.blade.php @@ -10,7 +10,7 @@

 

-

{{ trans('entities.pages_permissions') }}

+

@icon('lock') {{ trans('entities.pages_permissions') }}

@include('form.restriction-form', ['model' => $page])
diff --git a/resources/views/pages/revision.blade.php b/resources/views/pages/revision.blade.php index ca74e4afa..f3243e591 100644 --- a/resources/views/pages/revision.blade.php +++ b/resources/views/pages/revision.blade.php @@ -2,7 +2,7 @@ @section('sidebar')
-

{{ trans('common.details') }}

+

@icon('info') {{ trans('common.details') }}

@include('partials.entity-meta', ['entity' => $revision])
diff --git a/resources/views/pages/revisions.blade.php b/resources/views/pages/revisions.blade.php index ed3aa4832..c09661206 100644 --- a/resources/views/pages/revisions.blade.php +++ b/resources/views/pages/revisions.blade.php @@ -11,7 +11,7 @@

 

-

{{ trans('entities.pages_revisions') }}

+

@icon('history') {{ trans('entities.pages_revisions') }}

@if(count($page->revisions) > 0) diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php index 15ebd6f26..f11da0f4f 100644 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@ -7,7 +7,7 @@
-
{{ trans('entities.export') }}
+
@icon('export'){{ trans('entities.export') }}
  • {{ trans('entities.export_html') }} .html
  • {{ trans('entities.export_pdf') }} .pdf
  • @@ -19,14 +19,14 @@ @endif @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page))