Skip to content

Commit

Permalink
Build for 83a7dd7
Browse files Browse the repository at this point in the history
  • Loading branch information
9551-Dev committed Mar 11, 2024
0 parents commit 08e2b8f
Show file tree
Hide file tree
Showing 157 changed files with 3,868 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pictures/lab/storage_2024_03_07/.tmp/*
pictures/radioburza/leden_2024/.tmp/*

!.gitignore
!.nojekyll
!.github
1 change: 1 addition & 0 deletions .nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zap.devvie.cc
80 changes: 80 additions & 0 deletions assets/index_template.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
<!DOCTYPE html>
<html>
<head>
<title>{{header}}</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 20px;
padding: 0;
background-color: #222;
color: #ddd;
}
h1 {
margin-bottom: 20px;
font-size: 24px;
}
ul {
list-style-type: none;
padding: 0;
margin: 0;
}
li {
margin-bottom: 10px;
background-color: #333;
border-radius: 5px;
transition: background-color 0.3s ease;
cursor: pointer;
font-size: 18px;
}
li:hover {
background-color: #555;
}
li a {
display: block;
padding: 8px;
text-decoration: none;
color: #007bff;
}
li a:hover {
text-decoration: underline;
}

.index_self {
background-color: #444;
color: #999;
}
.index_directory {
background-color: rgb(67, 135, 198);
color: #ffffff;
}
.index_file {
background-color: #008b7b;
color: #fff;
}

button {
background-color: transparent;
color: #007bff;
border: 1px solid #007bff;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
transition: background-color 0.3s ease;
font-size: 18px;
}

button:hover {
background-color: #007bff;
color: #fff;
}
</style>
</head>
<body>
<h1>{{title}}</h1>
<ul>
{{directory_list}}
</ul>
{{comment_start}}<button onclick="location.href='..';">.. (zap.devvie.cc{{parent}})</button>{{comment_end}}
</body>
</html>
96 changes: 96 additions & 0 deletions assets/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
var current_image_index = 0;
var image_paths = [
{{image_paths}}
];

function open_image_viewer(image_path) {
current_image_index = image_paths.indexOf(image_path);
update_image_viewer();
document.querySelector(".image-viewer").style.display = "flex";
document.body.style.overflow = "hidden";

document.addEventListener("keydown", handle_keypress);

// Add event listener for mouse wheel
document.querySelector(".gallery").addEventListener("wheel", function(event) {
if (event.deltaY < 0) {
// Scrolling up
navigate_image(event, -1);
} else {
// Scrolling down
navigate_image(event, 1);
}
});
}

function close_image_viewer() {
var img = document.getElementById("viewer-image");
img.style.transform = "scale(1)";
document.querySelector(".image-viewer").style.display = "none";
document.body.style.overflow = "auto";

document.removeEventListener("keydown", handle_keypress);
document.querySelector(".gallery").removeEventListener("wheel", handle_wheel);
}

function navigate_image(event, direction) {
var img = document.getElementById("viewer-image");
img.style.transform = "scale(1)";
event.stopPropagation();
current_image_index += direction;
if (current_image_index < 0) {
current_image_index = image_paths.length - 1;
} else if (current_image_index >= image_paths.length) {
current_image_index = 0;
}
update_image_viewer();
}

function update_image_viewer() {
document.getElementById("viewer-image").src = image_paths[current_image_index];
}

function toggle_dark_mode() {
var body = document.body;
body.classList.toggle("dark-mode");
}

function zoom_image(event) {
var img = document.getElementById("viewer-image");
var bounding_rect = img.getBoundingClientRect();

var x = (event.clientX - bounding_rect.left) / bounding_rect.width;
var y = (event.clientY - bounding_rect.top) / bounding_rect.height;

img.style.transformOrigin = `${x * 100}% ${y * 100}%`;
img.style.transform = img.style.transform === "scale(2)" ? "scale(1)" : "scale(2)";

event.stopPropagation();
}

function handle_keypress(event) {
if (document.querySelector(".image-viewer").style.display === "flex") {
switch(event.key) {
case "ArrowLeft":
navigate_image(event, -1);
break;
case "ArrowRight":
navigate_image(event, 1);
break;
case "Escape":
close_image_viewer();
break;
}
}
}

window.addEventListener("scroll", function () {
var body = document.body;
var scroll_position = window.scrollY;

if (scroll_position > 0) {
body.classList.add("scrolled");
} else {
body.classList.remove("scrolled");
}
});
180 changes: 180 additions & 0 deletions assets/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,180 @@
body {
margin: 0;
font-family: Arial, sans-serif;
}

.header-box {
background-color: #333;
color: white;
padding: 15px;
text-align: center;
position: fixed;
width: 100%;
top: 0;
transition: top 0.3s;
z-index: 1;
display: flex;
justify-content: space-between;
}

.header-box h1 {
margin: 0;
}

.header-box button {
background-color: #4CAF50;
color: white;
padding: 10px 20px;
border: none;
border-radius: 5px;
cursor: pointer;
margin-left: auto;
margin-right: 30px;
}

.github-link {
position: fixed;
bottom: 0;
right: 0;
display: flex;
align-items: center;
margin-left: auto;
margin-right: 5px;
margin-bottom: 5px;
margin-top: auto;
}

.github-link img {
width: 40px;
margin-right: 5px;
}

.content {
padding: 80px 16px;
}

body.scrolled .header-box {
top: -100px;
}

.gallery {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 10px;
}
img {
max-width: 100%;
max-height: 400px;
height: auto;
border: 2px solid #ddd;
border-radius: 8px;
transition: 0.3s;
cursor: pointer;
}
img:hover {
border: 2px solid #777;
transition: transform 0.3s ease-out;
}
.image-viewer {
z-index: 3;
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.8);
justify-content: center;
align-items: center;
}

.image-viewer img {
max-width: 90%;
max-height: 90%;
cursor: zoom-in; /* add cursor style for zooming in */
transition: transform 0.5s ease-out;
}
.close-btn {
font-size: 40px;
color: white;
cursor: pointer;
position: absolute;
top: 10px;
right: 20px;
z-index: 1;
}
.nav-arrows {
position: fixed;
top: 50%;
display: flex;
justify-content: space-between;
width: 100%;
padding: 0 20px;
z-index: 1;
}

.nav-arrow {
font-size: 60px;
color: white;
cursor: pointer;
padding: 20px;
position: relative;
}

.nav-arrow-left {
margin-left: 20px;
}

.nav-arrow-right {
margin-right: 20px;
}

.nav-arrow-left:before,
.nav-arrow-right:before {
content: '';
position: absolute;
top: -20px;
right: -20px;
bottom: -20px;
left: -20px;
}

.dark-mode-btn {
top: 10px;
right: 10px;
cursor: pointer;
font-size: 18px;
padding: 5px;
background-color: #333;
color: #fff;
border: none;
border-radius: 5px;
transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
background-color: #2a2a2a;
color: #fff;
}

body.dark-mode .header-box {
background-color: #111;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.dark-mode .header-box h1 {
color: #fff;
}

body.dark-mode * {
border-color: #333;
}

body.dark-mode .content {
background-color: #2a2a2a;
}

.viewed-image {
z-index: 2;
}
Loading

0 comments on commit 08e2b8f

Please sign in to comment.