Skip to content

Commit

Permalink
fix(subsite): Fix logo size on subsite section
Browse files Browse the repository at this point in the history
  • Loading branch information
kreafox committed Jan 11, 2023
1 parent 83e8d9d commit 65fff54
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 23 deletions.
70 changes: 49 additions & 21 deletions theme/themes/eea/extras/header.less
Original file line number Diff line number Diff line change
Expand Up @@ -298,27 +298,33 @@

/* Subsite */
.eea.header .logo-wrapper {
position: relative;
display: flex;
align-items: center;
gap: 2em;
margin-top: @mobileLogoMarginTop;
gap: 30px;

.eea-logo {
margin: 0;
}
}

.eea.header .subsite-logo {
margin-top: @mobileLogoMarginTop;
font-size: @mobileSubsiteFontSize;
position: relative;
color: @subsiteColor;
font-family: @subsiteFontFamily;
font-size: @mobileSubsiteFontSize;
font-weight: @subsiteFontWeight;
color: @subsiteColor;
position: relative;
line-height: @subsiteLineHeight;

&:before {
position: absolute;
top: 50%;
left: -15px;
width: 1px;
height: 70%;
content: ' ';
height: 110%;
background-color: @subsiteDividerColor;
left: -15px;
top: 50%;
content: ' ';
transform: translate(-50%, -50%);
}
}
Expand Down Expand Up @@ -377,6 +383,7 @@
.homepage .content-area {
margin-top: -@mobileMainSectionHeight;
}

.eea.header .top.bar .ui.container {
width: 100% !important; //override semantic auto to display content with space between them
}
Expand Down Expand Up @@ -525,8 +532,11 @@
margin-top: @tabletLogoMarginTop;
}

.eea.header .subsite-logo {
.eea.header .logo-wrapper {
margin-top: @tabletLogoMarginTop;
}

.eea.header .subsite-logo {
font-size: @tabletSubsiteFontSize;
}

Expand All @@ -545,6 +555,15 @@
}

@media only screen and (min-width: @computerBreakpoint) {
.eea.header .subsite-logo {
position: absolute;
z-index: 1;
top: 50%;
left: calc(100% + 30px);
width: 400px;
transform: translateY(-50%);
}

.burger-action.mobile {
display: none;
}
Expand Down Expand Up @@ -625,8 +644,11 @@
margin-top: @computerLogoMarginTop;
}

.eea.header .subsite-logo {
.eea.header .logo-wrapper {
margin-top: @computerLogoMarginTop;
}

.eea.header .subsite-logo {
font-size: @computerSubsiteFontSize;
}

Expand All @@ -648,6 +670,12 @@
}
}

@media only screen and (min-width: @largestSmallMonitor) {
.eea.header .subsite-logo {
left: calc(100% + 15px) !important;
}
}

/************************
MEGA MENU
************************/
Expand All @@ -672,9 +700,9 @@
}

#mega-menu .item.sub-title {
color: @megaMenuTextColor;
font-size: @mobileMegaMenuSubTitleFontSize;
font-weight: @megaMenuSubTitleFontWeight;
color: @megaMenuTextColor;
}

#mega-menu .mega-menu-title {
Expand Down Expand Up @@ -706,8 +734,8 @@
}

#at-a-glance {
background-color: @megaMenuGlanceBackgroundColor;
padding: @megaMenuGlancePadding !important;
background-color: @megaMenuGlanceBackgroundColor;

.item {
margin: @megaMenuGlanceListItemMargin;
Expand All @@ -722,7 +750,7 @@
}

.ui.grid > .column > .ui.grid {
margin-top: 0;
margin-top: 0;
}

#mega-menu .ui.grid {
Expand All @@ -736,9 +764,9 @@
}

#mega-menu .active:not(.title-link):not(.button) > span {
border-left: @megaMenuListItemActiveBorder;
padding-left: @megaMenuListItemActivePadding;
border-left: @megaMenuListItemActiveBorder;
border-left: @megaMenuListItemActiveBorder;
}

.nav-description {
Expand All @@ -748,13 +776,13 @@
/*Mega Menu Accordion - Tablet & Mobile */
#mega-menu .ui.accordion {
.title {
font-size: @megaMenuAccordionTitleFontSize;
font-weight: @megaMenuAccordionTitleFontWeight;
color: @megaMenuTextColor;
padding: @megaMenuAccordionTitlePadding;
border-bottom: @megaMenuAccordionTitleBorderBottom;
color: @megaMenuTextColor;
color: @megaMenuTextColor;
font-size: @megaMenuAccordionTitleFontSize;
font-size: @megaMenuAccordionTitleFontSize;
font-weight: @megaMenuAccordionTitleFontWeight;

i:before {
font-size: @megaMenuAccordionIconFontSize;
Expand Down Expand Up @@ -804,7 +832,8 @@
#main #mega-menu .mobile > .ui.accordion > .title:first-child {
display: none;
}
#main #mega-menu .ui.accordion .title:first-child + .content {

#main #mega-menu .ui.accordion .title:first-child + .content {
display: none;
}

Expand Down Expand Up @@ -855,15 +884,14 @@
}

#mega-menu .sub-title {
color: @megaMenuTextColor;
font-size: @computerMegaMenuSubTitleFontSize;
font-weight: @megaMenuSubTitleFontWeight;
color: @megaMenuTextColor;

&:hover {
text-decoration: underline;
}
}
}


.loadUIOverrides();
5 changes: 3 additions & 2 deletions theme/themes/eea/extras/header.variables
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,10 @@
@subsiteFontFamily : @headerFont;
@subsiteFontWeight : @headerFontWeight;
@subsiteColor : @linkColor;
@subsiteLineHeight : 1.1;
@subsiteDividerColor : @darkCyan;
@mobileSubsiteFontSize : unit(@h4, em);
@tabletSubsiteFontSize : unit(@h3, em);
@mobileSubsiteFontSize : unit(@h6, em);
@tabletSubsiteFontSize : unit(@h4, em);
@computerSubsiteFontSize : unit(@h2, em);

/*-----------------
Expand Down

0 comments on commit 65fff54

Please sign in to comment.