Skip to content

Commit

Permalink
Pre-review cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusKjeldgaard committed Nov 28, 2024
1 parent f146dc9 commit cb3c5de
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 39 deletions.
4 changes: 2 additions & 2 deletions apps/cookbook/src/app/home/home.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

/* stylelint-disable declaration-block-no-redundant-longhand-properties */

$header-height-mobile: utils.size('xxxl') + 20px;
$header-height-mobile: auto;
$header-height-desktop: 2 * utils.size('xxl');
$footer-height: 3 * utils.size('xxl');
$sidebar-width: 5 * utils.size('xxl');
Expand All @@ -14,7 +14,7 @@ $desktop-gutter: minmax(utils.size('m'), 1fr);
background-color: utils.get-color('background-color');
display: grid;
grid-template-columns: $mobile-gutter minmax(0, 1fr) $mobile-gutter;
grid-template-rows: auto minmax(0, 1fr) $footer-height;
grid-template-rows: $header-height-mobile minmax(0, 1fr) $footer-height;
grid-template-areas:
'header header header'
'. main .'
Expand Down
19 changes: 10 additions & 9 deletions apps/cookbook/src/app/page/header/header.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,25 @@ $medium-rect-delay: $large-rect-delay + 300ms;
$small-rect-delay: $medium-rect-delay + 200ms;

:host {
display: flex;
grid-area: header;
z-index: utils.z('sticky-content') + 1; // above side-nav
position: sticky;
top: 0;
background-color: utils.get-color('light');
border-bottom: 1px solid utils.get-color('medium');

@include utils.media('<large') {
position: sticky;
top: 0;
z-index: utils.z('sticky-content') + 1; // above side-nav
background-color: utils.get-color('light');
border-bottom: 1px solid utils.get-color('medium');
@include utils.media('>=large') {
position: static;
background-color: transparent;
border-bottom: none;
}
}

header {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
width: 100%;
padding-inline: var(--kirby-spacing-xxs);
padding-block: var(--kirby-spacing-xxs);
padding: var(--kirby-spacing-xxs);

@include utils.media('>=large') {
padding-block-start: var(--kirby-spacing-m);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ <h2 class="kirby-text-normal">Resources</h2>
</kirby-card>

<kirby-card
[hasPadding]="true"
(keydown.ArrowUp)="onLinksArrowUpDown($event, 'components')"
(keydown.ArrowDown)="onLinksArrowUpDown($event, 'components')"
[hasPadding]="true"
>
<h2 class="kirby-text-normal">Components</h2>
<hr />
Expand Down
42 changes: 15 additions & 27 deletions apps/cookbook/src/app/page/side-nav/side-nav.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,29 @@ $logo-size-mobile: var(--kirby-spacing-xl);
display: none;
z-index: utils.z('sticky-content');
padding: $menu-padding-mobile;
position: absolute;
top: var(--kirby-spacing-xxxxl);
bottom: 0;
overflow: auto;

@include utils.media('<large') {
position: absolute;
top: var(--kirby-spacing-xxxxl);
bottom: 0;
overflow: auto;

&.is-open {
display: block;
background-color: utils.get-color('light');
box-shadow: utils.get-elevation(8);
}
&.is-open {
display: block;
background-color: utils.get-color('light');
box-shadow: utils.get-elevation(8);
}

@include utils.media('>=large') {
position: static;
grid-area: sidebar;
}

@include utils.media('>=large') {
box-shadow: none;
display: block;
position: static;
padding: 0;
min-height: unset;

&.is-open {
background-color: transparent;
box-shadow: none;
}
}
}

Expand All @@ -53,18 +52,7 @@ nav {
}
}

section {
overflow: auto;
@include utils.media('<large') {
display: none;

&.is-open {
display: block;
}
}
}

kirby-card:first-child {
kirby-card:not(:last-child) {
margin-bottom: var(--kirby-spacing-s);
}

Expand Down

0 comments on commit cb3c5de

Please sign in to comment.