click on splash quote to refresh quote
This commit is contained in:
@@ -6,10 +6,13 @@ import config from "../data/config.json";
|
|||||||
|
|
||||||
const PageIndex = () => {
|
const PageIndex = () => {
|
||||||
const [splash, setSplash] = useState("");
|
const [splash, setSplash] = useState("");
|
||||||
useEffect(() => {
|
function randomizeSplash(): void {
|
||||||
setSplash(
|
setSplash(
|
||||||
config.splashes[Math.floor(Math.random() * config.splashes.length)].body
|
config.splashes[Math.floor(Math.random() * config.splashes.length)].body
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
useEffect(() => {
|
||||||
|
randomizeSplash();
|
||||||
}, []);
|
}, []);
|
||||||
const welcometext: string = "Witamy na witrynie internetowej Gractwa."; // Mamy nadzieję że odnajdziesz czego szukasz, zbłąkana duszo.";
|
const welcometext: string = "Witamy na witrynie internetowej Gractwa."; // Mamy nadzieję że odnajdziesz czego szukasz, zbłąkana duszo.";
|
||||||
return (
|
return (
|
||||||
@@ -17,7 +20,12 @@ const PageIndex = () => {
|
|||||||
<SEO />
|
<SEO />
|
||||||
<div className={styles.hero}>
|
<div className={styles.hero}>
|
||||||
<div className={styles.heroinside}>
|
<div className={styles.heroinside}>
|
||||||
<h1>„{splash || "..."}”</h1>
|
<h1
|
||||||
|
onClick={randomizeSplash}
|
||||||
|
className={styles.h1clicktorefreshsplash}
|
||||||
|
>
|
||||||
|
„{splash || "..."}”
|
||||||
|
</h1>
|
||||||
<p>{welcometext}</p>
|
<p>{welcometext}</p>
|
||||||
<br />
|
<br />
|
||||||
<p>Warto naznaczyć, że strona jest w trakcie remontu.</p>
|
<p>Warto naznaczyć, że strona jest w trakcie remontu.</p>
|
||||||
|
|||||||
@@ -37,3 +37,9 @@
|
|||||||
transform: scale(0.85);
|
transform: scale(0.85);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.h1clicktorefreshsplash {
|
||||||
|
user-select: none;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user