-
-
Notifications
You must be signed in to change notification settings - Fork 660
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1603 from placeAtlas/staging/code
- Loading branch information
Showing
22 changed files
with
5,257 additions
and
5,116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,8 @@ | |
}, | ||
"parcelIgnore": [ | ||
"sw.js", | ||
"_img/.+" | ||
"_img/.+", | ||
"atlas.json" | ||
], | ||
"browserslist": [ | ||
">= 0.5%", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
|
||
<!-- | ||
The 2023 r/place Atlas | ||
Copyright (c) 2017 Roland Rytz <[email protected]> | ||
Copyright (c) 2023 Place Atlas contributors | ||
Copyright (c) 2023 Place Atlas Initiative and contributors | ||
Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
--> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
@@ -266,12 +266,12 @@ body[data-init-done] .listTransitioning #innerContainer { | |
} | ||
|
||
#variantControls { | ||
flex: 1 0 auto; | ||
flex: 2 0 auto; | ||
} | ||
|
||
#timeControls { | ||
position: relative; | ||
flex: 6 0 300px; | ||
flex: 12 0 300px; | ||
} | ||
|
||
#bottomBar.no-time-slider #timeControls { | ||
|
@@ -448,13 +448,25 @@ body:not([data-dev]) .show-only-on-dev { | |
display: none !important | ||
} | ||
|
||
#objectsList, | ||
#offcanvasList, | ||
#offcanvasDraw, | ||
#closeObjectsListButton { | ||
margin-top: var(--global-top-padding); | ||
} | ||
|
||
.copyleft { | ||
display: inline-block; | ||
transform: rotateY(180deg); | ||
} | ||
|
||
/* about.html */ | ||
|
||
#credits a { | ||
#entry-contributors-wrapper a { | ||
text-decoration: none; | ||
} | ||
|
||
#credits a:hover { | ||
#entry-contributors-wrapper a:hover { | ||
text-decoration: underline; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,21 @@ | ||
/* | ||
Access-Control-Allow-Origin: * | ||
|
||
/_img/canvas/*/*.png | ||
cache-control: public, max-age=604800 | ||
|
||
# Hashed resources: 1 year and immutable | ||
|
||
/_js/* | ||
Cache-Control: public, immutable, max-age=31536000 | ||
|
||
/_css/* | ||
Cache-Control: public, immutable, max-age=31536000 | ||
|
||
# Canvas images: 1 year | ||
|
||
/_img/canvas/* | ||
Cache-Control: public, max-age=31536000 | ||
|
||
/_img/canvas/*.png | ||
cache-control: public, max-age=604800 | ||
Cache-Control: public, max-age=31536000 | ||
|
||
/_img/canvas/*/*.png | ||
Cache-Control: public, max-age=31536000 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
const contributorsEl = document.querySelector('#contributors-wrapper') | ||
const contributorsEl = document.querySelector('#entry-contributors-wrapper') | ||
|
||
// <i aria-label="GitHub" class="bi bi-github"></i> | ||
const gitHubEl = document.createElement("i") | ||
|
@@ -34,6 +34,8 @@ fetch('all-authors.txt') | |
userEl.href = 'https://reddit.com/user/' + contributor | ||
userEl.textContent = contributor | ||
} | ||
userEl.target = '_blank' | ||
userEl.rel = 'noreferrer' | ||
contributorsEl.appendChild(userEl) | ||
contributorsEl.appendChild(document.createTextNode(' ')) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -314,6 +314,22 @@ const variationsConfig = { | |
], | ||
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 192 192" aria-hidden="true"><polygon points="154 0 154 38 39 38 39 192 0 192 0 0"/><polygon points="192 38 192 192 77 192 77 153 154 153 154 38"/><rect x="77" y="77" width="38" height="38"/></svg>' | ||
}, | ||
tfc: { | ||
name: "The Final Clean", | ||
code: "T", | ||
default: 0, | ||
drawablePeriods: [0, 0], | ||
drawableRegions: [ | ||
[[0, 0], [-1500, -1000, 1499, 999]], | ||
], | ||
versions: [ | ||
{ | ||
timestamp: "Final", | ||
url: "./_img/canvas/tfc/base.png", | ||
} | ||
], | ||
icon: '<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 192 192" aria-hidden="true"><defs><style>.a{fill-rule:evenodd;}</style></defs><path class="a" d="M69.79,83.55c-.47,.65-.59,1.35-.59,1.35-.26,1.47,.76,2.72,.92,3.12,2.84,7.1,4.49,13.93,3.97,16.39-.47,2.18-5.6,5.65-12.36,8.33-3.63,1.44-6.11,2.99-8.04,5.01-7.17,7.51-10.24,17.86-7.14,24.05,3.93,7.84,18.38,5.86,28.05-3.85,2.09-2.1,3.15-3.83,6.63-10.77,2.97-5.93,4.26-8.05,5.47-8.95,2.04-1.52,9.82,.1,17.41,3.64,1.71,.8,2.31,1.04,2.78,.98,0,0,.22-.05,.43-.14,1.31-.59,17.43-17,25.58-25.34-1.79,.09-3.57,.18-5.36,.28-2.84,2.63-5.68,5.27-8.52,7.9-10.85-10.85-21.7-21.71-32.55-32.56,1.73-1.8,3.46-3.6,5.18-5.4-.29-1.56-.57-3.12-.86-4.69-1.34,1.27-19.42,18.45-21.01,20.66Zm-10.45,44.57c2.5,0,4.53,2.03,4.53,4.53s-2.03,4.53-4.53,4.53-4.53-2.03-4.53-4.53,2.03-4.53,4.53-4.53Z"/><path class="f" d="M132.9,97.36c-.88,.22-7.88,1.92-9.91-1.04-1.11-1.62-1.05-4.71-.52-6.57,.74-2.59,.9-4.06,.25-4.73-.73-.76-2.03-.31-3.73-.18-3.4,.27-8.08-.86-9.6-3.16-2.77-4.21,4.48-13.03,2.31-14.69-.17-.13-.34-.16-.67-.22-4.24-.73-6.79,4.71-11.66,5.1-2.93,.24-6.21-1.39-7.72-4.02-1.11-1.94-1-3.96-.86-4.95h0s7.38-7.39,17.6-17.52c12.75,12.73,25.51,25.47,38.26,38.2l-13.75,13.79Z"/><polygon points="154 0 154 38 39 38 39 192 0 192 0 0"/><polygon points="192 38 192 192 77 192 77 153 154 153 154 38"/></svg>' | ||
} | ||
} | ||
window.variationsConfig = variationsConfig | ||
|
||
|
@@ -328,7 +344,7 @@ window.useNumericalId = useNumericalId | |
|
||
console.info(`%cThe 2023 r/place Atlas | ||
%cCopyright (c) 2017 Roland Rytz <[email protected]> | ||
Copyright (c) 2023 Place Atlas contributors | ||
Copyright (c) 2023 Place Atlas Initiative and contributors | ||
Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
https://2023.place-atlas.stefanocoding.me/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
@@ -100,6 +100,17 @@ async function init() { | |
} | ||
} | ||
|
||
// Experimental: TemplateManager support | ||
// Add a .json file of TemplateManager on the "template" URL param. | ||
// e.g. ?template=https://osu.place/e/osuplace2023.json | ||
// CORS bypass is required (e.g. a proxy, CORS Anywhere). | ||
if (params.get("template")) { | ||
const [ templateDatas ] = await loadTemplateData(params.get("template")) | ||
const templateLayers = await loadTemplateImages(templateDatas) | ||
additionalLayers.push(...templateLayers) | ||
updateAdditionalLayer(additionalLayers) | ||
} | ||
|
||
if (mode === "about") window.location.replace("./about.html") | ||
|
||
// For Reviewing Reddit Changes | ||
|
@@ -520,18 +531,31 @@ function generateAtlasAll(atlas = atlasAll) { | |
return newAtlas | ||
} | ||
|
||
// Announcement system | ||
// Notice system | ||
|
||
const noticeEl = document.querySelector("#headerNotice") | ||
const noticeButton = noticeEl.querySelector('[role=button]') | ||
const noticeText = noticeEl.querySelector('p').textContent.trim() | ||
|
||
const announcementEl = document.querySelector("#headerAnnouncement") | ||
const announcementButton = announcementEl.querySelector('[role=button]') | ||
const announcementText = announcementEl.querySelector('p').textContent.trim() | ||
const resizeGlobalTopPadding = () => { | ||
document.body.style.setProperty("--global-top-padding", noticeEl.offsetHeight + 'px') | ||
} | ||
|
||
if (window.localStorage.getItem('announcement-closed')) { | ||
window.localStorage.setItem('closed-notice', window.localStorage.getItem('announcement-closed')) | ||
window.localStorage.removeItem('announcement-closed') | ||
} | ||
|
||
if (announcementText && announcementText !== window.localStorage.getItem('announcement-closed')) { | ||
announcementButton.click() | ||
document.querySelector('#objectsList').style.marginTop = '2.8rem' | ||
if (noticeText && noticeText !== window.localStorage.getItem('closed-notice')) { | ||
noticeButton.click() | ||
setTimeout(() => { | ||
document.body.style.setProperty("--global-top-padding", noticeEl.offsetHeight + 'px') | ||
}, 500) | ||
window.addEventListener('resize', resizeGlobalTopPadding) | ||
} | ||
|
||
announcementEl.querySelector('[role=button]').addEventListener('click', () => { | ||
window.localStorage.setItem('announcement-closed', announcementText) | ||
document.querySelector('#objectsList').style.marginTop = '0' | ||
noticeEl.querySelector('[role=button]').addEventListener('click', () => { | ||
window.localStorage.setItem('closed-notice', noticeText) | ||
window.removeEventListener('resize', resizeGlobalTopPadding) | ||
document.body.style.setProperty("--global-top-padding", null) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/*! | ||
* The 2023 r/place Atlas | ||
* Copyright (c) 2017 Roland Rytz <[email protected]> | ||
* Copyright (c) 2023 Place Atlas contributors | ||
* Copyright (c) 2023 Place Atlas Initiative and contributors | ||
* Licensed under AGPL-3.0 (https://2023.place-atlas.stefanocoding.me/license.txt) | ||
*/ | ||
|
||
|
Oops, something went wrong.