Update project link display

This commit is contained in:
jaseg 2023-03-19 18:57:48 +01:00
parent c55e92fe93
commit 3c6957467f
11 changed files with 80 additions and 15 deletions

View file

@ -214,12 +214,36 @@ main.cards {
background-color: #1f232a;
}
.pagination-links {
width: 100%;
display: flex;
justify-content: center;
align-items: stretch;
}
.pagination-links > a {
background-color: #272c35;
box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2);
padding: 10px 20px 10px 20px;
}
.arrow-right {
display: inline-block;
width: 0;
height: 0;
border-top: .3rem solid transparent;
border-bottom: .3rem solid transparent;
border-left: .3rem solid ;
margin-bottom: .05rem;
margin-left: 5px;
}
.card {
background-color: #272c35;
box-shadow: 0 0 3px 1px rgba(0, 0, 0, 0.2);
padding: 30px 20px 30px 20px;
margin-top: 50px;
margin-bottom: 30px;
}
.card > .links {
@ -239,6 +263,24 @@ main.cards {
text-align: center;
}
main > .links {
margin: 20px 0px 40px 0px;
border: 0.5px dotted rgba(255, 255, 255, 0.3);
border-left: none;
border-right: none;
width: calc(100%);
max-width: calc(100%);
display: flex;
flex-flow: row wrap;
justify-content: space-around;
}
main > .links > a {
padding: 10px 10px 10px 10px;
flex-grow: 1;
text-align: center;
}
/* un-mess-up rst2html output */
.card > .summary > .document, .card > .summary > .document > p {
display: inline;

View file

@ -7,6 +7,13 @@
</header>
{{- end }}
<main>
{{- if .Params.external_links }}
<div class="links">
{{- range .Params.external_links }}
<a href="{{ .url | absURL }}">{{ .name }}</a>
{{- end }}
</div>
{{- end }}
{{ .Content }}
</main>
{{- end }}

View file

@ -9,14 +9,17 @@
</div>
{{- end }}
<h2>Recently updated projects</h2>
{{ range first 2 (where site.RegularPages "Section" "==" "projects") }}
{{ partial "card.html" . }}
{{- end }}
{{- range site.Params.homepage_categories }}
<h2>{{ .title }}</h2>
{{- range first .count (where site.RegularPages "Section" "==" .key) }}
{{ partial "card.html" . }}
{{- end }}
<h2>Blog</h2>
{{ range (where site.RegularPages "Section" "==" "blog") }}
{{ partial "card.html" . }}
<div class="pagination-links">
{{- with site.GetPage (printf "/%s" .key) }}
<a href="{{ .RelPermalink }}">See more<span class="arrow-right"></span></a>
{{- end }}
</div>
{{- end }}
</main>
{{- end }}

View file

@ -10,7 +10,7 @@
{{- if .Params.external_links }}
<div class="links">
{{- range .Params.external_links }}
<a href="{{ .url }}">{{ .name }}</a>
<a href="{{ .url | absURL }}">{{ .name }}</a>
{{- end }}
</div>
{{- end }}

View file

@ -1,6 +1,6 @@
<footer>
Copyright © {{ now.Year }} {{ site.Copyright }}
{{- range site.Params.footer_links }}
/ <a href="{{.url | absURL }}">{{ .name }}</a>
/ <a href="{{.url | relURL }}">{{ .name }}</a>
{{- end }}
</footer>