Klönkasten und BuLi-Tipp
This commit is contained in:
@@ -4,16 +4,17 @@
|
|||||||
|
|
||||||
TODO:
|
TODO:
|
||||||
|
|
||||||
- Addhit
|
|
||||||
- BuLi-Tipp (Paarungsergebnisse Ladescreen fehlt noch, evtl. IFrame entfernen?)
|
|
||||||
- Footer, Texte?
|
- Footer, Texte?
|
||||||
- Klönkasten ungelesen Punkt (localStorage)
|
- Klönkasten ungelesen Punkt (localStorage)
|
||||||
- Login Formular flexibleres Backend
|
- Login Formular flexibleres Backend
|
||||||
- Typos fixen
|
|
||||||
- Admin Panel
|
- Admin Panel
|
||||||
|
|
||||||
Funktioniert komplett:
|
Funktioniert komplett:
|
||||||
- Galerie
|
- Galerie
|
||||||
|
- Events
|
||||||
|
- BuLi-Tipp
|
||||||
|
|
||||||
Bei der Migration beachten:
|
Bei der Migration beachten:
|
||||||
- neue galerie-kommentare Tabelle
|
- neue galerie-kommentare Tabelle
|
||||||
|
- addhit URL in der index.html anpassen
|
||||||
|
- Event-Datenbank anpassen
|
||||||
|
|||||||
@@ -19,6 +19,8 @@
|
|||||||
</noscript>
|
</noscript>
|
||||||
<link rel="stylesheet"
|
<link rel="stylesheet"
|
||||||
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
|
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
|
||||||
|
<script src="http://192.168.188.38/Jonas/ritzenbergenapi/addhit.php">
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
<script lang="js">
|
<script lang="js">
|
||||||
import { RouterView } from 'vue-router';
|
import { RouterView } from 'vue-router';
|
||||||
|
import Kloenkasten from "./components/Kloenkasten.vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
RouterView
|
RouterView,
|
||||||
|
Kloenkasten
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -11,6 +13,8 @@ export default {
|
|||||||
<template>
|
<template>
|
||||||
<!-- Haupt-Component -->
|
<!-- Haupt-Component -->
|
||||||
<RouterView :key="$route.fullPath" />
|
<RouterView :key="$route.fullPath" />
|
||||||
|
|
||||||
|
<Kloenkasten />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -41,7 +41,6 @@
|
|||||||
padding: 20px;
|
padding: 20px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
box-shadow: 0 4px 8px rgba(0,0,0,0.5);
|
||||||
display: none; /* Modalbox wird zunächst ausgeblendet */
|
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -145,4 +144,4 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
205
src/components/Kloenkasten.vue
Normal file
205
src/components/Kloenkasten.vue
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
<script lang="ts">
|
||||||
|
import "../assets/css/chatbox.css";
|
||||||
|
import RitzenbergenLib from "../ritzenbergenlib.ts";
|
||||||
|
export default {
|
||||||
|
name: "Kloenkasten",
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
sender: "",
|
||||||
|
message: "",
|
||||||
|
email: "",
|
||||||
|
opened: false,
|
||||||
|
reloader: false,
|
||||||
|
RitzenbergenLib: RitzenbergenLib,
|
||||||
|
msgrefs: [],
|
||||||
|
};
|
||||||
|
},
|
||||||
|
|
||||||
|
computed: {
|
||||||
|
newMsg(): boolean {
|
||||||
|
if (this.messages == undefined) return false;
|
||||||
|
if (this.opened) this.open();
|
||||||
|
const lastOpened: Date = new Date(
|
||||||
|
parseInt(localStorage.getItem("kloenkasten_last_opened"))
|
||||||
|
);
|
||||||
|
const lastMsg = this.messages[this.messages.length - 1];
|
||||||
|
if (lastMsg.timestamp > lastOpened) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (localStorage.getItem("kloenkasten_last_opened") == null) {
|
||||||
|
localStorage.setItem(
|
||||||
|
"kloenkasten_last_opened",
|
||||||
|
Date.now().toString()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
submitMsg() {
|
||||||
|
const url = new URL(
|
||||||
|
RitzenbergenLib.RitzenbergenLib.api("/kloenkasten_submit.php")
|
||||||
|
);
|
||||||
|
url.searchParams.append("sender", this.sender);
|
||||||
|
url.searchParams.append("email", this.email);
|
||||||
|
url.searchParams.append("message", this.message);
|
||||||
|
|
||||||
|
fetch(url.toString(), { method: "GET" }).then(() => {
|
||||||
|
this.reloader = !this.reloader;
|
||||||
|
this.sender = "";
|
||||||
|
this.email = "";
|
||||||
|
this.message = "";
|
||||||
|
});
|
||||||
|
},
|
||||||
|
open() {
|
||||||
|
this.opened = true;
|
||||||
|
|
||||||
|
localStorage.setItem(
|
||||||
|
"kloenkasten_last_opened",
|
||||||
|
Date.now().toString()
|
||||||
|
);
|
||||||
|
window.setTimeout(
|
||||||
|
() =>
|
||||||
|
this.msgrefs[this.msgrefs.length - 1].scrollIntoView({
|
||||||
|
behavior: "smooth",
|
||||||
|
}),
|
||||||
|
50
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
asyncComputed: {
|
||||||
|
messages: {
|
||||||
|
get() {
|
||||||
|
const url = new URL(
|
||||||
|
RitzenbergenLib.RitzenbergenLib.api(
|
||||||
|
"/kloenkasten_nachrichten.php"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
return fetch(url.toString(), { method: "GET" })
|
||||||
|
.then((response) => response.json())
|
||||||
|
.then((data) =>
|
||||||
|
data.map((msg) => {
|
||||||
|
msg.timestamp = new Date(msg.timestamp);
|
||||||
|
return msg;
|
||||||
|
})
|
||||||
|
);
|
||||||
|
},
|
||||||
|
watch: ["reloader"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
<template>
|
||||||
|
<button
|
||||||
|
id="chatbox-button"
|
||||||
|
:class="{ newmsg: newMsg }"
|
||||||
|
@click="open"
|
||||||
|
>
|
||||||
|
<span class="material-symbols-outlined">chat</span>
|
||||||
|
|
||||||
|
<span :class="{ newmsgdot: newMsg, newmsgdotinvis: !newMsg }"></span>
|
||||||
|
</button>
|
||||||
|
<div v-show="opened" id="modalbox">
|
||||||
|
<div id="modalbox-header">
|
||||||
|
<span class="material-symbols-outlined">chat</span>
|
||||||
|
<h3 id="modalbox-title">Klönkasten</h3>
|
||||||
|
<span id="close-button" @click="opened = false">×</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="chat-messages">
|
||||||
|
<div
|
||||||
|
v-for="(msg, i) in messages"
|
||||||
|
:key="i"
|
||||||
|
:ref="(el) => (msgrefs[i] = el)"
|
||||||
|
>
|
||||||
|
<i>{{ msg.timestamp.toLocaleString() }}</i>
|
||||||
|
<div class="message own-message animate__animated">
|
||||||
|
<a :href="'mailto:' + msg.email" v-if="msg.email"
|
||||||
|
>{{ msg.name }}:
|
||||||
|
</a>
|
||||||
|
<span class="message-sender animate__animated" v-else
|
||||||
|
>{{ msg.name }}:
|
||||||
|
</span>
|
||||||
|
<span class="message-content animate__animated">{{
|
||||||
|
msg.message
|
||||||
|
}}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<form id="chat-input" @submit.prevent="submitMsg">
|
||||||
|
<input
|
||||||
|
id="name-input"
|
||||||
|
v-model="sender"
|
||||||
|
type="text"
|
||||||
|
maxlength="64"
|
||||||
|
placeholder="Name"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
id="email-input"
|
||||||
|
v-model="email"
|
||||||
|
type="email"
|
||||||
|
maxlength="128"
|
||||||
|
placeholder="E-Mail"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
id="message-input"
|
||||||
|
v-model="message"
|
||||||
|
type="text"
|
||||||
|
placeholder="Nachricht"
|
||||||
|
maxlength="1024"
|
||||||
|
required
|
||||||
|
/>
|
||||||
|
<input type="submit" id="send-button" value="Senden" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<style scoped>
|
||||||
|
@import url("https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0");
|
||||||
|
|
||||||
|
.newmsg {
|
||||||
|
animation: newmsgblink 3s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.newmsgdot{
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: #00ff00;
|
||||||
|
position: absolute;
|
||||||
|
border-radius: 50%;
|
||||||
|
|
||||||
|
top: 5px;
|
||||||
|
right: 5px;
|
||||||
|
z-index: 10;
|
||||||
|
|
||||||
|
}
|
||||||
|
.newmsgdotinvis{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes newmsgblink {
|
||||||
|
0% {
|
||||||
|
transform: scale(1) rotate(0deg) translateX(0) translateY(0);
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
transform: scale(1.5) rotate(0deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
25% {
|
||||||
|
transform: scale(1.5) rotate(10deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
30% {
|
||||||
|
transform: scale(1.5) rotate(-10deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
35% {
|
||||||
|
transform: scale(1.5) rotate(10deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
40% {
|
||||||
|
transform: scale(1.5) rotate(-10deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
45% {
|
||||||
|
transform: scale(1.5) rotate(0deg) translateX(-10px) translateY(-10px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -25,6 +25,7 @@ export default {
|
|||||||
<ul class="header-menu">
|
<ul class="header-menu">
|
||||||
<li class="header-menu-item mbr-fonts-style display-5">
|
<li class="header-menu-item mbr-fonts-style display-5">
|
||||||
<Modal v-show="aboutVisible" @closemodal="aboutVisible = false">
|
<Modal v-show="aboutVisible" @closemodal="aboutVisible = false">
|
||||||
|
<br>
|
||||||
<h1>Über</h1>
|
<h1>Über</h1>
|
||||||
<p>
|
<p>
|
||||||
Ritzenbergen ist ein kleines Dorf der Gemeinde Blender und
|
Ritzenbergen ist ein kleines Dorf der Gemeinde Blender und
|
||||||
@@ -32,10 +33,10 @@ export default {
|
|||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
Bei dieser Seite handelt es sich um eine private Homepage der
|
Bei dieser Seite handelt es sich um eine private Homepage der
|
||||||
Dorfgemeinschaft Amedorf & Ritzenbergen.
|
Dorfgemeinschaft Amedorf & Ritzenbergen.
|
||||||
<br /><br />
|
<br /><br />
|
||||||
© Front-End und Web Design: Mathis Kuhlenkamp <br />
|
© Front-End und Web Design: Mathis Kuhlenkamp, Jonas Kuhlenkamp <br />
|
||||||
© Back-End und Datenbanken: Tom Kuhlenkamp, Jonas Kuhlenkamp
|
© Back-End und Datenbanken: Jonas Kuhlenkamp
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
|||||||
@@ -1,81 +1,161 @@
|
|||||||
<script lang="js">
|
<script lang="js">
|
||||||
import RitzenbergenLib from "../../ritzenbergenlib.ts";
|
import RitzenbergenLib from "../../ritzenbergenlib.ts";
|
||||||
import Modal from "../Modal.vue";
|
import Modal from "../Modal.vue";
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
ergebnisse: {
|
ergebnisse: {
|
||||||
type: Array,
|
type: Array,
|
||||||
required: true
|
required: true,
|
||||||
},
|
},
|
||||||
maxspieltag: {
|
maxspieltag: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true,
|
||||||
}
|
},
|
||||||
},
|
tipps: {
|
||||||
data(){
|
type: Array,
|
||||||
return {
|
required: true,
|
||||||
RitzenbergenLib,
|
},
|
||||||
showmodal: false,
|
users: {
|
||||||
modalindex: 0
|
type: Array,
|
||||||
}
|
required: true,
|
||||||
},
|
},
|
||||||
components: {
|
},
|
||||||
Modal
|
data() {
|
||||||
},
|
return {
|
||||||
methods: {
|
RitzenbergenLib,
|
||||||
getbulipunktesrc(spieltag,paarung){
|
showmodal: false,
|
||||||
|
modalindex: 0,
|
||||||
return RitzenbergenLib.RitzenbergenLib.api("/bulitipp/buli-punkte.php?name=null&detail=spiel&spieltag="+spieltag+"&paarung="+paarung);
|
};
|
||||||
}
|
},
|
||||||
}
|
components: {
|
||||||
}
|
Modal,
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
ps(heim, gast, ergebnisHeim, ergebnisGast) {
|
||||||
|
if(heim == ergebnisHeim && gast == ergebnisGast) {
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
const tippDiff = heim - gast;
|
||||||
|
const ergebnisDiff = ergebnisHeim - ergebnisGast;
|
||||||
|
if(tippDiff === ergebnisDiff) {
|
||||||
|
return 2;
|
||||||
|
}
|
||||||
|
if(heim > gast && ergebnisHeim > ergebnisGast) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
if(heim < gast && ergebnisHeim < ergebnisGast) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<section class="buli-results scroll-x" id="buliresults-section">
|
<section class="buli-results scroll-x" id="buliresults-section">
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<h2>Paarungsergebnisse {{ maxspieltag }}. Spieltag</h2>
|
<h2>Paarungsergebnisse {{ maxspieltag }}. Spieltag</h2>
|
||||||
<Modal
|
<Modal v-if="showmodal" @closemodal="showmodal = false">
|
||||||
v-if="showmodal" @closemodal="showmodal = false">
|
<h1 class="detailansichtSchriftart">
|
||||||
<iframe :src="getbulipunktesrc(maxspieltag,ergebnisse[modalindex].paarung.id)" frameborder="0"></iframe>
|
Detailansicht {{ maxspieltag }}. Spieltag
|
||||||
</Modal>
|
</h1>
|
||||||
<table>
|
<h2 class="detailansichtSchriftart">
|
||||||
<tbody>
|
{{ ergebnisse[modalindex].paarung.heim }} -
|
||||||
<tr>
|
{{ ergebnisse[modalindex].paarung.gast }}
|
||||||
<td>Paarung</td>
|
</h2>
|
||||||
<td>Ergebnis</td>
|
<h1>
|
||||||
</tr>
|
{{ ergebnisse[modalindex].heim }} -
|
||||||
<tr v-for="ergebnis,i in ergebnisse">
|
{{ ergebnisse[modalindex].gast }}
|
||||||
<td @click="showmodal = true; modalindex = i">
|
</h1>
|
||||||
|
<table class="detailansichtSchriftart">
|
||||||
<span class="as-link">
|
<tbody>
|
||||||
<span class="teams">
|
<tr>
|
||||||
<span class="team">
|
<td>Name</td>
|
||||||
<img :src='RitzenbergenLib.RitzenbergenLib.api("/bulitipp/get-image.php?team="+ergebnis.paarung.heim)' alt="" />
|
<td>Tipp</td>
|
||||||
<p>{{ ergebnis.paarung.heim }}</p>
|
<td>Punkte</td>
|
||||||
</span>
|
<td>Gesamtpunktzahl</td>
|
||||||
<span class="vs"></span>
|
</tr>
|
||||||
<span class="team">
|
<tr
|
||||||
<p>{{ ergebnis.paarung.gast }}</p>
|
v-for="(tipp, i) in tipps.filter(
|
||||||
<img :src='RitzenbergenLib.RitzenbergenLib.api("/bulitipp/get-image.php?team="+ergebnis.paarung.gast)' alt="" />
|
(tipp) =>
|
||||||
</span>
|
tipp.tipp.paarungsid ==
|
||||||
</span>
|
ergebnisse[modalindex].paarung.id
|
||||||
</span>
|
)"
|
||||||
</td>
|
:key="i"
|
||||||
<td>
|
>
|
||||||
<p>{{ ergebnis.heim }} - {{ ergebnis.gast }}</p>
|
<td>
|
||||||
</td>
|
{{
|
||||||
</tr>
|
users.filter((user) => user.id == tipp.user)[0]
|
||||||
</tbody>
|
.username
|
||||||
</table>
|
}}
|
||||||
</section>
|
</td>
|
||||||
|
<td>{{ tipp.tipp.heim }} - {{ tipp.tipp.gast }}</td>
|
||||||
|
<td>{{ ps(tipp.tipp.heim, tipp.tipp.gast, ergebnisse[modalindex].heim, ergebnisse[modalindex].gast) }}</td>
|
||||||
|
<td>
|
||||||
|
{{
|
||||||
|
users.filter((user) => user.id == tipp.user)[0]
|
||||||
|
.points
|
||||||
|
}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</Modal>
|
||||||
|
<table>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>Paarung</td>
|
||||||
|
<td>Ergebnis</td>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="(ergebnis, i) in ergebnisse" :key="i">
|
||||||
|
<td
|
||||||
|
@click="
|
||||||
|
showmodal = true;
|
||||||
|
modalindex = i;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<span class="as-link">
|
||||||
|
<span class="teams">
|
||||||
|
<span class="team">
|
||||||
|
<img
|
||||||
|
:src="
|
||||||
|
RitzenbergenLib.RitzenbergenLib.api(
|
||||||
|
'/bulitipp/get-image.php?team=' +
|
||||||
|
ergebnis.paarung.heim
|
||||||
|
)
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
<p>{{ ergebnis.paarung.heim }}</p>
|
||||||
|
</span>
|
||||||
|
<span class="vs"></span>
|
||||||
|
<span class="team">
|
||||||
|
<p>{{ ergebnis.paarung.gast }}</p>
|
||||||
|
<img
|
||||||
|
:src="
|
||||||
|
RitzenbergenLib.RitzenbergenLib.api(
|
||||||
|
'/bulitipp/get-image.php?team=' +
|
||||||
|
ergebnis.paarung.gast
|
||||||
|
)
|
||||||
|
"
|
||||||
|
alt=""
|
||||||
|
/>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</span>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<p>{{ ergebnis.heim }} - {{ ergebnis.gast }}</p>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</section>
|
||||||
</template>
|
</template>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
||||||
@import "../../assets/css/bulitipp2.css";
|
@import "../../assets/css/bulitipp2.css";
|
||||||
|
|
||||||
iframe{
|
h1 {
|
||||||
width: 100%;
|
text-align: center;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
</style>
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ export default {
|
|||||||
<div v-if="(spieltag == '' || spieltag == null) && userinfo != null">
|
<div v-if="(spieltag == '' || spieltag == null) && userinfo != null">
|
||||||
<h1>Moin {{ userinfo.username }}!</h1>
|
<h1>Moin {{ userinfo.username }}!</h1>
|
||||||
<br />
|
<br />
|
||||||
<h4 v-if="zeitzutippen!=null">Du hast noch <span v-if="zeitzutippen.days!=0">{{ zeitzutippen.days }} Tage und </span>{{ zeitzutippen.hours }} Stunden Zeit, den {{ zeitzutippen.spieltag }}. Spieltag zu tippen.</h4>
|
<h4 v-if="zeitzutippen!=null">Du hast noch <span v-if="zeitzutippen.days!=0">{{ zeitzutippen.days }} Tage und </span>{{ zeitzutippen.hours }} Stunden Zeit, den {{ zeitzutippen.spieltag }}. Spieltag zu tippen.</h4>
|
||||||
<br />
|
<br />
|
||||||
<div v-if="disabled">
|
<div v-if="disabled">
|
||||||
<h3>Gerade kann nicht getippt werden.</h3><br>
|
<h3>Gerade kann nicht getippt werden.</h3><br>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export default {
|
|||||||
const openedModals: number[] = [];
|
const openedModals: number[] = [];
|
||||||
return {
|
return {
|
||||||
openedModals,
|
openedModals,
|
||||||
modaltypes: ["text", "html"],
|
modaltypes: ["markdown", "html"],
|
||||||
RitzenbergenLib: RitzenbergenLib.RitzenbergenLib,
|
RitzenbergenLib: RitzenbergenLib.RitzenbergenLib,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
@@ -36,8 +36,8 @@ export default {
|
|||||||
id: 0,
|
id: 0,
|
||||||
eventname: "Eventname",
|
eventname: "Eventname",
|
||||||
datum: "2009-04-06",
|
datum: "2009-04-06",
|
||||||
type: "text",
|
type: "markdown",
|
||||||
content: "<h1>Test</h1>",
|
content: "# Test",
|
||||||
link: undefined,
|
link: undefined,
|
||||||
foto: "erntefest/2011/pic08.jpg",
|
foto: "erntefest/2011/pic08.jpg",
|
||||||
minitext: ""
|
minitext: ""
|
||||||
@@ -154,8 +154,10 @@ export default {
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<MarkdownRender
|
<MarkdownRender
|
||||||
|
v-if="event.type == 'markdown'"
|
||||||
:content="event.content"
|
:content="event.content"
|
||||||
/>
|
/>
|
||||||
|
<div v-else v-html="event.content"></div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
|
||||||
<div class="item-wrapper">
|
<div class="item-wrapper">
|
||||||
|
|||||||
@@ -30,6 +30,14 @@ export default {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted(){
|
||||||
|
if(this.$route.path=="/anmeldeformular"){
|
||||||
|
const hash = this.$route.path.replace("/","");
|
||||||
|
console.log(this.$refs[hash])
|
||||||
|
this.$refs[hash].scrollIntoView();
|
||||||
|
this.$router.push("/");
|
||||||
|
}
|
||||||
|
},
|
||||||
components: {
|
components: {
|
||||||
Modal,
|
Modal,
|
||||||
},
|
},
|
||||||
@@ -68,7 +76,7 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<section id="anmeldeformular">
|
<section ref="anmeldeformular" id="anmeldeformular">
|
||||||
<section class="form5 cid-u6k7q0BfGa">
|
<section class="form5 cid-u6k7q0BfGa">
|
||||||
<div class="container" v-for="(form, i) in forms">
|
<div class="container" v-for="(form, i) in forms">
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class Spiel {
|
|||||||
}
|
}
|
||||||
public calcPoints(){
|
public calcPoints(){
|
||||||
if(this.tipp==null) return 0;
|
if(this.tipp==null) return 0;
|
||||||
if(this.result==this.tipp) return 3;
|
if(this.result[0]==this.tipp[0] && this.result[1]==this.tipp[1]) return 3;
|
||||||
let differenztipp=this.tipp[0]-this.tipp[1];
|
let differenztipp=this.tipp[0]-this.tipp[1];
|
||||||
let differenz=this.result[0]-this.result[1];
|
let differenz=this.result[0]-this.result[1];
|
||||||
if(differenztipp==differenz) return 2;
|
if(differenztipp==differenz) return 2;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const routes = [
|
|||||||
{ path: '/umgebung', component: () => import('../views/Main.vue') },
|
{ path: '/umgebung', component: () => import('../views/Main.vue') },
|
||||||
{ path: '/footer', component: () => import("../views/Main.vue")},
|
{ path: '/footer', component: () => import("../views/Main.vue")},
|
||||||
{ path: '/willkommen', component: () => import("../views/Main.vue")},
|
{ path: '/willkommen', component: () => import("../views/Main.vue")},
|
||||||
|
{ path: '/anmeldeformular', component: () => import("../views/Main.vue")},
|
||||||
{ path: "/bulitipp", component: () => import("../views/Bulitipp.vue") },
|
{ path: "/bulitipp", component: () => import("../views/Bulitipp.vue") },
|
||||||
{ path: "/bulitipp/tippen", component: () => import("../views/Bulitipp.vue") },
|
{ path: "/bulitipp/tippen", component: () => import("../views/Bulitipp.vue") },
|
||||||
]
|
]
|
||||||
@@ -19,4 +20,4 @@ export default createRouter({
|
|||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes,
|
routes,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ export default {
|
|||||||
|
|
||||||
<!-- Paarungsergebnisse -->
|
<!-- Paarungsergebnisse -->
|
||||||
|
|
||||||
<Paarungsergebnisse :ergebnisse="ergebnisse" :maxspieltag="maxspieltag" />
|
<Paarungsergebnisse :ergebnisse="ergebnisse" :maxspieltag="maxspieltag" :users="users" :tipps="tipps" />
|
||||||
|
|
||||||
<!-- Punktetabelle -->
|
<!-- Punktetabelle -->
|
||||||
<Tabelle :users="users" :ts="ts" />
|
<Tabelle :users="users" :ts="ts" />
|
||||||
|
|||||||
@@ -14,7 +14,6 @@ import Willkommen from "../components/startseite/Willkommen.vue";
|
|||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
Navbar,
|
Navbar,
|
||||||
Modal,
|
|
||||||
Embla,
|
Embla,
|
||||||
Umgebung,
|
Umgebung,
|
||||||
MyFooter, // Geändert von Footer auf MyFooter
|
MyFooter, // Geändert von Footer auf MyFooter
|
||||||
@@ -31,8 +30,8 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
if(this.$route.path !== "/"){
|
if(this.$route.path !== "/" && this.$route.path!=="/anmeldeformular"){
|
||||||
let hash = this.$route.path.replace("/","");
|
const hash = this.$route.path.replace("/","");
|
||||||
console.log(this.$refs[hash])
|
console.log(this.$refs[hash])
|
||||||
if(this.$refs[hash].$el) this.$refs[hash].$el.scrollIntoView();
|
if(this.$refs[hash].$el) this.$refs[hash].$el.scrollIntoView();
|
||||||
this.$router.push("/");
|
this.$router.push("/");
|
||||||
|
|||||||
Reference in New Issue
Block a user