Skip to content

Commit b961c91

Browse files
committed
feat(topic): add # to the right of the topic date to utilize anchor links
1 parent e68e0a9 commit b961c91

File tree

4 files changed

+37
-2
lines changed

4 files changed

+37
-2
lines changed

assets/static_stylesheet.go

Lines changed: 11 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

assets/style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,15 @@ form.search-form {
395395
gap: 0.5rem;
396396
align-items: center;
397397
justify-content: center;
398+
}
399+
400+
a.anchor {
401+
float: right;
402+
font-weight: normal;
403+
text-decoration: none;
404+
opacity: 0.6;
405+
}
406+
407+
a.anchor:hover {
408+
opacity: 1.0;
398409
}

web/handler/html.go

Lines changed: 14 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

web/handler/html/topic.gohtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
<a href="/posts/{{ .Id }}/edit">edit</a> <a href="/posts/{{ .Id }}/remove">remove</a>
5454
{{ end }}
5555
{{ end }}
56+
<a href="#{{ .Id }}" class="anchor">#</a>
5657
<hr/>
5758
</div>
5859
<div>{{ syntax .Content }}</div>

0 commit comments

Comments
 (0)