use more semantic html

This commit is contained in:
neri 2020-01-23 22:06:44 +01:00
parent 92b1e1c822
commit 537fe69462
5 changed files with 22 additions and 14 deletions

View File

@ -4,16 +4,11 @@ import accordionStyles from "./accordion.module.css"
export default ({ title, children }) => { export default ({ title, children }) => {
return ( return (
<div> <div>
<input <input type="checkbox" id={`tab-${title}`} name={`tab-${title}`} />
hidden={true}
type="checkbox"
id={`tab-${title}`}
name={`tab-${title}`}
/>
<label htmlFor={`tab-${title}`} className={accordionStyles.header}> <label htmlFor={`tab-${title}`} className={accordionStyles.header}>
{title} {title}
</label> </label>
<div className={accordionStyles.content}>{children}</div> <section className={accordionStyles.content}>{children}</section>
</div> </div>
) )
} }

View File

@ -12,6 +12,17 @@ label:after {
right: 1em; right: 1em;
} }
input:focus + label {
border: 1px dotted white;
}
input {
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
}
input:checked + label:after { input:checked + label:after {
content: "∧"; content: "∧";
} }

View File

@ -3,7 +3,7 @@ import footerStyles from "./footer.module.css"
import { Link } from "gatsby" import { Link } from "gatsby"
export default ({ editLink }) => ( export default ({ editLink }) => (
<div className={footerStyles.footer}> <footer className={footerStyles.footer}>
<div className={footerStyles.footerContent}> <div className={footerStyles.footerContent}>
{editLink ? ( {editLink ? (
<a <a
@ -22,5 +22,5 @@ export default ({ editLink }) => (
Datenschutzerklärung Datenschutzerklärung
</Link> </Link>
</div> </div>
</div> </footer>
) )

View File

@ -6,7 +6,9 @@ import layoutStyles from "./layout.module.css"
export default ({ path, editLink, children }) => ( export default ({ path, editLink, children }) => (
<> <>
<Nav path={path} /> <Nav path={path} />
<div className={layoutStyles.layout}>{children}</div> <main className={layoutStyles.layout}>
<article>{children}</article>
</main>
<Footer editLink={editLink} /> <Footer editLink={editLink} />
</> </>
) )

View File

@ -18,12 +18,12 @@ export default ({ path }) => {
return ( return (
<> <>
<div className={navStyles.header}> <header className={navStyles.header}>
<div className={navStyles.headerContent}> <div className={navStyles.headerContent}>
<span className={navStyles.chaos}>Chaostreff</span> Dortmund <span className={navStyles.chaos}>Chaostreff</span> Dortmund
</div> </div>
</div> </header>
<div className={navStyles.nav}> <nav className={navStyles.nav}>
<div className={navStyles.navContent}> <div className={navStyles.navContent}>
{pages.map(([title, link]) => ( {pages.map(([title, link]) => (
<Link <Link
@ -37,7 +37,7 @@ export default ({ path }) => {
</Link> </Link>
))} ))}
</div> </div>
</div> </nav>
</> </>
) )
} }