325 lines
11 KiB
HTML
325 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="de">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Rezept-Seite mit Video/Bild Viewer</title>
|
|
<style>
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
margin: 0;
|
|
padding: 0;
|
|
background-color: #f4f4f4;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
}
|
|
|
|
.container {
|
|
width: 90%;
|
|
max-width: 900px;
|
|
padding: 20px;
|
|
background-color: white;
|
|
border-radius: 8px;
|
|
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
|
|
text-align: center;
|
|
}
|
|
|
|
img, video {
|
|
width: 100%;
|
|
height: auto;
|
|
border-radius: 8px;
|
|
display: block;
|
|
}
|
|
|
|
h1, h2 {
|
|
color: #333;
|
|
}
|
|
|
|
.cl-checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
.cl-checkbox input {
|
|
margin-right: 10px;
|
|
}
|
|
|
|
.card {
|
|
width: 100%;
|
|
max-width: 500px;
|
|
background: white;
|
|
padding: 20px;
|
|
box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.1);
|
|
border-radius: 8px;
|
|
text-align: left;
|
|
}
|
|
|
|
ul, ol {
|
|
padding-left: 20px;
|
|
}
|
|
|
|
.cl-checkbox input[type="checkbox"]:checked + span {
|
|
color: #999; /* leicht grau */
|
|
text-decoration: line-through;
|
|
transition: color 0.3s, text-decoration 0.3s; /* sanfter Übergang */
|
|
}
|
|
|
|
|
|
|
|
|
|
footer {
|
|
text-align: center;
|
|
padding: 10px;
|
|
background-color: #333;
|
|
color: white;
|
|
width: 100%;
|
|
position: relative;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
@media (max-width: 600px) {
|
|
.card {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.viewer-controls {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 20px;
|
|
margin-top: 10px;
|
|
}
|
|
|
|
.viewer-button {
|
|
padding: 0.5em 1em;
|
|
font-size: 1em;
|
|
border: none;
|
|
background-color: #212121;
|
|
color: white;
|
|
border-radius: 5px;
|
|
cursor: pointer;
|
|
transition: 0.3s;
|
|
}
|
|
|
|
.viewer-button:hover {
|
|
background-color: #333;
|
|
}
|
|
|
|
.button {
|
|
cursor: pointer;
|
|
padding: 1em;
|
|
font-size: 1em;
|
|
width: 7em;
|
|
aspect-ratio: 1/0.25;
|
|
color: white;
|
|
background: #212121;
|
|
background-size: cover;
|
|
background-blend-mode: overlay;
|
|
border-radius: 0.5em;
|
|
outline: 0.1em solid #353535;
|
|
border: 0;
|
|
box-shadow: 0 0 1em 1em rgba(0, 0, 0, 0.1);
|
|
transition: all 0.3s ease-in-out;
|
|
position: relative;
|
|
}
|
|
|
|
.button:hover {
|
|
transform: scale(1.1);
|
|
box-shadow: 0 0 1em 0.45em rgba(0, 0, 0, 0.1);
|
|
background: linear-gradient(45deg, #212121, #252525);
|
|
background: radial-gradient(circle at bottom, rgba(50, 100, 180, 0.5) 10%, #212121 70%);
|
|
outline: 0;
|
|
}
|
|
|
|
.modal {
|
|
display: none;
|
|
position: fixed;
|
|
z-index: 1000;
|
|
left: 0;
|
|
top: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
}
|
|
|
|
.modal-content {
|
|
background-color: #fefefe;
|
|
margin: 15% auto;
|
|
padding: 20px;
|
|
border: 1px solid #888;
|
|
width: 80%;
|
|
max-width: 400px;
|
|
text-align: center;
|
|
border-radius: 10px;
|
|
}
|
|
|
|
.social-icons {
|
|
display: flex;
|
|
justify-content: center;
|
|
gap: 20px;
|
|
margin-top: 20px;
|
|
}
|
|
|
|
.social-icons a img {
|
|
width: 60px;
|
|
height: 60px;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.social-icons a img:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<br><br>
|
|
|
|
<!-- Medien-Viewer (Bild/Video Wechsel) -->
|
|
<div class="card">
|
|
<div id="viewer-container">
|
|
<img id="media-display" src="/fluffigkrossejoghurtbroteohnegehzeit/brot.jpeg" alt="Brotbacken">
|
|
</div>
|
|
|
|
<div class="viewer-controls">
|
|
<button class="viewer-button" id="prev-media">⬅</button>
|
|
<button class="viewer-button" id="next-media">➡</button>
|
|
</div>
|
|
</div>
|
|
|
|
<br>
|
|
|
|
<!-- Rezept-Karte -->
|
|
<div class="card">
|
|
<h2>Zutaten:</h2>
|
|
<ul>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>300 g Mehl</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>30 g Hefe</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>45 g Zucker</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>1 TL Vanillzucker</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>150 g Milch</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>45 g Butter</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>1 Prise Salz</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Schokocreme oder Marmelade</span></label></li>
|
|
</ul>
|
|
|
|
<h2>Zubereitung:</h2>
|
|
<ol>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Milch, Zucker, Vanillzucker, Hefe und Butter in dem Mixtopf geben und 4 Minuten/37°C/Stufe 3 erhitzen.</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Mehl und Salz dazugeben und 3 Minuten /Knetstufe zu einem geschmeidigen Teig verkneten.</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Teig in einer Schüssel abgedeckt 20 Minuten gehen lassen.</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Teig ausrollen, Quadrate ausschneiden mit Schokocreme oder Marmelade füllen und „flechten".</span></label></li>
|
|
<li><label class="cl-checkbox"><input type="checkbox"><span>Bei Ober-/Unterhitze 180° C mit Sichtkontakt ca. 18 Minuten auf der Stoneware backen und dem Kuchengitter abkühlen lassen.</span></label></li>
|
|
</ol>
|
|
</div>
|
|
|
|
<br><br>
|
|
|
|
<!-- Share-Button -->
|
|
<button class="button" onclick="openSharePopup()">
|
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" class="icon" fill="white">
|
|
<path d="M307 34.8c-11.5 5.1-19 16.6-19 29.2v64H176C78.8 128 0 206.8 0 304C0 417.3 81.5 467.9 100.2 478.1c2.5 1.4 5.3 1.9 8.1 1.9c10.9 0 19.7-8.9 19.7-19.7c0-7.5-4.3-14.4-9.8-19.5C108.8 431.9 96 414.4 96 384c0-53 43-96 96-96h96v64c0 12.6 7.4 24.1 19 29.2s25 3 34.4-5.4l160-144c6.7-6.1 10.6-14.7 10.6-23.8s-3.8-17.7-10.6-23.8l-160-144c-9.4-8.5-22.9-10.6-34.4-5.4z"></path>
|
|
</svg>
|
|
Share
|
|
</button>
|
|
|
|
<!-- Modal für Sharing-Optionen -->
|
|
<div id="shareModal" class="modal">
|
|
<div class="modal-content">
|
|
<h2>Teilen</h2>
|
|
<div class="social-icons">
|
|
<a href="#" onclick="shareViaWhatsApp()"><img src="/icons/whatsapp.svg" alt="WhatsApp" /></a>
|
|
<a href="#" onclick="shareViaPinterest()"><img src="/icons/pinterest.svg" /></a>
|
|
<a href="#" onclick="shareViaTelegram()"><img src="/icons/telegram.svg" alt="Telegram" /></a>
|
|
<a href="#" onclick="shareViaEmail()"><img src="/icons/email.svg" alt="E-Mail" /></a>
|
|
<a href="#" onclick="copyToClipboard()"><img src="/icons/copy.svg" /></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script>
|
|
// Medien-Wechsel
|
|
const mediaItems = [
|
|
{ type: 'image', src: '/hefe-teilchen/hefeteilchen.jpeg' },
|
|
{ type: 'video', src: '/hefe-teilchen/video.mov' }
|
|
];
|
|
|
|
let currentMediaIndex = 0;
|
|
const viewerContainer = document.getElementById('viewer-container');
|
|
|
|
function updateMedia() {
|
|
const item = mediaItems[currentMediaIndex];
|
|
viewerContainer.innerHTML = '';
|
|
if(item.type === 'image') {
|
|
const img = document.createElement('img');
|
|
img.src = item.src;
|
|
img.alt = 'Media';
|
|
viewerContainer.appendChild(img);
|
|
} else if(item.type === 'video') {
|
|
const video = document.createElement('video');
|
|
video.src = item.src;
|
|
video.controls = true;
|
|
video.autoplay = true;
|
|
video.style.width = '100%';
|
|
viewerContainer.appendChild(video);
|
|
}
|
|
}
|
|
|
|
document.getElementById('prev-media').addEventListener('click', ()=>{
|
|
currentMediaIndex = (currentMediaIndex - 1 + mediaItems.length) % mediaItems.length;
|
|
updateMedia();
|
|
});
|
|
|
|
document.getElementById('next-media').addEventListener('click', ()=>{
|
|
currentMediaIndex = (currentMediaIndex + 1) % mediaItems.length;
|
|
updateMedia();
|
|
});
|
|
|
|
updateMedia();
|
|
|
|
// Share-Funktionen
|
|
function openSharePopup() {
|
|
document.getElementById("shareModal").style.display = "block";
|
|
}
|
|
|
|
function closeSharePopup() {
|
|
document.getElementById("shareModal").style.display = "none";
|
|
}
|
|
|
|
function shareViaWhatsApp() {
|
|
const text = encodeURIComponent('Check out this fantastic recipe! https://test.somachtstefaniedas.de/fluffigkrossejoghurtbroteohnegehzeit/');
|
|
window.open('https://api.whatsapp.com/send?text=' + text, '_blank');
|
|
}
|
|
|
|
function shareViaTelegram() {
|
|
const text = encodeURIComponent('Check out this fantastic recipe! https://test.somachtstefaniedas.de/fluffigkrossejoghurtbroteohnegehzeit/');
|
|
window.open('https://t.me/share/url?url=' + text, '_blank');
|
|
}
|
|
|
|
function shareViaPinterest() {
|
|
const media = encodeURIComponent('URL_ZU_DEINEM_BILD');
|
|
const text = encodeURIComponent('Check out this fantastic recipe! https://test.somachtstefaniedas.de/fluffigkrossejoghurtbroteohnegehzeit/');
|
|
window.open('https://pinterest.com/pin/create/button/?url=' + text + '&media=' + media, '_blank');
|
|
}
|
|
|
|
function shareViaEmail() {
|
|
const subject = encodeURIComponent('Klick the Witch');
|
|
const body = encodeURIComponent('Check out this fantastic recipe! https://test.somachtstefaniedas.de/fluffigkrossejoghurtbroteohnegehzeit/');
|
|
window.location.href = 'mailto:?subject=' + subject + '&body=' + body;
|
|
}
|
|
|
|
function copyToClipboard() {
|
|
const text = 'Check out this fantastic recipe! https://test.somachtstefaniedas.de/fluffigkrossejoghurtbroteohnegehzeit/';
|
|
navigator.clipboard.writeText(text).then(()=>{alert('Text wurde in die Zwischenablage kopiert!');}, (err)=>{alert('Fehler beim Kopieren: ' + err);});
|
|
}
|
|
|
|
window.onclick = function(event) {
|
|
const modal = document.getElementById('shareModal');
|
|
if (event.target == modal) closeSharePopup();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|