Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

[WIP] added message of the day #282

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions components/MessageOfTheDay.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<template>
<div v-if="motd.message != undefined" class="motd" :style="motd.style">
{{ motd.message }} <a v-if="motd.readmorelink != undefined" :href="motd.readmorelink" :style="motd.style"> READ MORE </a>
</div>
</template>

<script>
export default {

name: 'Motd',
components: {},
data: () => ({
motd: {},
style: {}
}),
fetch () {
this.motd = { message: 'Cryptic wird heute zwei jahre alt! 🥳', readmorelink: 'https://google.de' }
}
}

</script>
<style lang="scss" scoped>
.motd{
width: fit-content;
padding: 0.4vw;
margin-right: 10%;
margin-left: 4%;
text-align: center;
background: #34A735;
border-radius: 4px;
margin-bottom: 2vh;
}
a{
color: white;
background: #1D1C1C;
text-decoration: none;
border-radius: 8px;
padding: 4px;
font-size: 0.8rem;
}
</style>
4 changes: 3 additions & 1 deletion components/NavigationBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,19 @@
</div>
</div>
</nav>
<message-of-the-day />
</div>
</template>

<script>
import CrypticHeadLogo from '@/assets/icons/cryptic_head.svg'
import LanguageSwitcher from '@/components/LanguageSwitcher'
import MessageOfTheDay from '@/components/MessageOfTheDay.vue'
import { isNuxt } from '@/assets/js/isNuxt'

export default {
name: 'NavigationBar',
components: { CrypticHeadLogo, LanguageSwitcher },
components: { CrypticHeadLogo, LanguageSwitcher, MessageOfTheDay },
props: {
backgroundAfterScroll: {
type: Boolean,
Expand Down