Skip to content

Commit

Permalink
Merge pull request #21 from OP-TED/scrollableHeader
Browse files Browse the repository at this point in the history
Scrollable header
  • Loading branch information
yfanti authored May 29, 2024
2 parents 8349c5e + 5a9486c commit 1fb912f
Show file tree
Hide file tree
Showing 18 changed files with 553 additions and 223 deletions.
1 change: 1 addition & 0 deletions docs/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ src/
js/
01-navigation.js
02-fragment-jumper.js
scrollable-header-nav.js
...
vendor/
highlight.js
Expand Down
91 changes: 78 additions & 13 deletions src/css/footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ footer.footer {

.footer p {
margin: 0;
font-family: var(--footer-OP-font-family);
font-size: x-small;
}

Expand All @@ -26,13 +25,6 @@ footer.footer {
/* .footer .columns div {
flex-grow: 1;
} */
.footer h3 {
font-family: var(--footer-OP-font-family);
font-size: 15px;
font-weight: 700;
margin: 0 0 15px 0;
}

.footer .logo {
margin: 0;
height: 48px;
Expand Down Expand Up @@ -171,21 +163,62 @@ footer.footer {
flex-wrap: wrap;
background-color: #f3f6fc;
border-bottom: 1px solid #cfdaf5;
justify-content: center;
}

.three-columns > div {
flex: 1; /* This allows the divs to grow and shrink as needed */
min-width: 20%; /* This sets a minimum width for the divs */
box-sizing: border-box;
padding: 1rem;
}

.three-columns > div:first-child {
flex: 0 0 20%;
box-sizing: border-box;
}

.three-columns > div:not(:first-child) {
flex: 0 0 40%;
box-sizing: border-box;
}

/* columns */
.three-columns > * {
padding: 1rem;
}

/* tablet breakpoint */
@media screen and (min-width: 769px) {
.search-institutions {
display: none;
}

@media (max-width: 1024px) {
.three-columns {
display: grid;
grid-auto-rows: 1fr;
grid-template-columns: 1fr 1fr 1fr;
flex-direction: column;
}

.institutions {
display: none;
}

.search-institutions {
display: block;
}
}
/* tablet breakpoint */
/* @media screen and (min-width: 769px) {
.three-columns {
display: flex;
}
.three-columns > div:first-child {
flex: 0 0 20%;
}
.three-columns > div:not(:first-child) {
flex: 0 0 40%;
}
} */

/* responsive EU logo change */
@media (min-width: 769px) {
Expand Down Expand Up @@ -265,3 +298,35 @@ footer.footer {
margin-right: 0.35rem;
margin-left: 2rem;
}

.ted-footer__title {
font-size: 28px;
font-weight: 400;
color: #333;
border-bottom: 1px solid #cfdaf5;
padding-bottom: 12px;
margin-bottom: 16px;
display: block;
line-height: 1.2;
}

.ted-footer__rich-text {
padding-right: 60px;
font-family: var(--gs-base-font-family-default);
font-weight: var(--gs-base-font-weight-default);
}

.ted-footer__rich-text p {
font-size: 16px;
color: #333;
}

.ted-footer__rich-text a {
font-size: 16px;
color: #0e47cb;
}

.ted-footer__title.ted-footer__title--main {
border: unset;
padding: 0;
}
105 changes: 79 additions & 26 deletions src/css/header.css
Original file line number Diff line number Diff line change
@@ -1,31 +1,42 @@
.globan {
/* .globan {
z-index: var(--z-index-globan) !important;
}
.header {
z-index: var(--z-index-header);
}
} */

html.is-clipped--navbar {
overflow-y: hidden;
}

body {
/* body {
padding-top: var(--navbar-height);
} */

.navbar-scrollable {
background: var(--color-white);
color: var(--navbar-font-color);
font-size: calc(16 / var(--rem-base) * 1rem);
height: calc(var(--navbar-height) / 2);
top: var(--globan-height);
width: 100%;
z-index: var(--z-index-navbar);
display: flex;
flex-direction: column;
}

.navbar {
background: var(--navbar-background);
background: var(--color-white);
color: var(--navbar-font-color);
font-size: calc(16 / var(--rem-base) * 1rem);
height: var(--navbar-height);
position: fixed;
top: 0;
height: calc(var(--navbar-height) / 2);
top: var(--globan-height);
width: 100%;
z-index: var(--z-index-navbar);
border-bottom: 6px solid var(--color-OP-green);
display: flex;
flex-direction: column;
border-bottom: 6px solid var(--color-OP-green);
}

.navbar a {
Expand Down Expand Up @@ -153,27 +164,11 @@ body {
}

@media screen and (max-width: 1023.5px) {
.navbar-brand {
height: inherit;
}

.navbar-brand .navbar-item {
align-items: center;
display: flex;
}

.navbar-menu {
background: var(--navbar-menu-background);
box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
max-height: var(--body-min-height);
overflow-y: auto;
padding: 0.5rem 0;
}

.navbar-menu:not(.is-active) {
display: none;
}

.navbar-menu a.navbar-item:hover,
.navbar-menu .navbar-link:hover {
background: var(--navbar-menu_hover-background);
Expand Down Expand Up @@ -309,7 +304,6 @@ body {
color: #515560;
margin-left: 25px;
margin-bottom: 6px;
margin-top: 15px;
display: block;
}

Expand Down Expand Up @@ -345,14 +339,73 @@ body {
line-height: 18px;
}

.text-eu-subtext-text a {
text-decoration: none;
color: #515560;
}

.text-eu-subtext-text a:visited {
color: #515560;
}

.text-eu-subtext-text a:hover,
.text-eu-subtext-text a:focus,
.text-eu-subtext-text a:active {
color: var(--color-OP-green);
}

@media (max-width: 500px) {
.text-eu-subtext-text {
font-size: 3vw;
}
}

.text-eu-subtext-label a {
text-decoration: none;
color: #515560;
}

.text-eu-subtext-label a:visited {
color: #515560;
}

.text-eu-tenders a {
text-decoration: none;
color: #515560;
}

.text-eu-tenders a:visited {
color: #515560;
}

.text-eu-subtext-label a:hover,
.text-eu-subtext-label a:focus,
.text-eu-subtext-label a:active {
color: var(--color-OP-green);
}

@media screen and (max-width: 960px) {
.text-eu-subtext-label {
margin-left: 25px;
}
}

@media (max-width: 768px) {
@media (max-width: 820px) {
.text-eu-subtext-label {
display: none;
}
}

.eu-tenders {
position: sticky;
top: 0;
left: 0;
height: calc(var(--navbar-height) / 2);
z-index: 5;
border-bottom: 6px solid var(--color-OP-green);
}

.eu-flag {
height: calc(var(--navbar-height) / 2);
z-index: 6;
}
Loading

0 comments on commit 1fb912f

Please sign in to comment.