Skip to content

Commit

Permalink
Merge pull request #94 from ImperialCollegeLondon/feature/ui_updates
Browse files Browse the repository at this point in the history
Feature/UI updates
  • Loading branch information
cc-a authored Jan 8, 2025
2 parents be706b7 + 535b3f0 commit c7ca2c1
Show file tree
Hide file tree
Showing 10 changed files with 89 additions and 95 deletions.
65 changes: 51 additions & 14 deletions assets/less/site/collections/menu.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
text-decoration: underline;
text-decoration-color: @primaryColor;
a:not(.ui.button) {
display: inline-block;
color: @primaryColor;
padding: 2rem 1rem;
text-decoration: underline;
Expand Down Expand Up @@ -40,21 +39,59 @@
}
}

#rdm-burger-toggle {
font-size: 20px;
position: absolute;
right: -1.5rem;
top: calc(50%);
border: none;

#rdm-burger-menu-icon {
.navicon {
background: @primaryColor;
color: @primaryColor;
&:hover {
color: @black;
.outer-navbar {
background-image: None;
background-color: transparent;
border-color: transparent;

#invenio-nav {
background: @white;
border-top: 2px solid @brandColor;
border-bottom: 2px solid @brandColor;
margin: 1rem 0;
}

a {
color: @primaryColor;
}

.header__nav-open#rdm-burger-menu-icon {
color: @navyBlue;
margin-inline-start: 1rem;
border-style: unset !important;
border-width: 0 !important;

span {
top: 1px;

&::before {
top: clamp(0.4375rem, 0.4016rem + 0.1795vw, 0.5625rem); // 7px -> 9px
transition: unset;
}

&::after {
top: clamp(0.875rem, 0.8032rem + 0.3591vw, 1.125rem); // 14px -> 18px
transition: uset;
}
}

span,
span::before,
span::after {
background-color: @navyBlue;
}

&:hover {

span,
span::before,
span::after {
left: 0px;
transform: none;
width: clamp(0.875rem, 1.1623rem, 1.125rem);
background-color: @darkGray;
}
}
}
}

Expand Down
14 changes: 14 additions & 0 deletions assets/less/site/elements/button.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,20 @@ div.ui.card.access-right .ui.two.buttons .ui.active.button.positive {
}
}

.ui.button.warning,
.ui.button.orange {
background-color: @warningButtonBackgroundColor;
border-color: @warningButtonBorderColor;
color: @warningButtonTextColor;
&:hover,
&:active,
&:focus {
background-color: @warningButtonBackgroundColorHovered;
border-color: @warningButtonBorderColorHovered;
color: @warningButtonTextColorHovered;
}
}

#skip-to-main {
position: absolute;
top: 0px;
Expand Down
11 changes: 11 additions & 0 deletions assets/less/site/elements/button.variables
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@ disabled button
@disabledButtonBackgroundColor: @whiteSmoke;
@disabledButtonBorderColor: @darkGray;
@disabledButtonTextColor: @darkGray;

/*----------------------------------------
warning button
-------------------------------------------*/

@warningButtonBackgroundColor: @orange;
@warningButtonBorderColor: @orange;
@warningButtonTextColor: @black;
@warningButtonBackgroundColorHovered: @darkOrange;
@warningButtonBorderColorHovered: @darkOrange;
@warningButtonTextColorHovered: @black;
16 changes: 0 additions & 16 deletions assets/less/site/elements/header.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,3 @@ aside.sidebar {
display: none;
}
}

.ui.header {
word-break: break-word;

&.text-muted {
color: @mutedTextColor;
}

.doi.sub.header {
display: inline-block;
}

&.highlight{
background-color: @highlightBackgroundColor;
}
}
4 changes: 4 additions & 0 deletions assets/less/site/elements/input.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
outline-width: 3px;
outline-offset: 3px;
}
&::placeholder{
color: @darkGray;
}

}

div.ui.search .ui.input input {
Expand Down
57 changes: 0 additions & 57 deletions assets/less/site/globals/site.overrides
Original file line number Diff line number Diff line change
Expand Up @@ -154,63 +154,6 @@ html.cover-page {
background-color: @white;
}

.outer-navbar {
background-image: None;
background-color: transparent;
border-color: transparent;

#invenio-nav {
background: @white;
border-top: 2px solid @brandColor;
border-bottom: 2px solid @brandColor;
margin: 1rem 0;
}

a {
color: @primaryColor;
}

#rdm-burger-menu-icon {
@headerOverlayOpenColor: @primaryColor;

.header__inner--inverse & {
@headerOverlayOpenColor: @white;
}
background-color: transparent !important;
border: none !important;
color: none;

span {
top: 1px;

&::before {
top: clamp(0.4375rem, 0.4016rem + 0.1795vw, 0.5625rem); // 7px -> 9px
transition: transform 0.2s;
}

&::after {
top: clamp(0.875rem, 0.8032rem + 0.3591vw, 1.125rem); // 14px -> 18px
transition: none;
}
}

span,
span::before,
span::after {
background-color: var(@headerOverlayOpenColor);
}

&:hover {
background-color: transparent !important;
border: none !important;
transform: rotate(90deg);
span::before {
width: clamp(0.875rem, 0.8032rem + 0.3591vw, 1.125rem); // 14px -> 18px
}
}
}
}

.theme.header {
box-shadow: None;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/less/site/globals/site.variables
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
@frontpageSearchBarBackgroundColor: @navyBlue;
@versionActiveColor: @lavender;

@inputColor: @white;
@inputColor: @black;
@inputBorderColor: @whiteSmoke;

@mutedAccordionHeaderColor: @whiteSmoke;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<div id="rdm-burger-toggle">
<button
id="rdm-burger-menu-icon"
class="ui button transparent mr-0 pr-0"
class="ui button transparent mr-0 pr-0 header__nav-open"
aria-label="{{ _('Menu') }}"
aria-haspopup="menu"
aria-expanded="false"
Expand Down
11 changes: 6 additions & 5 deletions templates/semantic-ui/invenio_app_rdm/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ <h3 class="sr-only">Address</h3>
</div>
<div class="twelve wide tablet twelve wide computer column">
<div class="ui right aligned footer__info">
<div class="email">
<h3>Contact the team</h3>
<a id="contact-us" href="/"
class="ui link right floated contact-us">contact@imperial.ac.uk</a>
</div>
<h3 class="sr-only">Site Information</h3>
<ul class="footer__meta">
<li><a href="/">Support</a></li>
<li><a href="https://www.imperial.ac.uk/about-the-site/accessibility/spiraldata/">Accessibility</a></li>
<li><a href="https://www.imperial.ac.uk/about-the-site/use-of-cookies/">Use of cookies</a></li>
</ul>
<p class="footer__copyright right floated">© 2024 Imperial College London</p>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/semantic-ui/invenio_app_rdm/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
<div id="rdm-burger-toggle">
<button
id="rdm-burger-menu-icon"
class="ui button transparent"
class="ui button transparent header__nav-open"
aria-label="{{ _('Menu') }}"
aria-haspopup="menu"
aria-expanded="false"
Expand Down

0 comments on commit c7ca2c1

Please sign in to comment.