Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sucs
sucs-hugo-theme
Compare Revisions
f8fafa9773341dfb76b82d18dd41ee080d78b0f4...706c78aacebbbd349448138f0f27efc25f412b88
Commits (2)
Post: show author at the top, better support multiple authors
· e5093547
Caleb Connolly
authored
Sep 25, 2020
e5093547
WIP:home: show most recent posts and tags
· 706c78aa
Caleb Connolly
authored
Sep 25, 2020
706c78aa
Hide whitespace changes
Inline
Side-by-side
layouts/_default/single.html
View file @
706c78aa
...
...
@@ -2,14 +2,13 @@
<div
class=
"container"
>
<h1>
{{ .Title }}
</h1>
{{ partial "metadata.html" . }}
<br><br>
{{ .Content }}
<h3>
Written by
</h3>
<p
class=
"author-list"
>
{{- range .Params.authors }}
{{- with $.Site.GetPage "taxonomyTerm" (printf "authors/%s" (urlize .)) }}
<a
href=
"{{ .Permalink }}"
><
p
>
{{ .Params.name }}
</
p
></a>
~
<a
href=
"{{ .Permalink }}"
><
b
>
{{ .Params.name }}
</
b
></a>
<br>
{{ end }}
{{ end }}
</p>
{{ .Content }}
</div>
{{ end }}
\ No newline at end of file
layouts/index.html
View file @
706c78aa
...
...
@@ -2,7 +2,26 @@
<main
aria-role=
"main"
>
<div
class=
"container"
>
<h1>
{{ .Site.Title }}
</h1>
{{ .Content }}
<div
class=
"box"
>
<div
class=
"row"
>
{{ .Content }}
</div>
<div
class=
"row"
>
<div
class=
"column"
>
<h2>
Latest posts
</h2>
{{ range (first 5 ($.Site.RegularPages.ByDate.Reverse)) }}
<h3><a
class=
"highlight btn btn-outline-dark tag-btn"
href=
"{{ .RelPermalink | absURL }}"
>
{{ .Title | title }}
</a></h3>
{{ end }}
</div>
<div
class=
"column"
>
<h2>
Recent tags
</h2>
{{ range (first 5 (where $.Site.Pages "Type" "tags")) }}
<h3><a
class=
"highlight btn btn-outline-dark tag-btn"
href=
"{{ .RelPermalink | absURL }}"
>
{{ .Title | title }}
</a></h3>
{{ end }}
</div>
</div>
</div>
</div>
</div>
</main>
{{ end }}
static/css/main.css
View file @
706c78aa
...
...
@@ -47,6 +47,10 @@ a:hover {
color
:
var
(
--sucs-accent-secondary
);
}
.highlight
{
color
:
var
(
--sucs-text-primary
);
}
.container
{
max-width
:
min
(
80%
,
800px
);
}
...
...
@@ -80,4 +84,23 @@ header {
.pagination__item--current
{
color
:
var
(
--sucs-text-primary
)
!important
;
}
\ No newline at end of file
}
.box
{
width
:
100%
;
}
.row
{
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
width
:
100%
;
}
.column
{
display
:
flex
;
flex-direction
:
column
;
flex-basis
:
100%
;
flex
:
1
0
;
}
\ No newline at end of file