-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mobile, fix sort issues, split components into files
- Loading branch information
Showing
6 changed files
with
120 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { div, h3, p, reusable, span, strong } from '@dolanske/cascade' | ||
import type { FormattedEvent } from '../events' | ||
|
||
export const CountdownItem = reusable('li', (ctx, props: FormattedEvent) => { | ||
ctx.nest([ | ||
h3(props.name), | ||
p(props.description).if(props.description), | ||
div().class('divider'), | ||
span(props.displayDate).class('date'), | ||
div([ | ||
strong(props.untilDate), | ||
span(props.untilTime), | ||
]).class('countdown'), | ||
]) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { div, h2, img, p, span, strong } from '@dolanske/cascade' | ||
|
||
export const Sidebar = div().setup((ctx) => { | ||
ctx.class('sidebar') | ||
ctx.nest([ | ||
img().attr('src', 'https://mavulp.github.io/countdown/logo.svg'), | ||
h2([ | ||
span('Hivecom'), | ||
strong('Countdown'), | ||
]), | ||
p().html(`Collection of upcoming events in the hivecom community. If you want your event added, please <a href="https://github.com/Mavulp/countdown/issues/new?assignees=dolanske&labels=&projects=&template=new-event.md&title=%5BRequest%5D+New+event" tarrget="_blank">create an issue</a>. <br /><br /> Designed and implemented by dolanske on Wednesday, in 2024.`), | ||
]) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
@media screen and (max-width: 1280px) { | ||
#app ul { | ||
grid-template-columns: 1fr 1fr !important; | ||
} | ||
} | ||
|
||
@media screen and (max-width: 888px) { | ||
#app ul { | ||
grid-template-columns: 1fr !important; | ||
|
||
li { | ||
padding: 16px; | ||
|
||
h3 { | ||
font-size: 0.9rem; | ||
} | ||
|
||
.date, | ||
p { | ||
font-size: 0.7rem; | ||
} | ||
|
||
.countdown { | ||
strong { | ||
font-size: 1.8rem; | ||
} | ||
|
||
span { | ||
font-size: 0.7rem; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
@media screen and (max-width: 512px) { | ||
#app { | ||
flex-direction: column-reverse; | ||
|
||
.sidebar-wrap { | ||
width: 100%; | ||
|
||
.sidebar { | ||
display: flex; | ||
border-bottom: 1px solid var(--color-border); | ||
width: 100%; | ||
position: relative; | ||
gap: 8px; | ||
align-items: flex-start; | ||
|
||
img { | ||
position: relative; | ||
top: unset; | ||
right: unset; | ||
width: 24px; | ||
margin-right: 8px; | ||
} | ||
|
||
h2 { | ||
writing-mode: initial; | ||
text-orientation: initial; | ||
font-size: 1rem; | ||
/* align-self: flex-end; */ | ||
margin: 0; | ||
text-align: right; | ||
|
||
span { | ||
display: block; | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters