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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M18 2H6c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 4h5v8l-2.5-1.5L6 12V4z"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M4 6H2v14c0 1.1.9 2 2 2h14v-2H4V6zm16-4H8c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-1 9H9V9h10v2zm-4 4H9v-2h6v2zm4-8H9V5h10v2z"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M21 3.01H3c-1.1 0-2 .9-2 2V9h2V4.99h18v14.03H3V15H1v4.01c0 1.1.9 1.98 2 1.98h18c1.1 0 2-.88 2-1.98v-14c0-1.11-.9-2-2-2zM11 16l4-4-4-4v3H1v2h10v3z"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M15 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm-9-2V7H4v3H1v2h3v3h2v-3h3v-2H6zm9 4c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 16H8v-2h8v2zm0-4H8v-2h8v2zm-3-5V3.5L18.5 9H13z"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/> + <path d="M0 0h24v24H0z" fill="none"/> +</svg> \ 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 @@ +<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/> + <path d="M0 0h24v24H0z" fill="none"/> + <path d="M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/> +</svg> \ 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)) - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a> + <a href="{{ baseUrl("/register") }}">@icon('new-user') {{ trans('auth.sign_up') }}</a> @endif @stop @@ -10,13 +10,12 @@ <div class="text-center"> <div class="card center-box"> - <h3><i class="zmdi zmdi-sign-in"></i> {{ title_case(trans('auth.log_in')) }}</h3> + <h3>@icon('login') {{ title_case(trans('auth.log_in')) }}</h3> <div class="body"> <form action="{{ baseUrl("/login") }}" method="POST" id="login-form"> {!! csrf_field() !!} - @include('auth/forms/login/' . $authMethod) <div class="form-group"> @@ -25,9 +24,8 @@ <label for="remember" class="toggle-switch"></label> </div> - <div class="from-group"> - <button class="button block pos" tabindex="3"><i class="zmdi zmdi-sign-in"></i> {{ title_case(trans('auth.log_in')) }}</button> + <button class="button block pos" tabindex="3">@icon('login') {{ title_case(trans('auth.log_in')) }}</button> </div> </form> @@ -35,7 +33,7 @@ <hr class="margin-top"> @foreach($socialDrivers as $driver => $name) <a id="social-login-{{$driver}}" class="button block muted-light svg text-left" href="{{ baseUrl("/login/service/" . $driver) }}"> - @icon($driver) + @icon('auth/' . $driver) {{ trans('auth.log_in_with', ['socialDriver' => $name]) }} </a> @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') - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> + <a href="{{ baseUrl("/login") }}">@icon('login') {{ trans('auth.log_in') }}</a> @if(setting('registration-enabled')) - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a> + <a href="{{ baseUrl("/register") }}">@icon('new-user') {{ trans('auth.sign_up') }}</a> @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') - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> + <a href="{{ baseUrl("/login") }}">@icon('login') {{ trans('auth.log_in') }}</a> @if(setting('registration-enabled')) - <a href="{{ baseUrl("/register") }}"><i class="zmdi zmdi-account-add"></i>{{ trans('auth.sign_up') }}</a> + <a href="{{ baseUrl("/register") }}">@icon('new-user') {{ trans('auth.sign_up') }}</a> @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) - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> + <a href="{{ baseUrl("/login") }}">@icon('login') {{ trans('auth.log_in') }}</a> @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') - <a href="{{ baseUrl("/login") }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> + <a href="{{ baseUrl("/login") }}">@icon('login') {{ trans('auth.log_in') }}</a> @stop @section('content') <div class="text-center"> <div class="card center-box"> - <h3><i class="zmdi zmdi-account-add"></i> {{ title_case(trans('auth.sign_up')) }}</h3> + <h3>@icon('new-user') {{ title_case(trans('auth.sign_up')) }}</h3> <div class="body"> <form action="{{ baseUrl("/register") }}" method="POST"> {!! csrf_field() !!} @@ -37,7 +37,7 @@ <hr class="margin-top"> @foreach($socialDrivers as $driver => $name) <a id="social-register-{{$driver}}" class="button block muted-light svg text-left" href="{{ baseUrl("/register/service/" . $driver) }}"> - @icon($driver) + @icon('auth/' . $driver) {{ trans('auth.sign_up_with', ['socialDriver' => $name]) }} </a> @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 @@ <div class="float right"> <div class="header-search"> <form action="{{ baseUrl('/search') }}" method="GET" class="search-box"> - <button id="header-search-box-button" type="submit"><i class="zmdi zmdi-search"></i> </button> + <button id="header-search-box-button" type="submit">@icon('search') </button> <input id="header-search-box-input" type="text" name="term" tabindex="2" placeholder="{{ trans('common.search') }}" value="{{ isset($searchTerm) ? $searchTerm : '' }}"> </form> </div> <div class="links text-center"> - <a href="{{ baseUrl('/books') }}"><i class="zmdi zmdi-book"></i>{{ trans('entities.books') }}</a> + <a href="{{ baseUrl('/books') }}">@icon('book'){{ trans('entities.books') }}</a> @if(signedInUser() && userCan('settings-manage')) <a href="{{ baseUrl('/settings') }}"><i class="zmdi zmdi-settings"></i>{{ trans('settings.settings') }}</a> @endif @if(!signedInUser()) - <a href="{{ baseUrl('/login') }}"><i class="zmdi zmdi-sign-in"></i>{{ trans('auth.log_in') }}</a> + <a href="{{ baseUrl('/login') }}">@icon('login') {{ trans('auth.log_in') }}</a> @endif </div> @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 @@ <div class="breadcrumbs"> - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> + <a href="{{$book->getUrl()}}" class="text-book text-button">@icon('book'){{ $book->getShortName() }}</a> </div> \ 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') <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> + <a href="{{ baseUrl('/books') }}" class="text-button">@icon('book'){{ trans('entities.books') }}</a> <span class="sep">»</span> - <a href="{{ baseUrl('/books/create') }}" class="text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a> + <a href="{{ baseUrl('/books/create') }}" class="text-button">@icon('add'){{ trans('entities.books_create') }}</a> </div> </div> @stop @@ -15,7 +15,7 @@ <div ng-non-bindable class="container small"> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-plus"></i> {{ trans('entities.books_create') }}</h3> + <h3>@icon('add') {{ trans('entities.books_create') }}</h3> <div class="body"> <form action="{{ baseUrl("/books") }}" method="POST" enctype="multipart/form-data"> @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 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-delete"></i> {{ trans('entities.books_delete') }}</h3> + <h3>@icon('delete') {{ trans('entities.books_delete') }}</h3> <div class="body"> <p>{{ trans('entities.books_delete_explain', ['bookName' => $book->name]) }}</p> <p class="text-neg">{{ trans('entities.books_delete_confirmation') }}</p> 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 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.books_edit') }}</h3> + <h3>@icon('edit') {{ trans('entities.books_edit') }}</h3> <div class="body"> <form action="{{ $book->getUrl() }}" method="POST"> <input type="hidden" name="_method" value="PUT"> 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 @@ <div class="col-xs-6 faded"> <div class="action-buttons"> @if($currentUser->can('book-create-all')) - <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.books_create') }}</a> + <a href="{{ baseUrl("/books/create") }}" class="text-pos text-button">@icon('add'){{ trans('entities.books_create') }}</a> @endif </div> </div> @@ -78,7 +78,7 @@ @else <p class="text-muted">{{ trans('entities.books_empty') }}</p> @if(userCan('books-create-all')) - <a href="{{ baseUrl("/books/create") }}" class="text-pos"><i class="zmdi zmdi-edit"></i>{{ trans('entities.create_one_now') }}</a> + <a href="{{ baseUrl("/books/create") }}" class="text-pos">@icon('edit'){{ trans('entities.create_one_now') }}</a> @endif @endif </div> 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 @@ <div class="book entity-list-item" data-entity-type="book" data-entity-id="{{$book->id}}"> - <h4 class="text-book"><a class="text-book entity-list-item-link" href="{{$book->getUrl()}}"><i class="zmdi zmdi-book"></i><span class="entity-list-item-name break-text">{{$book->name}}</span></a></h4> + <h4 class="text-book"><a class="text-book entity-list-item-link" href="{{$book->getUrl()}}">@icon('book')<span class="entity-list-item-name break-text">{{$book->name}}</span></a></h4> <div class="entity-item-snippet"> @if(isset($book->searchSnippet)) <p class="text-muted break-text">{!! $book->searchSnippet !!}</p> 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 @@ </ul> </span> @if(userCan('page-create', $book)) - <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a> + <a href="{{ $book->getUrl('/page/create') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a> @endif @if(userCan('chapter-create', $book)) - <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_new') }}</a> + <a href="{{ $book->getUrl('/chapter/create') }}" class="text-pos text-button">@icon('add'){{ trans('entities.chapters_new') }}</a> @endif @if(userCan('book-update', $book) || userCan('restrictions-manage', $book) || userCan('book-delete', $book)) <div dropdown class="dropdown-container"> <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-more-vert"></i>{{ trans('common.more') }}</a> <ul> @if(userCan('book-update', $book)) - <li><a href="{{$book->getEditUrl()}}" class="text-primary"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a></li> + <li><a href="{{$book->getEditUrl()}}" class="text-primary">@icon('edit'){{ trans('common.edit') }}</a></li> <li><a href="{{ $book->getUrl('/sort') }}" class="text-primary"><i class="zmdi zmdi-sort"></i>{{ trans('common.sort') }}</a></li> @endif @if(userCan('restrictions-manage', $book)) <li><a href="{{ $book->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li> @endif @if(userCan('book-delete', $book)) - <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li> + <li><a href="{{ $book->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li> @endif </ul> </div> @@ -47,7 +47,7 @@ <div class="body"> <form v-on:submit.prevent="searchBook" class="search-box"> <input v-model="searchTerm" v-on:change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.books_search_this') }}"> - <button type="submit"><i class="zmdi zmdi-search"></i></button> + <button type="submit">@icon('search')</button> <button v-if="searching" v-cloak class="text-neg" v-on:click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button> </form> </div> @@ -70,7 +70,7 @@ @if(count($activity) > 0) <div class="activity card"> - <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3> + <h3>@icon('time') {{ trans('entities.recent_activity') }}</h3> @include('partials/activity-list', ['activity' => $activity]) </div> @endif @@ -111,13 +111,13 @@ <div class="well"> <p class="text-muted italic">{{ trans('entities.books_empty_contents') }}</p> @if(userCan('page-create', $book)) - <a href="{{ $book->getUrl('/page/create') }}" class="button outline 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">@icon('page'){{ trans('entities.books_empty_create_page') }}</a> @endif @if(userCan('page-create', $book) && userCan('chapter-create', $book)) <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em> @endif @if(userCan('chapter-create', $book)) - <a href="{{ $book->getUrl('/chapter/create') }}" class="button outline 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">@icon('chapter'){{ trans('entities.books_empty_add_chapter') }}</a> @endif </div> @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 @@ <div class="sort-box" data-type="book" data-id="{{ $book->id }}" ng-non-bindable> - <h3 class="text-book"><i class="zmdi zmdi-book"></i>{{ $book->name }}</h3> + <h3 class="text-book">@icon('book'){{ $book->name }}</h3> <ul class="sortable-page-list sort-list"> @foreach($bookChildren as $bookChild) <li data-id="{{$bookChild->id}}" data-type="{{ $bookChild->getClassName() }}" class="text-{{ $bookChild->getClassName() }}"> @@ -8,7 +8,7 @@ <ul> @foreach($bookChild->pages as $page) <li data-id="{{$page->id}}" class="text-page" data-type="page"> - <i class="zmdi zmdi-file-text"></i> + @icon('page') {{ $page->name }} </li> @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) <div class="col-md-4"> <div class="card"> - <h3><i class="zmdi zmdi-book"></i> {{ trans('entities.books_sort_show_other') }}</h3> + <h3>@icon('book') {{ trans('entities.books_sort_show_other') }}</h3> <div class="body" id="additional-books"> @foreach($books as $otherBook) @if($otherBook->id !== $book->id) <div> - <a href="{{ $otherBook->getUrl('/sort-item') }}" class="text-book"><i class="zmdi zmdi-book"></i>{{ $otherBook->name }}</a> + <a href="{{ $otherBook->getUrl('/sort-item') }}" class="text-book">@icon('book'){{ $otherBook->name }}</a> </div> @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 @@ <div class="breadcrumbs"> @if (userCan('view', $chapter->book)) - <a href="{{ $chapter->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }}</a> + <a href="{{ $chapter->book->getUrl() }}" class="text-book text-button">@icon('book'){{ $chapter->book->getShortName() }}</a> <span class="sep">»</span> @endif - <a href="{{ $chapter->getUrl() }}" class="text-chapter text-button"><i class="zmdi zmdi-collection-bookmark"></i>{{$chapter->getShortName()}}</a> + <a href="{{ $chapter->getUrl() }}" class="text-chapter text-button">@icon('chapter'){{$chapter->getShortName()}}</a> </div> \ 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') <div class="col-sm-12 faded"> <div class="breadcrumbs"> - <a href="{{$book->getUrl()}}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $book->getShortName() }}</a> + <a href="{{$book->getUrl()}}" class="text-book text-button">@icon('book'){{ $book->getShortName() }}</a> <span class="sep">»</span> - <a href="{{ baseUrl('/books/chapter/create') }}" class="text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.chapters_create') }}</a> + <a href="{{ baseUrl('/books/chapter/create') }}" class="text-button">@icon('add'){{ trans('entities.chapters_create') }}</a> </div> </div> @stop @@ -14,7 +14,7 @@ <div class="container small" ng-non-bindable> <div class="card"> - <h3><i class="zmdi zmdi-plus"></i> {{ trans('entities.chapters_create') }}</h3> + <h3>@icon('add') {{ trans('entities.chapters_create') }}</h3> <div class="body"> <form action="{{ $book->getUrl('/chapter/create') }}" method="POST"> @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 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-delete"></i> {{ trans('entities.chapters_delete') }}</h3> + <h3>@icon('delete') {{ trans('entities.chapters_delete') }}</h3> <div class="body"> <p>{{ trans('entities.chapters_delete_explain', ['chapterName' => $chapter->name]) }}</p> 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 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.chapters_edit') }}</h3> + <h3>@icon('edit') {{ trans('entities.chapters_edit') }}</h3> <div class="body"> <form action="{{ $chapter->getUrl() }}" method="POST"> <input type="hidden" name="_method" value="PUT"> 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 @@ <h4> @if (isset($showPath) && $showPath) <a href="{{ $chapter->book->getUrl() }}" class="text-book"> - <i class="zmdi zmdi-book"></i>{{ $chapter->book->getShortName() }} + @icon('book'){{ $chapter->book->getShortName() }} </a> <span class="text-muted"> » </span> @endif <a href="{{ $chapter->getUrl() }}" class="text-chapter entity-list-item-link"> - <i class="zmdi zmdi-collection-bookmark"></i><span class="entity-list-item-name break-text">{{ $chapter->name }}</span> + @icon('chapter')<span class="entity-list-item-name break-text">{{ $chapter->name }}</span> </a> </h4> @@ -21,10 +21,10 @@ @if(!isset($hidePages) && count($chapter->pages) > 0) - <p chapter-toggle class="text-muted"><i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans_choice('entities.x_pages', $chapter->pages->count()) }}</span></p> + <p chapter-toggle class="text-muted"><i class="zmdi zmdi-caret-right"></i> @icon('page') <span>{{ trans_choice('entities.x_pages', $chapter->pages->count()) }}</span></p> <div class="inset-list"> @foreach($chapter->pages as $page) - <h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif"><i class="zmdi zmdi-file-text"></i>{{$page->name}}</a></h5> + <h5 class="@if($page->draft) draft @endif"><a href="{{ $page->getUrl() }}" class="text-page @if($page->draft) draft @endif">@icon('page'){{$page->name}}</a></h5> @endforeach </div> @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 @@ </ul> </span> @if(userCan('page-create', $chapter)) - <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button"><i class="zmdi zmdi-plus"></i>{{ trans('entities.pages_new') }}</a> + <a href="{{ $chapter->getUrl('/create-page') }}" class="text-pos text-button">@icon('add'){{ trans('entities.pages_new') }}</a> @endif @if(userCan('chapter-update', $chapter)) - <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button"><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a> + <a href="{{ $chapter->getUrl('/edit') }}" class="text-primary text-button">@icon('edit'){{ trans('common.edit') }}</a> @endif @if(userCan('chapter-update', $chapter) || userCan('restrictions-manage', $chapter) || userCan('chapter-delete', $chapter)) <div dropdown class="dropdown-container"> @@ -31,7 +31,7 @@ <li><a href="{{ $chapter->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li> @endif @if(userCan('chapter-delete', $chapter)) - <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li> + <li><a href="{{ $chapter->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li> @endif </ul> </div> @@ -51,7 +51,7 @@ <div class="body"> <form @submit.prevent="searchBook" class="search-box"> <input v-model="searchTerm" @change="checkSearchForm()" type="text" name="term" placeholder="{{ trans('entities.chapters_search_this') }}"> - <button type="submit"><i class="zmdi zmdi-search"></i></button> + <button type="submit">@icon('search')</button> <button v-if="searching" v-cloak class="text-neg" @click="clearSearch()" type="button"><i class="zmdi zmdi-close"></i></button> </form> </div> @@ -114,13 +114,13 @@ <p class="text-muted italic">{{ trans('entities.chapters_empty') }}</p> <p> @if(userCan('page-create', $chapter)) - <a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page"><i class="zmdi zmdi-file-text"></i>{{ trans('entities.books_empty_create_page') }}</a> + <a href="{{ $chapter->getUrl('/create-page') }}" class="button outline page">@icon('page'){{ trans('entities.books_empty_create_page') }}</a> @endif @if(userCan('page-create', $chapter) && userCan('book-update', $book)) <em class="text-muted">-{{ trans('entities.books_empty_or') }}-</em> @endif @if(userCan('book-update', $book)) - <a href="{{ $book->getUrl('/sort') }}" class="button outline book"><i class="zmdi zmdi-book"></i>{{ trans('entities.books_empty_sort_current_book') }}</a> + <a href="{{ $book->getUrl('/sort') }}" class="button outline book">@icon('book'){{ trans('entities.books_empty_sort_current_book') }}</a> @endif </p> </div> 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 @@ <div class="float right actions"> @if(userCan('comment-update', $comment)) - <button type="button" class="text-button" action="edit" title="{{ trans('common.edit') }}"><i class="zmdi zmdi-edit"></i></button> + <button type="button" class="text-button" action="edit" title="{{ trans('common.edit') }}">@icon('edit')</button> @endif @if(userCan('comment-create-all')) <button type="button" class="text-button" action="reply" title="{{ trans('common.reply') }}"><i class="zmdi zmdi-mail-reply-all"></i></button> @@ -11,10 +11,10 @@ @if(userCan('comment-delete', $comment)) <div dropdown class="dropdown-container"> - <button type="button" dropdown-toggle class="text-button" title="{{ trans('common.delete') }}"><i class="zmdi zmdi-delete"></i></button> + <button type="button" dropdown-toggle class="text-button" title="{{ trans('common.delete') }}">@icon('delete')</button> <ul> <li class="padded"><small class="text-muted">{{trans('entities.comment_delete_confirm')}}</small></li> - <li><a action="delete" class="text-button neg" ><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li> + <li><a action="delete" class="text-button neg" >@icon('delete'){{ trans('common.delete') }}</a></li> </ul> </div> @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 @@ <form @submit.prevent="searchImages" class="contained-search-box"> <input placeholder="{{ trans('components.image_search_hint') }}" v-model="searchTerm"> <button :class="{active: searching}" title="{{ trans('common.search_clear') }}" type="button" @click="cancelSearch()" class="text-button cancel"><i class="zmdi zmdi-close-circle-o"></i></button> - <button title="{{ trans('common.search') }}" class="text-button"><i class="zmdi zmdi-search"></i></button> + <button title="{{ trans('common.search') }}" class="text-button">@icon('search')</button> </form> </div> <div class="image-manager-list"> @@ -70,7 +70,7 @@ <div class="clearfix"> <form class="float left" @submit.prevent="deleteImage"> - <button class="button icon neg"><i class="zmdi zmdi-delete"></i></button> + <button class="button icon neg">@icon('delete')</button> </form> <button class="button pos anim fadeIn float right" v-show="selectedImage" @click="callbackAndHide(selectedImage)"> <i class="zmdi zmdi-square-right"></i>{{ trans('components.image_select_image') }} diff --git a/resources/views/errors/404.blade.php b/resources/views/errors/404.blade.php index 7cc67a677..8dd2219e3 100644 --- a/resources/views/errors/404.blade.php +++ b/resources/views/errors/404.blade.php @@ -17,19 +17,19 @@ <div class="row"> <div class="col-md-4"> <div class="card"> - <h3 class="text-muted"><i class="zmdi zmdi-file-text"></i> {{ trans('entities.pages_popular') }}</h3> + <h3 class="text-muted">@icon('page') {{ trans('entities.pages_popular') }}</h3> @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Page::class]), 'style' => 'compact']) </div> </div> <div class="col-md-4"> <div class="card"> - <h3 class="text-muted"><i class="zmdi zmdi-book"></i> {{ trans('entities.books_popular') }}</h3> + <h3 class="text-muted">@icon('book') {{ trans('entities.books_popular') }}</h3> @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Book::class]), 'style' => 'compact']) </div> </div> <div class="col-md-4"> <div class="card"> - <h3 class="text-muted"><i class="zmdi zmdi-collection-bookmark"></i> {{ trans('entities.chapters_popular') }}</h3> + <h3 class="text-muted">@icon('chapter') {{ trans('entities.chapters_popular') }}</h3> @include('partials.entity-list', ['entities' => Views::getPopular(10, 0, [\BookStack\Chapter::class]), 'style' => 'compact']) </div> </div> diff --git a/resources/views/home-custom.blade.php b/resources/views/home-custom.blade.php index 3d4616c4a..b155c8856 100644 --- a/resources/views/home-custom.blade.php +++ b/resources/views/home-custom.blade.php @@ -11,7 +11,7 @@ @section('sidebar') @if(count($draftPages) > 0) <div id="recent-drafts" class="card"> - <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.my_recent_drafts') }}</h3> + <h3>@icon('edit') {{ trans('entities.my_recent_drafts') }}</h3> @include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact']) </div> @endif @@ -37,7 +37,7 @@ </div> <div id="recent-activity" class="card"> - <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3> + <h3>@icon('time') {{ trans('entities.recent_activity') }}</h3> @include('partials/activity-list', ['activity' => $activity]) </div> @stop diff --git a/resources/views/home.blade.php b/resources/views/home.blade.php index 28be91414..70c55f26f 100644 --- a/resources/views/home.blade.php +++ b/resources/views/home.blade.php @@ -16,7 +16,7 @@ <div class="col-sm-4"> @if(count($draftPages) > 0) <div id="recent-drafts" class="card"> - <h3><i class="zmdi zmdi-edit"></i> {{ trans('entities.my_recent_drafts') }}</h3> + <h3>@icon('edit') {{ trans('entities.my_recent_drafts') }}</h3> @include('partials/entity-list', ['entities' => $draftPages, 'style' => 'compact']) </div> @endif @@ -46,7 +46,7 @@ <div class="col-sm-4" id="recent-activity"> <div class="card"> - <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3> + <h3>@icon('time') {{ trans('entities.recent_activity') }}</h3> @include('partials/activity-list', ['activity' => $activity]) </div> </div> diff --git a/resources/views/pages/_breadcrumbs.blade.php b/resources/views/pages/_breadcrumbs.blade.php index a7fb8fa0e..798ec379f 100644 --- a/resources/views/pages/_breadcrumbs.blade.php +++ b/resources/views/pages/_breadcrumbs.blade.php @@ -1,11 +1,11 @@ <div class="breadcrumbs"> @if (userCan('view', $page->book)) - <a href="{{ $page->book->getUrl() }}" class="text-book text-button"><i class="zmdi zmdi-book"></i>{{ $page->book->getShortName() }}</a> + <a href="{{ $page->book->getUrl() }}" class="text-book text-button">@icon('book'){{ $page->book->getShortName() }}</a> <span class="sep">»</span> @endif @if($page->hasChapter() && userCan('view', $page->chapter)) <a href="{{ $page->chapter->getUrl() }}" class="text-chapter text-button"> - <i class="zmdi zmdi-collection-bookmark"></i> + @icon('chapter') {{ $page->chapter->getShortName() }} </a> <span class="sep">»</span> diff --git a/resources/views/pages/delete.blade.php b/resources/views/pages/delete.blade.php index 47906a1f6..6c84819ec 100644 --- a/resources/views/pages/delete.blade.php +++ b/resources/views/pages/delete.blade.php @@ -11,7 +11,7 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-delete"></i> {{ $page->draft ? trans('entities.pages_delete_draft') : trans('entities.pages_delete') }}</h3> + <h3>@icon('delete') {{ $page->draft ? trans('entities.pages_delete_draft') : trans('entities.pages_delete') }}</h3> <div class="body"> <p class="text-neg">{{ $page->draft ? trans('entities.pages_delete_draft_confirm'): trans('entities.pages_delete_confirm') }}</p> diff --git a/resources/views/pages/form-toolbox.blade.php b/resources/views/pages/form-toolbox.blade.php index d448aad5b..4d4944ec5 100644 --- a/resources/views/pages/form-toolbox.blade.php +++ b/resources/views/pages/form-toolbox.blade.php @@ -61,7 +61,7 @@ <span class="text-primary small" @click="file.deleting = false;">{{ trans('common.cancel') }}</span> </div> </div> - <div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;"><i class="zmdi zmdi-edit"></i></div> + <div @click="startEdit(file)" class="drag-card-action text-center text-primary" style="padding: 0;">@icon('edit')</div> <div @click="deleteFile(file)" class="drag-card-action text-center text-neg" style="padding: 0;"><i class="zmdi zmdi-close"></i></div> </div> </draggable> diff --git a/resources/views/pages/form.blade.php b/resources/views/pages/form.blade.php index 53861527b..7ac491c98 100644 --- a/resources/views/pages/form.blade.php +++ b/resources/views/pages/form.blade.php @@ -29,7 +29,7 @@ <a @click="saveDraft()" class="text-pos"><i class="zmdi zmdi-save"></i>{{ trans('entities.pages_edit_save_draft') }}</a> </li> <li v-if="isNewDraft"> - <a href="{{ $model->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('entities.pages_edit_delete_draft') }}</a> + <a href="{{ $model->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('entities.pages_edit_delete_draft') }}</a> </li> <li v-if="isUpdateDraft"> <a type="button" @click="discardDraft" class="text-neg"><i class="zmdi zmdi-close-circle"></i>{{ trans('entities.pages_edit_discard_draft') }}</a> @@ -40,7 +40,7 @@ <div class="col-sm-4 faded"> <div class="action-buttons" v-cloak> <div dropdown class="dropdown-container"> - <a dropdown-toggle class="text-primary text-button"><i class="zmdi zmdi-edit"></i> <span v-text="changeSummaryShort"></span></a> + <a dropdown-toggle class="text-primary text-button">@icon('edit') <span v-text="changeSummaryShort"></span></a> <ul class="wide"> <li class="padded"> <p class="text-muted">{{ trans('entities.pages_edit_enter_changelog_desc') }}</p> diff --git a/resources/views/pages/list-item.blade.php b/resources/views/pages/list-item.blade.php index 554e90e44..b13bb0f12 100644 --- a/resources/views/pages/list-item.blade.php +++ b/resources/views/pages/list-item.blade.php @@ -2,17 +2,17 @@ <h4> @if (isset($showPath) && $showPath) <a href="{{ $page->book->getUrl() }}" class="text-book"> - <i class="zmdi zmdi-book"></i>{{ $page->book->getShortName() }} + @icon('book'){{ $page->book->getShortName() }} </a> <span class="text-muted"> » </span> @if($page->chapter) <a href="{{ $page->chapter->getUrl() }}" class="text-chapter"> - <i class="zmdi zmdi-collection-bookmark"></i>{{ $page->chapter->getShortName() }} + @icon('chapter'){{ $page->chapter->getShortName() }} </a> <span class="text-muted"> » </span> @endif @endif - <a href="{{ $page->getUrl() }}" class="text-page entity-list-item-link"><i class="zmdi zmdi-file-text"></i><span class="entity-list-item-name break-text">{{ $page->name }}</span></a> + <a href="{{ $page->getUrl() }}" class="text-page entity-list-item-link">@icon('page')<span class="entity-list-item-name break-text">{{ $page->name }}</span></a> </h4> <div class="entity-item-snippet"> @@ -29,12 +29,12 @@ @include('partials.entity-meta', ['entity' => $page]) </div> <div class="col-md-6"> - <a class="text-book" href="{{ $page->book->getUrl() }}"><i class="zmdi zmdi-book"></i>{{ $page->book->getShortName(30) }}</a> + <a class="text-book" href="{{ $page->book->getUrl() }}">@icon('book'){{ $page->book->getShortName(30) }}</a> <br> @if($page->chapter) - <a class="text-chapter" href="{{ $page->chapter->getUrl() }}"><i class="zmdi zmdi-collection-bookmark"></i>{{ $page->chapter->getShortName(30) }}</a> + <a class="text-chapter" href="{{ $page->chapter->getUrl() }}">@icon('chapter'){{ $page->chapter->getShortName(30) }}</a> @else - <i class="zmdi zmdi-collection-bookmark"></i> {{ trans('entities.pages_not_in_chapter') }} + @icon('chapter') {{ trans('entities.pages_not_in_chapter') }} @endif </div> </div> diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php index 3e10ac63a..15ebd6f26 100644 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@ -15,7 +15,7 @@ </ul> </span> @if(userCan('page-update', $page)) - <a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" ><i class="zmdi zmdi-edit"></i>{{ trans('common.edit') }}</a> + <a href="{{ $page->getUrl('/edit') }}" class="text-primary text-button" >@icon('edit'){{ trans('common.edit') }}</a> @endif @if(userCan('page-update', $page) || userCan('restrictions-manage', $page) || userCan('page-delete', $page)) <div dropdown class="dropdown-container"> @@ -29,7 +29,7 @@ <li><a href="{{ $page->getUrl('/permissions') }}" class="text-primary"><i class="zmdi zmdi-lock-outline"></i>{{ trans('entities.permissions') }}</a></li> @endif @if(userCan('page-delete', $page)) - <li><a href="{{ $page->getUrl('/delete') }}" class="text-neg"><i class="zmdi zmdi-delete"></i>{{ trans('common.delete') }}</a></li> + <li><a href="{{ $page->getUrl('/delete') }}" class="text-neg">@icon('delete'){{ trans('common.delete') }}</a></li> @endif </ul> </div> diff --git a/resources/views/partials/activity-item.blade.php b/resources/views/partials/activity-item.blade.php index 185e68038..1dbfc9de8 100644 --- a/resources/views/partials/activity-item.blade.php +++ b/resources/views/partials/activity-item.blade.php @@ -24,5 +24,5 @@ <br> - <span class="text-muted"><small><i class="zmdi zmdi-time"></i>{{ $activity->created_at->diffForHumans() }}</small></span> + <span class="text-muted"><small>@icon('time'){{ $activity->created_at->diffForHumans() }}</small></span> </div> diff --git a/resources/views/partials/book-tree.blade.php b/resources/views/partials/book-tree.blade.php index b954a4952..f4567ffde 100644 --- a/resources/views/partials/book-tree.blade.php +++ b/resources/views/partials/book-tree.blade.php @@ -1,27 +1,27 @@ <div class="card book-tree" v-pre> - <h3><i class="zmdi zmdi-book"></i> {{ trans('entities.books_navigation') }}</h3> + <h3>@icon('book') {{ trans('entities.books_navigation') }}</h3> <div class="body"> <ul class="sidebar-page-list menu"> @if (userCan('view', $book)) - <li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}"><i class="zmdi zmdi-book"></i>{{$book->name}}</a></li> + <li class="book-header"><a href="{{ $book->getUrl() }}" class="book {{ $current->matches($book)? 'selected' : '' }}">@icon('book'){{$book->name}}</a></li> @endif @foreach($sidebarTree as $bookChild) <li class="list-item-{{ $bookChild->getClassName() }} {{ $bookChild->getClassName() }} {{ $bookChild->isA('page') && $bookChild->draft ? 'draft' : '' }}"> <a href="{{ $bookChild->getUrl() }}" class="{{ $bookChild->getClassName() }} {{ $current->matches($bookChild)? 'selected' : '' }}"> - @if($bookChild->isA('chapter'))<i class="zmdi zmdi-collection-bookmark"></i>@else <i class="zmdi zmdi-file-text"></i>@endif{{ $bookChild->name }} + @if($bookChild->isA('chapter'))@icon('chapter')@else @icon('page')@endif{{ $bookChild->name }} </a> @if($bookChild->isA('chapter') && count($bookChild->pages) > 0) <p chapter-toggle class="text-muted @if($bookChild->matchesOrContains($current)) open @endif"> - <i class="zmdi zmdi-caret-right"></i> <i class="zmdi zmdi-file-text"></i> <span>{{ trans_choice('entities.x_pages', $bookChild->pages->count()) }}</span> + <i class="zmdi zmdi-caret-right"></i> @icon('page') <span>{{ trans_choice('entities.x_pages', $bookChild->pages->count()) }}</span> </p> <ul class="menu sub-menu inset-list @if($bookChild->matchesOrContains($current)) open @endif"> @foreach($bookChild->pages as $childPage) <li class="list-item-page {{ $childPage->isA('page') && $childPage->draft ? 'draft' : '' }}"> <a href="{{ $childPage->getUrl() }}" class="page {{ $current->matches($childPage)? 'selected' : '' }}"> - <i class="zmdi zmdi-file-text"></i> {{ $childPage->name }} + @icon('page') {{ $childPage->name }} </a> </li> @endforeach diff --git a/resources/views/partials/custom-styles.blade.php b/resources/views/partials/custom-styles.blade.php index a02f529c7..272aa3dc1 100644 --- a/resources/views/partials/custom-styles.blade.php +++ b/resources/views/partials/custom-styles.blade.php @@ -17,5 +17,6 @@ } .text-primary, p.primary, p .primary, span.primary:hover, .text-primary:hover, a, a:hover, a:focus, .text-button, .text-button:hover, .text-button:focus { color: {{ setting('app-color') }}; + fill: {{ setting('app-color') }}; } </style> \ No newline at end of file diff --git a/resources/views/search/all.blade.php b/resources/views/search/all.blade.php index 06a262cee..8dfca731a 100644 --- a/resources/views/search/all.blade.php +++ b/resources/views/search/all.blade.php @@ -3,7 +3,7 @@ @section('toolbar') <div class="col-sm-12 faded"> <div class="breadcrumbs"> - <a href="{{ baseUrl("/search?term=" . urlencode($searchTerm)) }}" class="text-button"><i class="zmdi zmdi-search"></i>{{ trans('entities.search_for_term', ['term' => $searchTerm]) }}</a> + <a href="{{ baseUrl("/search?term=" . urlencode($searchTerm)) }}" class="text-button">@icon('search'){{ trans('entities.search_for_term', ['term' => $searchTerm]) }}</a> </div> </div> @stop diff --git a/resources/views/search/entity-search-list.blade.php b/resources/views/search/entity-search-list.blade.php index 4e743f6bd..b60ca6f7e 100644 --- a/resources/views/search/entity-search-list.blade.php +++ b/resources/views/search/entity-search-list.blade.php @@ -7,7 +7,7 @@ <div class="row"> <div class="col-sm-12 faded"> <div class="breadcrumbs"> - <a href="{{ baseUrl("/search/all?term={$searchTerm}") }}" class="text-button"><i class="zmdi zmdi-search"></i>{{ $searchTerm }}</a> + <a href="{{ baseUrl("/search/all?term={$searchTerm}") }}" class="text-button">@icon('search'){{ $searchTerm }}</a> </div> </div> </div> diff --git a/resources/views/settings/roles/delete.blade.php b/resources/views/settings/roles/delete.blade.php index 8002cd4bd..7d7287277 100644 --- a/resources/views/settings/roles/delete.blade.php +++ b/resources/views/settings/roles/delete.blade.php @@ -8,7 +8,7 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-delete"></i> {{ trans('settings.role_delete') }}</h3> + <h3>@icon('delete') {{ trans('settings.role_delete') }}</h3> <div class="body"> <p>{{ trans('settings.role_delete_confirm', ['roleName' => $role->display_name]) }}</p> diff --git a/resources/views/users/delete.blade.php b/resources/views/users/delete.blade.php index a7d4e2476..ce9e0442f 100644 --- a/resources/views/users/delete.blade.php +++ b/resources/views/users/delete.blade.php @@ -9,7 +9,7 @@ <div class="container small" ng-non-bindable> <p> </p> <div class="card"> - <h3><i class="zmdi zmdi-delete"></i> {{ trans('settings.users_delete') }}</h3> + <h3>@icon('delete') {{ trans('settings.users_delete') }}</h3> <div class="body"> <p>{{ trans('settings.users_delete_warning', ['userName' => $user->name]) }}</p> <p class="text-neg">{{ trans('settings.users_delete_confirm') }}</p> diff --git a/resources/views/users/edit.blade.php b/resources/views/users/edit.blade.php index fc75593b8..80e320322 100644 --- a/resources/views/users/edit.blade.php +++ b/resources/views/users/edit.blade.php @@ -58,7 +58,7 @@ @if($currentUser->id === $user->id && count($activeSocialDrivers) > 0) <div class="card"> - <h3><i class="zmdi zmdi-sign-in"></i> {{ trans('settings.users_social_accounts') }}</h3> + <h3>@icon('login') {{ trans('settings.users_social_accounts') }}</h3> <div class="body"> <p class="text-muted">{{ trans('settings.users_social_accounts_info') }}</p> <div class="container"> diff --git a/resources/views/users/profile.blade.php b/resources/views/users/profile.blade.php index be04c97a9..007bb53b3 100644 --- a/resources/views/users/profile.blade.php +++ b/resources/views/users/profile.blade.php @@ -10,7 +10,7 @@ @section('sidebar') <div class="card" id="recent-activity"> - <h3><i class="zmdi zmdi-time"></i> {{ trans('entities.recent_activity') }}</h3> + <h3>@icon('time') {{ trans('entities.recent_activity') }}</h3> @include('partials/activity-list', ['activity' => $activity]) </div> @stop