Neue Fieberkurve + Testseite für Variaten
This commit is contained in:
parent
4077a2806c
commit
01bb983492
@ -1,87 +1,372 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<div class="grid-container">
|
||||||
|
<!-- Linker Text -->
|
||||||
|
<div v-if="!hideText" class="item1">
|
||||||
|
<div class="text-pair">anspruchsvoll</div>
|
||||||
|
<div class="text-pair">lustig</div>
|
||||||
|
<div class="text-pair">spannend</div>
|
||||||
|
<div class="text-pair">brutal</div>
|
||||||
|
<div class="text-pair">sittsam</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Fieberkurve und Punkte -->
|
||||||
|
<div class="item2">
|
||||||
|
<div class="FieberkurveGesamt">
|
||||||
|
<div
|
||||||
|
v-for="(slider, index) in sliders"
|
||||||
|
:key="index"
|
||||||
|
class="Fieberkurve"
|
||||||
|
:class="{ active: slider.clicked }"
|
||||||
|
>
|
||||||
|
<div v-for="i in 7" :key="i" class="kreis" />
|
||||||
|
<input
|
||||||
|
v-model="slider.value"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider-bg"
|
||||||
|
:class="{ 'bg-clicked': slider.clicked }"
|
||||||
|
:disabled="isStatic"
|
||||||
|
/>
|
||||||
|
<input
|
||||||
|
v-model="slider.value"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
:class="{ clicked: slider.clicked }"
|
||||||
|
:disabled="isStatic"
|
||||||
|
@input="updateLine"
|
||||||
|
@click="handleClick(index)"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<svg class="line-svg">
|
||||||
|
<polyline
|
||||||
|
:points="linePoints"
|
||||||
|
:class="{ clicked: sliders.some(slider => slider.clicked) }"
|
||||||
|
fill="none"
|
||||||
|
stroke-width="3"
|
||||||
|
/>
|
||||||
|
</svg>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Rechter Text -->
|
||||||
|
<div v-if="!hideText" class="item3">
|
||||||
|
<div class="text-pair">leseleicht</div>
|
||||||
|
<div class="text-pair">traurig</div>
|
||||||
|
<div class="text-pair">entspannend</div>
|
||||||
|
<div class="text-pair">gewaltfrei</div>
|
||||||
|
<div class="text-pair">erotisch</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Reset Button -->
|
||||||
|
<div v-if="!isStatic" class="reset-container">
|
||||||
|
<button @click="resetSliders">Fieberkurve zurücksetzen</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, watch, defineProps, defineEmits } from "vue"
|
import { ref, computed, watch, onMounted, defineProps, defineEmits } from "vue"
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
showResetButton: {
|
isStatic: { type: Boolean, default: false },
|
||||||
type: Boolean,
|
defaultValues: {
|
||||||
required: true,
|
type: Array,
|
||||||
},
|
default: () => [
|
||||||
showCategories: {
|
{ value: 4, clicked: false },
|
||||||
type: Boolean,
|
{ value: 4, clicked: false },
|
||||||
required: true,
|
{ value: 4, clicked: false },
|
||||||
|
{ value: 4, clicked: false },
|
||||||
|
{ value: 4, clicked: false },
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
hideText: { type: Boolean, default: false },
|
||||||
})
|
})
|
||||||
|
|
||||||
/*
|
const emit = defineEmits(["update:values", "filter-by-row"])
|
||||||
const emit = defineEmits(['buttonClicked'])
|
|
||||||
|
|
||||||
const emitButtonClick = () => {
|
defineExpose({ resetSliders })
|
||||||
emit('buttonClicked', 1)
|
|
||||||
|
const sliders = ref([...props.defaultValues])
|
||||||
|
|
||||||
|
const linePoints = computed(() => {
|
||||||
|
const Breite = 240
|
||||||
|
const Hoehe = 130
|
||||||
|
const Kreis = 20
|
||||||
|
return sliders.value
|
||||||
|
.map((slider, index) => {
|
||||||
|
const x = (slider.value - 1) * ((Breite - Kreis) / 6) + Kreis / 2
|
||||||
|
const y = index * ((Hoehe - Kreis) / 4) + Kreis / 2
|
||||||
|
return `${x},${y}`
|
||||||
|
})
|
||||||
|
.join(" ")
|
||||||
|
})
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props.defaultValues,
|
||||||
|
newValues => {
|
||||||
|
sliders.value = newValues.map(val => ({ ...val }))
|
||||||
|
},
|
||||||
|
{ deep: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(
|
||||||
|
sliders,
|
||||||
|
() => {
|
||||||
|
emit("update:values", sliders.value.map(slider => slider.value))
|
||||||
|
},
|
||||||
|
{ deep: true },
|
||||||
|
)
|
||||||
|
|
||||||
|
function resetSliders() {
|
||||||
|
sliders.value.forEach(slider => {
|
||||||
|
slider.value = 4
|
||||||
|
slider.clicked = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
const schwierigkeit = ref(4)
|
function handleClick(index) {
|
||||||
const stimmung = ref(4)
|
sliders.value[index].clicked = true
|
||||||
const spannung = ref(4)
|
emit("filter-by-row", { rowIndex: index, value: sliders.value[index].value })
|
||||||
const gewalt = ref(4)
|
}
|
||||||
const erotik = ref(4)
|
|
||||||
|
|
||||||
const ColorRow1 = ref('#a8a6a6')
|
function updateLine() {
|
||||||
const ColorRow2 = ref('#a8a6a6')
|
// Optional: Linien-Update
|
||||||
const ColorRow3 = ref('#a8a6a6')
|
}
|
||||||
const ColorRow4 = ref('#a8a6a6')
|
|
||||||
const ColorRow5 = ref('#a8a6a6')
|
|
||||||
|
|
||||||
const isRow1Active = ref(false)
|
onMounted(() => {
|
||||||
const isRow2Active = ref(false)
|
// Initial
|
||||||
const isRow3Active = ref(false)
|
})
|
||||||
const isRow4Active = ref(false)
|
</script>
|
||||||
const isRow5Active = ref(false)
|
|
||||||
|
|
||||||
const isResetButtonPressed = ref(false)
|
<style scoped>
|
||||||
const firstClick = ref(false)
|
.grid-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-areas: "txtLinks Fieberkurve txtRechts";
|
||||||
|
gap: 10px;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
function FevercurveIsClicked(RowValue) {
|
.item1,
|
||||||
|
.item3 {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-pair {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
height: 26px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.FieberkurveGesamt {
|
||||||
|
height: 130px;
|
||||||
|
width: 240px;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Fieberkurve {
|
||||||
|
position: relative;
|
||||||
|
width: 240px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.Fieberkurve.active {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.kreis {
|
||||||
|
z-index: 2;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
border-radius: 100%;
|
||||||
|
background: #ceccccdb;
|
||||||
|
box-shadow: 2px 12px 27px -13px rgba(0, 0, 0, 0.48);
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider-bg {
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: calc(50% - 4px);
|
||||||
|
height: 8px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
outline: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: #d3d3d3;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider-bg.bg-clicked {
|
||||||
|
background: #e0e0e0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
z-index: 3;
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
top: calc(50% - 4px);
|
||||||
|
height: 8px;
|
||||||
|
-webkit-appearance: none;
|
||||||
|
outline: none;
|
||||||
|
border-radius: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider.clicked::-webkit-slider-thumb {
|
||||||
|
//background-color: rgb(var(--v-theme-error));
|
||||||
|
background-color: #f45246;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider::-webkit-slider-thumb {
|
||||||
|
-webkit-appearance: none;
|
||||||
|
appearance: none;
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
background: rgba(251, 194, 194, 0.86);
|
||||||
|
border-radius: 50%;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: background-color 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-svg {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
z-index: 2;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-svg polyline {
|
||||||
|
stroke: rgba(251, 194, 194, 0.86);
|
||||||
|
//background-image: linear-gradient(to bottom, #f9f9f9 0, #f5f5f5 100%);
|
||||||
|
transition: stroke 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-svg polyline.clicked {
|
||||||
|
//stroke: rgb(var(--v-theme-error));
|
||||||
|
stroke: #fa574d;
|
||||||
|
}
|
||||||
|
|
||||||
|
.reset-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: 10px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Alter Code Michi von Fieberkurve 19.01.2025 -->
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<script setup>
|
||||||
|
import { ref, watch, defineProps, defineEmits } from "vue"
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
showResetButton: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
showCategories: {
|
||||||
|
type: Boolean,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
/*
|
||||||
|
const emit = defineEmits(['buttonClicked'])
|
||||||
|
|
||||||
|
const emitButtonClick = () => {
|
||||||
|
emit('buttonClicked', 1)
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
const schwierigkeit = ref(4)
|
||||||
|
const stimmung = ref(4)
|
||||||
|
const spannung = ref(4)
|
||||||
|
const gewalt = ref(4)
|
||||||
|
const erotik = ref(4)
|
||||||
|
|
||||||
|
const ColorRow1 = ref('#a8a6a6')
|
||||||
|
const ColorRow2 = ref('#a8a6a6')
|
||||||
|
const ColorRow3 = ref('#a8a6a6')
|
||||||
|
const ColorRow4 = ref('#a8a6a6')
|
||||||
|
const ColorRow5 = ref('#a8a6a6')
|
||||||
|
|
||||||
|
const isRow1Active = ref(false)
|
||||||
|
const isRow2Active = ref(false)
|
||||||
|
const isRow3Active = ref(false)
|
||||||
|
const isRow4Active = ref(false)
|
||||||
|
const isRow5Active = ref(false)
|
||||||
|
|
||||||
|
const isResetButtonPressed = ref(false)
|
||||||
|
const firstClick = ref(false)
|
||||||
|
|
||||||
|
function FevercurveIsClicked(RowValue) {
|
||||||
isResetButtonPressed.value = true
|
isResetButtonPressed.value = true
|
||||||
switch (RowValue) {
|
switch (RowValue) {
|
||||||
case "schwierigkeit":
|
case "schwierigkeit":
|
||||||
console.log("Line: 1")
|
console.log("Line: 1")
|
||||||
ColorRow1.value = '#cccccc'
|
ColorRow1.value = '#cccccc'
|
||||||
isRow1Active.value = true
|
isRow1Active.value = true
|
||||||
break
|
break
|
||||||
case "stimmung":
|
case "stimmung":
|
||||||
console.log("Line: 2")
|
console.log("Line: 2")
|
||||||
ColorRow2.value = '#cccccc'
|
ColorRow2.value = '#cccccc'
|
||||||
isRow2Active.value = true
|
isRow2Active.value = true
|
||||||
break
|
break
|
||||||
case "spannung":
|
case "spannung":
|
||||||
console.log("Line: 3")
|
console.log("Line: 3")
|
||||||
ColorRow3.value = '#cccccc'
|
ColorRow3.value = '#cccccc'
|
||||||
isRow3Active.value = true
|
isRow3Active.value = true
|
||||||
break
|
break
|
||||||
case "gewalt":
|
case "gewalt":
|
||||||
console.log("Line: 4")
|
console.log("Line: 4")
|
||||||
ColorRow4.value = '#cccccc'
|
ColorRow4.value = '#cccccc'
|
||||||
isRow4Active.value = true
|
isRow4Active.value = true
|
||||||
break
|
break
|
||||||
case "erotik":
|
case "erotik":
|
||||||
console.log("Line: 5")
|
console.log("Line: 5")
|
||||||
ColorRow5.value = '#cccccc'
|
ColorRow5.value = '#cccccc'
|
||||||
isRow5Active.value = true
|
isRow5Active.value = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
console.log("firstClick:", firstClick.value)
|
console.log("firstClick:", firstClick.value)
|
||||||
|
|
||||||
if (!firstClick.value) {
|
if (!firstClick.value) {
|
||||||
rowFevercurveConnectors()
|
rowFevercurveConnectors()
|
||||||
}
|
}
|
||||||
firstClick.value = true
|
firstClick.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function resetFevercurve() {
|
function resetFevercurve() {
|
||||||
if (!isResetButtonPressed.value) {
|
if (!isResetButtonPressed.value) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
console.log("reset Fevercurve")
|
console.log("reset Fevercurve")
|
||||||
|
|
||||||
@ -107,17 +392,17 @@ function resetFevercurve() {
|
|||||||
erotik.value = 4
|
erotik.value = 4
|
||||||
|
|
||||||
clearFevercurveConnectors()
|
clearFevercurveConnectors()
|
||||||
}
|
}
|
||||||
|
|
||||||
function clearFevercurveConnectors() {
|
function clearFevercurveConnectors() {
|
||||||
console.log("Striche werden gecleart")
|
console.log("Striche werden gecleart")
|
||||||
|
|
||||||
let c = document.getElementById("myCanvas")
|
let c = document.getElementById("myCanvas")
|
||||||
let ctx = c.getContext("2d")
|
let ctx = c.getContext("2d")
|
||||||
ctx.clearRect(0, 0, c.width, c.height)
|
ctx.clearRect(0, 0, c.width, c.height)
|
||||||
}
|
}
|
||||||
|
|
||||||
function rowFevercurveConnectors() {
|
function rowFevercurveConnectors() {
|
||||||
console.log("Funktion wird aufgerufen")
|
console.log("Funktion wird aufgerufen")
|
||||||
|
|
||||||
let c = document.getElementById("myCanvas")
|
let c = document.getElementById("myCanvas")
|
||||||
@ -146,245 +431,245 @@ function rowFevercurveConnectors() {
|
|||||||
ctx.lineTo(((erotik.value - 1) * ((Breite - Kreis) / 6) + (Kreis / 2)), ((5 - 1) * ((Hoehe - Kreis) / 4) + (Kreis / 2)))
|
ctx.lineTo(((erotik.value - 1) * ((Breite - Kreis) / 6) + (Kreis / 2)), ((5 - 1) * ((Hoehe - Kreis) / 4) + (Kreis / 2)))
|
||||||
|
|
||||||
ctx.stroke()
|
ctx.stroke()
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
watch([schwierigkeit, stimmung, spannung, gewalt, erotik], () => {
|
|
||||||
if (isResetButtonPressed.value){
|
|
||||||
rowFevercurveConnectors()
|
|
||||||
}
|
}
|
||||||
})
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<template>
|
|
||||||
|
|
||||||
|
|
||||||
|
watch([schwierigkeit, stimmung, spannung, gewalt, erotik], () => {
|
||||||
|
if (isResetButtonPressed.value){
|
||||||
|
rowFevercurveConnectors()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="grid-container">
|
<div class="grid-container">
|
||||||
<div
|
<div
|
||||||
v-if="props.showCategories"
|
v-if="props.showCategories"
|
||||||
class="item1"
|
class="item1"
|
||||||
>
|
>
|
||||||
anspruchsvoll <br>
|
anspruchsvoll <br>
|
||||||
lustig <br>
|
lustig <br>
|
||||||
spannend <br>
|
spannend <br>
|
||||||
brutal <br>
|
brutal <br>
|
||||||
sittsam
|
sittsam
|
||||||
</div>
|
|
||||||
<div class="item2">
|
|
||||||
<!-- Slider -->
|
|
||||||
<div style="position: relative; height: 120px">
|
|
||||||
<!-- Fieberkurve -->
|
|
||||||
<canvas
|
|
||||||
id="myCanvas"
|
|
||||||
width="240"
|
|
||||||
height="130"
|
|
||||||
>
|
|
||||||
Your browser does not support the HTML canvas tag.
|
|
||||||
</canvas>
|
|
||||||
|
|
||||||
<div class="FieberkurveGesamt">
|
|
||||||
<div
|
|
||||||
class="Fieberkurve"
|
|
||||||
@click="FevercurveIsClicked('schwierigkeit')"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="myRange"
|
|
||||||
v-model="schwierigkeit"
|
|
||||||
type="range"
|
|
||||||
min="1"
|
|
||||||
max="7"
|
|
||||||
class="slider"
|
|
||||||
:style="{ color: '#000000' }"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="slider-track"
|
|
||||||
:style="{ backgroundColor: ColorRow1 }"
|
|
||||||
/>
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
</div>
|
|
||||||
<!-- :style="{ backgroundColor: vuetifyTheme.current.value.colors.primary }" -->
|
|
||||||
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="Fieberkurve"
|
|
||||||
@click="FevercurveIsClicked('stimmung')"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="myRange"
|
|
||||||
v-model="stimmung"
|
|
||||||
type="range"
|
|
||||||
min="1"
|
|
||||||
max="7"
|
|
||||||
class="slider"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="slider-track"
|
|
||||||
:style="{ backgroundColor: ColorRow2 }"
|
|
||||||
/>
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="Fieberkurve"
|
|
||||||
@click="FevercurveIsClicked('spannung')"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="myRange"
|
|
||||||
v-model="spannung"
|
|
||||||
type="range"
|
|
||||||
min="1"
|
|
||||||
max="7"
|
|
||||||
class="slider"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="slider-track"
|
|
||||||
:style="{ backgroundColor: ColorRow3 }"
|
|
||||||
/>
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="Fieberkurve"
|
|
||||||
@click="FevercurveIsClicked('gewalt')"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="myRange"
|
|
||||||
v-model="gewalt"
|
|
||||||
type="range"
|
|
||||||
min="1"
|
|
||||||
max="7"
|
|
||||||
class="slider"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="slider-track"
|
|
||||||
:style="{ backgroundColor: ColorRow4 }"
|
|
||||||
/>
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="Fieberkurve"
|
|
||||||
@click="FevercurveIsClicked('erotik')"
|
|
||||||
>
|
|
||||||
<input
|
|
||||||
id="myRange5"
|
|
||||||
v-model="erotik"
|
|
||||||
type="range"
|
|
||||||
min="1"
|
|
||||||
max="7"
|
|
||||||
class="slider"
|
|
||||||
:class="{ backgroundColor: '#e70707' }"
|
|
||||||
>
|
|
||||||
<div
|
|
||||||
class="slider-track"
|
|
||||||
:style="{ backgroundColor: ColorRow5 }"
|
|
||||||
/>
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
<div class="kreis" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
v-if="props.showCategories"
|
|
||||||
class="item3"
|
|
||||||
>
|
|
||||||
leseleicht<br>
|
|
||||||
traurig<br>
|
|
||||||
entspannend<br>
|
|
||||||
gewaltfrei<br>
|
|
||||||
erotisch
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- ENDE FIEBERKURVE -->
|
|
||||||
<!-- Button Fieberkurve zurücksetzen -->
|
|
||||||
<div
|
|
||||||
v-if="props.showResetButton"
|
|
||||||
style="
|
|
||||||
width: 100%;
|
|
||||||
margin: 5px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;"
|
|
||||||
>
|
|
||||||
<VBtn
|
|
||||||
size="small"
|
|
||||||
@click="resetFevercurve"
|
|
||||||
>
|
|
||||||
Fieberkurve zurücksetzen
|
|
||||||
</VBtn>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
<div class="item2">
|
||||||
|
<!– Slider –>
|
||||||
|
<div style="position: relative; height: 120px">
|
||||||
|
<!– Fieberkurve –>
|
||||||
|
<canvas
|
||||||
|
id="myCanvas"
|
||||||
|
width="240"
|
||||||
|
height="130"
|
||||||
|
>
|
||||||
|
Your browser does not support the HTML canvas tag.
|
||||||
|
</canvas>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<div class="FieberkurveGesamt">
|
||||||
//Grid Layout
|
<div
|
||||||
.item1 {
|
class="Fieberkurve"
|
||||||
|
@click="FevercurveIsClicked('schwierigkeit')"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="myRange"
|
||||||
|
v-model="schwierigkeit"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
:style="{ color: '#000000' }"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="slider-track"
|
||||||
|
:style="{ backgroundColor: ColorRow1 }"
|
||||||
|
/>
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
</div>
|
||||||
|
<!– :style="{ backgroundColor: vuetifyTheme.current.value.colors.primary }" –>
|
||||||
|
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="Fieberkurve"
|
||||||
|
@click="FevercurveIsClicked('stimmung')"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="myRange"
|
||||||
|
v-model="stimmung"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="slider-track"
|
||||||
|
:style="{ backgroundColor: ColorRow2 }"
|
||||||
|
/>
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="Fieberkurve"
|
||||||
|
@click="FevercurveIsClicked('spannung')"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="myRange"
|
||||||
|
v-model="spannung"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="slider-track"
|
||||||
|
:style="{ backgroundColor: ColorRow3 }"
|
||||||
|
/>
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="Fieberkurve"
|
||||||
|
@click="FevercurveIsClicked('gewalt')"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="myRange"
|
||||||
|
v-model="gewalt"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="slider-track"
|
||||||
|
:style="{ backgroundColor: ColorRow4 }"
|
||||||
|
/>
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
class="Fieberkurve"
|
||||||
|
@click="FevercurveIsClicked('erotik')"
|
||||||
|
>
|
||||||
|
<input
|
||||||
|
id="myRange5"
|
||||||
|
v-model="erotik"
|
||||||
|
type="range"
|
||||||
|
min="1"
|
||||||
|
max="7"
|
||||||
|
class="slider"
|
||||||
|
:class="{ backgroundColor: '#e70707' }"
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
class="slider-track"
|
||||||
|
:style="{ backgroundColor: ColorRow5 }"
|
||||||
|
/>
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
<div class="kreis" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
v-if="props.showCategories"
|
||||||
|
class="item3"
|
||||||
|
>
|
||||||
|
leseleicht<br>
|
||||||
|
traurig<br>
|
||||||
|
entspannend<br>
|
||||||
|
gewaltfrei<br>
|
||||||
|
erotisch
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!– ENDE FIEBERKURVE –>
|
||||||
|
<!– Button Fieberkurve zurücksetzen –>
|
||||||
|
<div
|
||||||
|
v-if="props.showResetButton"
|
||||||
|
style="
|
||||||
|
width: 100%;
|
||||||
|
margin: 5px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;"
|
||||||
|
>
|
||||||
|
<VBtn
|
||||||
|
size="small"
|
||||||
|
@click="resetFevercurve"
|
||||||
|
>
|
||||||
|
Fieberkurve zurücksetzen
|
||||||
|
</VBtn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
//Grid Layout
|
||||||
|
.item1 {
|
||||||
grid-area: txtLinks;
|
grid-area: txtLinks;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item2 {
|
.item2 {
|
||||||
grid-area: Fieberkurve;
|
grid-area: Fieberkurve;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item3 {
|
.item3 {
|
||||||
grid-area: txtRechts;
|
grid-area: txtRechts;
|
||||||
background: transparent !important;
|
background: transparent !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-container {
|
.grid-container {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-areas: 'txtLinks Fieberkurve txtRechts';
|
grid-template-areas: 'txtLinks Fieberkurve txtRechts';
|
||||||
gap: 10px;
|
gap: 10px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
line-height: 26px;
|
line-height: 26px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-container > div {
|
.grid-container > div {
|
||||||
background-color: rgba(255, 255, 255, 0.8);
|
background-color: rgba(255, 255, 255, 0.8);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Grid Layout END
|
//Grid Layout END
|
||||||
|
|
||||||
|
|
||||||
canvas {
|
canvas {
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
//border:1px solid #000000;
|
//border:1px solid #000000;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
}
|
}
|
||||||
|
|
||||||
.FieberkurveGesamt {
|
.FieberkurveGesamt {
|
||||||
height: 130px;
|
height: 130px;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
position: relative;
|
position: relative;
|
||||||
@ -392,9 +677,9 @@ canvas {
|
|||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
align-content: space-between;
|
align-content: space-between;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.Fieberkurve {
|
.Fieberkurve {
|
||||||
position: relative;
|
position: relative;
|
||||||
width: 240px;
|
width: 240px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -402,20 +687,20 @@ canvas {
|
|||||||
//background: #27c21f;
|
//background: #27c21f;
|
||||||
//padding: ;
|
//padding: ;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kreis {
|
.kreis {
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
background: #CECCCCDB;
|
background: #CECCCCDB;
|
||||||
box-shadow: 2px 12px 27px -13px rgba(0,0,0,0.48);
|
box-shadow: 2px 12px 27px -13px rgba(0,0,0,0.48);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.slider {
|
.slider {
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -431,21 +716,21 @@ canvas {
|
|||||||
//border: 5px solid rgba(232, 64, 64, 0.83);
|
//border: 5px solid rgba(232, 64, 64, 0.83);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider-track {
|
.slider-track {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
//background: #bb2626;
|
//background: #bb2626;
|
||||||
height: 10px;
|
height: 10px;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Kreis */
|
/* Kreis */
|
||||||
/* for chrome/safari */
|
/* for chrome/safari */
|
||||||
.slider::-webkit-slider-thumb {
|
.slider::-webkit-slider-thumb {
|
||||||
//z-index: 4;
|
//z-index: 4;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
appearance: none;
|
appearance: none;
|
||||||
@ -455,15 +740,16 @@ canvas {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
//border: 5px solid red;
|
//border: 5px solid red;
|
||||||
border-radius: 100%;
|
border-radius: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* for firefox */
|
/* for firefox */
|
||||||
.slider::-moz-range-thumb {
|
.slider::-moz-range-thumb {
|
||||||
width: 20px;
|
width: 20px;
|
||||||
height: 20px;
|
height: 20px;
|
||||||
background: #000;
|
background: #000;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
//border: 5px solid lawngreen;
|
//border: 5px solid lawngreen;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
-->
|
||||||
|
|||||||
@ -1,65 +1,38 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<h1>Fieberkurve Beispielseite</h1>
|
|
||||||
|
|
||||||
<!-- Interaktive Fieberkurve -->
|
|
||||||
<div>
|
|
||||||
<h2>Interaktive Fieberkurve</h2>
|
|
||||||
<Fieberkurve :isStatic="false" @update:values="updateValues" />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<br>
|
|
||||||
<!-- Button zum Laden der Daten -->
|
|
||||||
<div class="button-container">
|
|
||||||
<button @click="loadValues">Daten laden</button>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Statische Fieberkurve -->
|
|
||||||
<div>
|
|
||||||
<h2>Dynamische Fieberkurve</h2>
|
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="staticValues" />
|
|
||||||
{{ staticValues }}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Statische Fieberkurve -->
|
<!-- Statische Fieberkurve -->
|
||||||
<div>
|
<div>
|
||||||
<hr>
|
<hr>
|
||||||
<br>
|
<br>
|
||||||
<h2>Statische Fieberkurve</h2>
|
<h2>Statische Fieberkurve</h2>
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 3 }, { value: 5 }]" />
|
<p>1.
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 1 }, { value: 4 }, { value: 7 }, { value: 1 }, { value: 2 }]" />
|
< Fieberkurve
|
||||||
|
:isStatic="true"
|
||||||
|
:defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 3 }, { value: 5 }]" />
|
||||||
|
</p>
|
||||||
|
<p>2.
|
||||||
|
< Fieberkurve :isStatic="true"
|
||||||
|
:hideText="true"
|
||||||
|
:defaultValues="[{ value: 1 }, { value: 4 }, { value: 7 }, { value: 1 }, { value: 2 }]" />
|
||||||
|
</p>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<Fieberkurve
|
||||||
|
:is-static="true"
|
||||||
|
:default-values="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 3 }, { value: 5 }]"
|
||||||
|
/>
|
||||||
|
<Fieberkurve
|
||||||
|
:is-static="true"
|
||||||
|
:hide-text="true"
|
||||||
|
:default-values="[{ value: 1 }, { value: 4 }, { value: 7 }, { value: 1 }, { value: 2 }]"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from "vue";
|
import { ref } from "vue"
|
||||||
import Fieberkurve from "@/components/Fieberkurve.vue";
|
import Fieberkurve from "@/components/Fieberkurve.vue"
|
||||||
|
|
||||||
// Werte der interaktiven Fieberkurve
|
|
||||||
const staticValues = ref([
|
|
||||||
{ value: 4 },
|
|
||||||
{ value: 4 },
|
|
||||||
{ value: 4 },
|
|
||||||
{ value: 4 },
|
|
||||||
{ value: 4 }
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Temporäre Werte für interaktive Fieberkurve
|
|
||||||
const temporaryValues = ref([]);
|
|
||||||
|
|
||||||
// Funktion zum Aktualisieren der temporären Werte
|
|
||||||
function updateValues(values) {
|
|
||||||
temporaryValues.value = values.map(value => ({ value }));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Funktion zum Laden der temporären Werte in die statische Fieberkurve
|
|
||||||
function loadValues() {
|
|
||||||
if (temporaryValues.value != 0){
|
|
||||||
staticValues.value = [...temporaryValues.value]; // Neuzuweisung des Arrays
|
|
||||||
}
|
|
||||||
// console.log(staticValues.value, temporaryValues.value)
|
|
||||||
}
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@ -105,47 +78,49 @@ div {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!--<script setup>
|
<!--
|
||||||
|
<script setup>
|
||||||
|
|
||||||
import Fieberkurve from "@/components/Fieberkurve.vue";
|
import Fieberkurve from "@/components/Fieberkurve.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
|
||||||
<VCard
|
<VCard
|
||||||
title="Fieberkurven Vorschauseite"
|
title="Fieberkurven Vorschauseite"
|
||||||
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<h4>Interaktive Fieberkurve:</h4>
|
<h4>Interaktive Fieberkurve:</h4>
|
||||||
<!– Interaktive Fieberkurve –>
|
<!– Interaktive Fieberkurve –>
|
||||||
<Fieberkurve :isStatic="false" />
|
<Fieberkurve :isStatic="false" />
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<Fieberkurve :isStatic="false" />
|
<Fieberkurve :isStatic="false" />
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
<hr>
|
<hr>
|
||||||
<br>
|
<br>
|
||||||
<h4>Statische Fieberkurve mit vordefinierten Werten:</h4>
|
<h4>Statische Fieberkurve mit vordefinierten Werten:</h4>
|
||||||
|
|
||||||
<!– Statische Fieberkurve mit vordefinierten Werten –>
|
<!– Statische Fieberkurve mit vordefinierten Werten –>
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 4 }, { value: 1 }]" />
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 4 }, { value: 1 }]" />
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 1 }, { value: 2 }, { value: 2 }, { value: 3 }, { value: 1 }]" />
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 1 }, { value: 2 }, { value: 2 }, { value: 3 }, { value: 1 }]" />
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 3 }, { value: 4 }, { value: 7 }]" />
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 3 }, { value: 4 }, { value: 7 }]" />
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
</VCard>
|
</VCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
</style>-->
|
</style>
|
||||||
|
-->
|
||||||
|
|||||||
@ -1,21 +1,142 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<h1>Fieberkurve Beispielseite</h1>
|
||||||
|
|
||||||
|
<!-- Interaktive Fieberkurve -->
|
||||||
|
<div>
|
||||||
|
<h2>Interaktive Fieberkurve</h2>
|
||||||
|
<Fieberkurve :isStatic="false" @update:values="updateValues" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<!-- Button zum Laden der Daten -->
|
||||||
|
<div class="button-container">
|
||||||
|
<button @click="loadValues">Daten laden</button>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Statische Fieberkurve -->
|
||||||
|
<div>
|
||||||
|
<h2>Dynamische Fieberkurve</h2>
|
||||||
|
<Fieberkurve :isStatic="true" :defaultValues="staticValues" />
|
||||||
|
{{ staticValues }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
import { ref } from "vue";
|
||||||
|
import Fieberkurve from "@/components/Fieberkurve.vue";
|
||||||
|
|
||||||
|
// Werte der interaktiven Fieberkurve
|
||||||
|
const staticValues = ref([
|
||||||
|
{ value: 4 },
|
||||||
|
{ value: 4 },
|
||||||
|
{ value: 4 },
|
||||||
|
{ value: 4 },
|
||||||
|
{ value: 4 }
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Temporäre Werte für interaktive Fieberkurve
|
||||||
|
const temporaryValues = ref([]);
|
||||||
|
|
||||||
|
// Funktion zum Aktualisieren der temporären Werte
|
||||||
|
function updateValues(values) {
|
||||||
|
temporaryValues.value = values.map(value => ({ value }));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Funktion zum Laden der temporären Werte in die statische Fieberkurve
|
||||||
|
function loadValues() {
|
||||||
|
if (temporaryValues.value != 0){
|
||||||
|
staticValues.value = [...temporaryValues.value]; // Neuzuweisung des Arrays
|
||||||
|
}
|
||||||
|
// console.log(staticValues.value, temporaryValues.value)
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
h1 {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin: 20px 0;
|
||||||
|
text-align: left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container {
|
||||||
|
text-align: center;
|
||||||
|
margin: 20px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background-color: #007bff;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
padding: 10px 20px;
|
||||||
|
border-radius: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
font-size: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
background-color: #0056b3;
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!--<script setup>
|
||||||
|
|
||||||
import Fieberkurve from "@/components/Fieberkurve.vue";
|
import Fieberkurve from "@/components/Fieberkurve.vue";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<Fieberkurve :show-reset-button="true" :show-categories="true" />
|
|
||||||
<hr>
|
<VCard
|
||||||
<br>
|
title="Fieberkurven Vorschauseite"
|
||||||
<Fieberkurve :show-reset-button="false" :show-categories="true" />
|
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
||||||
<br>
|
>
|
||||||
<hr>
|
|
||||||
<br>
|
|
||||||
<Fieberkurve :show-reset-button="false" :show-categories="false" />
|
|
||||||
<br>
|
|
||||||
<hr>
|
<h4>Interaktive Fieberkurve:</h4>
|
||||||
|
<!– Interaktive Fieberkurve –>
|
||||||
|
<Fieberkurve :isStatic="false" />
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<Fieberkurve :isStatic="false" />
|
||||||
|
|
||||||
|
<br>
|
||||||
|
<hr>
|
||||||
|
<br>
|
||||||
|
<h4>Statische Fieberkurve mit vordefinierten Werten:</h4>
|
||||||
|
|
||||||
|
<!– Statische Fieberkurve mit vordefinierten Werten –>
|
||||||
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 4 }, { value: 1 }]" />
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 1 }, { value: 2 }, { value: 2 }, { value: 3 }, { value: 1 }]" />
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 3 }, { value: 4 }, { value: 7 }]" />
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
|
</VCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
</style>
|
</style>-->
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user