From 624c568008af7e8fe8c2644742cb4c6c19bc4ad8 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Mon, 30 Apr 2018 14:35:15 +0100 Subject: [PATCH] Revamped tag styling --- resources/assets/sass/_blocks.scss | 30 +++++++++++++++++++ resources/assets/sass/_grid.scss | 3 ++ resources/views/books/show.blade.php | 16 ++++------ resources/views/chapters/show.blade.php | 16 +++++----- resources/views/components/tag-list.blade.php | 16 ++++------ resources/views/pages/show.blade.php | 9 ++---- 6 files changed, 55 insertions(+), 35 deletions(-) diff --git a/resources/assets/sass/_blocks.scss b/resources/assets/sass/_blocks.scss index 76d4d5e0c..b7a8dcc03 100644 --- a/resources/assets/sass/_blocks.scss +++ b/resources/assets/sass/_blocks.scss @@ -268,3 +268,33 @@ padding: $-m; border: 1px solid #DDD; } + +.tag-item { + display: inline-flex; + margin-bottom: $-xs; + margin-right: $-xs; + border-radius: 4px; + border: 1px solid #CCC; + overflow: hidden; + font-size: 0.85em; + a, a:hover, a:active { + padding: 4px 8px; + color: #777; + transition: background-color ease-in-out 80ms; + text-decoration: none; + } + a:hover { + background-color: rgba(255, 255, 255, 0.7); + } + svg { + fill: #888; + } + .tag-value { + border-left: 1px solid #DDD; + background-color: rgba(255, 255, 255, 0.5); + } +} + +.tag-list div:last-child .tag-item { + margin-bottom: 0; +} \ No newline at end of file diff --git a/resources/assets/sass/_grid.scss b/resources/assets/sass/_grid.scss index 10af80a54..8f15153b5 100644 --- a/resources/assets/sass/_grid.scss +++ b/resources/assets/sass/_grid.scss @@ -55,6 +55,9 @@ body.flexbox { background-color: #F2F2F2; max-width: 360px; min-height: 90vh; + section { + margin: $-m; + } } .flex.sidebar + .flex.content { flex: 3; diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index e97d9bb69..d0a2eb2f7 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -43,6 +43,12 @@ @section('sidebar') + @if($book->tags->count() > 0) +
+ @include('components.tag-list', ['entity' => $book]) +
+ @endif +
- @if($book->tags->count() > 0) -
-

@icon('tag') {{ trans('entities.book_tags') }}

-
- @include('components.tag-list', ['entity' => $book]) -
-
- @endif - -

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