-
Notifications
You must be signed in to change notification settings - Fork 1
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 #99 from geo-milev/add-announcements
Add announcements
- Loading branch information
Showing
5 changed files
with
106 additions
and
4 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,80 @@ | ||
<script> | ||
import OpenInNew from "$lib/OpenInNew.svelte"; | ||
export let announcements; | ||
</script> | ||
<div class="container"> | ||
{#each announcements as announcement} | ||
<div class="announcement"> | ||
{#if announcement.href} | ||
<a href="{announcement.href}">{announcement.text}<div class="open-in-new"><OpenInNew /></div></a> | ||
{:else} | ||
<span>{announcement.text}</span> | ||
{/if} | ||
</div> | ||
{/each} | ||
</div> | ||
|
||
<style> | ||
.container { | ||
min-height: 2.5rem; | ||
display: flex; | ||
flex-wrap: wrap; | ||
width: 100%; | ||
background-color: #7D0B09; | ||
align-items: center; | ||
justify-content: space-between; | ||
gap: 0.5rem; | ||
} | ||
.announcement { | ||
display: flex; | ||
justify-content: center; | ||
align-items: center; | ||
min-height: 28px; | ||
padding-left: 1rem; | ||
padding-right: 1rem; | ||
flex: 1 1 auto; | ||
height: 100%; | ||
text-align: center; | ||
} | ||
.announcement:first-child { | ||
border-left: none; | ||
} | ||
.announcement a { | ||
pointer-events: auto; | ||
} | ||
.announcement a, .announcement span { | ||
font-family: 'Roboto', serif; | ||
font-weight: 300; | ||
font-size: 18px; | ||
line-height: 18px; | ||
text-transform: none; | ||
color: #FFFFFF; | ||
cursor: pointer; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
text-decoration: none; | ||
} | ||
.announcement .open-in-new { | ||
margin-left: 5px; | ||
height: 18px; | ||
width: 18px; | ||
} | ||
.announcement a:hover { | ||
color: white; | ||
text-decoration: underline; | ||
} | ||
.announcement .open-in-new :global(svg) { | ||
fill: white; | ||
height: 18px; | ||
width: 18px; | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 -960 960 960" width="24"> | ||
<path d="M200-120q-33 0-56.5-23.5T120-200v-560q0-33 23.5-56.5T200-840h280v80H200v560h560v-280h80v280q0 33-23.5 56.5T760-120H200Zm188-212-56-56 372-372H560v-80h280v280h-80v-144L388-332Z"/> | ||
</svg> |
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