diff --git a/.env.default b/.env.default index af45e79..d856a5e 100644 --- a/.env.default +++ b/.env.default @@ -17,3 +17,4 @@ MAIL_USER="noreply@your_domain" MAIL_PASS="A_RANDOM_PASSWORD" DISCORD_SECRET="" DISCORD_ID="" +GITHUB=livzmc/website diff --git a/package.json b/package.json index 37cc223..aa512ec 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "A website designed to display Minecraft profiles, skins and capes.", "main": "src/index.ts", "scripts": { - "build": "npm run tailwind:build && npx eslint src && tsc", + "build": "npm run tailwind:build && npx eslint src && node script/update_git.js && tsc", "tailwind:build": "postcss ./public/style/tailwind.css -o ./public/style/index.css", "start": "node dist/index.js", "devStart": "nodemon src/index.ts" diff --git a/public/style/index.css b/public/style/index.css index c1010ac..8544769 100644 --- a/public/style/index.css +++ b/public/style/index.css @@ -525,6 +525,17 @@ video { max-width: 1536px; } } +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + white-space: nowrap; + border-width: 0; +} .pointer-events-none { pointer-events: none; } @@ -561,6 +572,9 @@ video { .m-2 { margin: 0.5rem; } +.m-auto { + margin: auto; +} .mx-auto { margin-left: auto; margin-right: auto; @@ -569,18 +583,34 @@ video { margin-top: 1rem; margin-bottom: 1rem; } +.my-6 { + margin-top: 1.5rem; + margin-bottom: 1.5rem; +} .-ml-1 { margin-left: -0.25rem; } .mb-2 { margin-bottom: 0.5rem; } +.mb-4 { + margin-bottom: 1rem; +} +.mb-6 { + margin-bottom: 1.5rem; +} +.me-3 { + margin-inline-end: 0.75rem; +} .ml-1 { margin-left: 0.25rem; } .ml-\[10px\] { margin-left: 10px; } +.ml-\[15px\] { + margin-left: 15px; +} .ml-\[2px\] { margin-left: 2px; } @@ -596,6 +626,9 @@ video { .mr-4 { margin-right: 1rem; } +.ms-5 { + margin-inline-start: 1.25rem; +} .mt-1 { margin-top: 0.25rem; } @@ -608,9 +641,6 @@ video { .mt-4 { margin-top: 1rem; } -.mt-5 { - margin-top: 1.25rem; -} .mt-\[10px\] { margin-top: 10px; } @@ -659,6 +689,9 @@ video { .h-32 { height: 8rem; } +.h-4 { + height: 1rem; +} .h-5 { height: 1.25rem; } @@ -671,6 +704,9 @@ video { .h-72 { height: 18rem; } +.h-8 { + height: 2rem; +} .h-96 { height: 24rem; } @@ -706,6 +742,9 @@ video { .w-11\/12 { width: 91.666667%; } +.w-4 { + width: 1rem; +} .w-48 { width: 12rem; } @@ -756,12 +795,18 @@ video { .max-w-md { max-width: 28rem; } +.max-w-screen-xl { + max-width: 1280px; +} .flex-auto { flex: 1 1 auto; } .flex-shrink { flex-shrink: 1; } +.flex-grow { + flex-grow: 1; +} .origin-top-right { transform-origin: top right; } @@ -785,6 +830,9 @@ video { .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); } +.grid-cols-2 { + grid-template-columns: repeat(2, minmax(0, 1fr)); +} .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } @@ -821,11 +869,17 @@ video { .gap-3 { gap: 0.75rem; } +.gap-8 { + gap: 2rem; +} .-space-x-px > :not([hidden]) ~ :not([hidden]) { --tw-space-x-reverse: 0; margin-right: calc(-1px * var(--tw-space-x-reverse)); margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse))); } +.self-center { + align-self: center; +} .overflow-hidden { overflow: hidden; } @@ -852,6 +906,9 @@ video { .text-ellipsis { text-overflow: ellipsis; } +.whitespace-nowrap { + white-space: nowrap; +} .rounded { border-radius: 0.25rem; } @@ -1003,6 +1060,9 @@ video { .p-3 { padding: 0.75rem; } +.p-4 { + padding: 1rem; +} .p-6 { padding: 1.5rem; } @@ -1351,6 +1411,10 @@ video { --tw-bg-opacity: 1; background-color: rgb(79 70 229 / var(--tw-bg-opacity)); } +.hover\:text-gray-900:hover { + --tw-text-opacity: 1; + color: rgb(17 24 39 / var(--tw-text-opacity)); +} .hover\:text-indigo-700:hover { --tw-text-opacity: 1; color: rgb(67 56 202 / var(--tw-text-opacity)); @@ -1496,6 +1560,10 @@ video { --tw-bg-opacity: 1; background-color: rgb(79 70 229 / var(--tw-bg-opacity)); } +:is(.dark .dark\:hover\:text-white:hover) { + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); +} :is(.dark .dark\:focus\:border-gray-600:focus) { --tw-border-opacity: 1; border-color: rgb(75 85 99 / var(--tw-border-opacity)); @@ -1506,10 +1574,19 @@ video { grid-column: span 2 / span 2; } + .sm\:mx-auto { + margin-left: auto; + margin-right: auto; + } + .sm\:mt-0 { margin-top: 0px; } + .sm\:flex { + display: flex; + } + .sm\:grid { display: grid; } @@ -1522,10 +1599,26 @@ video { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .sm\:items-center { + align-items: center; + } + + .sm\:justify-center { + justify-content: center; + } + + .sm\:justify-between { + justify-content: space-between; + } + .sm\:gap-4 { gap: 1rem; } + .sm\:gap-6 { + gap: 1.5rem; + } + .sm\:rounded-lg { border-radius: 0.5rem; } @@ -1534,9 +1627,17 @@ video { padding-left: 1.5rem; padding-right: 1.5rem; } + + .sm\:text-center { + text-align: center; + } } @media (min-width: 768px) { + .md\:mb-0 { + margin-bottom: 0px; + } + .md\:flex { display: flex; } @@ -1561,6 +1662,10 @@ video { grid-template-columns: repeat(3, minmax(0, 1fr)); } + .md\:justify-between { + justify-content: space-between; + } + .md\:rounded-none { border-radius: 0px; } @@ -1587,6 +1692,11 @@ video { } @media (min-width: 1024px) { + .lg\:my-8 { + margin-top: 2rem; + margin-bottom: 2rem; + } + .lg\:flex { display: flex; } @@ -1622,6 +1732,11 @@ video { padding-top: 0px; padding-bottom: 0px; } + + .lg\:py-8 { + padding-top: 2rem; + padding-bottom: 2rem; + } } @media (min-width: 1280px) { diff --git a/script/update_git.js b/script/update_git.js new file mode 100644 index 0000000..cf64fa7 --- /dev/null +++ b/script/update_git.js @@ -0,0 +1,21 @@ +require('dotenv').config(); +const fsp = require('fs/promises'); +const { execSync } = require('child_process'); + +const repoPath = process.env.GITHUB || 'livzmc/website'; + +(async function () { + try { + const branch = execSync('git rev-parse --abbrev-ref HEAD').toString().trim(); + const SHA = execSync('git rev-parse HEAD').toString().trim(); + const footer = await (await fsp.readFile('src/front-end/partials/footer.ejs')).toString(); + const prev = footer.split('\n').filter(a => a.includes('id="github_hash"'))[0]; + const new_footer = footer.replace(prev, `${branch}@${SHA.substring(0, 7)}`); + await fsp.writeFile('src/front-end/partials/footer.ejs', new_footer); + + process.exit(0); + } catch (e) { + console.error(e); + process.exit(1); + } +})(); \ No newline at end of file diff --git a/src/front-end/badges/index.ejs b/src/front-end/badges/index.ejs index 638339d..5699776 100644 --- a/src/front-end/badges/index.ejs +++ b/src/front-end/badges/index.ejs @@ -12,91 +12,96 @@ await include('../partials/header', { }); %> -
-
-

<%= await getLocaleString(language, 'core', 'badges') %>

-
-
-
- <% for (let i = 0; i < badges.length; i++) { %> - <% const badge = badges[i]; %> -
-
-
- - <%= badge.title %> -

- Created on: - • - - - <%= badge.user_count %> - -

+
+
+
+

<%= await getLocaleString(language, 'core', 'badges') %>

+
+
+
+ <% for (let i = 0; i < badges.length; i++) { %> + <% const badge = badges[i]; %> +
+
+
+ + <%= badge.title %> +

+ Created on: + • + + + <%= badge.user_count %> + +

+
+ <% } %> +
+ <% if (account && account.permission === 11) { %> +
+

Admin

+
+
+

+
+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ <% } %>
- <% if (account && account.permission === 11) { %> -
-

Admin

-
-
-

-
-
-
- -
- -
- -
- -
- -
- -
- -
-
- -
- <% } %> -
+ + <%- + await include('../partials/footer', { + }); + %> \ No newline at end of file diff --git a/src/front-end/badges/viewBadge.ejs b/src/front-end/badges/viewBadge.ejs index 382e900..f0bbf2c 100644 --- a/src/front-end/badges/viewBadge.ejs +++ b/src/front-end/badges/viewBadge.ejs @@ -12,56 +12,62 @@ await include('../partials/header', { }); %> -
-
-

<%= badge.title %>

-
-
-
- <%= badge.image %> -

- <%- badge.description %> -

-
-
-
-

<%= await getLocaleString(language, 'core', 'users') %>

-
- <% - const formattedUsers = await Promise.all( - users.map(async (user) => { - return `\${user.username}\` - }) - ); - // do this to save HTML size since doing for loop while generate a lot of whitespace. - %> - <%- formattedUsers.join('\n') %> +
+
+
+

<%= badge.title %>

+
+
+
+ <%= badge.image %> +

+ <%- badge.description %> +

+
+
+
+

<%= await getLocaleString(language, 'core', 'users') %>

+
+ <% + const formattedUsers = await Promise.all( + users.map(async (user) => { + return `\${user.username}\` + }) + ); + // do this to save HTML size since doing for loop while generate a lot of whitespace. + %> + <%- formattedUsers.join('\n') %> +
+ <% if (account && account.permission === 11) { %> +
+ +
+ + <% } %>
- <% if (account && account.permission === 11) { %> -
- -
- - <% } %>
-
+ + <%- + await include('../partials/footer', { + }); + %> \ No newline at end of file diff --git a/src/front-end/banner.ejs b/src/front-end/banner.ejs index 9f85f1f..ccb45f5 100644 --- a/src/front-end/banner.ejs +++ b/src/front-end/banner.ejs @@ -86,210 +86,216 @@ await include('partials/header', { }); %> -
-
-
-

-
-
- <%# holds layers list and advertisement %> -
-
-
-
-

<%= await getLocaleString(language, 'banner', 'layers') %>

+
+
+
+
+

+
+
+ <%# holds layers list and advertisement %> +
+
+
+
+

<%= await getLocaleString(language, 'banner', 'layers') %>

+
+
+
+ <%# generated server side, read Utils.ts %> + <%- formattedPatterns %> +
+
-
-
- <%# generated server side, read Utils.ts %> - <%- formattedPatterns %> +
+ <% if (true) { // ads %> +
+
+

Advertisement

+
+
+ + +
+ <% } %> +
+
+
+ +
+
+
+ +
+ +
+ +
+
+ +
+ +
+
+ +
+
- <% if (true) { // ads %> -
-
-

Advertisement

+
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +

+ https://livzmc.net/banner/?=<%= pattern %> + + + + + +

-
- - - +
+ <%= await await getLocaleString(language, 'banner', 'warning.microsoft') %> +
+ <%= await await getLocaleString(language, 'banner', 'warning.domain') %> +
+
+
+
+ + + + +
+
+
+ +
+
- <% } %> -
-
-
- -
-
-
- -
- -
- -
-
- -
- -
-
- -
-
-
-
- -
- -
- -
- -
- -
- -
- -

- https://livzmc.net/banner/?=<%= pattern %> - - - - - -

-
-
- <%= await await getLocaleString(language, 'banner', 'warning.microsoft') %> -
- <%= await await getLocaleString(language, 'banner', 'warning.domain') %> -
-
-
-
- - - - -
-
- -
- +
+
+
+ <% for (let i = 0; i < patterns.length; i++) { %> + <% const pattern = patterns[i]; %> +
+ <% } %>
-
-
-
- <% for (let i = 0; i < colours.length; i++) { %> - <% const colour = colours[i]; %> -
- <% } %> -
-
+
+

<%= await getLocaleString(language, 'banner', 'history') %>

-
- <% for (let i = 0; i < patterns.length; i++) { %> - <% const pattern = patterns[i]; %> -
- <% } %> +
+

Click the random banner to see your history!

-
-
-

<%= await getLocaleString(language, 'banner', 'history') %>

-
-
-

Click the random banner to see your history!

-
-
-
- - <%- await include('partials/modal', { - modal: { - title: await getLocaleString(language, 'banner', 'select.colour'), - body: [ - '\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
\\\
', - '\
', - ].join(''), - id: 'change_colour_modal', - } - }) - %> - - <%- await include('partials/modal', { - modal: { - title: await getLocaleString(language, 'banner', 'pmc.title'), - body: [ - '\', - '\', - `\

${await getLocaleString(language, "banner", "pmc.body.1")}\

`, - `\

${await getLocaleString(language, "banner", "pmc.body.2")}\

`, - ].join(''), - id: '0', - } - }) + + <%- await include('partials/modal', { + modal: { + title: await getLocaleString(language, 'banner', 'select.colour'), + body: [ + '\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
\\\
', + '\
', + ].join(''), + id: 'change_colour_modal', + } + }) + %> + + <%- await include('partials/modal', { + modal: { + title: await getLocaleString(language, 'banner', 'pmc.title'), + body: [ + '\', + '\', + `\

${await getLocaleString(language, "banner", "pmc.body.1")}\

`, + `\

${await getLocaleString(language, "banner", "pmc.body.2")}\

`, + ].join(''), + id: '0', + } + }) + %> + +
+ <%- + await include('partials/footer', { + }); %> - diff --git a/src/front-end/capes/minecraft.ejs b/src/front-end/capes/minecraft.ejs index 641ce87..55ff8c0 100644 --- a/src/front-end/capes/minecraft.ejs +++ b/src/front-end/capes/minecraft.ejs @@ -60,91 +60,97 @@ await include('../partials/header', { }); %> -
- <% if (true) { // ads %> -
-
-
-

Advertisement

-
-
- - - -
-
- <% } %> -
-
- <% - const Capes = capes.filter(cape => !cape.removed && !cape.category).sort((a, b) => b.users - a.users); - const rCapes = capes.filter(cape => cape.removed && !cape.category).sort((a, b) => b.users - a.users); - const categoried_capes = capes.filter(cape => !cape.removed && cape.category).sort((a, b) => b.users - a.users); - const categories = {}; - categoried_capes.forEach(function (cape) { - if (!categories[cape.category]) categories[cape.category] = []; - categories[cape.category].push(cape); - }); - %> - <% for (let i = 0; i < Capes.length; i++) { %> - <% const cape = Capes[i]; %> - <%- await capeLayout(cape); %> - <% } %> -
-
-
- <% if (false) { // ads %> -
-
-

Advertisement

-
-
-
- - +
+
+ <% if (true) { // ads %> +
+
+
+

Advertisement

+
+
+ +
-
- <% } %> -
-

<%= await getLocaleString(language, 'capes', 'removed.or.unused') %>:

-
- <% for (let i = 0; i < rCapes.length; i++) { %> - <% const cape = rCapes[i]; %> - <%- await capeLayout(cape); %> - <% } %> -
-
-
- <% if (false) { // ads %> -
-
-

Advertisement

+ <% } %> +
+
+ <% + const Capes = capes.filter(cape => !cape.removed && !cape.category).sort((a, b) => b.users - a.users); + const rCapes = capes.filter(cape => cape.removed && !cape.category).sort((a, b) => b.users - a.users); + const categoried_capes = capes.filter(cape => !cape.removed && cape.category).sort((a, b) => b.users - a.users); + const categories = {}; + categoried_capes.forEach(function (cape) { + if (!categories[cape.category]) categories[cape.category] = []; + categories[cape.category].push(cape); + }); + %> + <% for (let i = 0; i < Capes.length; i++) { %> + <% const cape = Capes[i]; %> + <%- await capeLayout(cape); %> + <% } %>
-
-
- - - +
+
+ <% if (false) { // ads %> +
+
+

Advertisement

+
+
+
+ + + +
+ <% } %> +
+

<%= await getLocaleString(language, 'capes', 'removed.or.unused') %>:

+
+ <% for (let i = 0; i < rCapes.length; i++) { %> + <% const cape = rCapes[i]; %> + <%- await capeLayout(cape); %> + <% } %> +
- <% } %> -
- <% for (const key in categories) { %> - <% if (Object.hasOwnProperty.call(categories, key)) { %> - <% const cat = categories[key]; %> -

<%= key.replace(/\_/g, ' '); %>

-
- <% for (let i = 0; i < cat.length; i++) { %> - <% const cape = cat[i]; %> - <%- await capeLayout(cape); %> - <% } %> +
+ <% if (false) { // ads %> +
+
+

Advertisement

- <% } %> +
+
+ + + +
+
+
<% } %> +
+ <% for (const key in categories) { %> + <% if (Object.hasOwnProperty.call(categories, key)) { %> + <% const cat = categories[key]; %> +

<%= key.replace(/\_/g, ' '); %>

+
+ <% for (let i = 0; i < cat.length; i++) { %> + <% const cape = cat[i]; %> + <%- await capeLayout(cape); %> + <% } %> +
+ <% } %> + <% } %> +
-
+
+ <%- + await include('../partials/footer', { + }); + %> \ No newline at end of file diff --git a/src/front-end/capes/optifine.ejs b/src/front-end/capes/optifine.ejs index 1148643..c5f17ed 100644 --- a/src/front-end/capes/optifine.ejs +++ b/src/front-end/capes/optifine.ejs @@ -23,57 +23,63 @@ await include('../partials/header', { }); %> -
-
-
-
- - <% - function formatLayerUrl(layerIn) { - const options = []; - if (url) options.push('&url=' + url); - return `/optifine-capes?page=${page}&layer=${layerIn}&${options.join('&')}`; - } - - function formatLayerClass(layerIn) { - return `text-indigo-${layers == layerIn ? '0' : '600'} dark:text-indigo-${layers == layerIn ? '' : '500'} text-lg` - } - %> - <% for (let i = 1; i < 9; i++) { %> - <%= i %> - <% } %> +
+
+
+
+
+ + <% + function formatLayerUrl(layerIn) { + const options = []; + if (url) options.push('&url=' + url); + return `/optifine-capes?page=${page}&layer=${layerIn}&${options.join('&')}`; + } + + function formatLayerClass(layerIn) { + return `text-indigo-${layers == layerIn ? '0' : '600'} dark:text-indigo-${layers == layerIn ? '' : '500'} text-lg` + } + %> + <% for (let i = 1; i < 9; i++) { %> + <%= i %> + <% } %> +
-
- +
+ <%- + await include('../partials/footer', { + }); + %> \ No newline at end of file diff --git a/src/front-end/capes/view/minecraft.ejs b/src/front-end/capes/view/minecraft.ejs index c27d91d..38360a3 100644 --- a/src/front-end/capes/view/minecraft.ejs +++ b/src/front-end/capes/view/minecraft.ejs @@ -12,106 +12,112 @@ await include('../../partials/header', { }); %> -
-
-
-
-
-

Cape Information

-
-
-
-
-
First Cached
-
-
-
-
Players
-
<%= userLength ?? '0' %>
-
-
-
-
- <% if (true) { // ads %> -
-
-
-

Advertisement

+
+
+
+
+
+
+

Cape Information

- - - +
+
+
First Cached
+
+
+
+
Players
+
<%= userLength ?? '0' %>
+
+
- <% } %> -
-
-
- -
-
- - + <% if (true) { // ads %> +
+
+
+

Advertisement

+
+
+ + + +
+
+ <% } %>
-
-
-
-
-

<%= cape.title %>

+
+
+
-
-
-
-
- <%- cape.description ? cape.description : "No description was set." %> -
-
-
+
+ +
- <% if (true) { // ads %> -
-
-
-

Advertisement

+
+
+
+

<%= cape.title %>

- - - +
+
+
+ <%- cape.description ? cape.description : "No description was set." %> +
+
+
- <% } %> -
-
-
-
-
<%= await getLocaleString(language, 'capes', 'users') %>
-
- <% for (let i = 0; i < users.length; i++) { %> - <% const user = users[i]; %> - <% if (user) { %> - href="/user/<%= user.username %>.<%= await getUserNameIndex(user.username, user.uuid) + 1 %>"> - <%= user.username %> - <%# getEmoji(user, '20') %> - - <% } %> - <% } %> - <% if (more) { %> - ... + <% if (true) { // ads %> +
+
+
+

Advertisement

+
+
+ + + +
+
<% } %>
- +
+
+
<%= await getLocaleString(language, 'capes', 'users') %>
+
+ <% for (let i = 0; i < users.length; i++) { %> + <% const user = users[i]; %> + <% if (user) { %> + href="/user/<%= user.username %>.<%= await getUserNameIndex(user.username, user.uuid) + 1 %>"> + <%= user.username %> + <%# getEmoji(user, '20') %> + + <% } %> + <% } %> + <% if (more) { %> + ... + <% } %> +
+
-
+
+ <%- + await include('../../partials/footer', { + }); + %> diff --git a/src/front-end/capes/view/optifine.ejs b/src/front-end/capes/view/optifine.ejs index 26865cc..a9fc168 100644 --- a/src/front-end/capes/view/optifine.ejs +++ b/src/front-end/capes/view/optifine.ejs @@ -12,82 +12,88 @@ await include('../../partials/header', { }); %> -
-
-
-
-
-

Cape Information

-
-
-
-
-
First Cached
-
-
- <% if (banner.cleanUrl) { %> +
+
+
+
+
+
+

Cape Information

+
+
+
-
Banner URL
-
- <% if (banner.isBanner) { %> - <%= banner.cleanUrl %> - <% } else { %> -

In moderation queue.

- <% } %> -
+
First Cached
+
- <% } %> -
-
Players
-
<%= length %>
-
-
+ <% if (banner.cleanUrl) { %> +
+
Banner URL
+
+ <% if (banner.isBanner) { %> + <%= banner.cleanUrl %> + <% } else { %> +

In moderation queue.

+ <% } %> +
+
+ <% } %> +
+
Players
+
<%= length %>
+
+
+
-
-
-
- -
-
- - +
+
+ +
+
+ + +
+ <% if (true) { // ads %> +
+
+ + + +
+ <% } %>
- <% if (true) { // ads %> -
-
- - - -
- <% } %> -
- -
-
-
<%= await getLocaleString(language, 'capes', 'users') %>
-
- <% for (let i = 0; i < profiles.length; i++) { %> - <% const account = profiles[i]; %> - ><%= account.username %><%# getEmoji(account, '22') %> - <% } %> - <% if (hasMore) { %> - ... - <% } %> -
-
- <% if (banner.isBanner && banner.cleanUrl) { %> - Banner Editor - <% } %> -
- <%= await getLocaleString(language, 'capes', 'download.cape') %> + +
+
+
<%= await getLocaleString(language, 'capes', 'users') %>
+
+ <% for (let i = 0; i < profiles.length; i++) { %> + <% const account = profiles[i]; %> + ><%= account.username %><%# getEmoji(account, '22') %> + <% } %> + <% if (hasMore) { %> + ... + <% } %> +
+
+ <% if (banner.isBanner && banner.cleanUrl) { %> + Banner Editor + <% } %> +
+ <%= await getLocaleString(language, 'capes', 'download.cape') %> +
-
+ + <%- + await include('../../partials/footer', { + }); + %> diff --git a/src/front-end/home/index.ejs b/src/front-end/home/index.ejs index b79df1c..9a29736 100644 --- a/src/front-end/home/index.ejs +++ b/src/front-end/home/index.ejs @@ -14,65 +14,71 @@ await include('../partials/header.ejs', { }); %> - <% if (false) { // ads %> -
-
-
-

Advertisement

-
-
-
- +
+ <% if (false) { // ads %> +
+
+
+

Advertisement

+
+
+
+ +
-
- <% } %> - -
- <% - const divs = await getLocaleString(language, 'home', 'div'); - const faqs = await getLocaleString(language, 'home', 'faq'); - %> -
-
-
-
- <% for (let i = 0; i < divs.length; i++) { %> - <% const HTML = divs[i]; %> - <% if (!HTML.belowFAQ) { %> -
<%- HTML.html %>
- <% } %> - <% } %> - -
-
- <% for (let i = 0; i < faqs.length; i++) { %> - <% const faq = faqs[i]; %> -
- -

<%= faq.q %>

-
-

<%- faq.a %>

-
- <% } %> -
-
- -
+ <% } %> + +
+ <% + const divs = await getLocaleString(language, 'home', 'div'); + const faqs = await getLocaleString(language, 'home', 'faq'); + %> +
+
+
+
<% for (let i = 0; i < divs.length; i++) { %> <% const HTML = divs[i]; %> - <% if (HTML.belowFAQ) { %> + <% if (!HTML.belowFAQ) { %>
<%- HTML.html %>
<% } %> <% } %> + +
+
+ <% for (let i = 0; i < faqs.length; i++) { %> + <% const faq = faqs[i]; %> +
+ +

<%= faq.q %>

+
+

<%- faq.a %>

+
+ <% } %> +
+
+ +
+ <% for (let i = 0; i < divs.length; i++) { %> + <% const HTML = divs[i]; %> + <% if (HTML.belowFAQ) { %> +
<%- HTML.html %>
+ <% } %> + <% } %> +
+
+
+
-
-
-
-
+ + <%- + await include('../partials/footer', { + }); + %> \ No newline at end of file diff --git a/src/front-end/partials/footer.ejs b/src/front-end/partials/footer.ejs new file mode 100644 index 0000000..000870f --- /dev/null +++ b/src/front-end/partials/footer.ejs @@ -0,0 +1,72 @@ +<% const LINK = "text-indigo-600 dark:text-indigo-500 hover:underline"; %> +
+ + + diff --git a/src/front-end/partials/header.ejs b/src/front-end/partials/header.ejs index 5f3cf61..06a3a68 100644 --- a/src/front-end/partials/header.ejs +++ b/src/front-end/partials/header.ejs @@ -6,80 +6,82 @@ return "dark:hover:bg-gray-800 hover:bg-gray-200" } %> - + + diff --git a/src/front-end/partials/meta.ejs b/src/front-end/partials/meta.ejs index 9c0d23f..d02394f 100644 --- a/src/front-end/partials/meta.ejs +++ b/src/front-end/partials/meta.ejs @@ -24,6 +24,17 @@ <% } else { %> <% } %> + <%- await include('../partials/skinviewer', { diff --git a/src/front-end/users/viewUser.ejs b/src/front-end/users/viewUser.ejs index 8286ecd..545f604 100644 --- a/src/front-end/users/viewUser.ejs +++ b/src/front-end/users/viewUser.ejs @@ -27,279 +27,284 @@ await include('../partials/header', { }); %> -
-
-

<%= profile.username %>

-
- Privacy -
- <% if (profile.optOut) { %> -
-
Archived
+
+
+
+

<%= profile.username %>

+ - <% } %> -
-
-
- -
- -
-
- -
-

- <%= await getLocaleString(language, 'user', 'account.information'); %> -

-
- -
-
-
-
<%= await getLocaleString(language, 'user', 'first.cached') %>
-
- -
-
-
-
-
-
UUID
-
- <%= profile.uuid %> -
- <%= dashedUUID %> -
-
-
-
-
-
<%= await getLocaleString(language, 'user', 'views') %>
-
- <%# monthlyViews %> -
-
-
-
-
- <% if (profile.badges.length > 0) { %> -
-
Badges
-
-
- <% - const formattedBadges = profile.badges.map((badge) => { - return `\ - \
- \ - \

${badge.title}\

- \
- \
`; - }) - %> - <%- formattedBadges.join('\n') %> -
-
-
- <% } %> -
-
+ <% if (profile.optOut) { %> +
+
Archived
-
- -
-
-
-
- - - - -
-
- -
- <% if (profile.skins.length > 0) { %> - + <% } %> +
+
+
+ +
+ +
+
-

- - <%= await getLocaleString(language, 'user', 'skins') %> - +

+ <%= await getLocaleString(language, 'user', 'account.information'); %>

+
-
- <% for (let i = 0; i < profile.skins.length; i++) { %> - <% const skin = profile.skins[i]; %> - <% if (skin.hidden == 0) { %> - - <% } %> - <% } %> +
+
+
<%= await getLocaleString(language, 'user', 'first.cached') %>
+
+ +
+
-
-
- <% } %> - <% if (profile.capes && profile.capes.length > 0) { %> -
- -
-
-

- <%= await getLocaleString(language, 'user', 'minecraft.capes') %> -

-
-
-
- <% for (let i = 0; i < profile.capes.length; i++) { %> - <% const cape = profile.capes[i]; %> - <% if (cape.hidden == 0) { %> - - <% } %> +
+
+
UUID
+
+ <%= profile.uuid %> +
+ <%= dashedUUID %> +
+
+
+
+
+
<%= await getLocaleString(language, 'user', 'views') %>
+
+ <%# monthlyViews %> +
+
+
+
+
+ <% if (profile.badges.length > 0) { %> +
+
Badges
+
+
+ <% + const formattedBadges = profile.badges.map((badge) => { + return `\ + \
+ \ + \

${badge.title}\

+ \
+ \
`; + }) + %> + <%- formattedBadges.join('\n') %> +
+
+
<% } %>
- <% } %> - <% if (profile.names && profile.names.length > 0) { %> -
- -
-
-
- - - <% for (let i = 0; i < profile.names.length; i++) { %> - <% const name = profile.names[i]; %> - <% if (!name.hidden) { %> - - - - - - + + +
+
+
+
+ + + + +
+
+ + -
<%= nameLength - i %> - <% if (name.username) { %> - - <%= name.username %> - - <% } else { %> -

-

- <% } %> -
- <% if (name.changedToAt) { %> - -
- <% if (name.diff) { %> - ± <%= name.giveOrTake %> - <% } %> - <% } %> -
- <% if (name.changedToAt) { %> - ~<%= name.formattedChanged %> - <% } %> -
-
-
- <% } %> - <% if (profile.ofCapes && profile.ofCapes.length > 0) { %> -
- -
-
-

- - OptiFine - -

+ +
-
-
- <% for (let i = 0; i < profile.ofCapes.length; i++) { %> - <% const cape = profile.ofCapes[i]; %> - <% if (cape && !cape.hidden) { %> - -
+
-
- <% } %> - <% if (profile.MCCapes && profile.MCCapes.length > 0) { %> -
- -
-
-

- - MinecraftCapes Mod - -

+ <% } %> + <% if (profile.names && profile.names.length > 0) { %> +
+ +
+
+
+ + + <% for (let i = 0; i < profile.names.length; i++) { %> + <% const name = profile.names[i]; %> + <% if (!name.hidden) { %> + + + + + + + <% } %> + <% } %> + +
<%= nameLength - i %> + <% if (name.username) { %> + + <%= name.username %> + + <% } else { %> +

-

+ <% } %> +
+ <% if (name.changedToAt) { %> + +
+ <% if (name.diff) { %> + ± <%= name.giveOrTake %> + <% } %> + <% } %> +
+ <% if (name.changedToAt) { %> + ~<%= name.formattedChanged %> + <% } %> +
+
-
-
- <% for (let i = 0; i < profile.MCCapes.length; i++) { %> - <% const cape = profile.MCCapes[i]; %> - <% if (cape && !cape.hidden) { %> - -
- cape="MC/<%= cape.capeId %>" src="/api/render/2d/cape/MC/<%= cape.capeId %>.png" alt="<%= cape.capeId %>" data-time-title="<%= new Date(cape.cachedOn).getTime() %>"> -
-
+ <% } %> + <% if (profile.ofCapes && profile.ofCapes.length > 0) { %> +
+ +
+ +
+
+ <% for (let i = 0; i < profile.ofCapes.length; i++) { %> + <% const cape = profile.ofCapes[i]; %> + <% if (cape && !cape.hidden) { %> + +
+ cape="OF/<%= cape.removed ? '{{defaultCape.capeId}}' : cape.capeId %>" src="/api/render/2d/cape/OF/<%= cape.capeId %>.png" alt="<%= cape.capeId %>" uuid="<%= profile.uuid %>" data-time-title="<%= new Date(cape.cachedOn).getTime() %>"> +
+
+ <% } %> <% } %> - <% } %> -
+
+
-
- <% } %> - <% if (profile.lbCapes && profile.lbCapes.length > 0) { %> -
- -
-
-

- - LabyMod - -

+ <% } %> + <% if (profile.MCCapes && profile.MCCapes.length > 0) { %> +
+ +
+ +
+
+ <% for (let i = 0; i < profile.MCCapes.length; i++) { %> + <% const cape = profile.MCCapes[i]; %> + <% if (cape && !cape.hidden) { %> + +
+ cape="MC/<%= cape.capeId %>" src="/api/render/2d/cape/MC/<%= cape.capeId %>.png" alt="<%= cape.capeId %>" data-time-title="<%= new Date(cape.cachedOn).getTime() %>"> +
+
+ <% } %> + <% } %> +
+
-
-
- <% for (let i = 0; i < profile.lbCapes.length; i++) { %> - <% const cape = profile.lbCapes[i]; %> - <% if (cape && !cape.hidden) { %> - -
- cape="LB/<%= cape.capeId %>" src="/api/render/2d/cape/LB/<%= cape.capeId %>.png" alt="<%= cape.capeId %>" data-time-title="<%= new Date(cape.cachedOn).getTime() %>"> -
-
+ <% } %> + <% if (profile.lbCapes && profile.lbCapes.length > 0) { %> +
+ +
+ +
+
+ <% for (let i = 0; i < profile.lbCapes.length; i++) { %> + <% const cape = profile.lbCapes[i]; %> + <% if (cape && !cape.hidden) { %> + +
+ cape="LB/<%= cape.capeId %>" src="/api/render/2d/cape/LB/<%= cape.capeId %>.png" alt="<%= cape.capeId %>" data-time-title="<%= new Date(cape.cachedOn).getTime() %>"> +
+
+ <% } %> <% } %> - <% } %> -
+
+
-
- <% } %> + <% } %> +
-
-
+
+ <%- + await include('../partials/footer', { + }); + %>