Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dark mode with bootstrap #45

Merged
merged 2 commits into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/pages/codeofconduct.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const CodeofconductPage = ({ data }) => {
<Seo />
<Hero />
<main>
<section id='' style={{ color: "black" }}>
<section id='' className='text-body'>
<Container className='py-5'>
<h2 style={{ textTransform: "uppercase" }}>Code of Conduct</h2>
<h3 className='pt-3'>Versione Italiana</h3>
Expand Down
30 changes: 16 additions & 14 deletions src/pages/schedule.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ const Talks = ({
icon={
starredTalksForYear?.includes(title)
? icon({
name: "star",
family: "classic",
style: "solid",
})
name: "star",
family: "classic",
style: "solid",
})
: icon({
name: "star",
family: "classic",
style: "regular",
})
name: "star",
family: "classic",
style: "regular",
})
}
onClick={(e) => handleStarClick(title, e)}
/>
Expand Down Expand Up @@ -180,10 +180,12 @@ const Talks = ({
</Col>
<Col className='align-bottom text-center'>{t.room}</Col>
<Col className='d-flex gap-1 justify-content-end'>
<Button variant='warning'
onClick={(e) => handleStarClick(t.title, e)}>
<StarToggle title={t.title} />
</Button>
<Button
variant='warning'
onClick={(e) => handleStarClick(t.title, e)}
>
<StarToggle title={t.title} />
</Button>
</Col>
</Row>
</div>
Expand Down Expand Up @@ -244,7 +246,7 @@ const Page = ({ data }) => {
<Seo title='Programma' />
<main id='index'>
<Hero />
<section id='calendar' style={{ color: "black" }}>
<section id='calendar' className='text-body'>
<Container>
<div className='d-flex flex-column flex-md-row justify-content-between align-items-center align-middle mb-5'>
<h2 className='text-md-left text-center'>
Expand Down Expand Up @@ -273,7 +275,7 @@ const Page = ({ data }) => {
onClick={() => {
navigate(
typeof window !== "undefined" &&
window.location.pathname + "?year=" + s.year
window.location.pathname + "?year=" + s.year
);
setSchedData(allSchedules[i]);
}}
Expand Down
7 changes: 7 additions & 0 deletions src/styles/base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ a.anchor {
.event:hover {
background-color: #d7d7d7;
}

@media (prefers-color-scheme: dark) {
.event:hover {
background-color: #454545;
}

}
1 change: 1 addition & 0 deletions src/styles/main.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@import "node_modules/@fortawesome/fontawesome-svg-core/styles";
@import "values";
$color-mode-type: media-query;
@import "bootstrap/scss/bootstrap.scss";
@import "base";

Expand Down