Events weiter gemacht
This commit is contained in:
@@ -8,3 +8,4 @@ TODO:
|
|||||||
- BuLi-Tipp
|
- BuLi-Tipp
|
||||||
- Startseite
|
- Startseite
|
||||||
- Footer
|
- Footer
|
||||||
|
- Event Fotos
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vue-tsc --noEmit && vite build",
|
"build": "vue-tsc --noEmit && vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"tauri": "tauri"
|
"tauri": "tauri",
|
||||||
|
"tauridev": "tauri dev"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@tauri-apps/api": "^2",
|
"@tauri-apps/api": "^2",
|
||||||
|
|||||||
@@ -39,7 +39,6 @@ export default {
|
|||||||
@import "assets/socicon/css/styles.css";
|
@import "assets/socicon/css/styles.css";
|
||||||
@import "assets/animatecss/animate.css";
|
@import "assets/animatecss/animate.css";
|
||||||
@import "assets/theme/css/style.css";
|
@import "assets/theme/css/style.css";
|
||||||
@import "assets/modal.css";
|
|
||||||
@import "assets/mobirise/css/additional.scss";
|
@import "assets/mobirise/css/additional.scss";
|
||||||
@import "./assets/css/index.css";
|
@import "./assets/css/index.css";
|
||||||
|
|
||||||
|
|||||||
36
src/Main.vue
36
src/Main.vue
@@ -2,9 +2,11 @@
|
|||||||
import Navbar from "./Navbar.vue";
|
import Navbar from "./Navbar.vue";
|
||||||
import striptags from "striptags";
|
import striptags from "striptags";
|
||||||
import moment, { Moment } from "moment";
|
import moment, { Moment } from "moment";
|
||||||
|
import Modal from "./Modal.vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Navbar,
|
Navbar,
|
||||||
|
Modal
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
events() {
|
events() {
|
||||||
@@ -19,38 +21,38 @@ export default {
|
|||||||
foto: "erntefest/2011/pic08.jpg"
|
foto: "erntefest/2011/pic08.jpg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 1,
|
||||||
eventname:"Eventname",
|
eventname:"Link",
|
||||||
datum: "2009-04-06",
|
datum: "2009-04-06",
|
||||||
type: "link",
|
type: "link",
|
||||||
content: "<h1>Test</h1>",
|
content: "<h1>Testlink</h1>",
|
||||||
link: "#/test",
|
link: "#/test",
|
||||||
foto: "erntefest/2011/pic08.jpg"
|
foto: "erntefest/2011/pic08.jpg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 2,
|
||||||
eventname:"Eventname",
|
eventname:"Download-Link",
|
||||||
datum: "2009-04-06",
|
datum: "2009-04-06",
|
||||||
type: "dlink",
|
type: "dlink",
|
||||||
content: "<h1>Test</h1>",
|
content: "<h1>Testlink2</h1>",
|
||||||
link: "/",
|
link: "/",
|
||||||
foto: "erntefest/2011/pic08.jpg"
|
foto: "erntefest/2011/pic08.jpg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 3,
|
||||||
eventname:"Eventname",
|
eventname:"Fotos endlich online!",
|
||||||
datum: "2009-04-06",
|
datum: "2009-04-06",
|
||||||
type: "fotos",
|
type: "fotos",
|
||||||
content: "<h1>Test</h1>",
|
content: "Fotos vom Erntefest 2011",
|
||||||
link: undefined,
|
link: "erntefest/2011",
|
||||||
foto: "erntefest/2011/pic08.jpg"
|
foto: "erntefest/2011/pic08.jpg"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 0,
|
id: 4,
|
||||||
eventname:"Eventname",
|
eventname:"Eventname",
|
||||||
datum: "2009-04-06",
|
datum: "2009-04-06",
|
||||||
type: "html",
|
type: "html",
|
||||||
content: "<h1>Test</h1>",
|
content: "<h1>Test2</h1>",
|
||||||
link: undefined,
|
link: undefined,
|
||||||
foto: "erntefest/2011/pic08.jpg"
|
foto: "erntefest/2011/pic08.jpg"
|
||||||
}
|
}
|
||||||
@@ -77,7 +79,14 @@ export default {
|
|||||||
get_file(filename:string){
|
get_file(filename:string){
|
||||||
return filename;
|
return filename;
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
let openedModals: number[] = [];
|
||||||
|
return {
|
||||||
|
openedModals,
|
||||||
|
modaltypes: ["text", "html"],
|
||||||
}
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -153,6 +162,7 @@ export default {
|
|||||||
|
|
||||||
|
|
||||||
<div class="item features-image col-12 col-md-6 col-lg-3" :class="{active: i%4==0}" v-for="event, i in events">
|
<div class="item features-image col-12 col-md-6 col-lg-3" :class="{active: i%4==0}" v-for="event, i in events">
|
||||||
|
<Modal v-show="openedModals.includes(event.id)&&modaltypes.includes(event.type)" @closemodal="openedModals.splice(openedModals.indexOf(event.id),1)" :content="event.content"></Modal>
|
||||||
<div class="item-wrapper">
|
<div class="item-wrapper">
|
||||||
<div class="item-img mb-3">
|
<div class="item-img mb-3">
|
||||||
<img :src="get_file('bilder/'+event.foto)" />
|
<img :src="get_file('bilder/'+event.foto)" />
|
||||||
@@ -180,9 +190,11 @@ export default {
|
|||||||
><button
|
><button
|
||||||
class="btn item-btn btn-primary display-7"
|
class="btn item-btn btn-primary display-7"
|
||||||
:data-id="event.id"
|
:data-id="event.id"
|
||||||
|
@click="openedModals.push(event.id);"
|
||||||
>
|
>
|
||||||
<span v-if="event.type=='link'">Einladung öffnen</span>
|
<span v-if="event.type=='link'">Einladung öffnen</span>
|
||||||
<span v-else-if="event.type=='dlink'">Einladung runterladen</span>
|
<span v-else-if="event.type=='dlink'">Einladung runterladen</span>
|
||||||
|
<span v-else-if="event.type=='fotos'">Fotos ansehen</span>
|
||||||
<span v-else>Mehr</span>
|
<span v-else>Mehr</span>
|
||||||
</button></a>
|
</button></a>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
18
src/Modal.vue
Normal file
18
src/Modal.vue
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
export default {
|
||||||
|
emits: ['closemodal'],
|
||||||
|
props: ["content"]
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<div class="modal">
|
||||||
|
<div class="modal-content">
|
||||||
|
<button class="closeBtn" @click="$emit('closemodal')">x</button>
|
||||||
|
<span v-html="content"></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style lang="css" scoped>
|
||||||
|
@import "assets/modal";
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
display: none;
|
display: flex;
|
||||||
background-color: rgba(255,255,255,0.5);
|
background-color: rgba(255,255,255,0.5);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user