1
0
This commit is contained in:
syui 2024-04-05 23:23:23 +09:00
parent 427b643a47
commit 4c5be2105c
Signed by: syui
GPG Key ID: 5417CFEBAD92DF56
8 changed files with 61 additions and 16 deletions

View File

@ -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"
+++

View File

@ -0,0 +1,7 @@
+++
date = "2024-04-01T00:00:00+09:00"
tags = ["blog"]
title = "change layout"
+++
layoutを変更しました。

View File

@ -1,8 +0,0 @@
+++
date = "2024-04-05T16:27:13+09:00"
tags = ["blog"]
title = "new layout"
+++
web pageのlayoutを変更しました。

View File

@ -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") }}

View File

@ -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
View 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

View File

@ -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
View 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';
}
}
}