fix
This commit is contained in:
parent
427b643a47
commit
4c5be2105c
@ -1,5 +1,5 @@
|
||||
+++
|
||||
date = "2024-04-04T16:27:13+09:00"
|
||||
date = "2024-03-31T16:27:13+09:00"
|
||||
tags = ["blog"]
|
||||
title = "start blog"
|
||||
+++
|
7
content/blog/2024-04-01-layout.md
Normal file
7
content/blog/2024-04-01-layout.md
Normal file
@ -0,0 +1,7 @@
|
||||
+++
|
||||
date = "2024-04-01T00:00:00+09:00"
|
||||
tags = ["blog"]
|
||||
title = "change layout"
|
||||
+++
|
||||
|
||||
layoutを変更しました。
|
@ -1,8 +0,0 @@
|
||||
+++
|
||||
date = "2024-04-05T16:27:13+09:00"
|
||||
tags = ["blog"]
|
||||
title = "new layout"
|
||||
+++
|
||||
|
||||
web pageのlayoutを変更しました。
|
||||
|
@ -9,12 +9,16 @@
|
||||
<li class="top">
|
||||
<a href="{{.Permalink}}">blog</a>
|
||||
</li>
|
||||
{{ range $index,$value := first 5 (where $.Site.RegularPages.ByDate.Reverse "Section" "blog") }}
|
||||
<li class="blog-list">
|
||||
<a href="{{.Permalink}}">{{.Title}}</a> <span class="blog-date">{{ .Date.Local.Format "2006-01-02" }}</span>
|
||||
</li>
|
||||
|
||||
{{ range $index,$value := (where $.Site.RegularPages.ByDate.Reverse "Section" "blog") }}
|
||||
{{ if lt $index 5 }}
|
||||
<li class="blog-list-first" style="display:block;"> <a href="{{.Permalink}}">{{.Title}}</a> <span class="blog-date">{{ .Date.Local.Format "2006-01-02" }}</span> </li>
|
||||
{{ else }}
|
||||
<li class="blog-list-all" style="display:none;"> <a href="{{.Permalink}}">{{.Title}}</a> <span class="blog-date">{{ .Date.Local.Format "2006-01-02" }}</span> </li>
|
||||
{{ end }}
|
||||
<li class="blog-menu"><a href="/blog"><i class="fa-solid fa-bars"></i></a></li>
|
||||
{{ end }}
|
||||
|
||||
<li class="blog-menu"><button onclick="blog_list_open();"><i class="fa-solid fa-bars"></i></button></li>
|
||||
{{ end }}
|
||||
|
||||
{{ if or (eq $t "chara") (eq $t "story") (eq $t "card") (eq $t "vrm") }}
|
||||
|
@ -35,6 +35,7 @@
|
||||
</script>
|
||||
<script src="/pkg/hotkeys-js/dist/hotkeys.min.js"></script>
|
||||
<script src="/pkg/hotkeys-js/dist/terminal.js"></script>
|
||||
<script src="/js/index.js"></script>
|
||||
|
||||
{{ range .AlternativeOutputFormats -}}
|
||||
{{ printf `<link rel="%s" type="%s" href="%s" title="%s" />` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }}
|
||||
|
16
scpt/md.zsh
Executable file
16
scpt/md.zsh
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/zsh
|
||||
|
||||
d=${0:a:h:h}
|
||||
c=$d/content/blog
|
||||
|
||||
for i in $(seq -w 1 20)
|
||||
do
|
||||
d=2024-01-$i
|
||||
f=$c/$d-test.md
|
||||
echo "
|
||||
+++
|
||||
date = \"${d}T00:00:00+09:00\"
|
||||
title = \"${RANDOM}\"
|
||||
+++
|
||||
" >! $f
|
||||
done
|
@ -1048,14 +1048,28 @@ table {
|
||||
table {
|
||||
border-spacing: 2px;
|
||||
}
|
||||
|
||||
|
||||
li.blog-list {
|
||||
li.blog-list-first {
|
||||
background-color: #fff;
|
||||
padding:10px 40px;;
|
||||
border: solid 1px #eee;
|
||||
display: block;
|
||||
}
|
||||
|
||||
li.blog-list span.blog-date {
|
||||
li.blog-list-first span.blog-date {
|
||||
float:left;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
||||
li.blog-list-all {
|
||||
background-color: #fff;
|
||||
padding:10px 40px;;
|
||||
border: solid 1px #eee;
|
||||
display: none;
|
||||
}
|
||||
|
||||
li.blog-list-all span.blog-date {
|
||||
float:left;
|
||||
padding: 0 20px;
|
||||
}
|
||||
|
11
static/js/index.js
Normal file
11
static/js/index.js
Normal file
@ -0,0 +1,11 @@
|
||||
function blog_list_open() {
|
||||
var b = document.querySelectorAll("li.blog-list-all");
|
||||
var index = 0, length = b.length;
|
||||
for ( ; index < length; index++) {
|
||||
if (b[index].style.display == 'none') {
|
||||
b[index].style.display = 'block';
|
||||
} else {
|
||||
b[index].style.display = 'none';
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user