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

Alexander Bilz
06.22.2022 9df825df06bf47bdbb53b67f15601c60f636b898
refactor: portfolio, alert, 404, TOC and smaller fixes

4 files added
9 files modified
370 ■■■■ changed files
assets/css/style.css 37 ●●●● patch | view | raw | blame | history
assets/scss/main.scss 4 ●●●● patch | view | raw | blame | history
assets/scss/modules/_variables.scss 2 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_alert.scss 23 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_content.scss 6 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_footer.scss 10 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_languageswitch.scss 2 ●●● patch | view | raw | blame | history
assets/scss/partials/components/_page404.scss 4 ●●●● patch | view | raw | blame | history
assets/scss/partials/components/_portfolio.scss 127 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_post.scss 110 ●●●● patch | view | raw | blame | history
assets/scss/partials/components/_sidebar.scss 20 ●●●● patch | view | raw | blame | history
assets/scss/partials/layout/_header.scss 2 ●●● patch | view | raw | blame | history
assets/scss/partials/vendors/tableofcontents.scss 23 ●●●●● patch | view | raw | blame | history
assets/css/style.css
@@ -749,12 +749,6 @@
  font-size: 1.4rem;
}
.back-button {
  padding-top: 30px;
  max-width: 100px;
  padding-left: 40px;
  float: left;
}
/*
#fb_comments_container {
@@ -827,7 +821,7 @@
  padding: 6px 12px;
}
/* Portfolio */
/*
.cta {
  padding-bottom: 1em;
}
@@ -875,6 +869,7 @@
.box--right {
  margin-top: -24px;
}
*/
/* Menu */
.menu {
@@ -934,16 +929,16 @@
  width: 100px;
  float: right;
}
/*
.page_404 {
  text-align: center;
  padding-top: 50px;
}
/*
.navbar-burger {
  display: none;
}
*/
#TableOfContents {
  display: block;
@@ -969,6 +964,7 @@
  display: inherit;
}
.alert {
  padding: 1rem;
  border-radius: 1 px;
@@ -991,6 +987,7 @@
  font-weight: 800;
  margin-right: 0.75rem;
}
*/
@media screen and (min-width: 961px), print {
  /* header {
@@ -999,7 +996,7 @@
  /* .nav__links li:not(:last-of-type) {
    padding-right: 20px;
  } */
  }
  .sidebar {
    height: 100vh;
@@ -1008,7 +1005,6 @@
    position: fixed;
    width: var(--sidebar-width);
  }
  /*
  .sidebar__content {
    display: flex;
    flex-direction: column;
@@ -1033,7 +1029,7 @@
  .wrapper {
    display: flex;
  }
*/
  .footer--base {
    display: none;
@@ -1093,6 +1089,7 @@
  .box--right {
    margin-left: auto;
  }
  */
}
@media screen and (max-width: 960px) {
@@ -1148,13 +1145,13 @@
    max-width: 100%;
    margin: 0;
  }
  */
  .footer--sidebar {
    display: none;
  }
  /* nav {
   nav {
    display: none;
  } */
@@ -1233,7 +1230,7 @@
  .list-with-title .listing .listing-post a {
    width: 80%;
  }
/*
  .box--right,
  .box--left {
    border-bottom: 1px solid var(--border-color);
@@ -1251,6 +1248,7 @@
    padding-bottom: 0px;
    padding-top: 48px;
  }
  */
  /*
  .triangle {
    display: none;
@@ -1287,7 +1285,7 @@
  header {
    display: none;
  }
} */
}
@media (min-width: 1921px) {
  .sidebar {
@@ -1298,8 +1296,9 @@
  .content {
    padding-right: 20%;
  }
  /* header {
  header {
    position: fixed;
    width: var(--content-width);
  } */
}
}
*/
assets/scss/main.scss
@@ -19,5 +19,9 @@
@import './partials/components/comment';
@import './partials/components/languageswitch';
@import './partials/components/post';
@import './partials/components/alert';
@import './partials/components/portfolio';
@import './partials/components/page404';
@import './partials/vendors/mediumzoom';
@import './partials/vendors/contactform';
@import './partials/vendors/tableofcontents';
assets/scss/modules/_variables.scss
@@ -5,6 +5,8 @@
$primary-lighter: #eeeeee;
$info: #0366d7;
$shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
$border: 1px solid rgba(0, 0, 0, 0.15);
$alert: #ffc107;
/* Former variables*/
$secondary-bg-color: #eeeeee;
assets/scss/partials/components/_alert.scss
New file
@@ -0,0 +1,23 @@
.alert {
    padding: 1rem;
    border-radius: 1 px;
    border-style: solid;
    border-color:$alert;
    border-radius: 0.25rem;
    border-width: 2px;
    #indicator {
        background-color: $alert;
        display: inline-block;
        border-radius: 9999px;
        padding: 0.5rem;
        height: 1.5rem;
        width: 2.5rem;
        height: 2.5rem;
        text-align: center;
        color: $accent;
        font-weight: 800;
        margin-right: 0.75rem;
      }
  }
assets/scss/partials/components/_content.scss
@@ -2,3 +2,9 @@
  height: auto;
  margin-top: 80px;
}
@media (min-width: 1921px) {
  .content {
    padding-right: 20%;
  }
}
assets/scss/partials/components/_footer.scss
@@ -21,3 +21,13 @@
        padding: 4px;
    }
  }
@media screen and (min-width: 961px), print {
  .footer {
    &--base {
      display: none;
    }
    &--sidebar {
      display: none;
    }
  }
}
assets/scss/partials/components/_languageswitch.scss
@@ -61,7 +61,7 @@
        width: 15px;
        transform: rotate(45deg) translateY(0px) translatex(10px);
        height: 15px;
        background: $primary-light;
        background: $accent;
        border-radius: 2px 0px 0px 0px;
        border-color: $primary;
        box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.2);
assets/scss/partials/components/_page404.scss
New file
@@ -0,0 +1,4 @@
.page_404 {
    text-align: center;
    padding-top: 50px;
}
assets/scss/partials/components/_portfolio.scss
New file
@@ -0,0 +1,127 @@
  .box-wrapper {
    padding: 48px;
    position: relative;
    z-index: 0;
  }
  .box-image {
    display: block;
    background-color: #fff;
    position: relative;
    z-index: 1;
    overflow: hidden;
    &--right,
    &--left {
      margin-right: auto;
      margin-left: auto;
      width: calc(100% - 64px);
      background-color: $accent;
      max-width: 400px;
      z-index: -1;
    }
    img {
        min-width: 100%;
        box-shadow: #000;
        overflow: hidden;
        transition: box-shadow 0.3s ease;
        object-fit: cover;
        border-bottom: 0px;
        display: block;
      }
  }
  .box {
    background-color: $primary-lighter;
    padding: 32px;
    &--left, &--right {
        margin-top: -24px;
    }
  }
  .cta {
    padding-bottom: 1em;
  }
@media screen and (min-width: 961px), print {
    .box {
        padding: 48px;
        box-shadow: $shadow;
        background-color: $accent;
        border-radius: 0.5em;
        &--left,
        &--right {
          width: 60%;
          margin-top: -48px;
          z-index: 3;
          background: $primary-lighter;
        }
        &--right {
          margin-left: auto;
      }
      }
      .box-wrapper::before {
        border: $border;
        content: '';
        z-index: -1;
        position: absolute;
        top: 10%;
        left: 10%;
        bottom: 10%;
        right: 10%;
        background: transparent;
        border-radius: 0.5em;
      }
      .box-image{
        &--right, &--left {
            width: 60%;
            object-fit: contain;
            max-width: none;
            border-top-right-radius: 0.5em;
            border-top-left-radius: 0.5em;
          }
          &--right {
            margin-right: 0;
            margin-left: auto;
            border-bottom-right-radius: 0.5em;
          }
          &--left {
            margin-right: auto;
            margin-left: 0;
            border-bottom-left-radius: 0.5em;
          }
      }
}
@media screen and (max-width: 960px) {
.box {
    &--right, &--left {
      border-bottom:$border;
    }
}
    .box-image{
        &--left, &--right {
        padding: 32px 32px 0px 32px;
        max-width: inherit;
        }
    }
    .box-wrapper {
      padding-left: 0px;
      padding-right: 0px;
      padding-bottom: 0px;
      padding-top: 48px;
    }
}
assets/scss/partials/components/_post.scss
@@ -27,7 +27,7 @@
      font-size: 2.2rem;
      margin: 0;
    }
    color: var(--heading-color);
    color: $primary;
    &:hover {
      text-decoration: underline;
    }
@@ -39,31 +39,12 @@
      font-weight: 400;
      font-size: 1.4rem;
    }
  }
  .post-footer {
    padding: 0 0 10px 0;
    border-bottom: 1px solid var(--border-color);
    .meta {
    img {
      display: block;
      margin-left: auto;
      margin-right: auto;
      width: 65%;
      max-width: 100%;
      display: flex;
      color: #bbbbbb;
      .info {
        float: left;
        font-size: 1.2rem;
        margin-bottom: 1em;
        color: var(--body-color);
        .date {
          margin-right: 10px;
          margin-left: 5px;
        }
      }
    }
    .info {
      .separator a {
        margin-right: 0.2em;
      }
    }
  }
  figure {
    max-width: 100%;
@@ -89,75 +70,104 @@
  }
}
.post .post-footer .meta a {
  text-decoration: none;
  color: var(--body-color);
  .post-footer {
    padding: 0 0 10px 0;
    border-bottom: $border;
    .meta {
      max-width: 100%;
      display: flex;
      color: #bbbbbb;
      .info {
        float: left;
        font-size: 1.2rem;
        margin-bottom: 1em;
        color: $primary;
        .date {
          margin-right: 10px;
          margin-left: 5px;
}
.post .post-footer .meta a:hover {
      }
      a {
        text-decoration: none;
        color: $primary;
        &:hover {
  color: #2660ab;
}
.post .post-footer .meta i {
      }
      i {
  margin-right: 6px;
}
.post .post-footer .tags {
    }
    .info {
      .separator a {
        margin-right: 0.2em;
      }
    }
    .tags {
  padding-bottom: 15px;
  font-size: 1.3rem;
}
.post .post-footer .tags ul {
      ul {
  list-style-type: none;
  display: inline;
  margin: 0;
  padding: 0;
}
.post .post-footer .tags ul li {
      ul li {
  list-style-type: none;
  margin: 0;
  padding-right: 5px;
  display: inline;
}
.post .post-footer .tags a {
      a {
  text-decoration: none;
  color: var(--post-color);
        color: $primary;
  font-weight: 400;
}
.post .post-footer .tags a:hover {
        &:hover {
  text-decoration: none;
}
      }
    }
  }
.post .post-thumbnail {
  .post-thumbnail {
  width: 100%;
  padding-bottom: 1em;
  box-shadow: #000;
  border-radius: 0.5em;
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}
.post .post-thumbnail img {
    img {
  width: 100%;
  height: var(--thumbnail-height);
      height: $thumbnail-height;
  object-fit: cover;
  border: 1px solid var(--border-color);
      border: $border;
  border-bottom: 0px;
}
  }
}
@media screen and (max-width: 960px) {
  .post figure.right {
  .post {
    figure {
      max-width: 100%;
      height: auto;
      margin: 0;
      text-align: center;
      &.right {
    float: unset;
    max-width: 100%;
    margin: 0;
  }
  .post figure.left {
      &.left {
    float: unset;
    max-width: 100%;
    margin: 0;
  }
}
  }
}
assets/scss/partials/components/_sidebar.scss
@@ -54,17 +54,29 @@
          }
    }
}
    @media screen and (min-width: 961px), print {
  .sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
    position: fixed;
    width: $sidebar-width;
        &__content {
            display: flex;
            flex-direction: column;
            justify-content: center;
            flex-grow: 1;
        }
    }
  }
@media (min-width: 1921px) {
  .sidebar {
    padding-left: 17%;
    padding-right: 3%;
    width: calc(var(--sidebar-width) - 20%);
  }
}
assets/scss/partials/layout/_header.scss
@@ -8,7 +8,7 @@
@media screen and (min-width: 961px), print {
  .header {
    border-bottom: 1px solid $primary-light;
    border-bottom: $border;
  }
}
@media screen and (max-width: 960px) {
assets/scss/partials/vendors/tableofcontents.scss
New file
@@ -0,0 +1,23 @@
#TableOfContents {
    display: block;
    background: transparent;
  }
#TableOfContents ul {
list-style: none;
line-height: 1.9em;
margin: 0;
}
#TableOfContents > ul {
padding-left: 0;
}
#TableOfContents li a {
display: inherit;
color: var(--link-color);
}
#TableOfContents li a:hover {
display: inherit;
}