Skip to content

Commit

Permalink
Clean up some style and script code
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmilot committed Jan 8, 2025
1 parent 544acbf commit 69c7f41
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 27 deletions.
1 change: 0 additions & 1 deletion script.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ function createEventCard(event) {
var otherClass = "";
const today = new Date();
const eventDateTime = new Date(event.details.date);
console.log(today.getMonth(), eventDateTime.getMonth(), foundCurrent);
if (
(today.getMonth() == eventDateTime.getMonth() &&
today.getDate() <= eventDateTime.getDate()) ||
Expand Down
47 changes: 21 additions & 26 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ button,
font-weight: bolder;
width: fit-content;
align-self: center;
margin: 0.5rem auto 1rem auto;
}

button:hover,
Expand Down Expand Up @@ -324,7 +325,7 @@ a:not(.rsvp):active {
}

.event-card__description {
line-height: 1.6;
line-height: 1.25;
white-space: pre-wrap;
padding: 1rem;
}
Expand All @@ -334,6 +335,11 @@ a:not(.rsvp):active {
border-top: 1px solid var(--dark-highlight);
}

body:not(.light-mode) .raised:has(.current) .event-card__menu {
padding-top: 1.5rem;
border-top: 1px solid var(--dark-bg);
}

body.light-mode .event-card__menu {
border-top: 1px solid var(--light-shadow);
}
Expand Down Expand Up @@ -370,11 +376,12 @@ body:not(.light-mode) .event-card__accent {

.event-card {
display: flex;
gap: 1.5rem;
gap: 0.5rem;
flex-direction: column;
padding: 0.5rem;
}

.raised:has(.past){
.raised:has(.past) {
display: none;
}

Expand All @@ -392,34 +399,17 @@ body.light-mode .raised:has(.current) .rsvp {
background: var(--accent-color);
}

body.light-mode .raised:has(.current), body.light-mode .raised:has(.current) .rsvp {
box-shadow: 5px 5px 15px var(--accent-shadow), -5px -5px 15px var(--accent-highlight);
body.light-mode .raised:has(.current),
body.light-mode .raised:has(.current) .rsvp {
box-shadow: 5px 5px 15px var(--accent-shadow),
-5px -5px 15px var(--accent-highlight);
}

body.light-mode .raised:has(.current) .rsvp:hover {
box-shadow: inset 5px 5px 15px var(--accent-shadow), inset -5px -5px 15px var(--accent-highlight);
box-shadow: inset 5px 5px 15px var(--accent-shadow),
inset -5px -5px 15px var(--accent-highlight);
}


/* .raised:not(.raised:has(.current)),
.raised:not(.raised:has(.current)) .rsvp {
background: var(--dark-highlight);
}
body.light-mode .raised:not(.raised:has(.current)),
body.light-mode .raised:not(.raised:has(.current)) .rsvp {
background: var(--mid-shadow);
} */

/* Light mode styles */
/* body.light-mode .event-card {
background: var(--light-bg);
} */

/* body.light-mode .raised:has(.current) {
background: var(--light-current);
} */

body.light-mode .menu-item {
background: var(--light-highlight);
}
Expand All @@ -428,6 +418,7 @@ body.light-mode .menu-item {
@media (max-width: 768px) {
.event-card {
gap: 2rem;
padding: 0.5rem;
}

.event-card__header {
Expand All @@ -444,6 +435,10 @@ body.light-mode .menu-item {
align-items: center;
}

/* .raised {
width: calc(100% - 5rem);
} */

.menu-item {
width: 75%;
}
Expand Down

0 comments on commit 69c7f41

Please sign in to comment.