diff --git a/assets/css/main.css b/assets/css/main.css index 3beb93f..1b29540 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -56,6 +56,54 @@ footer { border-top: 1px solid var(--light); } +section.index { + display: flex; + flex-direction: row; +} + +section.index aside { flex-shrink: 4; } + +aside { + display: flex; + justify-content: flex-end; + flex-wrap: wrap; + flex-direction: row; + gap: 20px; +} + +article { + width: 256px; + height: 414px; + padding: 1rem; + border-radius: 10px; + background-color: #111; +} + +@media(max-width: 700px) { + aside { display: none; } +} + +article img { + height: 50%; + width: 100%; + border-radius: 10px; + object-fit: cover; +} + +article h3 { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.float-on-hover{ + transition: all .25s cubic-bezier(.2,.1,.47,1) +} + +.float-on-hover:hover{ + transform: translateY(-10px); +} + a { color: var(--links); text-decoration: none; diff --git a/layouts/_default/home.html b/layouts/_default/home.html index a2894b7..0b78227 100644 --- a/layouts/_default/home.html +++ b/layouts/_default/home.html @@ -1,6 +1,7 @@ {{ define "main" }} {{ .Content }} -
+
+

All Posts:

{{ range site.RegularPages.GroupByDate "2006" }}

{{ .Key }}

@@ -12,5 +13,12 @@ {{ end -}} {{ end }} +
+ +
{{ end }} diff --git a/layouts/partials/article.html b/layouts/partials/article.html new file mode 100644 index 0000000..75a5d82 --- /dev/null +++ b/layouts/partials/article.html @@ -0,0 +1,13 @@ +
+ + {{- $image := (.Resources.GetMatch "featured").Resize "256x webp q90" }} + {{ .Params.featured.alt }} + +

{{ .Title | markdownify }}

+ {{- with .Date }} +

{{ .Format "2006/01/02" }}

+ {{- end }} + {{- with index (.GetTerms "tags") 0 }} + {{ .LinkTitle }} + {{- end }} +