refactor style using scss

This commit is contained in:
mivinci 2021-08-29 23:55:45 +08:00
parent 31ec816be5
commit 6b55bdedc6
17 changed files with 222 additions and 588 deletions

View file

@ -1,7 +1,7 @@
<!DOCTYPE html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<body class=" sm:mx-5 sm:my-0">
{{ partial "header.html" . }}
{{ block "main" . }} {{ end }}

View file

@ -7,8 +7,8 @@
{{ end }}
<div>
{{ range .Data.Pages }}
<div class="row row-mob mb-1 mb-1_5-mob gap-3">
<div class="sm-2-mob mb-0_5-mob">{{ dateFormat "Jan 2, 2006" .Date }}</div>
<div class="flex sm:flex-col my-5 sm:mb-6 sm:mt-3">
<div class="min-w-32 sm:mb-2">{{ dateFormat .Site.Params.timeformat .Date }}</div>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
</div>
{{ end }}

View file

@ -1,18 +1,18 @@
{{ define "main" }}
{{ if .Params.toc }}
{{ partial "toc.html" . }}
{{ end }}
<main>
<h1>{{ .Title }}</h1>
<div class="sm-1 mtb-1">
<h1 class="my-6">{{ .Title }}</h1>
<div class="mb-3 text-xs">
Posted at &mdash; {{ dateFormat .Site.Params.timeformat .Date }}
{{ if .Draft }}
<span class="tag ml-1">
<span class="ml-1">
DRAFT
</span>
{{ end }}
</div>
<p>{{ .Description | markdownify | safeHTML }}</p>
{{ if .Params.toc }}
{{ partial "toc.html" . }}
{{ end }}
<article class="md">
{{ .Content }}
</article>

View file

@ -1,12 +1,12 @@
{{ define "main" }}
<main>
<h2>{{ .Title }}</h2>
<nav class="col">
<nav class="flex flex-col">
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms.ByCount }}
<a class="row as-s mb-1" href="/{{ $data.Plural }}/{{ $value.Name }}">
<a class="mb-5 self-start" href="/{{ $data.Plural }}/{{ $value.Name }}">
{{ $value.Name }}
<span class="tag-pm ml-1">{{ $value.Count }}</span>
<span class="">{{ $value.Count }}</span>
</a>
{{ end }}
</nav>