diff --git a/handler/template.go b/handler/template.go
index ffd0503..9a620cf 100644
--- a/handler/template.go
+++ b/handler/template.go
@@ -7,6 +7,7 @@ import (
"net/url"
"regexp"
"strconv"
+ "time"
)
func GetRandomColor() string {
@@ -105,6 +106,10 @@ func ParsePixivRedirect(s string) template.HTML {
return template.HTML(escaped)
}
+func ParseTime(date time.Time) string {
+ return date.Format("2006-01-02 15:04")
+}
+
func GetTemplateFunctions() template.FuncMap {
return template.FuncMap{
"toInt": func(s string) int {
@@ -143,5 +148,8 @@ func GetTemplateFunctions() template.FuncMap {
}
return fmt.Sprintf("%s-%s-%s", s[4:], s[2:4], s[:2])
},
+ "parseTime": func(date time.Time) string {
+ return ParseTime(date)
+ },
}
}
diff --git a/template/assets/calendar.png b/template/assets/calendar.png
new file mode 100644
index 0000000..0c8bc73
Binary files /dev/null and b/template/assets/calendar.png differ
diff --git a/template/css/style.css b/template/css/style.css
index 1f91e74..e2a79f4 100644
--- a/template/css/style.css
+++ b/template/css/style.css
@@ -245,6 +245,8 @@ nav .navigation-wrapper .sidebar .sidebar-list .sidebar-item img {
max-width: 1200px;
margin-left: auto;
margin-right: auto;
+ padding-left: 10px;
+ padding-right: 10px;
}
.artwork-container {
@@ -445,13 +447,16 @@ nav .navigation-wrapper .sidebar .sidebar-list .sidebar-item img {
font-size: 0.8em;
color: #aaa;
}
+.illust .illust-description {
+ font-size: 0.9em;
+}
.illust .illust-tags {
font-size: 0.9em;
}
.illust .illust-tags .illust-tag-attr {
display: inline-flex;
align-items: center;
- margin-right: 10px;
+ margin-right: 15px;
}
.illust .illust-tags .illust-tag-attr img {
aspect-ratio: 1/1;
@@ -460,7 +465,7 @@ nav .navigation-wrapper .sidebar .sidebar-list .sidebar-item img {
margin-right: 5px;
}
.illust .illust-tags .illust-tag {
- margin-right: 5px;
+ margin-right: 10px;
}
.illust .illust-tags .illust-tag #highlight {
color: #fc365b;
@@ -468,20 +473,21 @@ nav .navigation-wrapper .sidebar .sidebar-list .sidebar-item img {
.illust .illust-tags .illust-tag .illust-tag-name {
color: #118bee;
font-weight: bold;
+ margin-right: 5px;
}
-.illust .illust-other-works img {
+.illust .illust-other-works > a {
+ display: inline-flex;
+ align-items: center;
+ text-decoration: none;
+ color: #fff;
+}
+.illust .illust-other-works > a > img {
aspect-ratio: 1/1;
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 5px;
}
-.illust .illust-other-works a {
- display: inline-flex;
- align-items: center;
- text-decoration: none;
- color: #fff;
-}
.background-cover {
background: repeating-linear-gradient(52.5deg, rgba(32, 32, 32, 0.8), rgba(32, 32, 32, 0.8) 14px, rgba(240, 248, 255, 0) 14px, rgba(240, 248, 255, 0) 28px);
diff --git a/template/css/style.scss b/template/css/style.scss
index 5ba1ca5..5ebfdd4 100644
--- a/template/css/style.scss
+++ b/template/css/style.scss
@@ -302,6 +302,8 @@ nav {
max-width: 1200px;
margin-left: auto;
margin-right: auto;
+ padding-left: 10px;
+ padding-right: 10px;
}
.artwork-container {
@@ -515,13 +517,17 @@ line-height: 10px;
}
}
+ .illust-description {
+ font-size: 0.9em;
+ }
+
.illust-tags {
font-size: 0.9em;
.illust-tag-attr {
display: inline-flex;
align-items: center;
- margin-right: 10px;
+ margin-right: 15px;
img {
aspect-ratio: 1/1;
@@ -532,7 +538,7 @@ line-height: 10px;
}
.illust-tag {
- margin-right: 5px;
+ margin-right: 10px;
#highlight {
color: $highlight;
@@ -541,25 +547,28 @@ line-height: 10px;
.illust-tag-name {
color: $link;
font-weight: bold;
+ margin-right: 5px;
}
}
}
.illust-other-works {
- img {
+ & > a {
+ display: inline-flex;
+ align-items: center;
+ text-decoration: none;
+ color: $fg;
+
+ & > img {
aspect-ratio: 1/1;
width: 50px;
height: 50px;
border-radius: 50%;
margin-right: 5px;
}
-
- a {
- display: inline-flex;
- align-items: center;
- text-decoration: none;
- color: $fg;
}
+
+
}
}
diff --git a/template/layout.jet.html b/template/layout.jet.html
index f9aeccc..ef1d0da 100644
--- a/template/layout.jet.html
+++ b/template/layout.jet.html
@@ -98,8 +98,11 @@
@@ -121,10 +124,12 @@
diff --git a/template/pages/artwork.jet.html b/template/pages/artwork.jet.html
index fc98d0c..87efdcf 100644
--- a/template/pages/artwork.jet.html
+++ b/template/pages/artwork.jet.html
@@ -54,7 +54,10 @@
{{ Illust.Likes }}
- {{ Illust.Date }}
+
+
+ {{ parseTime: Illust.Date }}
+
{{ Tag.Metadata.Detail }}
-{{ Tag.Metadata.Detail }}