Compare commits

..

No commits in common. "6259e4f3afdfbf1fc301560d1fd104212193b6ab" and "ff88c5c2b0c88acc2ffd99474561b3574021efa4" have entirely different histories.

3 changed files with 393 additions and 83 deletions

View file

@ -1,72 +1,26 @@
:root { :root {
color-scheme: light dark; color-scheme: light dark;
--background-color: light-dark(#e7e6df, #1d1e22);
--primary: #cc2027; --breadcrumb-color: #333333;
--primary-darken: #8E161B; --caption-text-color: light-dark(#e7e6df, #333333);
--primary-lighten: #D64C52; --header-background: #fff;
--primary-text-contrast: #FFF; --header-color: #333333;
--link-color: var(--title-color);
--secondary: #20ccc5; --link-hover-color: #e34f54;
--secondary-darken: #168E89; --message-background: #2ecc71;
--secondary-lighten: #4CD6D0; --text-color: light-dark(#333333, #e7e6df);
--secondary-text-contrast: #000; --title-color: #cc2027;
--logo-stroke: #333333;
--error: #c43933;
--error-darken: #892723;
--error-lighten: #CF605B;
--error-text-contrast: #FFF;
--info: #206ccc;
--info-darken: #164B8E;
--info-lighten: #4C89D6;
--info-text-contrast: #FFF;
--success: #7dcc20;
--success-darken: #578E16;
--success-lighten: #97D64C;
--success-text-contrast: #000;
--warning: #cc5e20;
--warning-darken: #8E4116;
--warning-lighten: #D67E4C;
--warning-text-contrast: #FFF;
--background-color: light-dark(#fffbfb, #171414);
--background-color-darken: light-dark(#B2AFAF, #100E0E);
--background-color-lighten: light-dark(#FFFBFB, #454343);
--header-background-color: light-dark(#171414, #fffbfb);
--header-background-color-darken: light-dark(#100E0E, #B2AFAF);
--header-background-color-lighten: light-dark(#454343, #FFFBFB);
--header-text-color: light-dark(#fffbfb, #171414);
--header-text-color-secondary: #ffffffb3;
--header-text-color-disable: light-dark(#ffffff80, #454343);
--text-color: light-dark(#171414, #fffbfb);
--text-color-secondary: #ffffffb3;
--text-color-disable: light-dark(#454343, #ffffff80);
--text-color-inverse: light-dark(#fffbfb, #171414);
--text-color-secondary-inverse: #ffffffb3;
--text-color-disable-inverse: light-dark(#ffffff80, #454343);
--h1-color: var(--primary);
--h2-color: #c33d35;
--h3-color: #b94f44;
--h4-color: #ae5e52;
--h5-color: #a16a61;
--h6-color: #927671;
} }
[data-theme="dark"] { [data-theme="dark"] {
--background-color: #171414; --background-color: #1d1e22;
--text-color: #fffbfb; --text-color: #e7e6df;
} }
[data-theme="light"] { [data-theme="light"] {
--background-color: #fffbfb; --background-color: #e7e6df;
--text-color: #171414; --text-color: #333333;
} }
* { * {
@ -90,13 +44,13 @@ body {
} }
a { a {
color: var(--primary); color: var(--link-color);
font-weight: bold; font-weight: bold;
text-decoration: none; text-decoration: none;
} }
a:not(.card-content):hover { a:not(.card-content):hover {
color: var(--primary-lighten); color: var(--link-hover-color);
} }
h1 { h1 {
@ -107,18 +61,18 @@ h1 {
} }
h1 a { h1 a {
color: var(--h1-color); color: var(--link-color);
} }
#logo-border-color { #logo-border-color {
fill: var(--primary) !important; fill: var(--title-color) !important;
stroke: none !important; stroke: none !important;
} }
.logo { .logo {
height: 3em; height: 3em;
vertical-align: middle; vertical-align: middle;
stroke: var(--header-text-color) !important; stroke: var(--logo-stroke) !important;
} }
#dark-mode { #dark-mode {
@ -128,8 +82,8 @@ h1 a {
} }
body>header { body>header {
background-color: var(--header-background-color); background-color: var(--header-background);
color: var(--header-text-color); color: var(--header-color);
padding: 0; padding: 0;
margin: 0 0 .5em 0; margin: 0 0 .5em 0;
} }
@ -139,11 +93,7 @@ body>header {
} }
#breadcrumb a { #breadcrumb a {
color: var(--primary); color: var(--breadcrumb-color);
}
#breadcrumb a:hover {
color: var(--primary-lighten);
} }
#container, #container,
@ -153,8 +103,7 @@ body>header {
} }
.message { .message {
background-color: var(--success); background-color: var(--message-background);
color: var(--success-text-contrast);
border-radius: 2px; border-radius: 2px;
} }
@ -180,7 +129,7 @@ aside {
} }
aside a { aside a {
color: var(--primary); color: var(--title-color);
text-decoration: none; text-decoration: none;
} }
@ -196,7 +145,7 @@ aside * {
} }
.card { .card {
background-color: var(--header-background-color); background-color: var(--header-background);
display: grid; display: grid;
grid-template-columns: repeat(1, 1fr); grid-template-columns: repeat(1, 1fr);
margin: 0; margin: 0;
@ -211,7 +160,7 @@ aside * {
} }
.card-footer { .card-footer {
color: var(--header-text-color); color: var(--header-color);
margin: 0; margin: 0;
overflow: hidden; overflow: hidden;
padding: .3em .6em; padding: .3em .6em;
@ -220,6 +169,12 @@ aside * {
white-space: nowrap; white-space: nowrap;
} }
#backtop,
#backtop:hover,
#backtop:active {
transition: all .2s ease-in;
}
footer { footer {
padding-top: 1em; padding-top: 1em;
text-align: center; text-align: center;
@ -238,8 +193,9 @@ footer a {
#backtop { #backtop {
bottom: 0; bottom: 0;
border-radius: 4px; border-radius: 4px;
background-color: var(--primary); box-shadow: 0px 0px 2px -1px #000;
color: var(--text-color-secondary); background-color: var(--title-color);
color: var(--header-background);
display: block; display: block;
margin: .5%; margin: .5%;
padding: 1rem 4rem; padding: 1rem 4rem;
@ -248,7 +204,7 @@ footer a {
} }
#legend { #legend {
background-color: var(--header-background-color); background-color: var(--header-background);
flex: none; flex: none;
max-width: 90%; max-width: 90%;
width: 100%; width: 100%;
@ -259,14 +215,14 @@ footer a {
flex-direction: row; flex-direction: row;
p { p {
background-color: var(--header-background-color); background-color: var(--header-background);
width: 100%; width: 100%;
max-width: 90%; max-width: 90%;
} }
} }
.gdesc-inner { .gdesc-inner {
color: var(--text-color-inverse); color: var(--caption-text-color);
word-break: break-word; word-break: break-word;
} }

View file

@ -0,0 +1,243 @@
:root {
color-scheme: light dark;
--title-color: #cc2027;
--header-background: #fff;
--header-color: #333333;
--message-background: #2ecc71;
--breadcrumb-color: #333333;
--background-color: light-dark(#e7e6df, #1d1e22);
--text-color: light-dark(#333333, #e7e6df);
--caption-text-color: light-dark(#e7e6df, #333333);
--link-color: var(--title-color);
--link-hover-color: #e34f54;
--logo-stroke: light-dark(#333333, #b7a1a2);
}
[data-theme="dark"] {
--background-color: #1d1e22;
--text-color: #e7e6df;
--logo-stroke: #b7a1a2;
}
[data-theme="light"] {
--background-color: #e7e6df;
--text-color: #1d1e22;
--logo-stroke: #333333;
}
* {
box-sizing: border-box;
}
html {
font-size: 62.5%;
}
body {
width: 100%;
margin: 0;
padding: 0;
font-family: Helvetica, Arial, sans-serif;
font-size: 1.5rem;
color: var(--text-color);
background-color: var(--background-color);
}
a {
text-decoration: none;
}
h1 {
margin: 0 auto;
padding: 0;
font-family: Georgia, Lucida, serif;
font-style: italic;
color: var(--link-color);
font-weight: normal;
text-align: center;
width: fit-content;
}
body>header {
padding: 1px;
}
#logo-border-color {
fill: var(--title-color) !important;
stroke: none !important;
}
.logo {
height: 3em;
vertical-align: middle;
stroke: var(--logo-stroke) !important;
}
#dark-mode {
position: absolute;
top: 1em;
right: 1em;
}
#container,
#innerheader {
margin: 0 auto;
}
#innerheader a {
color: var(--link-color);
font-weight: bold;
}
#innerheader a:hover {
color: var(--link-hover-color);
}
nav {
font-size: 1.3em;
text-align: center;
}
aside {
padding: 0 0.3em;
}
aside a {
color: var(--title-color);
text-decoration: none;
}
aside * {
margin: .2em 0;
}
#gallery li:hover img,
#gallery li img,
#gallery li em,
#gallery li:hover em,
#backtop,
#backtop:hover,
#backtop:active {
transition: all .2s ease-in;
}
#gallery {
margin: 0 auto;
padding: 0;
list-style: none;
display: flex;
flex-wrap: wrap;
justify-content: center;
width: 95%;
}
#gallery li {
position: relative;
overflow: hidden;
line-height: 0;
background-color: var(--header-background);
}
#gallery li img {
width: 100%;
}
#gallery li img:hover {
position: relative;
transform: scale(1.1);
}
#gallery em {
display: block;
position: absolute;
top: 100%;
bottom: 0;
width: 100%;
padding: 40% 0;
text-align: center;
font-family: Georgia, Lucida, serif;
font-size: 2rem;
font-style: italic;
color: var(--header-background);
background-color: rgba(0, 0, 0, .6);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
z-index: 10;
}
#gallery li:hover em {
top: 0;
}
footer {
clear: both;
font-weight: bold;
padding-top: 2rem;
margin: 25px 0px;
text-align: center;
}
#backtop {
display: block;
position: fixed;
bottom: 0;
right: 0;
padding: 1rem 4rem;
background-color: var(--header-background);
color: var(--title-color);
font-weight: bold;
box-shadow: 0px 0px 2px -1px #000;
}
#backtop:hover,
#backtop:active {
background-color: var(--title-color);
color: var(--header-background);
padding: 2rem 8rem;
}
footer {
padding-top: 1em;
text-align: center;
}
footer a {
text-decoration: none;
color: var(--link-color);
}
.buildTime {
font-size: 1.1rem;
margin: 0;
}
.lightbox-container__media {
flex-wrap: wrap;
flex-direction: row;
p {
background-color: var(--header-background);
width: 100%;
max-width: 90%;
}
}
.gdesc-inner {
color: var(--caption-text-color);
word-break: break-word;
}
.gdesc-inner ul {
padding: 0 0 0 1.8em;
}
.glightbox-container .gslide,
.gslide-image img {
user-select: auto;
}
.gslide-description a {
color: var(--link-color);
}

View file

@ -0,0 +1,111 @@
<?php
use App\FileAndDir;
?>
<!DOCTYPE html>
<html data-theme="auto" lang="en">
<head>
<meta charset="UTF-8">
<meta name="author" content="<?= $config['author']; ?>">
<meta name="generator" content="NanoGal">
<title><?= $config['title']; ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="<?= $config['description']; ?>">
<link href="assets/css/glightbox.min.css" rel="stylesheet">
<link href="templates/board/board.css" rel="stylesheet">
<link rel="apple-touch-icon" sizes="57x57" href="/assets/favicons/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="/assets/favicons/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="/assets/favicons/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="/assets/favicons/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="/assets/favicons/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/favicons/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="/assets/favicons/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/favicons/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/favicons/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192" href="/assets/favicons/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="96x96" href="/assets/favicons/favicon-96x96.png">
<link rel="manifest" href="/assets/favicons/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="/assets/favicons/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
<?= $userCss; ?>
</head>
<body>
<header id="top">
<div id="innerheader">
<h1><svg class="logo" viewBox="0 0 135.467 135.467" xmlns="http://www.w3.org/2000/svg">
<g transform="translate(-37.267 -74.664)">
<path d="M105 110.248l32.15 32.15L105 174.546l-32.15-32.15z" fill="none" stroke-width="2.377" />
<path
d="M125.872 142.397A20.872 20.872 0 01105 163.27a20.872 20.872 0 01-20.872-20.873A20.872 20.872 0 01105 121.525a20.872 20.872 0 0120.872 20.872z"
fill="none" stroke-width="2.338" />
<ellipse cx="105" cy="142.397" rx="9.621" ry="9.704" fill="#030101" />
<circle cx="128.534" cy="119.421" r="3.173" />
<path id="logo-border-color"
d="M77.916 108.243a7.163 7.163 0 00-7.179 7.178v53.908a7.164 7.164 0 007.18 7.179h53.907a7.163 7.163 0 007.179-7.179v-53.908a7.163 7.163 0 00-7.179-7.178zm-.113 2.475h54.134a4.603 4.603 0 014.613 4.612v54.134a4.603 4.603 0 01-4.613 4.613H77.803a4.603 4.603 0 01-4.613-4.613V115.33a4.603 4.603 0 014.613-4.612z"
fill="#333" />
<circle cx="111.946" cy="135.633" r="4.596" fill="#fff" />
<g fill="none" stroke-width="2.361">
<path
d="M73.37 181.786h-2.615a5.133 5.133 0 01-5.144-5.144v-2.607M144.389 174.023v2.62a5.133 5.133 0 01-5.144 5.143h-2.59M136.658 103.009h2.587a5.133 5.133 0 015.144 5.143v2.553M65.611 110.717v-2.565a5.133 5.133 0 015.144-5.143h2.607" />
</g>
</g>
</svg><a href="/"><?= $config['title']; ?></a>
</h1>
<a href="#" id="dark-mode" onclick="switchTheme();"><img height="24" src="/assets/images/moon.svg" alt="Dark/Light mode icon"></a>
<nav><?= $breadcrumb_navigation; ?></nav>
<aside><?= $folderNote; ?></aside>
</div>
<?php if (!empty($messages)) : ?>
<div id="message" class="message">
<div>
<?= $messages; ?>
</div>
</div>
<?php endif; ?>
</header>
<main id="container">
<ul id="gallery">
<?php foreach ($listDir as $value) : ?>
<?php foreach ($value as $entry) : ?>
<li>
<a href="<?= $entry['link']; ?>" class="<?= FileAndDir::addToLightBox($entry['type']); ?>" data-gallery="gallery" data-glightbox="<?= $entry['dataAttr']; ?>">
<?php if ($entry['type'] === 'folder'):; ?>
<em><?= $entry['name']; ?></em>
<?php endif; ?>
<img src="<?= $entry['thumb']; ?>" alt="Loading..." width="<?= $config['thumbSize']; ?>" height="<?= $config['thumbSize']; ?>">
</a>
</li>
<?= $entry['imgCaption']; ?>
<?php endforeach; ?>
<?php endforeach; ?>
</ul>
</main>
<a href="#top" id="backtop">Top</a>
<footer>
Gallery by <?= $config['author']; ?> /
<a href="https://github.com/sebsauvage/MinigalNano" title="Powered by NanoGal" target=" _blank">
Powered by NanoGal
</a> Fork of
<a href="https://github.com/sebsauvage/MinigalNano" title="Original MiniGal Nano" target="_blank">
MiniGal Nano
</a>
<p class="buildTime">
<% buildTime %>
</p>
</footer>
<script src="assets/js/glightbox.min.js"></script>
<script src="assets/js/app.js"></script>
<script>
const lightbox = GLightbox({
autoplayVideos: false,
descPosition: '<?= $config['imageCaptionPosition']; ?>'
});
</script>
</body>
</html>