Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Header and Contact Us components #45

Merged
merged 22 commits into from
Jan 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8e21f13
feat: add header [without button yet]
hellagirrl Jan 12, 2024
ce5f61c
feat: add line separating the header and the main parts, remove empty…
hellagirrl Jan 12, 2024
198be2f
Merge branch 'main' into feat/header
hellagirrl Jan 14, 2024
e2e4f41
feat: add button to header, start footer
hellagirrl Jan 14, 2024
993c2e2
feat: add footer [without img files yet]
hellagirrl Jan 16, 2024
9af306d
fix: update tabulation in footer.njk
hellagirrl Jan 16, 2024
a3c82ac
feat: add burger menu, hide footer picture on mobile
hellagirrl Jan 16, 2024
27a5a53
feat: add js to burger menu
hellagirrl Jan 16, 2024
fe41260
fix: delete redundant code
hellagirrl Jan 16, 2024
b6b2fb2
refactor: update toggle_mobile_menu function
hellagirrl Jan 18, 2024
ad77ec1
Merge branch 'main' into feat/header
hellagirrl Jan 18, 2024
a11f9d0
refactor: create footer_databag, turn email and phone numbers to links
hellagirrl Jan 18, 2024
3b37426
styles: remove 100% height from footer, make height depend on footer'…
hellagirrl Jan 18, 2024
78d05d1
styles: create scss variables for burger, reuse mixins for headings a…
hellagirrl Jan 18, 2024
3261a21
styles: update mixins, use scss nesting, add footer picture
hellagirrl Jan 18, 2024
6b72ab9
fix: bring husky dir back
hellagirrl Jan 18, 2024
9bf06b0
fix: PR review fixes
hellagirrl Jan 25, 2024
85ed0b3
fix: make footer contacts section bem alike
hellagirrl Jan 25, 2024
956930a
fix: move contact-row to the outer scope, display shelter picture on …
hellagirrl Jan 27, 2024
33c00be
fix: make burger menu adaptive
hellagirrl Jan 27, 2024
90f881b
fix: make footer picture adaptive for mobiles and small mobiles
hellagirrl Jan 27, 2024
ede5095
fix
Christik Jan 28, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions frontend/package.json

This file was deleted.

6 changes: 6 additions & 0 deletions frontend/src/scss/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ $breakpoint-extra-large: 1300px;
}
}

@mixin for-tablet-down {
@media (max-width: $breakpoint-large - 0.1px) {
@content;
}
}

@mixin for-tablet {
@media (min-width: $breakpoint-medium) and (max-width: $breakpoint-large - 0.1px) {
@content;
Expand Down
5 changes: 5 additions & 0 deletions frontend/src/scss/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@ $primary-font: 'Mulish', sans-serif;
Sizes
========================= */

$side-padding: 15px;
$border-radius: 8px;

// header
$desktop-header-height: 90px;
$mobile-header-height: 70px;

/* =========================
Paths
Expand Down
74 changes: 73 additions & 1 deletion frontend/src/scss/layout/_footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,77 @@
========================= */

.page-footer {
// TODO
background-color: $inverse-primary-bg-color;
padding: 100px 0;

&__title {
@include heading2;
color: $inverse-primary-txt-color;
position: relative;

&::after {
display: block;
content: '';
width: 199px;
height: 3px;
background: $accent-bg-color;
position: absolute;
bottom: 0;
left: 0;
}
}

&__wrapper {
display: grid;
gap: 30px;
grid-template-columns: repeat(2, 1fr);
margin-top: 60px;

@include for-mobile {
grid-template-columns: repeat(1, 1fr);
}
}

&__pic {
width: 100%;
height: 100%;
border-radius: $border-radius;
object-fit: cover;
}

&__content {
color: $inverse-primary-txt-color;
margin: 0;
display: flex;
flex-direction: column;
align-items: baseline;
gap: 44px;
}

&__text {
font-size: 1.75em;
font-weight: 800;
line-height: 39.2px;
margin: 0;
}

&__contact-list {
list-style: none;
margin: 0;
}
}

.contact-row {
font-size: 1.125em;

&:not(:last-child) {
margin-bottom: 20px;
}

&__content {
@include loud;
text-decoration: none;
display: block;
color: $inverse-primary-txt-color;
}
}
146 changes: 145 additions & 1 deletion frontend/src/scss/layout/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,154 @@

.page-header {
position: relative;
@include sidePadding(60px);

@include for-tablet-down {
@include sidePadding($side-padding);
}

&__in {
height: $desktop-header-height;
border-bottom: 1px solid rgba($white, 10%);
display: flex;
align-items: center;
justify-content: space-between;

@include for-tablet-down {
height: $mobile-header-height;
}
}

&__logo {
@include heading3;
color: $accent-txt-color;
z-index: 2;


@include for-tablet-down {
font-size: 20px;
}
}
}

.page-menu {
display: flex;
gap: 40px;
margin: 0;
list-style: none;
align-items: baseline;

@include for-tablet-down {
position: fixed;
gap: 0;
padding: 0;
left: 0;
top: 0;
bottom: 0;
right: 0;
background-color: $inverse-primary-bg-color;
align-items: center;
display: flex;
justify-content: center;
flex-direction: column;
transform: translateX(-100%);
transition: transform 0.5s;

&--opened {
transform: translateX(0);
}
}

&__link {
display: block;
@include heading6;
color: $inverse-primary-txt-color;
text-decoration: none;
transition: 0.5s;

@include for-desktop {
height: $desktop-header-height;
line-height: $desktop-header-height;
}

@include for-tablet-down {
display: block;
padding: 15px;
font-size: 18px;
}

@include activeHover {
color: $accent-txt-color;
}
}

&__donate {
margin-left: 78px;

@include for-tablet-down {
margin: 20px 0 0;
}
}
}

.burger {
$burger-dash-height: 3px;
$burger-dash-margin: 6px;
$burger-translate-y: calc($burger-dash-margin / 3 + $burger-dash-height);

position: relative;
outline: none;
border: none;
background: none;
height: 32px;
width: 32px;
display: flex;
flex-direction: column;
z-index: 2;
cursor: pointer;
padding: 0;
justify-content: center;

@include for-desktop {
display: none;
}

&__dash {
position: absolute;
width: 100%;
height: $burger-dash-height;
background-color: $primary-bg-color;
transition: 0.3s;

&:nth-child(2) {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}

&:first-child {
top: 0;
}

&:last-child {
bottom: 0;
}
}

&--opened {
.burger__dash {
&:nth-child(2) {
transform: translate(-50%, -50%) scaleX(0);
}

&:first-child {
transform: translateY($burger-translate-y) rotate(45deg);
top: 30%;
}

&:last-child {
transform: translateY($burger-translate-y) rotate(-45deg);
top: 30%;
}
}
}
}
6 changes: 5 additions & 1 deletion frontend/src/scss/layout/_layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,9 @@
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
padding: 0 $side-padding;
}

.body-menu-opened {
overflow: hidden;
}
Loading