From 5a52f7f8f7cb130041e049ce9740eeb42df4b34d Mon Sep 17 00:00:00 2001
From: Alexander Bilz <mail@alexbilz.com>
Date: Fri, 11 Feb 2022 11:44:41 +0000
Subject: [PATCH] refactor: archive

---
 layouts/_default/list.html                    |   22 +++++------
 assets/scss/partials/components/_archive.scss |   65 ++++++++++++++------------------
 2 files changed, 39 insertions(+), 48 deletions(-)

diff --git a/assets/scss/partials/components/_archive.scss b/assets/scss/partials/components/_archive.scss
index df09a7c..2bc5dfc 100644
--- a/assets/scss/partials/components/_archive.scss
+++ b/assets/scss/partials/components/_archive.scss
@@ -1,40 +1,33 @@
 .archive {
-    width: 100%;
-
-    &__list {
-        font-size: 1.4rem;
-        margin: 30px;
-        padding: 0;
-        &-item{
-            padding-bottom: 5px;
-            list-style-type: none;
-
-            .post-time {
-                float: right;
-                display: inline-block;
-                max-width: 10%;
-                text-align: right;
-                color: $primary-light;
-            }
-            a {
-                color: $primary;
-                width: 90%;
-                display: inline-block;
-              }
-              
-              a:hover {
-                color: $info;
-              }
-        }
-        &-title{
-            font-size: 2.4rem;
-            color: $primary;
-            font-weight: 600;
-            line-height: 2.2em;
-        }
+  &__list {
+    font-size: 1.4rem;
+    margin: 30px;
+    padding: 0;
+    &-item {
+      padding-bottom: 5px;
+      list-style-type: none;
     }
 
+    &-date {
+      float: right;
+      max-width: 10%;
+      text-align: right;
+      color: $primary-light;
+    }
+    &-title {
+      color: $primary;
+      width: 90%;
+      display: inline-block;
+      &:hover {
+        color: $info;
+      }
+    }
+
+    &-heading {
+      font-size: 2.4rem;
+      color: $primary;
+      font-weight: 600;
+      line-height: 2.2em;
+    }
+  }
 }
-
-
-
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index bde9f1d..07dd11b 100644
--- a/layouts/_default/list.html
+++ b/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,24 +10,22 @@
   >
     <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" }}
-                      {{ .Date.Format .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 }}
 
 
-                    {{ else }}
-                      {{ .Date.Format "Jan 2" }}
+                {{ else }}
+                  {{ .Date.Format "Jan 2" }}
 
 
-                    {{ end }}</span
-                  >
-                </div>
+                {{ end }}
+              </div>
             </li>
           </ul>
 

--
Gitblit v1.10.0