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