Make tag view scrollable

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-02-10 11:48:45 +05:30
parent 4b39e41c5d
commit 0bae76802a
2 changed files with 15 additions and 2 deletions

View File

@ -7,11 +7,11 @@
| Also available on <a href="{{ . }}">dev.to</a>
{{- end -}}
</p>
<p>
<div class="tag-container">
{{ range .Params.tags }}
<button class="tag-button"><a class="tag-button" href="{{ "tags/" | absLangURL }}{{ . | urlize }}">#{{.}}</a> </button>
{{ end }}
</p>
</div>
{{- with .Content -}}
{{ . | replaceRE "(<h[1-2] id=\"([^\"]+)\".+)(</h[1-9]+>)" `<a href="#${2}" class="hanchor" ariaLabel="Anchor"> ${1}</a> ${3}` | safeHTML }}
{{- end -}}

View File

@ -96,6 +96,19 @@ div.image_caption {
color: #757575;
}
div.tag-container {
width: fit-content(300px);
margin-bottom: 1rem;
overflow-x: auto;
scrollbar-width: 0rem;
white-space: nowrap;
overflow-y: hidden;
}
::-webkit-scrollbar {
display: none;
}
.tag-button {
background-color: #202020;
border: none;