Skip to content

Commit 2145c6d

Browse files
committed
feat(tpls): hide mm:ss for semi-narrow screen
1 parent efe0314 commit 2145c6d

File tree

3 files changed

+19
-1
lines changed

3 files changed

+19
-1
lines changed

src/tpl/asset/main.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,16 @@ em {
315315
background: #ffc;
316316
}
317317

318+
@media only screen and (max-width: 375px) {
319+
.item-list .header .time {
320+
width: 4.05em;
321+
}
322+
323+
.item-list .detail .time span {
324+
display: none;
325+
}
326+
}
327+
318328
@media only screen and (max-width: 350px) {
319329
.item-list .detail .time {
320330
display: none;

src/tpl/asset/main.css.go

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,14 @@ margin: 1em;
266266
padding: 1em;
267267
background: #ffc;
268268
}
269+
@media only screen and (max-width: 375px) {
270+
.item-list .header .time {
271+
width: 4.05em;
272+
}
273+
.item-list .detail .time span {
274+
display: none;
275+
}
276+
}
269277
@media only screen and (max-width: 350px) {
270278
.item-list .detail .time {
271279
display: none;

src/tpl/util/formatTime.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ import (
66
)
77

88
func FormatTime(t time.Time) template.HTML {
9-
return template.HTML(t.Format("2006-01-02 15:04"))
9+
return template.HTML(t.Format("2006-01-02<span> 15:04</span>"))
1010
}

0 commit comments

Comments
 (0)