From c3374393703b55d5c9efa54870c760b8899ceeeb Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 28 Jan 2023 16:06:11 +0000 Subject: [PATCH] Rolled out use of seperate link color style --- resources/js/components/setting-app-color-picker.js | 1 + resources/js/components/tabs.js | 2 ++ resources/lang/en/settings.php | 2 +- resources/sass/_buttons.scss | 10 +++------- resources/sass/_colors.scss | 10 +++++++++- resources/sass/_components.scss | 4 ++-- resources/sass/_forms.scss | 1 - resources/sass/_text.scss | 4 ++-- resources/sass/_variables.scss | 1 + resources/sass/styles.scss | 2 +- resources/views/attachments/manager-list.blade.php | 6 +++--- resources/views/books/index.blade.php | 2 +- resources/views/books/parts/convert-to-shelf.blade.php | 2 +- resources/views/books/parts/form.blade.php | 4 ++-- resources/views/books/show.blade.php | 2 +- resources/views/chapters/copy.blade.php | 2 +- .../views/chapters/parts/convert-to-book.blade.php | 2 +- resources/views/chapters/parts/form.blade.php | 2 +- resources/views/chapters/show.blade.php | 2 +- resources/views/entities/favourite-action.blade.php | 2 +- resources/views/entities/view-toggle.blade.php | 4 ++-- resources/views/form/entity-permissions-row.blade.php | 2 +- resources/views/home/books.blade.php | 6 +++--- resources/views/home/default.blade.php | 4 ++-- resources/views/home/shelves.blade.php | 6 +++--- resources/views/home/specific-page.blade.php | 6 +++--- resources/views/layouts/tri.blade.php | 4 ++-- resources/views/mfa/parts/setup-method-row.blade.php | 2 +- resources/views/pages/copy.blade.php | 2 +- resources/views/pages/parts/editor-toolbar.blade.php | 8 ++++---- resources/views/pages/parts/form.blade.php | 2 +- .../views/pages/parts/image-manager-list.blade.php | 2 +- .../views/pages/parts/revisions-index-row.blade.php | 2 +- resources/views/pages/show.blade.php | 4 ++-- resources/views/settings/recycle-bin/index.blade.php | 2 +- .../roles/parts/asset-permissions-row.blade.php | 2 +- resources/views/settings/roles/parts/form.blade.php | 4 ++-- .../parts/related-asset-permissions-row.blade.php | 2 +- resources/views/shelves/index.blade.php | 2 +- resources/views/shelves/parts/form.blade.php | 4 ++-- resources/views/shelves/show.blade.php | 2 +- 41 files changed, 71 insertions(+), 64 deletions(-) diff --git a/resources/js/components/setting-app-color-picker.js b/resources/js/components/setting-app-color-picker.js index 68e5abce5..f167e5fc9 100644 --- a/resources/js/components/setting-app-color-picker.js +++ b/resources/js/components/setting-app-color-picker.js @@ -3,6 +3,7 @@ import {Component} from "./component"; export class SettingAppColorPicker extends Component { setup() { + // TODO this.colorInput = this.$refs.input; this.lightColorInput = this.$refs.lightInput; diff --git a/resources/js/components/tabs.js b/resources/js/components/tabs.js index ebab4191c..6d48048b5 100644 --- a/resources/js/components/tabs.js +++ b/resources/js/components/tabs.js @@ -42,6 +42,8 @@ export class Tabs extends Component { const selected = tabSection === sectionId; tab.setAttribute('aria-selected', selected ? 'true' : 'false'); } + + this.$emit('change', {section: sectionId}); } } \ No newline at end of file diff --git a/resources/lang/en/settings.php b/resources/lang/en/settings.php index f9abadc0c..90ad311a7 100755 --- a/resources/lang/en/settings.php +++ b/resources/lang/en/settings.php @@ -53,7 +53,7 @@ return [ 'color_scheme_desc' => 'Set the colors to use in the BookStack interface. Colors can be configured separately for dark and light mode to best fit the theme and ensure legibility.', 'ui_colors_desc' => 'Set the primary and link colors used in BookStack. The primary color is mainly used for the header banner, buttons and UI decorations, in addition to a few other components.', 'app_color' => 'Primary Color', - 'link_color' => 'Link Color', + 'link_color' => 'Default Link Color', 'content_colors_desc' => 'Set colors for all elements in the page organisation hierarchy. Choosing colors with a similar brightness to the default colors is recommended for readability.', 'bookshelf_color' => 'Shelf Color', 'book_color' => 'Book Color', diff --git a/resources/sass/_buttons.scss b/resources/sass/_buttons.scss index fb3af06e8..3c6775ad5 100644 --- a/resources/sass/_buttons.scss +++ b/resources/sass/_buttons.scss @@ -25,7 +25,6 @@ button { text-transform: uppercase; border: 1px solid var(--color-primary); vertical-align: top; - @include lightDark(filter, none, saturate(0.8) brightness(0.8)); &:hover, &:focus, &:active { background-color: var(--color-primary); text-decoration: none; @@ -85,10 +84,7 @@ button { user-select: none; font-size: 0.75rem; line-height: 1.4em; - color: var(--color-primary); - @include whenDark { - color: #AAA; - } + color: var(--color-link); &:active { outline: 0; } @@ -96,8 +92,8 @@ button { text-decoration: none; } &:hover, &:focus { - color: var(--color-primary); - fill: var(--color-primary); + color: var(--color-link); + fill: var(--color-link); } } .text-button.hover-underline:hover { diff --git a/resources/sass/_colors.scss b/resources/sass/_colors.scss index c51f01659..aff9ff6d0 100644 --- a/resources/sass/_colors.scss +++ b/resources/sass/_colors.scss @@ -9,11 +9,14 @@ background-color: var(--color-primary-light); @include whenDark { background: #000; - .text-primary { + .text-link { color: #AAA !important; } } } +.link-background { + background-color: var(--color-link) !important; +} /* * Status text colors @@ -41,6 +44,11 @@ fill: var(--color-primary) !important; } +.text-link, .text-link:hover, .text-link-hover:hover { + color: var(--color-link) !important; + fill: var(--color-link) !important; +} + .text-muted { @include lightDark(color, #575757, #888888, true); fill: currentColor !important; diff --git a/resources/sass/_components.scss b/resources/sass/_components.scss index c8ecd438d..2150f6d07 100644 --- a/resources/sass/_components.scss +++ b/resources/sass/_components.scss @@ -626,8 +626,8 @@ body.flexbox-support #entity-selector-wrap .popup-body .form-group { border-bottom: 2px solid transparent; margin-bottom: -1px; &[aria-selected="true"] { - color: var(--color-primary) !important; - border-bottom-color: var(--color-primary) !important; + color: var(--color-link) !important; + border-bottom-color: var(--color-link) !important; } &:hover, &:focus { @include lightDark(color, rgba(0, 0, 0, .8), rgba(255, 255, 255, .8)); diff --git a/resources/sass/_forms.scss b/resources/sass/_forms.scss index ef14f6221..b7fc52f7d 100644 --- a/resources/sass/_forms.scss +++ b/resources/sass/_forms.scss @@ -258,7 +258,6 @@ input[type=color] { border-radius: 2px; display: inline-block; border: 2px solid currentColor; - opacity: 0.6; overflow: hidden; fill: currentColor; .svg-icon { diff --git a/resources/sass/_text.scss b/resources/sass/_text.scss index 6c68bd12b..edf8ce614 100644 --- a/resources/sass/_text.scss +++ b/resources/sass/_text.scss @@ -90,7 +90,7 @@ h2.list-heading { * Link styling */ a { - color: var(--color-primary); + color: var(--color-link); fill: currentColor; cursor: pointer; text-decoration: none; @@ -107,7 +107,7 @@ a { display: inline-block; } &:focus img:only-child { - outline: 2px dashed var(--color-primary); + outline: 2px dashed var(--color-link); outline-offset: 2px; } } diff --git a/resources/sass/_variables.scss b/resources/sass/_variables.scss index e1242bdda..aac9223f9 100644 --- a/resources/sass/_variables.scss +++ b/resources/sass/_variables.scss @@ -39,6 +39,7 @@ $fs-s: 12px; :root { --color-primary: #206ea7; --color-primary-light: rgba(32,110,167,0.15); + --color-link: #206ea7; --color-page: #206ea7; --color-page-draft: #7e50b1; diff --git a/resources/sass/styles.scss b/resources/sass/styles.scss index e50a2f96a..668cb5c85 100644 --- a/resources/sass/styles.scss +++ b/resources/sass/styles.scss @@ -113,7 +113,7 @@ $loadingSize: 10px; &:focus { top: $-xl; outline-offset: -10px; - outline: 2px dotted var(--color-primary); + outline: 2px dotted var(--color-link); } } diff --git a/resources/views/attachments/manager-list.blade.php b/resources/views/attachments/manager-list.blade.php index ebb1c24aa..f1dfe2b82 100644 --- a/resources/views/attachments/manager-list.blade.php +++ b/resources/views/attachments/manager-list.blade.php @@ -14,13 +14,13 @@ option:event-emit-select:name="insert" type="button" title="{{ trans('entities.attachments_insert_link') }}" - class="drag-card-action text-center text-primary">@icon('link') + class="drag-card-action text-center text-link">@icon('link') + class="drag-card-action text-center text-link">@icon('edit')
diff --git a/resources/views/books/index.blade.php b/resources/views/books/index.blade.php index dc51a3a80..bf9795b3a 100644 --- a/resources/views/books/index.blade.php +++ b/resources/views/books/index.blade.php @@ -35,7 +35,7 @@
{{ trans('common.actions') }}
-
+
-
@@ -27,7 +27,7 @@
-
diff --git a/resources/views/books/show.blade.php b/resources/views/books/show.blade.php index 884082456..8bb41c18b 100644 --- a/resources/views/books/show.blade.php +++ b/resources/views/books/show.blade.php @@ -91,7 +91,7 @@
{{ trans('common.actions') }}
-
+
-
diff --git a/resources/views/chapters/parts/convert-to-book.blade.php b/resources/views/chapters/parts/convert-to-book.blade.php index 516d1117a..3bda32779 100644 --- a/resources/views/chapters/parts/convert-to-book.blade.php +++ b/resources/views/chapters/parts/convert-to-book.blade.php @@ -18,7 +18,7 @@
  • {!! csrf_field() !!} - +
  • diff --git a/resources/views/chapters/parts/form.blade.php b/resources/views/chapters/parts/form.blade.php index 068c033ab..8abcebe13 100644 --- a/resources/views/chapters/parts/form.blade.php +++ b/resources/views/chapters/parts/form.blade.php @@ -12,7 +12,7 @@
    -
    diff --git a/resources/views/chapters/show.blade.php b/resources/views/chapters/show.blade.php index d2f8cec97..de52888dd 100644 --- a/resources/views/chapters/show.blade.php +++ b/resources/views/chapters/show.blade.php @@ -105,7 +105,7 @@
    {{ trans('common.actions') }}
    -
    +
    -
    diff --git a/resources/views/pages/parts/editor-toolbar.blade.php b/resources/views/pages/parts/editor-toolbar.blade.php index fa5cb7374..c29e6de0e 100644 --- a/resources/views/pages/parts/editor-toolbar.blade.php +++ b/resources/views/pages/parts/editor-toolbar.blade.php @@ -3,14 +3,14 @@
    @icon('back'){{ trans('common.back') }} + class="text-button text-link">@icon('back'){{ trans('common.back') }}
    \ No newline at end of file diff --git a/resources/views/pages/parts/form.blade.php b/resources/views/pages/parts/form.blade.php index 8da5cbf39..a3a118527 100644 --- a/resources/views/pages/parts/form.blade.php +++ b/resources/views/pages/parts/form.blade.php @@ -44,7 +44,7 @@ + class="text-link text-button hide-over-m page-save-mobile-button">@icon('save') {{--Editor Change Dialog--}} @component('common.confirm-dialog', ['title' => trans('entities.pages_editor_switch_title'), 'ref' => 'page-editor@switchDialog']) diff --git a/resources/views/pages/parts/image-manager-list.blade.php b/resources/views/pages/parts/image-manager-list.blade.php index e5562e10f..22fe7addd 100644 --- a/resources/views/pages/parts/image-manager-list.blade.php +++ b/resources/views/pages/parts/image-manager-list.blade.php @@ -3,7 +3,7 @@
    {{ $image->name }} {!! csrf_field() !!} - diff --git a/resources/views/pages/show.blade.php b/resources/views/pages/show.blade.php index e05d9d739..2cbc7fe47 100644 --- a/resources/views/pages/show.blade.php +++ b/resources/views/pages/show.blade.php @@ -66,7 +66,7 @@ @foreach($pageNav as $navItem) @endforeach
    @@ -143,7 +143,7 @@
    {{ trans('common.actions') }}
    -
    +
    diff --git a/resources/views/settings/roles/parts/asset-permissions-row.blade.php b/resources/views/settings/roles/parts/asset-permissions-row.blade.php index df179a985..8bff570cb 100644 --- a/resources/views/settings/roles/parts/asset-permissions-row.blade.php +++ b/resources/views/settings/roles/parts/asset-permissions-row.blade.php @@ -1,7 +1,7 @@
    {{ trans('common.create') }}
    diff --git a/resources/views/settings/roles/parts/form.blade.php b/resources/views/settings/roles/parts/form.blade.php index 8534b7fdb..ac5c320d2 100644 --- a/resources/views/settings/roles/parts/form.blade.php +++ b/resources/views/settings/roles/parts/form.blade.php @@ -28,7 +28,7 @@
    - {{ trans('common.toggle_all') }} + {{ trans('common.toggle_all') }}
    @@ -62,7 +62,7 @@ class="item-list toggle-switch-list">
    {{ trans('common.create') }}
    {{ trans('common.view') }}
    diff --git a/resources/views/settings/roles/parts/related-asset-permissions-row.blade.php b/resources/views/settings/roles/parts/related-asset-permissions-row.blade.php index 1ec3d2257..62fdd6b74 100644 --- a/resources/views/settings/roles/parts/related-asset-permissions-row.blade.php +++ b/resources/views/settings/roles/parts/related-asset-permissions-row.blade.php @@ -1,7 +1,7 @@