Skip to content

Commit

Permalink
Merge pull request #94 from timfanda35/styles/refine-list-style
Browse files Browse the repository at this point in the history
style(list): refine the list style
  • Loading branch information
timfanda35 authored Apr 13, 2024
2 parents 1f2972f + 9005e48 commit bdbeeb5
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 28 deletions.
46 changes: 25 additions & 21 deletions themes/simplecss/layouts/_default/li.html
Original file line number Diff line number Diff line change
@@ -1,26 +1,30 @@
<article>
<h3>
<a href="{{ .Permalink }}">{{ .Title }}</a>
</h3>
<div>
<time class="pub-time" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Lastmod.Format ( .Site.Params.dateformat | default "2006.01.02") }}
</time>
<div class="terms">
{{ if .Params.categories }}
<div class="categories">
{{ range .Params.categories }}
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}"><mark>{{ . }}</mark></a>
{{ end }}
<li style="margin-top: 1rem; margin-bottom: 1rem;">
<div style="display: flex; flex-direction: column;">
<div style="font-size: x-large;">
<a href="{{ .Permalink }}">{{ .Title }}</a>
</div>
<div style="display: flex; gap: 1rem;">
<div>
<time class="pub-time" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}">
{{ .Lastmod.Format ( .Site.Params.dateformat | default "2006.01.02") }}
</time>
</div>
{{ end }}
{{ if .Params.tags }}
<div class="tag">
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}"><mark>{{ . }}</mark></a>
<div class="terms">
{{ if .Params.categories }}
<div class="categories">
{{ range .Params.categories }}
<a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}"><mark>{{ . }}</mark></a>
{{ end }}
</div>
{{ end }}
{{ if .Params.tags }}
<div class="tag">
{{ range .Params.tags }}
<a href="{{ "/tags/" | relLangURL }}{{ . | urlize }}"><mark>{{ . }}</mark></a>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</div>
</div>
</article>
</li>
6 changes: 4 additions & 2 deletions themes/simplecss/layouts/_default/list.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{{ define "main" }}
{{ $pag := .Paginate (.Pages) 10 }}
<div class="archive-body">
{{ $pag := .Paginate (.Pages) 50 }}
<div>
<ul>
{{ range $pag.Pages }}
{{ .Render "li" }}
{{ end }}
</ul>
</div>

{{ partial "pagination" . }}
Expand Down
10 changes: 6 additions & 4 deletions themes/simplecss/layouts/_default/taxonomy.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@
<header class="archive-header">
<h2 class="title">「{{ .Title }}」 List</h2>
</header>
<div class="archive-body">
{{ range .Data.Pages }}
{{ .Render "li" }}
{{ end }}
<div>
<ul>
{{ range .Data.Pages }}
{{ .Render "li" }}
{{ end }}
</ul>
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion themes/simplecss/layouts/_default/terms.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{ $data := .Data }}
{{ range $key, $value := .Data.Terms }}
<li class="taxonomy-list-item">
<p class="title">
<p class="title" style="font-size: x-large;">
<a href="/{{ $data.Plural }}/{{ $key | urlize }}">{{ $key }}</a><span>({{ len $value }})</span>
</p>
<ul>
Expand Down
12 changes: 12 additions & 0 deletions themes/simplecss/static/css/customize.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
p, li {
line-height: 2;
}

mark {
background-color: #a5a5a5;
}

a {
text-decoration: none;
}

a:hover {
text-decoration: underline;
}

0 comments on commit bdbeeb5

Please sign in to comment.