du.html aktualisiert

This commit is contained in:
develcookingtest 2024-03-20 17:42:34 +00:00
parent 2c66275a0a
commit 97d2c6ec46
1 changed files with 169 additions and 141 deletions

28
du.html
View File

@ -9,6 +9,7 @@
border: 1px solid #ccc;
margin-bottom: 10px;
padding: 10px;
position: relative; /* Um Positionierung für den edit-button zu ermöglichen */
}
.weekday-btn-container {
display: flex;
@ -69,6 +70,21 @@
text-align: center;
}
.edit-button {
position: absolute;
bottom: 5px;
right: 5px;
background-color: #2196F3;
color: white;
border: none;
border-radius: 50%;
width: 30px;
height: 30px;
cursor: pointer;
display: flex;
justify-content: center;
align-items: center;
}
</style>
</head>
<body>
@ -116,6 +132,7 @@
checkbox.addEventListener('click', function(event) {
event.preventDefault();
});
const checkmark = document.createElement('span');
checkmark.classList.add('checkmark');
@ -130,6 +147,17 @@
});
jsonElement.appendChild(weekdayContainer);
const editButton = document.createElement('div'); // Jetzt innerhalb der Schleife erstellt
editButton.classList.add('edit-button');
editButton.innerHTML = '&#9998;';
// Add click event for edit button
editButton.addEventListener('click', function() {
console.log('Edit button clicked');
});
jsonElement.appendChild(editButton); // Hinzufügen des edit-buttons zum JSON-Element
jsonContainer.appendChild(jsonElement);
});
})