Datasets:
Download tasks/c07/repo/src/App.jsx from Roy-DOU/Webdev-Bench: direct link, hf CLI and curl.
- Browser
- Download file 12.8 kB
-
https://huggingface.co/datasets/Roy-DOU/Webdev-Bench/resolve/main/tasks/c07/repo/src/App.jsx
- Command line
-
hf download hf://datasets/Roy-DOU/Webdev-Bench/tasks/c07/repo/src/App.jsx
-
curl -L -o App.jsx https://huggingface.co/datasets/Roy-DOU/Webdev-Bench/resolve/main/tasks/c07/repo/src/App.jsx
12.8 kB
| import { useState } from 'react' | |
| import kmark from './assets/kmark.png' | |
| import shapes from './assets/shapes.png' | |
| import album from './assets/album.png' | |
| import bautzArt from './assets/bautz-art.jpg' | |
| import dgArt from './assets/dg-art.jpg' | |
| import ehexFull from './assets/ehex-full.jpg' | |
| import markeArt from './assets/marke-art.jpg' | |
| import curenectArt from './assets/curenect-art.jpg' | |
| import zknArt from './assets/zkn-art.jpg' | |
| import logowall from './assets/logowall.jpg' | |
| const ArrowRight = ({ color = '#fff' }) => ( | |
| <svg width="22" height="16" viewBox="0 0 22 16" fill="none" aria-hidden="true"> | |
| <path d="M1 8h19M14 1.5 20.5 8 14 14.5" stroke={color} strokeWidth="2.4" strokeLinecap="round" strokeLinejoin="round" /> | |
| </svg> | |
| ) | |
| const ArrowUpRight = ({ color = '#fff' }) => ( | |
| <svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"> | |
| <path d="M2.5 13.5 13 3M4.5 2.5H13.5V11.5" stroke={color} strokeWidth="2.2" strokeLinecap="round" strokeLinejoin="round" /> | |
| </svg> | |
| ) | |
| const projects = { | |
| left: [ | |
| { | |
| id: 'bautz', | |
| title: 'Bautz Festival', | |
| subtitle: 'Progressive Web App für Lüdenscheids fettestes Festival', | |
| linkText: 'Case ansehen', | |
| linkKind: 'case', | |
| art: bautzArt, | |
| artHeight: 458, | |
| cardBg: '#353D50', | |
| titleColor: '#FFFFFF', | |
| subColor: '#F2F4F8', | |
| accent: '#EE8442', | |
| arrowColor: '#FFFFFF', | |
| }, | |
| { | |
| id: 'ehex', | |
| title: 'ehex', | |
| subtitle: 'Die digitale Revolution des Gesundheitswesens', | |
| linkText: 'Case ansehen', | |
| linkKind: 'case', | |
| art: ehexFull, | |
| artHeight: 731, | |
| artCover: true, | |
| cardBg: '#110C2A', | |
| titleColor: '#FFFFFF', | |
| subColor: '#F2F2F6', | |
| accent: '#2BBE7A', | |
| arrowColor: '#0E2A22', | |
| }, | |
| { | |
| id: 'curenect', | |
| title: 'curenect', | |
| subtitle: 'Branding, Website und Bestellportal', | |
| linkText: 'Case ansehen', | |
| linkKind: 'case', | |
| art: curenectArt, | |
| artHeight: 521, | |
| cardBg: '#E7F0F5', | |
| titleColor: '#22333F', | |
| subColor: '#22333F', | |
| accent: '#54809B', | |
| arrowColor: '#FFFFFF', | |
| }, | |
| ], | |
| right: [ | |
| { | |
| id: 'dg', | |
| title: 'David&Goliath', | |
| subtitle: 'Guten Freunden gibt man eine Website', | |
| linkText: 'Website ansehen', | |
| linkKind: 'website', | |
| art: dgArt, | |
| artHeight: 544, | |
| cardBg: '#030303', | |
| titleColor: '#FFFFFF', | |
| subColor: '#D9D9D9', | |
| accent: '#979797', | |
| circleBg: '#4A4A4A', | |
| arrowColor: '#DEDEDE', | |
| }, | |
| { | |
| id: 'marke', | |
| title: 'Mark-E', | |
| subtitle: 'Portal für die Direktvermarktung erneuerbarer Energien', | |
| linkText: 'Case ansehen', | |
| linkKind: 'case', | |
| art: markeArt, | |
| artHeight: 517, | |
| cardBg: '#F9FAF5', | |
| titleColor: '#28313E', | |
| subColor: '#28313E', | |
| accent: '#EE7A3B', | |
| arrowColor: '#FFFFFF', | |
| }, | |
| { | |
| id: 'zkn', | |
| title: ( | |
| <> | |
| Zentrum | |
| <br /> | |
| Klimaforschung | |
| <br /> | |
| Niedersachsen | |
| </> | |
| ), | |
| subtitle: 'Lösungen für eine klimagerechte Zukunft', | |
| linkText: 'Website ansehen', | |
| linkKind: 'website', | |
| art: zknArt, | |
| artHeight: 516, | |
| cardBg: '#A9D2D4', | |
| titleColor: '#22333F', | |
| subColor: '#22333F', | |
| accent: '#22333F', | |
| circleBg: '#22333F', | |
| arrowColor: '#A9D2D4', | |
| }, | |
| ], | |
| } | |
| const manifestSlides = [ | |
| { | |
| heading: ( | |
| <> | |
| Liberté, Égalité, | |
| <br /> | |
| Interneté. | |
| </> | |
| ), | |
| body: ( | |
| <> | |
| Barrieren gehören abgebaut statt eingebaut. Mit jeder Webseite | |
| <br /> | |
| zeigen wir, dass Barrierefreiheit nicht langweilig sein muss und | |
| <br /> | |
| schaffen ein kleines Stück digitaler Freiheit, in der Inhalte für alle | |
| <br /> | |
| erlebbar werden — unabhängig von Einschränkungen, Geräten | |
| <br /> | |
| oder Bandbreite. Touché. | |
| </> | |
| ), | |
| }, | |
| { | |
| heading: ( | |
| <> | |
| Ladezeit ist | |
| <br /> | |
| Lebenszeit. | |
| </> | |
| ), | |
| body: ( | |
| <> | |
| Niemand wartet gern — im Netz schon gar nicht. Deshalb bauen | |
| <br /> | |
| wir Webseiten, die schneller laden als man „kolossal“ sagen | |
| <br /> | |
| kann: schlanke Assets, kluges Caching und Code, der nur das | |
| <br /> | |
| tut, was er soll. Performance ist kein Feature, sondern | |
| <br /> | |
| Höflichkeit. | |
| </> | |
| ), | |
| }, | |
| { | |
| heading: ( | |
| <> | |
| Handwerk statt | |
| <br /> | |
| Hokuspokus. | |
| </> | |
| ), | |
| body: ( | |
| <> | |
| Wir versprechen keine Magie, wir liefern Handwerk: sauberes | |
| <br /> | |
| HTML, ehrliches CSS und JavaScript nur da, wo es wirklich | |
| <br /> | |
| etwas kann. Dafür stehen wir gerade — vom ersten Pixel bis | |
| <br /> | |
| zum letzten Deploy. Und wenn etwas klemmt, sind wir da. | |
| <br /> | |
| Versprochen. | |
| </> | |
| ), | |
| }, | |
| ] | |
| function FloatingNav({ active, onNavigate }) { | |
| const items = [ | |
| { id: 'home', label: 'Home' }, | |
| { id: 'referenzen', label: 'Referenzen' }, | |
| { id: 'manifest', label: 'Manifest' }, | |
| ] | |
| return ( | |
| <nav className="floating-nav" aria-label="Hauptnavigation"> | |
| {items.map((item) => ( | |
| <button | |
| key={item.id} | |
| type="button" | |
| className={`nav-item${active === item.id ? ' is-active' : ''}`} | |
| onClick={() => onNavigate(item.id)} | |
| > | |
| {item.label} | |
| </button> | |
| ))} | |
| </nav> | |
| ) | |
| } | |
| function ProjectCard({ p }) { | |
| return ( | |
| <a | |
| href={`#${p.id}`} | |
| className="card" | |
| style={{ backgroundColor: p.cardBg }} | |
| onClick={(e) => e.preventDefault()} | |
| aria-label={p.linkText} | |
| > | |
| <img | |
| className={`card-art${p.artCover ? ' card-art--cover' : ''}`} | |
| src={p.art} | |
| alt="" | |
| style={{ height: p.artHeight }} | |
| draggable="false" | |
| /> | |
| <div className="card-body"> | |
| <h3 className="card-title" style={{ color: p.titleColor }}> | |
| {p.title} | |
| </h3> | |
| <p className="card-sub" style={{ color: p.subColor }}> | |
| {p.subtitle} | |
| </p> | |
| <span className="card-link" style={{ color: p.accent }}> | |
| {p.linkText} | |
| {p.linkKind === 'case' ? ( | |
| <span className="card-pill" style={{ backgroundColor: p.accent }}> | |
| <ArrowRight color={p.arrowColor} /> | |
| </span> | |
| ) : ( | |
| <span className="card-circle" style={{ backgroundColor: p.circleBg }}> | |
| <ArrowUpRight color={p.arrowColor} /> | |
| </span> | |
| )} | |
| </span> | |
| </div> | |
| </a> | |
| ) | |
| } | |
| function ManifestCarousel() { | |
| const [index, setIndex] = useState(0) | |
| const prev = () => setIndex((i) => (i - 1 + manifestSlides.length) % manifestSlides.length) | |
| const next = () => setIndex((i) => (i + 1) % manifestSlides.length) | |
| const slide = manifestSlides[index] | |
| return ( | |
| <div className="carousel"> | |
| <button type="button" className="carousel-arrow carousel-arrow--left" onClick={prev} aria-label="Vorheriges Manifest"> | |
| <svg width="24" height="18" viewBox="0 0 24 18" fill="none" aria-hidden="true"> | |
| <path d="M23 9H2M9 1.5 1.5 9 9 16.5" stroke="#1B2A38" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" /> | |
| </svg> | |
| </button> | |
| <div className="manifest-card"> | |
| <h3 className="manifest-card-title">{slide.heading}</h3> | |
| <p className="manifest-card-body">{slide.body}</p> | |
| </div> | |
| <button type="button" className="carousel-arrow carousel-arrow--right" onClick={next} aria-label="Nächstes Manifest"> | |
| <svg width="24" height="18" viewBox="0 0 24 18" fill="none" aria-hidden="true"> | |
| <path d="M1 9h21M15 1.5 22.5 9 15 16.5" stroke="#1B2A38" strokeWidth="2.6" strokeLinecap="round" strokeLinejoin="round" /> | |
| </svg> | |
| </button> | |
| </div> | |
| ) | |
| } | |
| export default function App() { | |
| const [active, setActive] = useState('home') | |
| const navigate = (id) => { | |
| setActive(id) | |
| const el = document.getElementById(id) | |
| if (el) el.scrollIntoView({ behavior: 'smooth', block: 'start' }) | |
| } | |
| return ( | |
| <div className="page" id="home"> | |
| <FloatingNav active={active} onNavigate={navigate} /> | |
| <header className="header"> | |
| <div className="shell header-row"> | |
| <a className="brand" href="#home" onClick={(e) => { e.preventDefault(); navigate('home') }}> | |
| <img className="brand-mark" src={kmark} alt="kolossal Logo" /> | |
| <span className="brand-name">kolossal</span> | |
| </a> | |
| <img className="header-shapes" src={shapes} alt="" /> | |
| </div> | |
| </header> | |
| <section className="hero"> | |
| <div className="shell text-indent"> | |
| <h1 className="display"> | |
| Wir machen | |
| <br /> | |
| dieses Internet | |
| </h1> | |
| <p className="lead"> | |
| Keine Templates, nix von der Stange: Wir entwickeln | |
| <br /> | |
| vollmundige Webseiten, die Unternehmen immer von der | |
| <br /> | |
| Schokoladenseite zeigen. Merci, dass es uns gibt. | |
| </p> | |
| </div> | |
| </section> | |
| <section className="projects" id="referenzen"> | |
| <div className="shell projects-grid"> | |
| <div className="col col-left"> | |
| {projects.left.map((p) => ( | |
| <ProjectCard key={p.id} p={p} /> | |
| ))} | |
| </div> | |
| <div className="col col-right"> | |
| {projects.right.map((p) => ( | |
| <ProjectCard key={p.id} p={p} /> | |
| ))} | |
| </div> | |
| </div> | |
| </section> | |
| <section className="clients"> | |
| <div className="clients-flare" aria-hidden="true" /> | |
| <div className="shell text-indent clients-copy"> | |
| <h2 className="display"> | |
| Vertrauen gut, | |
| <br /> | |
| Logos besser | |
| </h2> | |
| <p className="lead"> | |
| Unsere Kunden wissen: Wir liefern keine Luftschlösser, | |
| <br /> | |
| sondern pünktlich pixelgenaue Projekte. Obendrauf das | |
| <br /> | |
| kleine Extra, das niemand bestellt hat, aber jeder liebt. | |
| <br /> | |
| Die hier haben’s ausprobiert: | |
| </p> | |
| </div> | |
| <img className="logowall" src={logowall} alt="Logos unserer Kunden: Alberts, Bautz Festival, Büro Schriever, Clee, curenect, David&Goliath, ehex, Enders, Hotel Vierjahreszeiten, IMS, KCX, Mark-E, Radolid, RMP SL, Sauerlandpark Hemer, Schmale Raabe, Selbstauslöser, Stegermeister, WGB, ZKfN" /> | |
| </section> | |
| <section className="manifest" id="manifest"> | |
| <div className="shell text-indent"> | |
| <h2 className="display">Manifest</h2> | |
| <p className="lead"> | |
| Kein Pathos, nur ein kleiner Kodex fürs große Web | |
| <br /> | |
| und Projekte, die laufen wie geschnitten Brot. | |
| </p> | |
| </div> | |
| <div className="shell"> | |
| <ManifestCarousel /> | |
| </div> | |
| </section> | |
| <section className="cta"> | |
| <div className="shell text-indent"> | |
| <p className="cta-kicker">Wir waren noch nie bereiter.</p> | |
| <h2 className="cta-title">Gehen wir’s an.</h2> | |
| <a className="cta-button" href="mailto:hallo@kolossal.io">hallo@kolossal.io</a> | |
| </div> | |
| </section> | |
| <footer className="footer"> | |
| <div className="shell text-indent footer-grid"> | |
| <div> | |
| <p>kolossal GmbH</p> | |
| <p>© 2018—2026</p> | |
| </div> | |
| <div> | |
| <p>Florianstraße 15-21</p> | |
| <p>44139 Dortmund</p> | |
| </div> | |
| <div> | |
| <p><a className="footer-link" href="mailto:hallo@kolossal.io">hallo@kolossal.io</a></p> | |
| </div> | |
| <div> | |
| <p><a className="footer-link" href="#datenschutz" onClick={(e) => e.preventDefault()}>Datenschutz</a></p> | |
| <p><a className="footer-link" href="#impressum" onClick={(e) => e.preventDefault()}>Impressum</a></p> | |
| </div> | |
| </div> | |
| </footer> | |
| <aside className="now-playing" aria-label="Gerade läuft"> | |
| <img className="now-playing-art" src={album} alt="Albumcover" /> | |
| <div className="now-playing-meta"> | |
| <p className="now-playing-title"> | |
| <svg width="13" height="12" viewBox="0 0 13 12" fill="#fff" aria-hidden="true"> | |
| <rect x="0" y="5" width="2.4" height="7" rx="1" /> | |
| <rect x="4.6" y="2" width="2.4" height="10" rx="1" /> | |
| <rect x="9.2" y="6.5" width="2.4" height="5.5" rx="1" /> | |
| </svg> | |
| Paper Trail$ | |
| </p> | |
| <p className="now-playing-artist">Joey Bada$$</p> | |
| </div> | |
| </aside> | |
| </div> | |
| ) | |
| } | |