fixed components

This commit is contained in:
2025-10-02 02:10:07 +02:00
parent 696d0e61f1
commit d0227e4539
26 changed files with 603 additions and 271 deletions

View File

@@ -34,44 +34,9 @@ body{
font-weight: 400;
font-style: normal;
}
footer a{
color: var(--c-text);
text-decoration: none;
}
footer a i{
color: white;
text-decoration: none;
}
footer{
font-family: "Roboto Mono", monospace;
background-color: var(--c-boxes);
margin-top: 2em;
display: flex;
color: white;
align-items: center;
justify-content: space-evenly;
}
footer address{
padding: 1em;
font-style: normal;
}
footer .contacts{
font-size: 2em;
}
@media only screen and (max-width: 990px){
footer{
flex-direction: column;
padding-bottom: 1em;
padding-top: 1em;
}
}
.introduction {
.introduction {
display: flex;
flex-direction: column;
color: var(--c-text);
@@ -85,6 +50,7 @@ footer .contacts{
/* gap: 4em;*/
}
.introduction h1{
font-size: 2em;
}

View File

@@ -1,142 +0,0 @@
nav{
padding: 1.1em;
font-family: "Roboto Mono", monospace;
position: -webkit-sticky;
position: sticky;
top: 0; /* required */
transition: top 1s ease-in-out, border-radius 1s ease-in-out;
z-index: 5;
padding-left: 2em;
padding-right: 2em;
width: max-content;
background: var(--c-boxes);
/*background: -moz-linear-gradient(117deg, rgba(34,34,34,1) 0%, rgba(59,54,54,1) 100%);
background: -webkit-linear-gradient(117deg, rgba(34,34,34,1) 0%, rgba(59,54,54,1) 100%);
background: linear-gradient(117deg, rgba(34,34,34,1) 0%, rgba(59,54,54,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#222222",endColorstr="#3b3636",GradientType=1);*/
color: #fff;
text-align: center;
margin: auto;
border-radius: 2em;
}
nav.isSticky-nav{
border-top-left-radius: 0;
border-top-right-radius: 0;
}
nav ul #nav-logo{
border-right: 0.2em solid var(--c-lines);
}
nav ul #nav-logo span{
line-height: 0.75;
font-size: 1.5em;
}
nav a{
color: #fff;
transition: color 1s;
position: relative;
text-decoration: none;
}
nav a:hover{
color: #fff;
}
nav a::before {
content: "";
position: absolute;
display: block;
width: 100%;
height: 2px;
bottom: 0;
left: 0;
background-color: #fff;
transform: scaleX(0);
transition: transform 0.3s ease;
}
nav a:hover::before {
transform: scaleX(1);
}
nav ul {
list-style: none;
padding: 0;
}
nav ul li {
display: inline;
padding: 0 3em;
}
nav ul li a {
text-decoration: none;
}
#toggle-nav{
display: none;
-webkit-transition: transform 0.5s ease;
-moz-transition: transform 0.5s ease;
-o-transition: transform 0.5s ease;
-ms-transition: transform 0.5s ease;
transition: transform 0.5s ease;
}
.toggle-nav-rotated {
transform: rotate(360deg);
}
.nav-open{
max-height: 20em;
}
@media only screen and (max-width: 990px){
#toggle-nav{
margin-top: 0.25em;
margin-left: 0.75em;
position: absolute;
left: 0;
display: block;
font-size: 2em;
}
nav{
width: 100%;
padding: 0;
border-top-right-radius: 0;
border-top-left-radius: 0;
border-bottom-left-radius: 1em;
border-bottom-right-radius: 1em;
overflow: hidden;
}
nav ul {
margin-top: 1em;
gap: 2em;
display: flex;
flex-direction: column;
-webkit-transition: max-height 1s ease;
-moz-transition: max-height 1s ease;
-o-transition: max-height 1s ease;
-ms-transition: max-height 1s ease;
transition: max-height 1s ease;
max-height: 2em;
}
nav ul:last-child{
padding-bottom: 1em;
}
nav ul #nav-logo {
margin: auto;
padding-bottom: 0.5em;
margin-bottom: -1em;
border-bottom: 0.2em solid var(--c-lines);
border-right: none;
}
}

View File

@@ -1,42 +0,0 @@
import React from "react";
import styles from "./Home.module.css";
export default function Home() {
return (
<div className={styles.container}>
<h1 className={styles.title}>Vítejte na hlavní stránce</h1>
<p>Toto je obsah jen pro home page.</p>
</div>
);
}
$(document).ready(function () {
$("body").click(function(event){
var randomId = "spark-" + Math.floor(Math.random() * 100000);
var $spark = $("<div>").addClass("spark-cursor").attr("id", randomId);
$("body").append($spark);
// Nastavení pozice
$spark.css({
"top": event.pageY + "px",
"left": event.pageX + "px",
"filter": "hue-rotate(" + Math.random() * 360 + "deg)"
});
for (let index = 0; index < 8; index++) {
let $span = $("<span>");
$span.css("transform", 'rotate(' + (index * 45) +"deg)" );
$spark.append($span);
}
setTimeout(() => {
$spark.find("span").addClass("animate");
}, 10);
setTimeout(function(){
$("#" + randomId).remove();
}, 1000);
});
});

View File

@@ -0,0 +1,49 @@
import React, { useEffect } from "react"
import styles from "./Home.module.css"
export default function Home() {
useEffect(() => {
const handleClick = (event: MouseEvent) => {
const randomId = "spark-" + Math.floor(Math.random() * 100000)
const spark = document.createElement("div")
spark.className = "spark-cursor"
spark.id = randomId
document.body.appendChild(spark)
// pozice a barva
spark.style.top = `${event.pageY}px`
spark.style.left = `${event.pageX}px`
spark.style.filter = `hue-rotate(${Math.random() * 360}deg)`
for (let i = 0; i < 8; i++) {
const span = document.createElement("span")
span.style.transform = `rotate(${i * 45}deg)`
spark.appendChild(span)
}
setTimeout(() => {
spark.querySelectorAll("span").forEach((s) => {
(s as HTMLElement).classList.add("animate")
})
}, 10)
setTimeout(() => {
spark.remove()
}, 1000)
}
document.body.addEventListener("click", handleClick)
// cleanup když komponenta zmizí
return () => {
document.body.removeEventListener("click", handleClick)
}
}, [])
return (
<></>
)
}