diff --git a/assets/js/main.js b/assets/js/main.js index bd0ad59..5f0a47c 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -86,6 +86,12 @@ if (header !== null) { listen('#img-btn', "click", showImg); listen('.bg-img', "click", hideImg); + document.querySelectorAll('.post-year').forEach((ele)=> { + ele.addEventListener('click', () => { + window.location.hash = '#' + ele.id; + }); + }); + window.addEventListener('scroll', throttle(() => { autoHideHeader(); diff --git a/assets/scss/style.scss b/assets/scss/style.scss index 9ff07e7..be2c149 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -408,6 +408,11 @@ p.img-404 { margin-right: 1.8em; font-size: 1.6em; @include dimmed; + + &:hover { + text-decoration: underline; + cursor: pointer; + } } .posts-list { diff --git a/layouts/_default/list.html b/layouts/_default/list.html index 198911d..dc525d6 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -12,7 +12,7 @@ {{- end }} {{- range .Data.Pages.GroupByDate "2006" }}
-
{{ .Key }}
+
{{ .Key }}