split config.json intro seperate files
This commit is contained in:
@@ -2,7 +2,7 @@ import styles from "./Navigation.module.scss";
|
||||
import { GractwoLogo } from "../Logo";
|
||||
import Link from "next/link";
|
||||
|
||||
import config from "../../data/config.json";
|
||||
import navigation from "../../data/navigation.json";
|
||||
|
||||
const Navigation = () => {
|
||||
let username: string = "";
|
||||
@@ -10,7 +10,7 @@ const Navigation = () => {
|
||||
<>
|
||||
<div className={styles.nav}>
|
||||
<GractwoLogo className={`${styles.logo} ${styles.desktop}`} />
|
||||
{config.navigation.map((navlink) => {
|
||||
{navigation.map((navlink) => {
|
||||
return (
|
||||
<Link
|
||||
key={`desktop${navlink.href}`}
|
||||
@@ -26,7 +26,7 @@ const Navigation = () => {
|
||||
nawigacja
|
||||
{/* TUTAJ WSTAWIĆ IKONKĘ PÓŹNIEJ */}
|
||||
<div className={styles.innerdropdown}>
|
||||
{config.navigation.map((navlink) => {
|
||||
{navigation.map((navlink) => {
|
||||
return (
|
||||
<Link
|
||||
key={`mobile${navlink.href}`}
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
{
|
||||
"splashes": [
|
||||
{
|
||||
"body": "ona jest narysowana debilu",
|
||||
"author": "jamesen"
|
||||
},
|
||||
{
|
||||
"body": "idą jak surykatki na śmierć puszczone",
|
||||
"author": "mollin"
|
||||
},
|
||||
{
|
||||
"body": "jak spotkam stacha będziemy się napierdalać",
|
||||
"author": "KuOlek"
|
||||
},
|
||||
{
|
||||
"body": "to nie kwestia fetyszu, to kwestia prawa izraela",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "czemu ten szkielet ma oczy i czilluje",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "decymalizacja człowieka",
|
||||
"author": "elephant / suoń"
|
||||
},
|
||||
{
|
||||
"body": "pizdeczka... z całym szacunkiem",
|
||||
"author": "bavil gravlax"
|
||||
},
|
||||
{
|
||||
"body": "mam dwunastometrowego kija w dupie",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "pamięć wody o jabłku",
|
||||
"author": "maciuś"
|
||||
},
|
||||
{
|
||||
"body": "właśnie piszę biblię",
|
||||
"author": "elephant / suoń"
|
||||
},
|
||||
{
|
||||
"body": "bitwa o chromosom",
|
||||
"author": "mollin"
|
||||
}
|
||||
],
|
||||
"navigation": [
|
||||
{
|
||||
"name": "główna",
|
||||
"href": "/"
|
||||
},
|
||||
{
|
||||
"name": "o gractwie",
|
||||
"href": "/o-gractwie"
|
||||
},
|
||||
{
|
||||
"name": "cytaty",
|
||||
"href": "/cytaty"
|
||||
},
|
||||
{
|
||||
"name": "rankingi",
|
||||
"href": "/rankingi"
|
||||
}
|
||||
],
|
||||
"links": [
|
||||
{
|
||||
"name": "Discord",
|
||||
"href": "https://discord.gg/NBXq95C",
|
||||
"hrefalias": ["/discord", "/dsc", "/dc"],
|
||||
"desc": "Nasz serwer na Discordzie!"
|
||||
},
|
||||
{
|
||||
"name": "YouTube",
|
||||
"href": "https://www.youtube.com/@gractwopl",
|
||||
"hrefalias": ["/youtube", "/yt"],
|
||||
"desc": "Nasz kanał na YouTubie!"
|
||||
},
|
||||
{
|
||||
"name": "Twitter",
|
||||
"href": "https://twitter.com/gractwo",
|
||||
"hrefalias": ["/twitter", "/twt"],
|
||||
"desc": "Nasz profil na Twitterze!"
|
||||
},
|
||||
{
|
||||
"name": "GitHub",
|
||||
"href": "https://github.com/gractwo",
|
||||
"hrefalias": ["/github", "/gh"],
|
||||
"desc": "Nasz org na GitHubie!"
|
||||
},
|
||||
{
|
||||
"name": "Kod Źródłowy",
|
||||
"href": "https://github.com/gractwo/gractwo-web",
|
||||
"hrefalias": ["/source", "/oss"],
|
||||
"desc": "Kod źródłowy naszej strony internetowej."
|
||||
}
|
||||
]
|
||||
}
|
||||
32
data/links.json
Normal file
32
data/links.json
Normal file
@@ -0,0 +1,32 @@
|
||||
[
|
||||
{
|
||||
"name": "Discord",
|
||||
"href": "https://discord.gg/NBXq95C",
|
||||
"hrefalias": ["/discord", "/dsc", "/dc"],
|
||||
"desc": "Nasz serwer na Discordzie!"
|
||||
},
|
||||
{
|
||||
"name": "YouTube",
|
||||
"href": "https://www.youtube.com/@gractwopl",
|
||||
"hrefalias": ["/youtube", "/yt"],
|
||||
"desc": "Nasz kanał na YouTubie!"
|
||||
},
|
||||
{
|
||||
"name": "Twitter",
|
||||
"href": "https://twitter.com/gractwo",
|
||||
"hrefalias": ["/twitter", "/twt"],
|
||||
"desc": "Nasz profil na Twitterze!"
|
||||
},
|
||||
{
|
||||
"name": "GitHub",
|
||||
"href": "https://github.com/gractwo",
|
||||
"hrefalias": ["/github", "/gh"],
|
||||
"desc": "Nasz org na GitHubie!"
|
||||
},
|
||||
{
|
||||
"name": "Kod Źródłowy",
|
||||
"href": "https://github.com/gractwo/gractwo-web",
|
||||
"hrefalias": ["/source", "/oss"],
|
||||
"desc": "Kod źródłowy naszej strony internetowej."
|
||||
}
|
||||
]
|
||||
18
data/navigation.json
Normal file
18
data/navigation.json
Normal file
@@ -0,0 +1,18 @@
|
||||
[
|
||||
{
|
||||
"name": "główna",
|
||||
"href": "/"
|
||||
},
|
||||
{
|
||||
"name": "o gractwie",
|
||||
"href": "/o-gractwie"
|
||||
},
|
||||
{
|
||||
"name": "cytaty",
|
||||
"href": "/cytaty"
|
||||
},
|
||||
{
|
||||
"name": "rankingi",
|
||||
"href": "/rankingi"
|
||||
}
|
||||
]
|
||||
42
data/splashes.json
Normal file
42
data/splashes.json
Normal file
@@ -0,0 +1,42 @@
|
||||
[
|
||||
{
|
||||
"body": "ona jest narysowana debilu",
|
||||
"author": "jamesen"
|
||||
},
|
||||
{
|
||||
"body": "idą jak surykatki na śmierć puszczone",
|
||||
"author": "mollin"
|
||||
},
|
||||
{
|
||||
"body": "jak spotkam stacha będziemy się napierdalać",
|
||||
"author": "KuOlek"
|
||||
},
|
||||
{
|
||||
"body": "to nie kwestia fetyszu, to kwestia prawa izraela",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "czemu ten szkielet ma oczy i czilluje",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "decymalizacja człowieka",
|
||||
"author": "elephant / suoń"
|
||||
},
|
||||
{
|
||||
"body": "pizdeczka... z całym szacunkiem",
|
||||
"author": "bavil gravlax"
|
||||
},
|
||||
{
|
||||
"body": "mam dwunastometrowego kija w dupie",
|
||||
"author": "stachowiak"
|
||||
},
|
||||
{
|
||||
"body": "pamięć wody o jabłku",
|
||||
"author": "maciuś"
|
||||
},
|
||||
{
|
||||
"body": "właśnie piszę biblię",
|
||||
"author": "elephant / suoń"
|
||||
}
|
||||
]
|
||||
@@ -1,4 +1,4 @@
|
||||
const { links } = require("./data/config.json");
|
||||
const links = require("./data/links.json");
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
|
||||
@@ -2,14 +2,12 @@ import styles from "../styles/Index.module.scss";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { SEO } from "../components/SEO";
|
||||
import config from "../data/config.json";
|
||||
import splashes from "../data/splashes.json";
|
||||
|
||||
const PageIndex = () => {
|
||||
const [splash, setSplash] = useState("");
|
||||
function randomizeSplash(): void {
|
||||
setSplash(
|
||||
config.splashes[Math.floor(Math.random() * config.splashes.length)].body
|
||||
);
|
||||
setSplash(splashes[Math.floor(Math.random() * splashes.length)].body);
|
||||
}
|
||||
useEffect(() => {
|
||||
randomizeSplash();
|
||||
|
||||
Reference in New Issue
Block a user