mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-06 15:11:21 +00:00
nice looking popup with well aligned icon
This commit is contained in:
parent
eac2709e86
commit
fd2295119d
@ -64,7 +64,6 @@ export class IcsCalendar extends inheritHtmlElement("div") {
|
||||
const popup = document.createElement("div");
|
||||
const popupContainer = document.createElement("div");
|
||||
const popupFirstRow = document.createElement("div");
|
||||
const popupSecondRow = document.createElement("div");
|
||||
const popupTitleTimeIcon = document.createElement("i");
|
||||
const popupTitleTime = document.createElement("div");
|
||||
const popupTitle = document.createElement("h4");
|
||||
@ -73,24 +72,25 @@ export class IcsCalendar extends inheritHtmlElement("div") {
|
||||
popup.setAttribute("id", "event-details");
|
||||
popupContainer.setAttribute("class", "event-details-container");
|
||||
popupFirstRow.setAttribute("class", "event-details-row");
|
||||
popupSecondRow.setAttribute("class", "event-details-row");
|
||||
|
||||
popupTitleTimeIcon.setAttribute("class", "fa-solid fa-calendar-days fa-xl");
|
||||
popupTitleTimeIcon.setAttribute(
|
||||
"class",
|
||||
"fa-solid fa-calendar-days fa-xl event-detail-row-icon",
|
||||
);
|
||||
|
||||
popupTitle.setAttribute("class", "event-details-title");
|
||||
popupTitle.setAttribute("class", "event-details-row-content");
|
||||
popupTitle.textContent = event.event.title;
|
||||
|
||||
popupTime.setAttribute("class", "event-details-time");
|
||||
popupTime.setAttribute("class", "event-details-row-content");
|
||||
popupTime.textContent = `${this.formatDate(event.event.start)} - ${this.formatDate(event.event.end)}`;
|
||||
|
||||
popupTitleTime.appendChild(popupTitle);
|
||||
popupTitleTime.appendChild(popupTime);
|
||||
|
||||
popupFirstRow.appendChild(popupTitleTimeIcon);
|
||||
popupSecondRow.appendChild(popupTitleTime);
|
||||
popupFirstRow.appendChild(popupTitleTime);
|
||||
|
||||
popupContainer.appendChild(popupFirstRow);
|
||||
popupContainer.appendChild(popupSecondRow);
|
||||
|
||||
popup.appendChild(popupContainer);
|
||||
|
||||
|
@ -41,13 +41,22 @@ ics-calendar {
|
||||
box-shadow: var(--event-details-box-shadow);
|
||||
}
|
||||
|
||||
.event-detail-row-icon {
|
||||
margin-left: 10px;
|
||||
margin-right: 20px;
|
||||
align-content: center;
|
||||
align-self: center;
|
||||
}
|
||||
|
||||
.event-details-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: start;
|
||||
}
|
||||
|
||||
.event-details-title {
|
||||
.event-details-row-content {
|
||||
display: flex;
|
||||
align-items: start;
|
||||
flex-direction: row;
|
||||
background-color: var(--event-details-background-color);
|
||||
margin-top: 0px;
|
||||
margin-bottom: 4px;
|
||||
|
Loading…
Reference in New Issue
Block a user