mirror of https://github.com/lxndrblz/anatole.git

alexanderdavide
13.51.2022 743d26966bac06a114c46fb85e2ccf4c264e74ee
refactor: make header sticky
5 files modified
30 ■■■■ changed files
assets/scss/partials/components/_portfolio.scss 5 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_sidebar.scss 14 ●●●●● patch | view | raw | blame | history
assets/scss/partials/layout/_header.scss 7 ●●●●● patch | view | raw | blame | history
layouts/_default/baseof.html 2 ●●● patch | view | raw | blame | history
layouts/partials/navbar.html 2 ●●● patch | view | raw | blame | history
assets/scss/partials/components/_portfolio.scss
@@ -1,6 +1,5 @@
.portfolio {
  position: relative;
  z-index: 0;
  padding-left: 0px;
  padding-right: 0px;
  padding-bottom: 0px;
@@ -15,7 +14,6 @@
      border: t('border');
    }
    content: '';
    z-index: -1;
    position: absolute;
    top: 10%;
    left: 10%;
@@ -47,7 +45,6 @@
      display: block;
      background-color: #fff;
      position: relative;
      z-index: 1;
      overflow: hidden;
      &--right,
@@ -58,7 +55,6 @@
        margin-right: auto;
        margin-left: auto;
        width: calc(100% - 64px);
        z-index: -1;
        padding: 32px 32px 0px 32px;
        max-width: inherit;
@@ -117,7 +113,6 @@
        border-bottom: 0px;
        width: 60%;
        margin-top: -48px;
        z-index: 3;
      }
    }
assets/scss/partials/components/_sidebar.scss
@@ -2,18 +2,20 @@
  -webkit-background-size: cover;
  background-size: cover;
  background-color: var(--bg-color);
  margin-top: 40px;
  @include desktop_and_print {
    @include themed() {
      border-right: 1px solid t('primary-lighter');
    }
    z-index: 3;
    height: 100vh;
    z-index: 2;
    position: fixed;
    height: 100%;
    margin-top: 0;
    width: $sidebar-width;
    display: flex;
    flex-direction: column;
    @include themed() {
      border-right: t('border');
    }
  }
  @include widescreen {
assets/scss/partials/layout/_header.scss
@@ -4,14 +4,15 @@
  }
  width: 100%;
  position: fixed;
  right: 0;
  z-index: 3;
  z-index: 1;
  top: 0;
  @include desktop {
    position: sticky;
    @include themed() {
      border-bottom: t('border');
    }
    width: $content-width;
  }
  @include print {
layouts/_default/baseof.html
@@ -7,12 +7,12 @@
>
  {{- partial "head.html" . -}}
  <body class="body theme--light">
    <header class="header">{{ partial "navbar.html" . }}</header>
    <div class="wrapper">
      <aside class="wrapper__sidebar">
        {{- partial "sidebar.html" . -}}
      </aside>
      <main class="wrapper__main">
        <header class="header">{{ partial "navbar.html" . }}</header>
        {{- block "main" . }}{{- end }}
      </main>
    </div>
layouts/partials/navbar.html
@@ -1,5 +1,5 @@
<div
  class="page-top {{ with .Site.Params.doNotLoadAnimations }}
  class="{{ with .Site.Params.doNotLoadAnimations }}
    .
  {{ else }}