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>
|
||||
import { ref, watch, defineProps, defineEmits } from "vue"
|
||||
import { ref, computed, watch, onMounted, defineProps, defineEmits } from "vue"
|
||||
|
||||
const props = defineProps({
|
||||
showResetButton: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
},
|
||||
showCategories: {
|
||||
type: Boolean,
|
||||
required: true,
|
||||
isStatic: { type: Boolean, default: false },
|
||||
defaultValues: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ value: 4, clicked: false },
|
||||
{ value: 4, clicked: false },
|
||||
{ value: 4, clicked: false },
|
||||
{ value: 4, clicked: false },
|
||||
{ value: 4, clicked: false },
|
||||
],
|
||||
},
|
||||
hideText: { type: Boolean, default: false },
|
||||
})
|
||||
|
||||
/*
|
||||
const emit = defineEmits(['buttonClicked'])
|
||||
const emit = defineEmits(["update:values", "filter-by-row"])
|
||||
|
||||
const emitButtonClick = () => {
|
||||
emit('buttonClicked', 1)
|
||||
defineExpose({ resetSliders })
|
||||
|
||||
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)
|
||||
const stimmung = ref(4)
|
||||
const spannung = ref(4)
|
||||
const gewalt = ref(4)
|
||||
const erotik = ref(4)
|
||||
function handleClick(index) {
|
||||
sliders.value[index].clicked = true
|
||||
emit("filter-by-row", { rowIndex: index, value: sliders.value[index].value })
|
||||
}
|
||||
|
||||
const ColorRow1 = ref('#a8a6a6')
|
||||
const ColorRow2 = ref('#a8a6a6')
|
||||
const ColorRow3 = ref('#a8a6a6')
|
||||
const ColorRow4 = ref('#a8a6a6')
|
||||
const ColorRow5 = ref('#a8a6a6')
|
||||
function updateLine() {
|
||||
// Optional: Linien-Update
|
||||
}
|
||||
|
||||
const isRow1Active = ref(false)
|
||||
const isRow2Active = ref(false)
|
||||
const isRow3Active = ref(false)
|
||||
const isRow4Active = ref(false)
|
||||
const isRow5Active = ref(false)
|
||||
onMounted(() => {
|
||||
// Initial
|
||||
})
|
||||
</script>
|
||||
|
||||
const isResetButtonPressed = ref(false)
|
||||
const firstClick = ref(false)
|
||||
<style scoped>
|
||||
.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
|
||||
switch (RowValue) {
|
||||
case "schwierigkeit":
|
||||
console.log("Line: 1")
|
||||
ColorRow1.value = '#cccccc'
|
||||
isRow1Active.value = true
|
||||
break
|
||||
console.log("Line: 1")
|
||||
ColorRow1.value = '#cccccc'
|
||||
isRow1Active.value = true
|
||||
break
|
||||
case "stimmung":
|
||||
console.log("Line: 2")
|
||||
ColorRow2.value = '#cccccc'
|
||||
isRow2Active.value = true
|
||||
break
|
||||
console.log("Line: 2")
|
||||
ColorRow2.value = '#cccccc'
|
||||
isRow2Active.value = true
|
||||
break
|
||||
case "spannung":
|
||||
console.log("Line: 3")
|
||||
ColorRow3.value = '#cccccc'
|
||||
isRow3Active.value = true
|
||||
break
|
||||
console.log("Line: 3")
|
||||
ColorRow3.value = '#cccccc'
|
||||
isRow3Active.value = true
|
||||
break
|
||||
case "gewalt":
|
||||
console.log("Line: 4")
|
||||
ColorRow4.value = '#cccccc'
|
||||
isRow4Active.value = true
|
||||
break
|
||||
console.log("Line: 4")
|
||||
ColorRow4.value = '#cccccc'
|
||||
isRow4Active.value = true
|
||||
break
|
||||
case "erotik":
|
||||
console.log("Line: 5")
|
||||
ColorRow5.value = '#cccccc'
|
||||
isRow5Active.value = true
|
||||
break
|
||||
console.log("Line: 5")
|
||||
ColorRow5.value = '#cccccc'
|
||||
isRow5Active.value = true
|
||||
break
|
||||
}
|
||||
console.log("firstClick:", firstClick.value)
|
||||
|
||||
if (!firstClick.value) {
|
||||
rowFevercurveConnectors()
|
||||
rowFevercurveConnectors()
|
||||
}
|
||||
firstClick.value = true
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function resetFevercurve() {
|
||||
function resetFevercurve() {
|
||||
if (!isResetButtonPressed.value) {
|
||||
return
|
||||
return
|
||||
}
|
||||
console.log("reset Fevercurve")
|
||||
|
||||
@ -107,17 +392,17 @@ function resetFevercurve() {
|
||||
erotik.value = 4
|
||||
|
||||
clearFevercurveConnectors()
|
||||
}
|
||||
}
|
||||
|
||||
function clearFevercurveConnectors() {
|
||||
function clearFevercurveConnectors() {
|
||||
console.log("Striche werden gecleart")
|
||||
|
||||
let c = document.getElementById("myCanvas")
|
||||
let ctx = c.getContext("2d")
|
||||
ctx.clearRect(0, 0, c.width, c.height)
|
||||
}
|
||||
}
|
||||
|
||||
function rowFevercurveConnectors() {
|
||||
function rowFevercurveConnectors() {
|
||||
console.log("Funktion wird aufgerufen")
|
||||
|
||||
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.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 class="grid-container">
|
||||
<div
|
||||
v-if="props.showCategories"
|
||||
class="item1"
|
||||
>
|
||||
anspruchsvoll <br>
|
||||
lustig <br>
|
||||
spannend <br>
|
||||
brutal <br>
|
||||
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 class="grid-container">
|
||||
<div
|
||||
v-if="props.showCategories"
|
||||
class="item1"
|
||||
>
|
||||
anspruchsvoll <br>
|
||||
lustig <br>
|
||||
spannend <br>
|
||||
brutal <br>
|
||||
sittsam
|
||||
</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">
|
||||
//Grid Layout
|
||||
.item1 {
|
||||
<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>
|
||||
</template>
|
||||
|
||||
<style scoped lang="scss">
|
||||
//Grid Layout
|
||||
.item1 {
|
||||
grid-area: txtLinks;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item2 {
|
||||
.item2 {
|
||||
grid-area: Fieberkurve;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
.item3 {
|
||||
.item3 {
|
||||
grid-area: txtRechts;
|
||||
background: transparent !important;
|
||||
}
|
||||
}
|
||||
|
||||
.grid-container {
|
||||
.grid-container {
|
||||
display: grid;
|
||||
grid-template-areas: 'txtLinks Fieberkurve txtRechts';
|
||||
gap: 10px;
|
||||
justify-content: center;
|
||||
line-height: 26px;
|
||||
}
|
||||
}
|
||||
|
||||
.grid-container > div {
|
||||
.grid-container > div {
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
//Grid Layout END
|
||||
//Grid Layout END
|
||||
|
||||
|
||||
canvas {
|
||||
canvas {
|
||||
z-index: 2;
|
||||
//border:1px solid #000000;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
||||
.FieberkurveGesamt {
|
||||
.FieberkurveGesamt {
|
||||
height: 130px;
|
||||
width: 240px;
|
||||
position: relative;
|
||||
@ -392,9 +677,9 @@ canvas {
|
||||
flex-wrap: wrap;
|
||||
align-content: space-between;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.Fieberkurve {
|
||||
.Fieberkurve {
|
||||
position: relative;
|
||||
width: 240px;
|
||||
display: flex;
|
||||
@ -402,20 +687,20 @@ canvas {
|
||||
//background: #27c21f;
|
||||
//padding: ;
|
||||
border-radius: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
.kreis {
|
||||
.kreis {
|
||||
z-index: 1;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border-radius: 100%;
|
||||
background: #CECCCCDB;
|
||||
box-shadow: 2px 12px 27px -13px rgba(0,0,0,0.48);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
.slider {
|
||||
.slider {
|
||||
z-index: 3;
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
@ -431,21 +716,21 @@ canvas {
|
||||
//border: 5px solid rgba(232, 64, 64, 0.83);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.slider-track {
|
||||
.slider-track {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
border-radius: 8px;
|
||||
//background: #bb2626;
|
||||
height: 10px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Kreis */
|
||||
/* for chrome/safari */
|
||||
.slider::-webkit-slider-thumb {
|
||||
/* Kreis */
|
||||
/* for chrome/safari */
|
||||
.slider::-webkit-slider-thumb {
|
||||
//z-index: 4;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
@ -455,15 +740,16 @@ canvas {
|
||||
cursor: pointer;
|
||||
//border: 5px solid red;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
/* for firefox */
|
||||
.slider::-moz-range-thumb {
|
||||
/* for firefox */
|
||||
.slider::-moz-range-thumb {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background: #000;
|
||||
cursor: pointer;
|
||||
//border: 5px solid lawngreen;
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
}
|
||||
</style>
|
||||
-->
|
||||
|
||||
@ -1,65 +1,38 @@
|
||||
<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>
|
||||
|
||||
<!-- Statische Fieberkurve -->
|
||||
<div>
|
||||
<hr>
|
||||
<br>
|
||||
<h2>Statische Fieberkurve</h2>
|
||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 5 }, { value: 2 }, { value: 7 }, { value: 3 }, { value: 5 }]" />
|
||||
<Fieberkurve :isStatic="true" :defaultValues="[{ value: 1 }, { value: 4 }, { value: 7 }, { value: 1 }, { value: 2 }]" />
|
||||
<p>1.
|
||||
< 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>
|
||||
</template>
|
||||
|
||||
<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)
|
||||
}
|
||||
import { ref } from "vue"
|
||||
import Fieberkurve from "@/components/Fieberkurve.vue"
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@ -105,47 +78,49 @@ div {
|
||||
|
||||
|
||||
|
||||
<!--<script setup>
|
||||
<!--
|
||||
<script setup>
|
||||
|
||||
import Fieberkurve from "@/components/Fieberkurve.vue";
|
||||
</script>
|
||||
import Fieberkurve from "@/components/Fieberkurve.vue";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<template>
|
||||
|
||||
<VCard
|
||||
title="Fieberkurven Vorschauseite"
|
||||
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
||||
title="Fieberkurven Vorschauseite"
|
||||
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<h4>Interaktive Fieberkurve:</h4>
|
||||
<!– Interaktive Fieberkurve –>
|
||||
<Fieberkurve :isStatic="false" />
|
||||
<br>
|
||||
<br>
|
||||
<Fieberkurve :isStatic="false" />
|
||||
<h4>Interaktive Fieberkurve:</h4>
|
||||
<!– Interaktive Fieberkurve –>
|
||||
<Fieberkurve :isStatic="false" />
|
||||
<br>
|
||||
<br>
|
||||
<Fieberkurve :isStatic="false" />
|
||||
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
<h4>Statische Fieberkurve mit vordefinierten Werten:</h4>
|
||||
<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>
|
||||
<!– 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>
|
||||
-->
|
||||
|
||||
@ -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>
|
||||
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";
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Fieberkurve :show-reset-button="true" :show-categories="true" />
|
||||
<hr>
|
||||
<br>
|
||||
<Fieberkurve :show-reset-button="false" :show-categories="true" />
|
||||
<br>
|
||||
<hr>
|
||||
<br>
|
||||
<Fieberkurve :show-reset-button="false" :show-categories="false" />
|
||||
<br>
|
||||
<hr>
|
||||
|
||||
<VCard
|
||||
title="Fieberkurven Vorschauseite"
|
||||
subtitle="Hier werden nur ein paar Varianten der Fieberkurve gezeigt!"
|
||||
>
|
||||
|
||||
|
||||
|
||||
|
||||
<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>
|
||||
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
</style>-->
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user