more fixes for broken achievements and small bugs
This commit is contained in:
parent
f103dc5c38
commit
9775b97893
11 changed files with 39 additions and 26 deletions
|
@ -1,13 +1,19 @@
|
|||
import { enable, disable, auto, setFetchMethod } from 'darkreader';
|
||||
import { darkmode } from "@params";
|
||||
import * as params from "@params";
|
||||
|
||||
const {
|
||||
defaultColorScheme,
|
||||
theme,
|
||||
fixes,
|
||||
} = darkmode.darkreader;
|
||||
|
||||
setFetchMethod(window.fetch)
|
||||
const darkreader = params?.darkmode?.darkreader || {};
|
||||
const defaultColorScheme = darkreader.defaultColorScheme || 'system';
|
||||
const theme = {
|
||||
brightness: 100,
|
||||
contrast: 100,
|
||||
sepia: 0,
|
||||
...(darkreader.theme || {}),
|
||||
};
|
||||
const fixes = {
|
||||
invert: ['img[src$=".svg"]'],
|
||||
...(darkreader.fixes || {}),
|
||||
};
|
||||
setFetchMethod(window.fetch);
|
||||
|
||||
export function setSchemeDark() {
|
||||
enable(theme, fixes);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import { getDeviceState } from '../core';
|
||||
|
||||
function fourColumRow(gallery, entries, i) {
|
||||
let entry1 = document.createElement("div");
|
||||
entry1.classList.add("col-lg-6", "m-0", "p-0");
|
||||
|
@ -123,6 +125,7 @@ function singleColumnRow(gallery, entries, i) {
|
|||
}
|
||||
|
||||
function showAchievements() {
|
||||
const { isLaptop, isTablet } = getDeviceState()
|
||||
// show achievements from achievements-holder div
|
||||
let gallery = document.getElementById("gallery");
|
||||
if (gallery == null) {
|
||||
|
@ -204,8 +207,8 @@ function showAchievements() {
|
|||
this.children["caption"].classList.toggle("hidden");
|
||||
}
|
||||
if (this.children["enlarge-icon"] != undefined) {
|
||||
this.children["enlarge-icon"].classList.toggle("fa-search-plus");
|
||||
this.children["enlarge-icon"].classList.toggle("fa-times");
|
||||
this.getElementsByClassName('fa-xmark')[0].classList.toggle('hidden');
|
||||
this.getElementsByClassName('fa-magnifying-glass-plus')[0].classList.toggle('hidden');
|
||||
}
|
||||
if (this.children["achievement-title"] != undefined) {
|
||||
this.children["achievement-title"].classList.toggle("hidden");
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
<div class="title">
|
||||
<h1>{{ .Page.Title }}</h1>
|
||||
</div>
|
||||
{{ if site.Params.enableTags }}
|
||||
{{ if site.Params.features.tags.enable }}
|
||||
<div class="taxonomy-terms">
|
||||
<ul style="padding-left: 0;">
|
||||
{{ range .Params.tags }}
|
||||
|
@ -158,7 +158,7 @@
|
|||
|
||||
<!----- Add comment support ----->
|
||||
{{ if site.Params.features.comment.enable }}
|
||||
{{ partial "comments.html" site.Params.features.comment }}
|
||||
{{ partial "comments.html" site.Params.features.comment.services }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Keep backward compatibility with old config.yaml -->
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
<!-- Add Analytics if enabled in configuration -->
|
||||
{{ with site.Params.features.analytics }}
|
||||
{{ if .enabled }}
|
||||
{{ with .services }}
|
||||
<!-- Google Analytics -->
|
||||
{{ with .google }}
|
||||
{{ $privacyConfig:= dict (slice "Site" "Config" "Privacy" "GoogleAnalytics") $.Site.Config.Privacy.GoogleAnalytics }}
|
||||
|
@ -43,6 +44,7 @@
|
|||
</script>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
<!-- Keep backwards compatibility and consistency with HUGO defaults -->
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
<link rel="stylesheet" href="{{ "/css/layouts/main.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/navigators/navbar.css" | relURL }}"/>
|
||||
<link rel="stylesheet" href="{{ "/css/plyr.css" | relURL }}"/>
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
<link rel="stylesheet" href="{{ "/css/flag-icon.min.css" | relURL }}"/>
|
||||
{{ end }}
|
||||
<!--=================== fonts ==============================-->
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<div class="dropdown languageSelector">
|
||||
<a class="btn dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
@ -14,7 +14,7 @@
|
|||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
@ -14,7 +14,7 @@
|
|||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range .Translations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ path.Join "/" (cond (eq .Language.Lang "en") "" .Language.Lang) $pageURL }}">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<li class="nav-item dropdown">
|
||||
<a class="nav-link dropdown-toggle" href="#" id="languageSelector" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
@ -9,7 +9,7 @@
|
|||
<div class="dropdown-menu" aria-labelledby="languageSelector">
|
||||
{{ range site.Home.AllTranslations }}
|
||||
<a class="dropdown-item nav-link languages-item" href="{{ .RelPermalink }}">
|
||||
{{ if ne site.Params.showFlags false }}
|
||||
{{ if ne site.Params.features.flags.enable false }}
|
||||
{{ $countryCode := partial "helpers/country-code.html" . }}
|
||||
<span class="flag-icon flag-icon-{{$countryCode}}"></span>
|
||||
{{ end }}
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
class="achievement-entry text-center"
|
||||
style="background-image: url('{{ $achievementImageSm }}');"
|
||||
>
|
||||
<i class="fas fa-search-plus" id="enlarge-icon"></i>
|
||||
<i class="fa-solid fa-xmark hidden"></i>
|
||||
<i class="fa-solid fa-magnifying-glass-plus" id="enlarge-icon"></i>
|
||||
<h4 class="title" id="achievement-title">{{ .title }}</h4>
|
||||
<div class="caption hidden col-lg-6 text-left" id="caption">
|
||||
<h4>{{ .title }}</h4>
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
.accomplishments-section .card {
|
||||
background: #fff;
|
||||
border-top: 2px solid #248aaa;
|
||||
height: 100%;
|
||||
}
|
||||
.accomplishments-section .card .card-header {
|
||||
background: none;
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
#gallery i {
|
||||
#gallery .svg-inline--fa {
|
||||
color: #8392a5;
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
padding: 10px;
|
||||
|
@ -56,21 +56,21 @@
|
|||
opacity: 0;
|
||||
}
|
||||
|
||||
#gallery .achievement-entry:hover i {
|
||||
#gallery .achievement-entry:hover .svg-inline--fa {
|
||||
opacity: 1;
|
||||
font-size: 1rem;
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
|
||||
#gallery .img-type-1 i {
|
||||
#gallery .img-type-1 .svg-inline--fa {
|
||||
margin-top: 135px;
|
||||
}
|
||||
#gallery .img-type-2 i {
|
||||
#gallery .img-type-2 .svg-inline--fa {
|
||||
margin-top: 50px;
|
||||
}
|
||||
|
||||
#gallery .achievement-details.img-type-1 i,
|
||||
.achievement-details.img-type-2 i {
|
||||
#gallery .achievement-details.img-type-1 .svg-inline--fa,
|
||||
.achievement-details.img-type-2 .svg-inline--fa {
|
||||
margin-top: 0px !important;
|
||||
transition: none !important;
|
||||
float: right;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue