|
49 | 49 | </div> |
50 | 50 | <div class="container"> |
51 | 51 | <div class="vertical-stack"> |
52 | | - <div class="content main-content"> |
53 | | - <h1 class="page-logo"> |
54 | | - <picture> |
55 | | - <source srcset="root/img/codename-animated.webp" type="image/webp"> |
56 | | - <img class="content-logo" src="root/img/codename-animated.gif" alt="Codename Engine"> |
57 | | - </picture> |
58 | | - </h1> |
59 | | - <br /> |
60 | | - <a href="/api-docs/" class="default-button">API</a> |
61 | | - <a href="/wiki/" class="default-button">Wiki</a> |
62 | | - <a href="/tools/" class="default-button">Tools</a> |
63 | | - <div> |
64 | | - <p>Codename Engine is a fork of Friday Night Funkin'<br>with a focus on softcoding and modding.</p> |
65 | | - </div> |
66 | | - <div> |
67 | | - <h2>Downloads</h2> |
68 | | - </div> |
69 | | - <div class="downloads"> |
70 | | - <div class="os-button"> |
71 | | - <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/windows/main/Codename%20Engine.zip" class="default-button"> |
72 | | - <span> |
73 | | - <img class="os-logo" src="root/img/os/windows.svg" alt="Icon for Windows"> Windows |
74 | | - </span> |
75 | | - </a> |
| 52 | + <div class="horizontal-stack"> |
| 53 | + <div class="content main-content"> |
| 54 | + <h1 class="page-logo"> |
| 55 | + <picture> |
| 56 | + <source srcset="root/img/codename-animated.webp" type="image/webp"> |
| 57 | + <img class="content-logo" src="root/img/codename-animated.gif" alt="Codename Engine"> |
| 58 | + </picture> |
| 59 | + </h1> |
| 60 | + <br /> |
| 61 | + <a href="/api-docs/" class="default-button">API</a> |
| 62 | + <a href="/wiki/" class="default-button">Wiki</a> |
| 63 | + <a href="/tools/" class="default-button">Tools</a> |
| 64 | + <div> |
| 65 | + <p>Codename Engine is a fork of Friday Night Funkin'<br>with a focus on softcoding and modding.</p> |
| 66 | + </div> |
| 67 | + <div> |
| 68 | + <h2>Downloads</h2> |
76 | 69 | </div> |
77 | | - <div class="os-button"> |
78 | | - <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/macos/main/Codename%20Engine.zip" class="default-button"> |
79 | | - <span> |
80 | | - <img class="os-logo" src="root/img/os/apple.svg" alt="Icon for MacOS"> MacOS |
81 | | - </span> |
82 | | - </a> |
| 70 | + <div class="downloads"> |
| 71 | + <div class="os-button"> |
| 72 | + <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/windows/main/Codename%20Engine.zip" class="default-button"> |
| 73 | + <span> |
| 74 | + <img class="os-logo" src="root/img/os/windows.svg" alt="Icon for Windows"> Windows |
| 75 | + </span> |
| 76 | + </a> |
| 77 | + </div> |
| 78 | + <div class="os-button"> |
| 79 | + <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/macos/main/Codename%20Engine.zip" class="default-button"> |
| 80 | + <span> |
| 81 | + <img class="os-logo" src="root/img/os/apple.svg" alt="Icon for MacOS"> MacOS |
| 82 | + </span> |
| 83 | + </a> |
| 84 | + </div> |
| 85 | + <div class="os-button"> |
| 86 | + <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/linux/main/Codename%20Engine.zip" class="default-button"> |
| 87 | + <span> |
| 88 | + <img class="os-logo" src="root/img/os/linux.svg" alt="Icon for Linux"> Linux |
| 89 | + </span> |
| 90 | + </a> |
| 91 | + </div> |
83 | 92 | </div> |
84 | | - <div class="os-button"> |
85 | | - <a href="https://nightly.link/CodenameCrew/CodenameEngine/workflows/linux/main/Codename%20Engine.zip" class="default-button"> |
86 | | - <span> |
87 | | - <img class="os-logo" src="root/img/os/linux.svg" alt="Icon for Linux"> Linux |
88 | | - </span> |
89 | | - </a> |
| 93 | + <div> |
| 94 | + <i>Make sure to join our official <img class="icon" src="root/img/icons/discord.svg" alt="Discord"> <a href="https://discord.com/servers/codename-engine-860561967383445535">Discord Server</a>!</i> |
| 95 | + <br> |
| 96 | + <i>You can contribute to this website by going to the <i class="fa fa-github"></i> <a href="https://github.com/CodenameCrew/codename-website">Website repository</a></i> |
| 97 | + <br> |
| 98 | + <i>You can find the engine source by going to the <i class="fa fa-github"></i> <a href="https://github.com/CodenameCrew/CodenameEngine">Engine repository</a></i> |
90 | 99 | </div> |
91 | 100 | </div> |
92 | | - <div> |
93 | | - <i>Make sure to join our official <img class="icon" src="root/img/icons/discord.svg" alt="Discord"> <a href="https://discord.com/servers/codename-engine-860561967383445535">Discord Server</a>!</i> |
94 | | - <br> |
95 | | - <i>You can contribute to this website by going to the <i class="fa fa-github"></i> <a href="https://github.com/CodenameCrew/codename-website">Website repository</a></i> |
96 | | - <br> |
97 | | - <i>You can find the engine source by going to the <i class="fa fa-github"></i> <a href="https://github.com/CodenameCrew/CodenameEngine">Engine repository</a></i> |
| 101 | + |
| 102 | + <div class="discordWidget"> |
| 103 | + <div class="discordWidget-header"> |
| 104 | + <h2 style="text-align: center; margin: 0; transform: translateY(50%);">Discord Server</h2> |
| 105 | + </div> |
| 106 | + <div class="discordWidget-content"> |
| 107 | + <span>Members online</span> |
| 108 | + <div class="discordWidget-user"> |
| 109 | + <img style="margin-right: 8px;"; src=""/> |
| 110 | + <span></span> |
| 111 | + </div> |
| 112 | + </div> |
| 113 | + <div class="discordWidget-footer"> |
| 114 | + <span>Want to chat?</span> |
| 115 | + <a style="margin-left: 35px;" href="#" class="default-button">Join Server</a> |
| 116 | + </div> |
98 | 117 | </div> |
99 | 118 | </div> |
100 | 119 |
|
@@ -196,6 +215,37 @@ <h3>{{ safeish name }}</h3> |
196 | 215 | </div> |
197 | 216 | </div> |
198 | 217 |
|
| 218 | + <script> |
| 219 | + const widgetContent = document.querySelector(".discordWidget-content"); |
| 220 | + const widgetFooter = document.querySelector(".discordWidget-footer"); |
| 221 | + const userTemplate = document.querySelector(".discordWidget-user"); |
| 222 | + userTemplate.remove(); |
| 223 | + fetch("https://discord.com/api/guilds/860561967383445535/widget.json").then(response => response.json()).then(data => { |
| 224 | + widgetFooter.querySelector("a").href = data.instant_invite; |
| 225 | + for (const member of data.members) { |
| 226 | + const user = userTemplate.cloneNode(true); |
| 227 | + user.querySelector("img").src = member.avatar_url + "?size=16"; |
| 228 | + user.querySelector("span").innerText = member.username; |
| 229 | + user.querySelector("img").style.border = "solid var(--discord-" + member.status + ") 2px"; |
| 230 | + widgetContent.appendChild(user); |
| 231 | + } |
| 232 | + }) |
| 233 | + |
| 234 | + function syncHeights() { |
| 235 | + const main = document.querySelector('.main-content'); |
| 236 | + const discord = document.querySelector('.discordWidget'); |
| 237 | + if (main && discord) { |
| 238 | + discord.style.height = `${main.offsetHeight}px`; |
| 239 | + const mainStyles = window.getComputedStyle(main); |
| 240 | + discord.style.marginTop = mainStyles.marginTop; |
| 241 | + } |
| 242 | + } |
| 243 | + |
| 244 | + window.addEventListener('load', syncHeights); |
| 245 | + window.addEventListener('DOMContentLoaded', syncHeights); |
| 246 | + window.addEventListener('resize', syncHeights); |
| 247 | + </script> |
| 248 | + |
199 | 249 | <script src='https://storage.ko-fi.com/cdn/scripts/overlay-widget.js'></script> |
200 | 250 | <script> |
201 | 251 | kofiWidgetOverlay.draw('codename_engine', { |
|
0 commit comments