Skip to content

Commit

Permalink
Merge pull request #516 from monarch-initiative/banner
Browse files Browse the repository at this point in the history
add banner pointing to new site
  • Loading branch information
kevinschaper committed Aug 31, 2023
2 parents 6bc5b49 + 0185c06 commit adce6fe
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
<template>
<div id="app" class="page-wrapper">
<monarch-banner
>This site will soon be replaced by a
<a href="https://next.monarchinitiative.org/" target="_blank"
>new version</a
>, re-built and re-imagined. Check it out!</monarch-banner
>
<monarch-navbar />
<div class="content-wrapper">
<router-view />
Expand All @@ -15,6 +21,7 @@ import Vue from "vue";
import { sanitizeText } from "@/lib/utils";
import Navbar from "@/components/Navbar.vue";
import Footer from "@/components/Footer.vue";
import Banner from "./components/Banner.vue";
Vue.prototype.$sanitizeText = sanitizeText;
Expand All @@ -23,6 +30,7 @@ export default {
name: "App",
components: {
"monarch-navbar": Navbar,
"monarch-banner": Banner,
},
data() {
return {
Expand Down
35 changes: 35 additions & 0 deletions src/components/Banner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<template>
<aside v-if="open" class="banner">
<div>
<slot />
</div>
<button class="banner-button" @click="open = false">Close</button>
</aside>
</template>

<script>
export default {
data() {
return { open: true };
},
};
</script>

<style lang="scss">
.banner {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: center;
justify-content: center;
padding: 20px;
gap: 20px;
background: hsl(185, 75%, 80%);
text-align: center;
}
.banner-button {
background: #00000020;
border: none;
}
</style>

0 comments on commit adce6fe

Please sign in to comment.