style: full width links

Wrap all content in the anchor tag rather than just the title so
the user can click anywhere on the item to navigate / download
This commit is contained in:
Evan Buss
2024-07-08 23:38:33 -04:00
parent 1099f67641
commit 7170d35962
2 changed files with 14 additions and 15 deletions

View File

@@ -39,18 +39,15 @@
<ul>
{{range .Links}}
<li class="link">
{{if .ImageURL}}
<img src="?q={{.ImageURL}}" alt="{{.Title}}" height="40" />
{{end}}
<div class="info">
{{if .IsDownload}}
<a href="?q={{.Href}}" download>{{.Title}}</a>
{{else}}
<a href="?q={{.Href}}">{{.Title}}</a>
<a href="?q={{.Href}}">
{{if .ImageURL}}
<img src="?q={{.ImageURL}}" alt="{{.Title}}" height="40" />
{{end}}
<p>{{.Author}}</p>
</div>
<div class="info">
<p>{{.Title}}</p>
<p>{{.Author}}</p>
</div>
</a>
</li>
{{end}}
</ul>

View File

@@ -29,18 +29,19 @@
white-space: nowrap;
}
#container > ul > li > img {
#container > ul > li > a > img {
display: inline-block;
height: 75px;
margin-right: 1rem;
}
#container > ul > li > .info {
#container > ul > li > a > .info {
display: inline-block;
vertical-align: top;
white-space: normal;
max-width: calc(100% - 3rem - 75px);
}
.info > p {
.info > p:not(:first-child) {
font-size: 1rem;
}
@@ -51,7 +52,7 @@ a {
}
#container > ul > li a {
vertical-align: top;
width: 100%;
}
#container > ul > li:not(:last-child) {
@@ -94,6 +95,7 @@ a {
.nav-controls > a {
padding: 1rem 0.5rem;
font-size: 1rem;
}
.nav-controls:last-child {