Merge branch 'main' into add-dark-background

This commit is contained in:
Bernat Borràs Civil 2025-01-17 21:45:10 +01:00 committed by GitHub
commit 8debb95b4c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 61 additions and 4 deletions

View file

@ -67,4 +67,4 @@ function setImages(newScheme) {
if (dark !== null) dark.style.display = 'none'
}
}
}
}

View file

@ -85,4 +85,4 @@ function setImages(newScheme) {
if (dark !== null) dark.style.display = 'none'
}
}
}
}

View file

@ -55,4 +55,22 @@ html[data-theme='dark'] {
.company-logo {
max-height: 100%;
width: auto;
}
}
.light-logo {
display: inline;
}
.dark-logo {
display: none;
}
html[data-theme='dark'] {
.light-logo {
display: none;
}
.dark-logo {
display: inline;
}
}

View file

@ -24,6 +24,14 @@
float: right !important;
}
}
a[href] {
text-decoration: underline; /* Underline only when href is present */
}
a:not([href]) {
text-decoration: none; /* No underline when href is absent */
}
}
.card-body {

View file

@ -11,12 +11,22 @@
<div class="card-header">
<h5 class="card-title mb-0">{{ .title }}</h5>
<div class="sub-title">
<span><a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a></span>
<span>
{{ if .publishedIn.url }}
<a class="" href="{{.publishedIn.url}}">{{ .publishedIn.name }}</a>
{{ else }}
<a class="">{{ .publishedIn.name }}</a>
{{ end }}
</span>
<span class="ms-2">{{ .publishedIn.date }}</span>
</div>
<div class="authors">
{{ range $index,$author:= .authors }}
{{if .url}}
<span class="me-2"><a class="" href="{{.url}}">{{ .name }}</a></span>
{{ else }}
<span class="me-2"><a class="">{{ .name }}</a></span>
{{ end }}
{{ end }}
</div>
</div>
@ -31,9 +41,11 @@
</span>
{{ end }}
</div>
{{ if .paper.url }}
<div class="details-btn">
<a class="btn btn-outline-info ms-1 ps-2 mb-2" href="{{ .paper.url }}" target="_blank" rel="noopener" role="button">{{ i18n "project_details"}}</a>
</div>
{{ end }}
</div>
</div>
</div>

View file

@ -18,3 +18,7 @@
<link rel="icon" type="image/png" href="{{ $favicon }}" />
{{end}}
{{ with .OutputFormats.Get "rss" -}}
{{ printf `<link rel=%q type=%q href=%q title=%q>` .Rel .MediaType.Type .Permalink site.Title | safeHTML }}
{{ end }}

View file

@ -13,6 +13,7 @@
{{/* by default, don't use any logo */}}
{{ $mainLogo := "" }}
{{ $invertedLogo := "" }}
{{ $darkLogo := "" }}
{{/* if custom logo has been provided, use them */}}
{{ if site.Params.logo.main }}
@ -21,6 +22,9 @@
{{ if site.Params.logo.inverted }}
{{ $invertedLogo = site.Params.logo.inverted }}
{{ end }}
{{ if site.Params.logo.dark }}
{{ $darkLogo = site.Params.logo.dark }}
{{ end }}
{{/* resize the logos. don't resize svg because it is not supported */}}
{{ if $mainLogo }}
@ -39,6 +43,14 @@
{{ $invertedLogo = $invertedLogo.RelPermalink}}
{{ end }}
{{ if $darkLogo }}
{{ $darkLogo = resources.Get $darkLogo}}
{{ if and $darkLogo (ne $darkLogo.MediaType.SubType "svg")}}
{{ $darkLogo = $darkLogo.Resize "42x" }}
{{ end }}
{{ $darkLogo = $darkLogo.RelPermalink}}
{{ end }}
{{ $logo := $mainLogo }}
{{ if .IsHome }}
{{ $logo = $invertedLogo }}
@ -154,4 +166,7 @@
{{ if $invertedLogo }}
<img src="{{ $invertedLogo }}" class="d-none" id="inverted-logo" alt="Inverted Logo">
{{ end }}
{{ if $darkLogo }}
<img src="{{ $darkLogo }}" class="d-none" id="dark-logo" alt="Dark Logo">
{{ end }}
</nav>