-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #35 from languageXchange:behics/issue33
Add AnnouncementModal component and include it in the Waves layout
- Loading branch information
Showing
2 changed files
with
58 additions
and
0 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,55 @@ | ||
<script> | ||
import { onMount } from 'svelte'; | ||
import { slide } from 'svelte/transition'; | ||
let show = false; | ||
onMount(() => { | ||
show = true; | ||
}); | ||
</script> | ||
|
||
{#if show} | ||
<div class="modal" transition:slide={{ duration: 800 }}> | ||
<div class="modal-content"> | ||
<button class="close-button" on:click={() => (show = false)}>X</button> | ||
<h4>⬆️ Breaking News!</h4> | ||
<p> | ||
We are now live on <a | ||
href="https://pitchwall.co/product/languagexchange" | ||
target="_blank">PitchWall</a | ||
>! Upvote us there. | ||
</p> | ||
</div> | ||
</div> | ||
{/if} | ||
|
||
<style> | ||
@import '$lib/scss/_themes.scss'; | ||
.modal { | ||
position: relative; | ||
z-index: 9999; | ||
width: 100%; | ||
background-color: var(--color--secondary); | ||
} | ||
.modal-content { | ||
position: relative; | ||
margin: 0 auto; | ||
padding: 20px; | ||
padding-right: 50px; /* Add padding to the right side */ | ||
width: 80%; | ||
} | ||
.close-button { | ||
position: absolute; | ||
right: 10px; | ||
top: 50%; | ||
transform: translateY(-50%); | ||
border: none; | ||
background: none; | ||
font-size: 1.5em; | ||
cursor: pointer; | ||
color: black; | ||
} | ||
</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