diff --git a/_config.yml b/_config.yml index 9f25e4e1c..2663880d9 100644 --- a/_config.yml +++ b/_config.yml @@ -165,9 +165,6 @@ colors: cyan: hex: '#17a2b8' title: Cyan - gray: - hex: '#868e96' - title: Gray colors-extra: white: @@ -176,6 +173,9 @@ colors-extra: dark: hex: '#303645' title: Dark + gray: + hex: '#868e96' + title: Gray variants: - name: success diff --git a/src/pages/_includes/layout/header-actions/breadcrumb.html b/src/pages/_includes/layout/header-actions/breadcrumb.html new file mode 100644 index 000000000..bd270cf4e --- /dev/null +++ b/src/pages/_includes/layout/header-actions/breadcrumb.html @@ -0,0 +1,3 @@ +
+ {% include ui/breadcrumb.html class="breadcrumb-alternate" %} +
\ No newline at end of file diff --git a/src/pages/_includes/layout/header-actions/buttons.html b/src/pages/_includes/layout/header-actions/buttons.html new file mode 100644 index 000000000..15d3f50d1 --- /dev/null +++ b/src/pages/_includes/layout/header-actions/buttons.html @@ -0,0 +1,9 @@ +
+ + {% include ui/button.html text="New view" color="white" %} + + {% include ui/button.html icon="plus" text="Create new report" color="primary" class="d-none d-sm-inline-block" modal-id="report" %} + {% include ui/button.html icon="plus" icon-only=true color="primary" class="d-sm-none" text="Create new report" modal-id="report" %} +
+ +{% include ui/modal.html modal-id="report" size="lg" top=true %} diff --git a/src/pages/_includes/layout/header-actions/calendar.html b/src/pages/_includes/layout/header-actions/calendar.html new file mode 100644 index 000000000..2b27e15ee --- /dev/null +++ b/src/pages/_includes/layout/header-actions/calendar.html @@ -0,0 +1,3 @@ +
+ {% include ui/button.html text="Add event" color="primary" icon="plus" %} +
\ No newline at end of file diff --git a/src/pages/_includes/layout/header-actions/photos.html b/src/pages/_includes/layout/header-actions/photos.html new file mode 100644 index 000000000..0192f62cf --- /dev/null +++ b/src/pages/_includes/layout/header-actions/photos.html @@ -0,0 +1,6 @@ +
+
+ {% include ui/form/input-icon.html %} +
+ {% include ui/button.html text="Add event" color="primary" icon="plus" %} +
\ No newline at end of file diff --git a/src/pages/_includes/layout/header-actions/users.html b/src/pages/_includes/layout/header-actions/users.html new file mode 100644 index 000000000..acf5eb059 --- /dev/null +++ b/src/pages/_includes/layout/header-actions/users.html @@ -0,0 +1,4 @@ +
+ + {% include ui/button.html text="New user" color="primary" icon="plus" %} +
\ No newline at end of file diff --git a/src/pages/_includes/layout/page-header-actions.html b/src/pages/_includes/layout/page-header-actions.html deleted file mode 100644 index 8acbaf6a8..000000000 --- a/src/pages/_includes/layout/page-header-actions.html +++ /dev/null @@ -1,33 +0,0 @@ -{% assign actions = include.actions %} - - -
- {% if actions == 'users' %} -
- - {% include ui/button.html text="New user" color="primary" icon="plus" %} -
- {% elsif actions == 'calendar' %} -
- {% include ui/button.html text="Add event" color="primary" icon="plus" %} -
- {% elsif actions == 'photos' %} -
-
- {% include ui/form/input-icon.html %} -
- {% include ui/button.html text="Add event" color="primary" icon="plus" %} -
- {% elsif actions == 'breadcrumb' %} -
- {% include ui/breadcrumb.html class="breadcrumb-alternate" %} -
- {% elsif actions == 'buttons' %} - - {% include ui/button.html text="New view" color="white" %} - - {% include ui/button.html icon="plus" text="Create new report" color="primary" class="ml-3 d-none d-sm-inline-block" modal-id="report" %} - {% include ui/button.html icon="plus" icon-only=true color="primary" class="ml-3 d-sm-none" text="Create new report" modal-id="report" %} - {% include ui/modal.html modal-id="report" size="lg" top=true %} - {% endif %} -
diff --git a/src/pages/_includes/layout/page-header.html b/src/pages/_includes/layout/page-header.html index f037393fc..5ce717a6b 100644 --- a/src/pages/_includes/layout/page-header.html +++ b/src/pages/_includes/layout/page-header.html @@ -2,7 +2,7 @@
-
+
{% if include.pretitle %}
@@ -19,7 +19,10 @@
{% if include.actions %} - {% include layout/page-header-actions.html actions=include.actions %} + +
+ {% include layout/header-actions/{{ include.actions }}.html %} +
{% endif %}
diff --git a/src/scss/_variables.scss b/src/scss/_variables.scss index d9741669c..1bb4de95d 100644 --- a/src/scss/_variables.scss +++ b/src/scss/_variables.scss @@ -72,7 +72,7 @@ $text-muted-opacity: .68 !default; $text-muted-light-opacity: .4 !default; $border-opacity: .18 !default; -$border-dark-opacity: .32 !default; +$border-dark-opacity: .28 !default; $light: #f5f7fb !default; $dark: #252f3f !default; @@ -286,7 +286,7 @@ $input-focus-color: inherit !default; //buttons $btn-padding-x: 1rem !default; -$btn-font-weight: $font-weight-bold !default; +$btn-font-weight: $font-weight-medium !default; $btn-border-radius: 3px !default; //cards diff --git a/src/scss/ui/_buttons.scss b/src/scss/ui/_buttons.scss index 3e770a829..95ebe3e07 100644 --- a/src/scss/ui/_buttons.scss +++ b/src/scss/ui/_buttons.scss @@ -9,7 +9,7 @@ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .05), inset 0 2px 0 -1px rgba(255, 255, 255, .1); } - svg.icon { + svg { filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .05)); } } @@ -19,32 +19,27 @@ cursor: not-allowed; } - .icon { - margin: 0 .25em 0 -.25em; - font-size: (20em/14); + svg { + width: 1.25rem; + height: 1.25rem; + margin: 0 .5em 0 -.5em; + vertical-align: bottom; } .avatar { width: 1.25rem; height: 1.25rem; vertical-align: text-top; - margin: 0 .5em 0 -.25em; + margin: 0 .5em 0 -.5em; } .icon-right { - margin: 0 -.25em 0 .5em; - } - - svg.icon { - width: 1em; - height: 1em; - stroke-width: 1.75; + margin: 0 -.5em 0 .5em; } } .btn-white { - @include button-variant($white, $border-color, $dark); - background-image: linear-gradient(-180deg, rgba($dark, 0), rgba($dark, .04) 100%); + @include button-variant($white, $border-color-dark, $text-muted); box-shadow: none !important; &.active { @@ -97,8 +92,7 @@ margin-bottom: -.5rem !important; margin-right: -.5rem; - > .btn, - > .dropdown { + > * { margin: 0 .5rem .5rem 0; }