Refactor CSS styling
This commit is contained in:
+4
-6
@@ -3,16 +3,14 @@
|
|||||||
{{define "content"}}
|
{{define "content"}}
|
||||||
{{if .Query}}
|
{{if .Query}}
|
||||||
{{if .Results}}
|
{{if .Results}}
|
||||||
<h2 class="muted search-summary">{{len .Results}} match{{if ne (len .Results) 1}}es{{end}} for “{{.Query}}”</h2>
|
<p class="muted">{{len .Results}} match{{if ne (len .Results) 1}}es{{end}} for “{{.Query}}”</p>
|
||||||
<div class="search-results">
|
|
||||||
{{range .Results}}
|
{{range .Results}}
|
||||||
<article class="search-card">
|
<article class="search-card">
|
||||||
<a class="search-card-name" href="{{.URL}}">{{.Name}}</a>
|
<a href="{{.URL}}">{{.Name}}</a>
|
||||||
<div class="search-card-path muted">/{{.Path}}</div>
|
<div class="muted">/{{.Path}}</div>
|
||||||
{{if .Snippet}}<div class="search-card-snippet">{{.Snippet}}</div>{{end}}
|
{{if .Snippet}}<div>{{.Snippet}}</div>{{end}}
|
||||||
</article>
|
</article>
|
||||||
{{end}}
|
{{end}}
|
||||||
</div>
|
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="empty">No matches for “{{.Query}}”.</p>
|
<p class="empty">No matches for “{{.Query}}”.</p>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
|||||||
+4
-20
@@ -379,41 +379,25 @@ textarea {
|
|||||||
.search-input:focus {
|
.search-input:focus {
|
||||||
border-color: var(--primary-hover);
|
border-color: var(--primary-hover);
|
||||||
}
|
}
|
||||||
.search-summary {
|
|
||||||
margin-bottom: 1rem;
|
|
||||||
}
|
|
||||||
.search-results {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
gap: 1rem;
|
|
||||||
}
|
|
||||||
.search-card {
|
.search-card {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 0.25rem;
|
gap: 0.25rem;
|
||||||
padding-bottom: 1rem;
|
padding-bottom: 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
border-bottom: 1px dashed var(--secondary);
|
border-bottom: 1px dashed var(--secondary);
|
||||||
|
word-break: break-word;
|
||||||
}
|
}
|
||||||
.search-card:last-child {
|
.search-card:last-child {
|
||||||
border-bottom: none;
|
border-bottom: none;
|
||||||
}
|
}
|
||||||
.search-card-name {
|
.search-card a {
|
||||||
color: var(--link);
|
color: var(--link);
|
||||||
font-size: 1.1rem;
|
font-size: 1.1rem;
|
||||||
word-break: break-word;
|
|
||||||
}
|
}
|
||||||
.search-card-name:hover {
|
.search-card a:hover {
|
||||||
color: var(--link-hover);
|
color: var(--link-hover);
|
||||||
}
|
}
|
||||||
.search-card-path {
|
|
||||||
word-break: break-all;
|
|
||||||
}
|
|
||||||
.search-card-snippet {
|
|
||||||
font-size: 0.9rem;
|
|
||||||
line-height: 1.5;
|
|
||||||
color: var(--text-muted);
|
|
||||||
margin-top: 0.25rem;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* === Muted text === */
|
/* === Muted text === */
|
||||||
.muted {
|
.muted {
|
||||||
|
|||||||
Reference in New Issue
Block a user