Skip to content

Commit

Permalink
Create announcements.js
Browse files Browse the repository at this point in the history
To do:
- Fill it with previous WK announcements
  • Loading branch information
wutadam authored Dec 7, 2024
1 parent c6c6dbf commit 596b20c
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions AltDesign/pages/announcements.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
pages.announcements = {
title: "What's New",
wireframe: `
<div class="updatePageTitle">What's New</div>
`,
code: async function () {
let announcements = [
{
title: "Test Announcement",
date: "December 7th, 2024",
content: `heheheha`
}
];

function createUpdate(data) {
let thisUpdate = createElement("update", "div", findI("main"));
thisUpdate.innerHTML = `<div class="updateTitle">${data.title}</div>
<div class="updateTime">${data.date}</div>
<div>${data.content}</div>`;
}
announcements.reverse();
for (let i in announcements) {
createUpdate(announcements[i]);
}
},
style: {
".updatePageTitle": `margin-block-start: 0.67em;
margin-block-end: 0.67em;
text-align: center;
font-size: 35px;
font-weight: bold;`,
".update": `background: var(--background);
box-shadow: 0 3px 10px -1px rgba(0,0,0,0.2);
margin: 10px;
padding: 10px;
border-radius: 10px;`,
".updateTitle": `font-size: 25px;
font-weight: bold;`,
".updateTime": `color: gray;`
}
};

0 comments on commit 596b20c

Please sign in to comment.