From 793cb839cbe7f5b9f26da8b02f151e11d2a38923 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Wed, 24 Jul 2024 10:08:05 -0700 Subject: [PATCH 1/5] switched from using to \ No newline at end of file diff --git a/packages/frontend/app/components/user-guide-link.js b/packages/frontend/app/components/user-guide-link.js new file mode 100644 index 0000000000..bb3efa85c2 --- /dev/null +++ b/packages/frontend/app/components/user-guide-link.js @@ -0,0 +1,9 @@ +import Component from '@glimmer/component'; +import { action } from '@ember/object'; + +export default class UserGuideLinkComponent extends Component { + @action + openUserGuide() { + window.open('https://iliosproject.gitbook.io/ilios-user-guide', '_blank'); + } +} diff --git a/packages/frontend/app/styles/components/user-guide-link.scss b/packages/frontend/app/styles/components/user-guide-link.scss index a3493d52c2..b0f97963ca 100644 --- a/packages/frontend/app/styles/components/user-guide-link.scss +++ b/packages/frontend/app/styles/components/user-guide-link.scss @@ -1,29 +1,36 @@ @use "../ilios-common/mixins" as cm; @use "../ilios-common/colors" as c; +@use "sass:color"; + +$header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); + .user-guide-link { - margin-left: 0.5rem; + margin-right: 0.5rem; - @include cm.for-tablet-and-up { - margin-left: 0.25rem; - margin-right: 0.5rem; - } + button { + background-color: $header-menu-background-color; + border: 1px solid $header-menu-background-color; + border-radius: 0.2rem; + color: c.$raisinBlack; + font-weight: normal; + margin-left: 0.5rem; + padding: 0.25em; - a { - svg { - align-items: center; - color: c.$white; - display: flex; - height: 30px; - width: 30px; + &:hover, + &:focus { + background-color: c.$white; + } + + @include cm.for-tablet-and-up { + display: inline; + margin-left: 0; } - } - @include cm.for-phone-only { - a { + @include cm.for-phone-only { svg { - height: 24px; - width: 24px; + height: 4.25vw; + width: 4.25vw; } } } From 2cde4b0dcffb2c2442fb6816bfdd0fb5814c3a67 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Thu, 25 Jul 2024 13:41:19 -0700 Subject: [PATCH 2/5] changed back from + \ No newline at end of file diff --git a/packages/frontend/app/components/user-guide-link.js b/packages/frontend/app/components/user-guide-link.js deleted file mode 100644 index bb3efa85c2..0000000000 --- a/packages/frontend/app/components/user-guide-link.js +++ /dev/null @@ -1,9 +0,0 @@ -import Component from '@glimmer/component'; -import { action } from '@ember/object'; - -export default class UserGuideLinkComponent extends Component { - @action - openUserGuide() { - window.open('https://iliosproject.gitbook.io/ilios-user-guide', '_blank'); - } -} diff --git a/packages/frontend/app/styles/components/ilios-header.scss b/packages/frontend/app/styles/components/ilios-header.scss index a657673d77..6d5b7c5dc1 100644 --- a/packages/frontend/app/styles/components/ilios-header.scss +++ b/packages/frontend/app/styles/components/ilios-header.scss @@ -38,7 +38,11 @@ } .user-guide-link { grid-area: guide; - height: 100%; + height: 66%; + + @include m.for-phone-only { + height: 90%; + } } .global-search-box { diff --git a/packages/frontend/app/styles/components/user-guide-link.scss b/packages/frontend/app/styles/components/user-guide-link.scss index b0f97963ca..d490ba20f8 100644 --- a/packages/frontend/app/styles/components/user-guide-link.scss +++ b/packages/frontend/app/styles/components/user-guide-link.scss @@ -6,15 +6,17 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); .user-guide-link { - margin-right: 0.5rem; + margin-right: 0.75rem; - button { + a { + @include cm.ilios-link-button; background-color: $header-menu-background-color; border: 1px solid $header-menu-background-color; border-radius: 0.2rem; color: c.$raisinBlack; + @include cm.font-size("small"); font-weight: normal; - margin-left: 0.5rem; + margin-left: 0.8rem; padding: 0.25em; &:hover, @@ -24,14 +26,12 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); @include cm.for-tablet-and-up { display: inline; - margin-left: 0; + margin-left: 0.5rem; } @include cm.for-phone-only { - svg { - height: 4.25vw; - width: 4.25vw; - } + /* stylelint-disable property-disallowed-list */ + font-size: 2.75vw; } } } From d8b33a266813f621f262f4cf49ce8287bd4baef6 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Fri, 26 Jul 2024 13:14:28 -0700 Subject: [PATCH 3/5] increased icon right margin --- packages/frontend/app/styles/components/user-guide-link.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/frontend/app/styles/components/user-guide-link.scss b/packages/frontend/app/styles/components/user-guide-link.scss index d490ba20f8..2c83f40569 100644 --- a/packages/frontend/app/styles/components/user-guide-link.scss +++ b/packages/frontend/app/styles/components/user-guide-link.scss @@ -6,7 +6,7 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); .user-guide-link { - margin-right: 0.75rem; + margin-right: 0.85rem; a { @include cm.ilios-link-button; From 02bbba269e938bd35e7e563f59940edb16bd245a Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Fri, 26 Jul 2024 14:37:45 -0700 Subject: [PATCH 4/5] adjusted height and padding for icon across viewports --- packages/frontend/app/styles/components/ilios-header.scss | 4 ++-- packages/frontend/app/styles/components/user-guide-link.scss | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/frontend/app/styles/components/ilios-header.scss b/packages/frontend/app/styles/components/ilios-header.scss index 6d5b7c5dc1..24ae13d2f7 100644 --- a/packages/frontend/app/styles/components/ilios-header.scss +++ b/packages/frontend/app/styles/components/ilios-header.scss @@ -38,10 +38,10 @@ } .user-guide-link { grid-area: guide; - height: 66%; + height: 72%; @include m.for-phone-only { - height: 90%; + height: 100%; } } diff --git a/packages/frontend/app/styles/components/user-guide-link.scss b/packages/frontend/app/styles/components/user-guide-link.scss index 2c83f40569..bf73ab1ce7 100644 --- a/packages/frontend/app/styles/components/user-guide-link.scss +++ b/packages/frontend/app/styles/components/user-guide-link.scss @@ -17,7 +17,7 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); @include cm.font-size("small"); font-weight: normal; margin-left: 0.8rem; - padding: 0.25em; + padding: 0.2em; &:hover, &:focus { @@ -27,6 +27,7 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); @include cm.for-tablet-and-up { display: inline; margin-left: 0.5rem; + padding: 0.125em; } @include cm.for-phone-only { From 42cbd5deaf82a0ab7a5072c6816c8db4d54b44f9 Mon Sep 17 00:00:00 2001 From: Michael Chadwick Date: Wed, 7 Aug 2024 15:27:52 -0700 Subject: [PATCH 5/5] use flexbox instead of magic height percentage --- packages/frontend/app/styles/components/ilios-header.scss | 4 ++-- packages/frontend/app/styles/components/user-guide-link.scss | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/frontend/app/styles/components/ilios-header.scss b/packages/frontend/app/styles/components/ilios-header.scss index 24ae13d2f7..257831de65 100644 --- a/packages/frontend/app/styles/components/ilios-header.scss +++ b/packages/frontend/app/styles/components/ilios-header.scss @@ -37,11 +37,11 @@ grid-area: user; } .user-guide-link { + display: flex; grid-area: guide; - height: 72%; @include m.for-phone-only { - height: 100%; + vertical-align: -0.25em; } } diff --git a/packages/frontend/app/styles/components/user-guide-link.scss b/packages/frontend/app/styles/components/user-guide-link.scss index bf73ab1ce7..2c83f40569 100644 --- a/packages/frontend/app/styles/components/user-guide-link.scss +++ b/packages/frontend/app/styles/components/user-guide-link.scss @@ -17,7 +17,7 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); @include cm.font-size("small"); font-weight: normal; margin-left: 0.8rem; - padding: 0.2em; + padding: 0.25em; &:hover, &:focus { @@ -27,7 +27,6 @@ $header-menu-background-color: color.adjust(c.$slightWhite, $lightness: -3%); @include cm.for-tablet-and-up { display: inline; margin-left: 0.5rem; - padding: 0.125em; } @include cm.for-phone-only {