-
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.
Add carousel with news items to front page
- news items displayed in carousel which scrolls every 3 seconds - clicking on an item opens the associated url in a new window - news items are stored in the file src/assets/news.json for now - could make it editable from the admin interface in the future - uses vueperslides library - resolves #37
- Loading branch information
Showing
6 changed files
with
71 additions
and
3 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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,26 @@ | ||
[ | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #1: some text about a paper written that used predicTCR. Click on this text to open the associated link." | ||
}, | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #2: some text about a paper written that used predicTCR." | ||
}, | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #3: some text about a paper written that used predicTCR." | ||
}, | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #4: some text about a paper written that used predicTCR." | ||
}, | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #5: some text about a paper written that used predicTCR." | ||
}, | ||
{ | ||
"url": "https://www.dkfz.de", | ||
"text": "News item #6: some text about a paper written that used predicTCR." | ||
} | ||
] |
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,24 @@ | ||
<script setup lang="ts"> | ||
import { VueperSlides, VueperSlide } from "vueperslides"; | ||
import "vueperslides/dist/vueperslides.css"; | ||
import items from "@/assets/news.json"; | ||
</script> | ||
|
||
<template> | ||
<vueper-slides | ||
autoplay | ||
duration="3000" | ||
fixed-height="130px" | ||
:touchable="false" | ||
> | ||
<vueper-slide v-for="item in items"> | ||
<template #content> | ||
<div | ||
class="h-full mx-14 flex flex-col justify-center text-slate-300 pb-4" | ||
> | ||
<a :href="item.url" target="_blank">{{ item.text }}</a> | ||
</div> | ||
</template> | ||
</vueper-slide> | ||
</vueper-slides> | ||
</template> |
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