-
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.
Move Testimonial to separate content type and add carousel (#83)
* Move Testimonial to separate content type and add carousel * Fix check * Rebuild * Finish carousel * Testing new option * Add guide * Fix observer * Remove unused css * Remove unused icons * Fix some css * Remove unused import * Fix transitions * Guide fixed height from bottom * Fix button transforms * Don't show 2 testimonials at once * Remove unncessary state var * Simply hasnext and hasprev logic * Make some changes to styles and create dialog component * Fix build * Fix button positions * Re-center guide * Simplify CSS a lot * Unused import * Reposition a few things * Make carousel prev/next buttons place better * Add new icons with iconify * Fix icon fills * Remove unused export * Simplify testimonial and dialog * Remove unncessary section color * Bump padding on nonprofits page testimonial * Close Dialog on outside click and make carousel more blue * Reorder styles
- Loading branch information
1 parent
990b0b6
commit c76e82b
Showing
14 changed files
with
434 additions
and
93 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,86 @@ | ||
<script lang="ts"> | ||
let dialog: HTMLDialogElement; | ||
export function close() { | ||
dialog.close(); | ||
} | ||
export function open() { | ||
dialog.showModal(); | ||
} | ||
</script> | ||
|
||
<!-- svelte-ignore a11y-click-events-have-key-events --> | ||
<dialog bind:this={dialog} on:click={close}> | ||
<div class="content" on:click|stopPropagation> | ||
<button class="close" on:click={close}>✕</button> | ||
<slot /> | ||
</div> | ||
</dialog> | ||
|
||
<style> | ||
dialog { | ||
width: 70ch; | ||
max-width: 95vw; | ||
max-height: 85vh; | ||
font-size: 1rem; | ||
border: 1px solid black; | ||
border-radius: 10px; | ||
padding: 0; | ||
opacity: 0; | ||
transform: translateY(10%); | ||
overscroll-behavior: contain; | ||
box-sizing: border-box; | ||
} | ||
dialog[open] { | ||
animation: fade-in 0.4s both; | ||
} | ||
@media (prefers-reduced-motion: no-preference) { | ||
dialog[open] { | ||
animation: slide-in 0.4s both, fade-in 0.4s both; | ||
} | ||
} | ||
@keyframes slide-in { | ||
to { | ||
transform: translateY(0); | ||
} | ||
} | ||
dialog::backdrop { | ||
background-color: rgba(0, 0, 0, 0.75); | ||
opacity: 0; | ||
animation: fade-in 0.4s both; | ||
} | ||
@keyframes fade-in { | ||
to { | ||
opacity: 1; | ||
} | ||
} | ||
.content { | ||
padding: 2em; | ||
padding-top: 4em; | ||
} | ||
.content > .close { | ||
position: absolute; | ||
top: 0.5em; | ||
right: 0.5em; | ||
font-size: 1.5em; | ||
width: 2em; | ||
appearance: none; | ||
cursor: pointer; | ||
background-color: white; | ||
border-radius: 50%; | ||
border: none; | ||
aspect-ratio: 1; | ||
} | ||
.content > .close:hover { | ||
background-color: var(--gray-lighter); | ||
} | ||
</style> |
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
Oops, something went wrong.
c76e82b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
uiuc-website – ./
uiuc-website.vercel.app
uiuc-website-hack4impact1.vercel.app
uiuc-website-git-main-hack4impact1.vercel.app