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

@ -58,6 +58,17 @@ name = "Imprint"
url = "/imprint/"
weight = 2
[[params.homepage_categories]]
title = "Recently updated projects"
key = "projects"
weight = 1
count = 2
[[params.homepage_categories]]
title = "Blog"
key = "blog"
weight = 2
count = 10
[security.exec]
allow = ["^dart-sass-embedded$", "^go$", "^npx$", "^postcss$", "^rst2html$"]

View file

@ -8,7 +8,7 @@ external_links:
- name: Docs
url: "https://gerbolyze.gitlab.io/gerbolyze"
- name: PyPI
url: "https://pypi.org/projects/gerbolyze"
url: "https://pypi.org/project/gerbolyze"
summary: >
Gerbolyze is a tool that allows the modification of Gerber PCB artwork with a vector graphics editor like Inkscape.
Gerbolyze directly converts between SVG and Gerber, and accurately reproduces details that other tools can not.

View file

@ -8,7 +8,7 @@ external_links:
- name: Docs
url: "https://gerbolyze.gitlab.io/gerbonara"
- name: PyPI
url: "https://pypi.org/projects/gerbonara"
url: "https://pypi.org/project/gerbonara"
summary: >
Gerbonara is a user-friendly, powerful tool for reading, writing, modification and rendering of Gerber PCB artwork
from the command line or from Python code. Gerbonara supports the Gerber dialects of all industry-standard EDA

View file

@ -3,6 +3,8 @@ title: "lolcat-c"
external_links:
- name: Sources
url: "https://git.jaseg.de/lolcat.git"
- name: Github
url: "https://github.com/jaseg/lolcat"
- name: Issues
url: "https://github.com/jaseg/lolcat/issues"
summary: >

View file

@ -8,7 +8,7 @@ external_links:
- name: Docs
url: "https://neinseg.gitlab.io/python-mpv"
- name: PyPI
url: "https://pypi.org/projects/mpv"
url: "https://pypi.org/project/mpv"
summary: >
python-mpv is a small, ctypes-based Python library wrapping the libmpv media player library. Despite its small size
and simple API, python-mpv allows advanced control over libmpv and beyond simple remote control of mpv can be used

View file

@ -5,8 +5,8 @@ external_links:
url: "https://git.jaseg.de/wsdiff.git"
- name: Issues
url: "https://github.com/jaseg/wsdiff/issues"
- name: Docs
url: "https://pypi.org/projects/wsdiff"
- name: PyPI
url: "https://pypi.org/project/wsdiff"
summary: >
wsdiff is a command-line utility that produces self-contained, syntax-highlighted, HTML-formatted diffs that support
both unified and side-by-side diffs from a single source file using nothing but CSS magic.

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>