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

Alexander Bilz
11.44.2022 5a52f7f8f7cb130041e049ce9740eeb42df4b34d
refactor: archive

2 files modified
33 ■■■■■ changed files
assets/scss/partials/components/_archive.scss 19 ●●●●● patch | view | raw | blame | history
layouts/_default/list.html 14 ●●●●● patch | view | raw | blame | history
assets/scss/partials/components/_archive.scss
@@ -1,6 +1,4 @@
.archive {
    width: 100%;
    &__list {
        font-size: 1.4rem;
        margin: 30px;
@@ -8,33 +6,28 @@
        &-item{
            padding-bottom: 5px;
            list-style-type: none;
    }
            .post-time {
    &-date {
                float: right;
                display: inline-block;
                max-width: 10%;
                text-align: right;
                color: $primary-light;
            }
            a {
    &-title {
                color: $primary;
                width: 90%;
                display: inline-block;
              }
              a:hover {
      &:hover {
                color: $info;
              }
        }
        &-title{
    &-heading {
            font-size: 2.4rem;
            color: $primary;
            font-weight: 600;
            line-height: 2.2em;
        }
    }
}
layouts/_default/list.html
@@ -1,6 +1,6 @@
{{ define "main" }}
  <div
    class="archive {{ with .Site.Params.doNotLoadAnimations }}
    class="post post-wrapper archive {{ with .Site.Params.doNotLoadAnimations }}
      .
    {{ else }}
@@ -10,14 +10,13 @@
  >
    <ul class="archive__list">
      {{ range .Data.Pages.GroupByDate "2006" }}
        <div class="archive__list-title">{{ .Key }}</div>
        <div class="archive__list-heading">{{ .Key }}</div>
        {{ range .Pages }}
          <ul>
            <li class="archive__list-item">
                <a href="{{ .RelPermalink }}" title="{{ .Title }}">{{ .Title }}</a>
                <div class="post-time">
                  <span class="date"
                    >{{ if isset .Site.Params "listdateformat" }}
              <a class="archive__list-title" href="{{ .RelPermalink }}" title="{{ .Title }}">{{ .Title }}</a>
              <div class="archive__list-date">
                {{ if isset .Site.Params "listdateformat" }}
                      {{ .Date.Format .Site.Params.listDateFormat }}
@@ -25,8 +24,7 @@
                      {{ .Date.Format "Jan 2" }}
                    {{ end }}</span
                  >
                {{ end }}
                </div>
            </li>
          </ul>