wallpapers

This commit is contained in:
joygnu 2024-11-08 12:23:24 +01:00
commit 1c1360824f
234 changed files with 445 additions and 0 deletions

1
.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.html

3
README.md Normal file
View file

@ -0,0 +1,3 @@
# Gruvbox Wallpapers
A fork of [Gruvbox Wallpapers](https://gruvbox-wallpapers.pages.dev/) with no weird wallpapers.

60
app.js Normal file
View file

@ -0,0 +1,60 @@
function loadPage(section, page) {
let buttons = document.getElementById(section).getElementsByTagName("button");
let currSel;
for (let i in buttons) {
if (buttons[i].classList?.contains("selected")) {
if (page - 1 == i) return;
else {
currSel = buttons[i];
break;
}
}
}
fetch(section + "_page" + page + ".html")
.then((response) => response.text())
.then((data) => {
document.getElementById(section + "-content").innerHTML = data;
if (currSel) {
currSel.classList.remove("selected");
}
document.getElementById(section).getElementsByTagName("button")[page - 1].classList.add("selected");
});
}
function activeSection(section) {
hideAll();
const targetSection = document.getElementById(section);
targetSection.focus();
targetSection.classList.add("selected");
setTimeout(() => {
targetSection.scrollIntoView({ block: "start", behavior: "smooth" });
}, 100);
}
function hideAll() {
document.querySelectorAll(".section").forEach((s) => {
s.classList.remove("selected");
});
}
const HIDDEN_CLASS = "hidden";
function hideThemeSwitcher(currentTheme) {
if (currentTheme == "dark") {
document.getElementById("dark-icon")?.classList.add(HIDDEN_CLASS);
document.getElementById("light-icon")?.classList.remove(HIDDEN_CLASS);
} else {
document.getElementById("light-icon")?.classList.add(HIDDEN_CLASS);
document.getElementById("dark-icon")?.classList.remove(HIDDEN_CLASS);
}
}
function setTheme(newTheme) {
document.documentElement.style.setProperty("color-scheme", newTheme);
hideThemeSwitcher(newTheme);
}
function switchTheme() {
setTheme(document.documentElement.style.getPropertyValue("color-scheme")=="dark"?"light":"dark");
}

146
build.sh Executable file
View file

@ -0,0 +1,146 @@
#!/usr/bin/env bash
# MIT License
# Copyright (c) 2022 Angel Jumbo <anarjumb@protonmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
write_section_header(){
echo "<h2 class='s$1 clickable' onclick='activeSection(\"$2\")' >" >> $3
echo "$2" | tr a-z A-Z >> $3
echo "</h2>" >> $3
}
write_img(){
echo " <a target='_blank' href='$1'>
<img loading='lazy' src='$1' alt='$1' width='200'></a>" >> $2
}
rm *.html
touch ./index.html
echo "<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<link rel='stylesheet' type='text/css' href='style.css'>
<title>Gruvbox wallpapers</title>
<script src='app.js' defer></script>
<script src='https://kit.fontawesome.com/13865d7982.js' crossorigin='anonymous' defer></script>
</head>
<body>
<div class='float-btns'>
<a href='https://github.com/AngelJumbo/gruvbox-wallpapers' target='_blank' class='btn float-btn' title='Source code' >
<span>
<i class='fa-brands fa-github'></i>
</span>
</a>
<button onclick='switchTheme()' class='btn float-btn' title='Switch theme'>
<span>
<i id='light-icon' class='fa-solid fa-sun'></i>
<i id='dark-icon' class='fa-solid fa-moon'></i>
</span>
</button>
</div>
<main>
<h1>Gruvbox Wallpapers</h1>" > ./index.html
color=1
maxPerPage=8
declare -a sections
for subdir in ./wallpapers/*
do
section="${subdir##*/}"
sections+=("$section")
write_section_header $color "$section" ./index.html
page=1
img_count=0
subhtml="${section}_page${page}.html"
touch ./$subhtml
echo "<div class='section' id='$section'>" >> ./index.html
echo "<div class='pager'>" >> ./index.html
countImgs=$(find "$subdir" -type f | wc -l)
countImgs=$((countImgs - 1))
for i in $(seq 1 $((( $countImgs / $maxPerPage)+1))); do
echo "<button class='btn pager-btn' onclick='loadPage(\"$section\", $i)'>$i</button>" >> ./index.html
done
echo "</div>" >> ./index.html
echo "<div id='$section-content'>" >> ./index.html
echo "<div class='c'>" >> ./$subhtml
for wallpaper in ${subdir}/*
do
if [ "$img_count" -ge $maxPerPage ]; then
echo "</div>" >> ./$subhtml
page=$((page + 1))
subhtml="${section}_page${page}.html"
touch ./$subhtml
echo "<div class='c'>" >> ./$subhtml
img_count=0
fi
write_img $wallpaper ./$subhtml
img_count=$((img_count + 1))
done
echo "</div>" >> ./$subhtml
echo "</div>" >> ./index.html
echo "</div>" >> ./index.html
color=$((color + 1))
if [ "$color" -eq 8 ]; then
color=1
fi
done
echo "</main>" >> ./index.html
echo "<script>
window.onload = () => {" >> ./index.html
#echo "hideAll();" >> ./index.html
for section in "${sections[@]}"; do
echo " loadPage('$section', 1);" >> ./index.html
done
echo "
activeSection('${sections[0]}');
if (window.matchMedia('(prefers-color-scheme: dark)').matches){
setTheme('dark');
}else{
setTheme('light');
}
}
</script>" >> ./index.html
echo "
</body>
</html>" >> ./index.html

36
layout.css Normal file
View file

@ -0,0 +1,36 @@
main {
display: flex;
flex-direction: column;
padding: 0 1rem;
flex-grow: 1;
}
@media screen and (min-width: 640px) {
main {
padding: 0 4rem;
}
}
@media screen and (min-width: 768px) {
main {
padding: 0 8rem;
}
}
@media screen and (min-width: 1024px) {
main {
padding: 0 12rem;
}
}
@media screen and (min-width: 1280px) {
main {
padding: 0 14rem;
}
}
@media screen and (min-width: 1536px) {
main {
padding: 0 18rem;
}
}

199
style.css Normal file
View file

@ -0,0 +1,199 @@
@import url("/layout.css");
:root {
color-scheme: light dark;
--bg-color: light-dark(#fbf1c7, #282828);
--fg-color: light-dark(#3c3836, #ebdbb2);
--bg-color-reverse: light-dark(#3c3836, #ebdbb2);
--fg-color-reverse: light-dark(#fbf1c7, #282828);
--bg-color-3: light-dark(#bdae93, #665c54);
--bg-color-3-switch: light-dark(#665c54, #bdae93);
--bg-color-hard: light-dark(#f9f5d7, #1d2021);
--gray: light-dark(#7c6f64, #a89984);
--orange: #d65d0e;
--red: #cc241d;
--green: #98971a;
--yellow: #d79921;
--blue: #458588;
--purple: #b16286;
--aqua: #689d6a;
--orange-dim: light-dark(#af3a03, #fe8019);
--red-dim: light-dark(#9d0006, #fb4934);
--green-dim: light-dark(#79740e, #b8bb26);
--yellow-dim: light-dark(#b57614, #fabd2f);
--blue-dim: light-dark(#076678, #83a598);
--purple-dim: light-dark(#8f3f71, #d3869d);
--aqua-dim: light-dark(#427b58, #8ec07c);
}
body {
background-color: var(--bg-color);
/*container-type: inline-size;*/
font-family: "Curier New", monospace;
margin: 0;
min-height: 100svh;
flex-direction: column;
justify-content: space-evenly;
}
* {
color: var(--fg-color);
border: none;
box-sizing: border-box;
}
h1,
h2 {
background-color: var(--bg-color-reverse);
color: var(--fg-color-reverse);
text-align: center;
text-decoration: none;
}
.s1,
.s2,
.s3,
.s4,
.s5,
.s6,
.s7 {
transition: background 0.7s ease-in-out;
margin-bottom: 0;
&:hover {
background-color: var(--dim-color);
}
}
.s1 {
background-color: var(--orange);
--dim-color: var(--orange-dim);
}
.s2 {
background-color: var(--red);
--dim-color: var(--red-dim);
}
.s3 {
background-color: var(--green);
--dim-color: var(--green-dim);
}
.s4 {
background-color: var(--yellow);
--dim-color: var(--yellow-dim);
}
.s5 {
background-color: var(--blue);
--dim-color: var(--blue-dim);
}
.s6 {
background-color: var(--purple);
--dim-color: var(--purple-dim);
}
.s7 {
background-color: var(--aqua);
--dim-color: var(--aqua-dim);
}
.c {
padding: 1em;
background-color: var(--bg-color-3);
text-align: center;
}
img {
transition: all 0.2s ease-in-out;
}
img:hover {
transform: scale(1.5);
border: none;
box-shadow: 5px 4px 10px black;
}
.pager {
margin-top: 5px;
margin-bottom: 10px;
padding: 5px;
color: var(--fg-color-reverse);
text-align: center;
}
.btn {
transition: background 0.4s ease-in-out;
cursor: pointer;
background-color: var(--bg-color-reverse);
color: var(--fg-color-reverse);
display: inline-flex;
flex-direction: column;
justify-content: center;
align-items: center;
&:hover {
background-color: var(--bg-color-3-switch);
}
}
.btn.pager-btn {
padding: 10px 20px;
font-size: 16px;
font-weight: 900;
margin: 4px 2px;
&.selected {
background-color: var(--bg-color);
color: var(--fg-color);
border-color: var(--fg-color);
border-width: thick;
border-style: solid;
}
}
.clickable {
cursor: pointer;
}
.section {
display: none;
&.selected {
display: block;
}
}
.float-btns {
position: fixed;
bottom: 0;
right: 0;
margin-bottom: 1rem;
margin-right: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
justify-content: end;
}
.btn.float-btn {
height: 2.5rem;
width: 2.5rem;
font-size: 1.5rem;
& i {
color: var(--fg-color-reverse);
}
}
.hidden {
display: none !important;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 775 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 MiB

BIN
wallpapers/anime/elias.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 850 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 MiB

BIN
wallpapers/anime/wall.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 661 KiB

BIN
wallpapers/irl/Colors.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

BIN
wallpapers/irl/DKoRY7F.jpeg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 768 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 518 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 MiB

BIN
wallpapers/irl/beach.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 166 KiB

BIN
wallpapers/irl/berries.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

BIN
wallpapers/irl/board.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 MiB

BIN
wallpapers/irl/bulbs.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

BIN
wallpapers/irl/cactus.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

BIN
wallpapers/irl/camera.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,008 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 938 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 365 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 KiB

BIN
wallpapers/irl/flower-1.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 865 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

BIN
wallpapers/irl/flowers.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 KiB

BIN
wallpapers/irl/forest-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1 MiB

BIN
wallpapers/irl/forest-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

BIN
wallpapers/irl/forest.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 MiB

BIN
wallpapers/irl/girl.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 MiB

BIN
wallpapers/irl/house.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 MiB

BIN
wallpapers/irl/lantern.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 396 KiB

BIN
wallpapers/irl/leaves-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 159 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 MiB

BIN
wallpapers/irl/leaves.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

BIN
wallpapers/irl/mate-2.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

BIN
wallpapers/irl/mate-3.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Some files were not shown because too many files have changed in this diff Show more