Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
e3e57abefd | |||
ef8a3fe419 | |||
405e634e59 | |||
e1be96557a | |||
3b63a4ce00 | |||
75fad798be | |||
a79ebaf044 | |||
c029ed416d |
4
package-lock.json
generated
4
package-lock.json
generated
@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "buzzword-bingo",
|
"name": "buzzword-bingo",
|
||||||
"version": "0.3.2",
|
"version": "0.4.0",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "buzzword-bingo",
|
"name": "buzzword-bingo",
|
||||||
"version": "0.3.2",
|
"version": "0.4.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"next": "14.0.1",
|
"next": "14.0.1",
|
||||||
"react": "^18",
|
"react": "^18",
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "buzzword-bingo",
|
"name": "buzzword-bingo",
|
||||||
"version": "0.3.2",
|
"version": "0.4.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
|
@ -14,18 +14,39 @@ function FisherYatesShuffle(array:string[]):string[]{
|
|||||||
return array;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function BingoController({buzzwords, maxSize} : {buzzwords?: string[], maxSize?: number}){
|
export default function BingoController({buzzwords} : {buzzwords?: string[]}){
|
||||||
if(maxSize == undefined) maxSize = 5;
|
const [orientation, setOrientation] = React.useState("");
|
||||||
const [size, setSize] = React.useState(maxSize!);
|
React.useEffect(()=>{
|
||||||
|
function updateOrientation()
|
||||||
|
{
|
||||||
|
setOrientation(window.screen.orientation.type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// init
|
||||||
|
updateOrientation();
|
||||||
|
|
||||||
|
window.addEventListener("orientationchange", updateOrientation);
|
||||||
|
|
||||||
|
// destructor
|
||||||
|
return () => {
|
||||||
|
window.removeEventListener("orientationchange", updateOrientation);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const [size, setSize] = React.useState(5);
|
||||||
if(buzzwords == undefined || buzzwords.length < 1) buzzwords = ["Cloud", "Cyber-[Something]", "Distrupt[ive]", "AI", "Meta [Something]", "Gamification", "Web 2.0/3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Something] as a service", "Emerging [Something]", "Streamline", "Ecosystem", "Leverage", "Outside the Box", "Pivot", "Strategic", "Agile", "Smart Tech", "Data Warehouse", "Actionable Insights", "Holistic Approach", "Digital Transformation", "Growth Hacking"];
|
if(buzzwords == undefined || buzzwords.length < 1) buzzwords = ["Cloud", "Cyber-[Something]", "Distrupt[ive]", "AI", "Meta [Something]", "Gamification", "Web 2.0/3.0", "Industry 4.0", "Internet of Things", "Multiexperience", "Big Data", "Crypto", "[Something] as a service", "Emerging [Something]", "Streamline", "Ecosystem", "Leverage", "Outside the Box", "Pivot", "Strategic", "Agile", "Smart Tech", "Data Warehouse", "Actionable Insights", "Holistic Approach", "Digital Transformation", "Growth Hacking"];
|
||||||
const [items, setItems] = React.useState(buzzwords);
|
const [items, setItems] = React.useState(buzzwords);
|
||||||
const sizeError = (items.length < size);
|
const sizeError = (items.length < size);
|
||||||
return(
|
return(
|
||||||
<>
|
<>
|
||||||
<div className="w-full md:w-3/4 flex flex-col m-auto gap-4">
|
<div className="w-full md:w-3/4 flex flex-col m-auto gap-4">
|
||||||
|
{orientation != "landscape-primary" && <div role="alert" className="alert alert-info">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" className="stroke-current shrink-0 w-6 h-6"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||||
|
<span>Please rotate your device</span>
|
||||||
|
</div>}
|
||||||
<Bingo size={size} items={items}/>
|
<Bingo size={size} items={items}/>
|
||||||
<form className="w-1/3 m-auto">
|
<form className="w-1/3 m-auto">
|
||||||
<input type="range" min={3} max={maxSize!} value={size} className="range range-xs sm:range-sm md:range-md range-secondary" step={1} onChange={({target:{value:s}}) => setSize(+s)}/>
|
<input type="range" min={3} max={5} value={size} className="range range-xs sm:range-sm md:range-md range-secondary" step={1} onChange={({target:{value:s}}) => setSize(+s)}/>
|
||||||
<div className="w-full flex justify-between text-sm px-2 mb-2">
|
<div className="w-full flex justify-between text-sm px-2 mb-2">
|
||||||
<span>3x3</span>
|
<span>3x3</span>
|
||||||
<span>4x4</span>
|
<span>4x4</span>
|
||||||
|
@ -9,7 +9,7 @@ export default function ThemeSwitcher(){
|
|||||||
React.useEffect(() => {document.body.setAttribute("data-theme", theme)});
|
React.useEffect(() => {document.body.setAttribute("data-theme", theme)});
|
||||||
|
|
||||||
return(
|
return(
|
||||||
<ul className="p-2 right-0 text-base-content z-10">
|
<ul className="p-2 right-0 z-10">
|
||||||
<li><a onClick={() => setTheme("light")}>Light</a></li>
|
<li><a onClick={() => setTheme("light")}>Light</a></li>
|
||||||
<li><a onClick={() => setTheme("cyberpunk")}>Cyberpunk</a></li>
|
<li><a onClick={() => setTheme("cyberpunk")}>Cyberpunk</a></li>
|
||||||
<li><a onClick={() => setTheme("valentine")}>Valentine</a></li>
|
<li><a onClick={() => setTheme("valentine")}>Valentine</a></li>
|
||||||
@ -19,7 +19,6 @@ export default function ThemeSwitcher(){
|
|||||||
<li><a onClick={() => setTheme("synthwave")}><DarkIcon/>Synthwave</a></li>
|
<li><a onClick={() => setTheme("synthwave")}><DarkIcon/>Synthwave</a></li>
|
||||||
<li><a onClick={() => setTheme("coffee")}><DarkIcon/>Coffee</a></li>
|
<li><a onClick={() => setTheme("coffee")}><DarkIcon/>Coffee</a></li>
|
||||||
<li><a onClick={() => setTheme("dim")}><DarkIcon/>Dim</a></li>
|
<li><a onClick={() => setTheme("dim")}><DarkIcon/>Dim</a></li>
|
||||||
<li><a onClick={() => setTheme("dielinke")}>Die Linke</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -16,20 +16,25 @@ export default function RootLayout({
|
|||||||
<html lang="en" data-theme="dark">
|
<html lang="en" data-theme="dark">
|
||||||
<body className="bg-base-100 base-content flex flex-col h-screen">
|
<body className="bg-base-100 base-content flex flex-col h-screen">
|
||||||
<div className="navbar bg-neutral text-neutral-content">
|
<div className="navbar bg-neutral text-neutral-content">
|
||||||
<div className="flex-1">
|
<div className="navbar-start">
|
||||||
|
<div className="dropdown">
|
||||||
|
<div tabIndex={0} role="button" className="btn btn-ghost lg:hidden">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" className="h-5 w-5" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" strokeWidth="2" d="M4 6h16M4 12h8m-8 6h16" /></svg>
|
||||||
|
</div>
|
||||||
|
<ul tabIndex={0} className="menu menu-sm dropdown-content bg-neutral text-neutral-content mt-3 z-[1] p-2 shadow rounded-box w-52">
|
||||||
|
<li><a href="https://git.datalore.sh/datalore/buzzword-bingo.git" target="_blank">Source Code</a></li>
|
||||||
|
<li><a>Theme</a><ThemeSwitcher/></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
<span><b className="normal-case text-xl">Buzzword Bingo</b><span className="text-xs ml-1">v{process.env.npm_package_version}</span></span>
|
<span><b className="normal-case text-xl">Buzzword Bingo</b><span className="text-xs ml-1">v{process.env.npm_package_version}</span></span>
|
||||||
</div>
|
</div>
|
||||||
<div className="flex-none">
|
<div className="navbar-end hidden lg:flex">
|
||||||
<ul className="menu menu-horizontal px-1">
|
<ul className="menu menu-horizontal px-1">
|
||||||
<li>
|
<li><a href="https://git.datalore.sh/datalore/buzzword-bingo.git" target="_blank">Source Code</a></li>
|
||||||
<a href="https://git.datalore.sh/datalore/buzzword-bingo.git" target="_blank">Source Code</a>
|
<li><details>
|
||||||
</li>
|
|
||||||
<li>
|
|
||||||
<details>
|
|
||||||
<summary>Theme</summary>
|
<summary>Theme</summary>
|
||||||
<ThemeSwitcher/>
|
<ThemeSwitcher/>
|
||||||
</details>
|
</details></li>
|
||||||
</li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,8 +0,0 @@
|
|||||||
import BingoController from '../components/bingocontroller'
|
|
||||||
|
|
||||||
export default function Home(){
|
|
||||||
const buzzwords = ["\"Ohne Frieden ist alles nichts\"", "Wahlordnung muss mehrfach erklärt werden", "Pizza ist da", "Stefan pöbelt", "Mareike pöbelt zurück", "Jemand überzieht die Redezeit", "Machentanz knallt die Tür zu", "GO-Antrag zur Pause", "GO-Antrag zum GO-Antrag", "Doppelte Für-/Gegenreden", "Rita Krüger redet zu Wagenknecht", "Ins Mikrofon schreien", "Karl-Marx-Zitate", "Rosa-Luxemburg-Zitate", "\"Es braucht die Linke\"", "\"In der Tradition von Rosa Luxemburg und Karl Liebknecht\"", "KW sagt \"Ruhe im Saal\""];
|
|
||||||
return(
|
|
||||||
<BingoController buzzwords={buzzwords} maxSize={4} />
|
|
||||||
);
|
|
||||||
}
|
|
@ -7,21 +7,9 @@ const config: Config = {
|
|||||||
},
|
},
|
||||||
plugins: [require("daisyui")],
|
plugins: [require("daisyui")],
|
||||||
daisyui: {
|
daisyui: {
|
||||||
themes: [
|
themes: ["light", "dark", "synthwave", "cyberpunk", "valentine", "pastel", "aqua", "coffee", "dim"]
|
||||||
{
|
|
||||||
dielinke: {
|
|
||||||
"primary": "#ff0000",
|
|
||||||
"accent": "#6f003c",
|
|
||||||
"secondary": "#004b5b",
|
|
||||||
"neutral": "#6f003c",
|
|
||||||
"base-100": "#f8f8f8",
|
|
||||||
|
|
||||||
"--rounded-box": "0",
|
|
||||||
"--rounded-btn": "0.75rem"
|
|
||||||
}
|
|
||||||
},"light", "dark", "synthwave", "cyberpunk", "valentine", "pastel", "aqua", "coffee", "dim"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
export default config;
|
export default config;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user