Skip to content

Commit

Permalink
wrapping up launch event
Browse files Browse the repository at this point in the history
  • Loading branch information
reubenson committed Mar 21, 2024
1 parent a3f4818 commit 8dcf1fa
Show file tree
Hide file tree
Showing 8 changed files with 115 additions and 94 deletions.
42 changes: 42 additions & 0 deletions docs/assets/index-1ce7aa4d.js

Large diffs are not rendered by default.

42 changes: 0 additions & 42 deletions docs/assets/index-afc3ece7.js

This file was deleted.

2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta property="og:image" content="/images/frogcomp_riso.jpg" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="473" />
<script type="module" crossorigin src="/assets/index-afc3ece7.js"></script>
<script type="module" crossorigin src="/assets/index-1ce7aa4d.js"></script>
<link rel="stylesheet" href="/assets/index-decbe5c9.css">
</head>
<body>
Expand Down
42 changes: 0 additions & 42 deletions docs/stg/index-6eebc5b2.js

This file was deleted.

42 changes: 42 additions & 0 deletions docs/stg/index-eb6394c6.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/stg/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta property="og:image" content="/images/frogcomp_riso.jpg" />
<meta property="og:image:width" content="600" />
<meta property="og:image:height" content="473" />
<script type="module" crossorigin src="/stg/index-6eebc5b2.js"></script>
<script type="module" crossorigin src="/stg/index-eb6394c6.js"></script>
<link rel="stylesheet" href="/stg/index-decbe5c9.css">
</head>
<body>
Expand Down
34 changes: 28 additions & 6 deletions src/Events.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,27 @@
$: {
mainColor = $hasStarted ? colors.darkMode.main : colors.lightMode.main;
}
const currentDate = new Date( (new Date()).toLocaleDateString() )
const upcomingEvents = events
.filter(event => {
console.log('event', event);
console.log('new Date(event.date)', new Date(event.date));
return true;
// return new Date(event.date) >= new Date()
return new Date(event.date).getDate() >= currentDate.getDate()
})
.map(event => {
return {
...event,
date: new Date(event.date).toDateString()
}
});
const pastEvents = events.filter(event => new Date(event.date).getDate() < currentDate.getDate())
.map(event => {
return {
...event,
date: new Date(event.date).toDateString()
}
});
</script>

<Section>
Expand All @@ -37,10 +44,10 @@
{/each}
</ul>
{:else}
<p>There are no official upcoming events scheduled! But you can organize your own Frog Chorus event and use the suggestion below.</p>
<p>There are no official upcoming events scheduled! But you can organize your own Frog Chorus event and use the suggestion below.</p>
{/if}

<h3 class="text-xl mt-5 border-b-2 border-{mainColor}">What to expect for a Frog Chorus event</h3>
<h2 class="text-xl mt-5 border-b-2 border-{mainColor}">What to expect for a Frog Chorus event</h2>
<p>In a gathering of five or more people with smartphones running this app in a browser, consider the following actions.</p>
<ul>
<li>
Expand Down Expand Up @@ -74,5 +81,20 @@
After a while, consider leaving the pond, either bringing your phone with you, or not.
</li> -->
</ul>

<h2 class="text-xl mt-5 border-b-2 border-{mainColor}">Past Events</h2>
{#if pastEvents.length > 0}
<ul class="event-list">
{#each pastEvents as event}
<li class="event-item">
<p>{event.date} at {event.time}</p>
<p class="mt-0">{event.location}</p>
<p>
{@html event.description}
</p>
</li>
{/each}
</ul>
{/if}
</Section>

3 changes: 1 addition & 2 deletions src/lib/Frog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -562,8 +562,7 @@ export class Frog implements FrogPropsExtended {
if (this.eagerness === 1) {
return 1
} else {
return this.calculateEagernessFactor(this.eagerness)
// return this.calculateEagernessFactor(this.eagerness) * this.calculateShynessFactor(this.shyness)
return this.calculateEagernessFactor(this.eagerness) * this.calculateShynessFactor(this.shyness)
}
}

Expand Down

0 comments on commit 8dcf1fa

Please sign in to comment.