From c55d3b8b2462e05bcb1620604139fb6d18b20678 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Wed, 20 Apr 2022 01:54:58 -0700 Subject: [PATCH 01/16] Major UI redesign --- web/_css/style.css | 1052 +++--------------------------------------- web/_img/logo.svg | 2 +- web/_js/draw.js | 108 ++--- web/_js/infoblock.js | 121 +++-- web/_js/main.js | 12 +- web/_js/time.js | 4 +- web/_js/view.js | 79 ++-- web/about.html | 168 ++++--- web/index.html | 454 +++++++++++------- 9 files changed, 674 insertions(+), 1326 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index a2f2d976..6b5b7769 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -13,20 +13,13 @@ ======================================================================== */ -@font-face { - /* DejaVuSans-ExtraLight 2.37 - https://dejavu-fonts.github.io/ */ +/* @font-face { + DejaVuSans-ExtraLight 2.37 - https://dejavu-fonts.github.io/ font-family: 'dejavu'; src: url('dejavusans-extralight.woff2') format('woff2'); font-weight: normal; font-style: normal; -} - -* { - margin: 0; - padding: 0; - border: none; - box-sizing: border-box; -} +} */ html, body { min-height: 100%; @@ -35,21 +28,14 @@ html, body { width: 100%; } -p { - line-height: 1.5em; - margin-bottom: 1em; +svg.bi { + display: inline-block; + vertical-align: -.125em; } -body { +body[data-mode] { overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; - - font-family: dejavu, sans, Sans-Serif; background-color: #111; - color: #FFF; - - line-height: 1.15; } #wrapper { @@ -57,170 +43,35 @@ #wrapper { height: 100%; width: 100%; overflow: hidden; - overflow-x: hidden; - overflow-y: hidden; -webkit-overflow-scrolling: touch; } -a { - color: #ffcf6f; - text-decoration: none; +.navbar { + z-index: 1100 !important; } -a:hover { - text-decoration: underline; -} - -button, -.button { - background-image: linear-gradient(to bottom, #888, #666); - border: 1px #000 solid; - color: #FFF; - text-align: center; - display: inline-block; - padding: 5px; - cursor: pointer; - text-shadow: 1px 1px 0 #444; -} - -button::-moz-focus-inner, -.button::-moz-focus-inner { - border: 0; -} - -button:disabled, -button:disabled:hover, -.button:disabled, -.button:disabled:hover { - background-image: none; - background-color: #666; - color: #AAA; - cursor: default; -} - -button:hover, -.button:hover { - background-image: linear-gradient(to bottom, #999, #777); - text-decoration: none; -} - -input[type="text"], -textArea { - background-color: #444; - border: 1px #000 solid; - margin-bottom: 4px; - padding: 5px 5px; - color: #FFF; - box-sizing: border-box; -} - -input[type="text"] { - height: 25px; -} - -header { - min-width: 360px; - height: 50px; - position: absolute; - background-color: #555; - border-right: 1px #000 solid; - border-bottom: 1px #000 solid; - z-index: 2000; - display: inline-block; -} - -@media (max-width: 600px) { - header{ - width: 100%; +@supports (backdrop-filter: blur()) { + .navbar, #offcanvasList, #offcanvasDraw { + -webkit-backdrop-filter: saturate(180%) blur(15px); + backdrop-filter: saturate(180%) blur(15px); + --bs-bg-opacity: .9 !important; } } +#offcanvasList, #offcanvasDraw { + top: 3.75rem; +} + +body[data-mode]:not([data-mode="draw"]) #drawNavButtons, [data-mode="draw"] #defaultNavButtons { + display: none; +} + @media (max-width: 400px) { - header h1{ - font-size: 28px; + .offcanvas-start.show { + border-right: none !important; } } -@media (max-width: 350px) { - header h1{ - font-size: 20px; - } -} - -header.aboutHeader { - width: 100%; - border-right: 0; -} - -header > a { - display: flex; - color: #FFF; - /*align-items: center;*/ -} - -header > a:hover { - text-decoration: none; - color: #FFAA00; -} - -header h1 { - font-size: 24px; -} - -#logo { - padding: 5px; - /*background-color: #FFF;*/ -} - -h1 { - font-weight: lighter; - padding: 0 10px; - display: inline-block; - margin-top: 0; - line-height: 45px; - position: absolute; - top: 0; - left: 50px; - text-shadow: 1px 1px 0 #000; -} - -select { - -moz-appearance: none; - -webkit-appearance: none; - appearance: none; - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15.264' height='15.313'%3E%3Cpath d='M188.363 392.51h15.264l-7.637 15.313-7.627-15.312' fill='%23fff' fill-opacity='.633' transform='translate(-188.363 -392.51)'/%3E%3C/svg%3E") - ,linear-gradient(to bottom, #888, #666); - background-repeat: no-repeat, repeat; - background-position: calc(100% - 10px) center, 0 0; - background-size: 10px, cover; - border: 1px #222 outset; - color: #FFF; - cursor: pointer; - padding: 3px; - padding-left: 7px; -} - -select option[disabled] { - display: none; -} - -select:hover { - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15.264' height='15.313'%3E%3Cpath d='M188.363 392.51h15.264l-7.637 15.313-7.627-15.312' fill='%23fff' fill-opacity='.633' transform='translate(-188.363 -392.51)'/%3E%3C/svg%3E") - ,linear-gradient(to bottom, #999, #777); -} - -select:active { - background-image: linear-gradient(to bottom, #666, #777); - background-color: #666; -} - -option, -optgroup { - background-color: #555; - font-size: 16px; - border-color: #BBB; -} - #linesCanvas { position: absolute; left: 0; @@ -232,9 +83,9 @@ #linesCanvas { } #container { - width: calc(100% - 320px); + width: calc(100% - 400px); height: 100%; - margin-left: 320px; + margin-left: 400px; touch-action: manipulation; @@ -250,7 +101,7 @@ #loading { left: 0; right: 0; bottom: 0; - z-index: 1000; + z-index: -10; } #loading > div { @@ -325,7 +176,7 @@ #image { height: 100%; width: 100%; z-index: -1500; - image-rendering: -moz-crisp-edges; + image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; } @@ -335,19 +186,18 @@ #highlightCanvas { position: absolute; height: 100%; width: 100%; - image-rendering: -moz-crisp-edges; + image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; -ms-interpolation-mode: nearest-neighbor; } #objectsList { max-width: 300px; - width: calc(100% - 10px); + width: 100%; position: absolute; right: 0; - top: 0; - padding: 0; - max-height: calc(100% - 40px); + top: 3.75rem; + max-height: calc(100% - 3.75rem); overflow-y: auto; z-index: 0; } @@ -356,22 +206,8 @@ #closeObjectsListButton { height: 40px; width: 40px; position: absolute; - top: 10px; - right: 310px; - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cg fill='none' stroke-width='24.749' stroke-linecap='square' stroke='%23fff'%3E%3Cpath d='m26.625 166.233 139.59-139.59M166.214 166.233 26.625 26.643' stroke-width='29.999747839999998'/%3E%3C/g%3E%3C/svg%3E") - ,linear-gradient(to bottom, #666, #444); - background-size: 15px, cover; - background-position: center, 0 0; - background-repeat: no-repeat, no-repeat; -} - -#closeObjectsListButton.hidden { - display: none; -} - -#closeObjectsListButton:hover { - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cg fill='none' stroke-width='24.749' stroke-linecap='square' stroke='%23fff'%3E%3Cpath d='m26.625 166.233 139.59-139.59M166.214 166.233 26.625 26.643' stroke-width='29.999747839999998'/%3E%3C/g%3E%3C/svg%3E") - ,linear-gradient(to bottom, #777, #555); + top: 4.25rem; + right: 300px; } @media (max-width: 750px) { @@ -383,516 +219,98 @@ @media (max-width: 750px) { } } -@media (max-width: 700px) { +@media (max-width: 576px) { #objectsList { - top: 50px; - max-height: calc(100% - 90px); + max-width: calc(300px - 3rem); } -} - -@media (max-width: 750px) { #closeObjectsListButton { - top: 60px; + right: calc(300px - 3rem); } } -@media (max-width: 530px) { - #objectsList { - top: 80px; - max-height: calc(100% - 130px); - } - - #closeObjectsListButton { - top: 55px; - right: 10px; - height: 30px; - width: 30px; +@media (max-width: 540px) { + div:not(.listHidden) > #bottomBar { + display: none !important; } } -.object { - background-color: #555; - border: 1px #000 solid; - margin: 10px 10px 0 0; - padding: 10px; - overflow-x: auto; +#objectDescription p { + margin-bottom: 0.5rem; } -.object:hover { - background-color: #666; - border-color: #FFF; -} - -.object:hover a { - background-color: #555; -} - -.object:hover h2 { - background-color: #777; -} - -.object > * { - display: block; -} - -.object h2 { - display: block; - font-size: 20px; - background-color: #666; - text-shadow: 1px 1px 0 #000; - margin: 0 -10px 10px -10px; - font-weight: 300; -} - -.object h2 a { - color: #FFF; - padding: 3px 10px; - display: block; - height: 100%; - width: 100%; -} - -.object h2 a:hover { - color: #FFAA00; -} - -.object a { - background-color: #666666; - text-align: center; - padding: 3px; - margin-bottom: 5px; -} - -.object a.inline { - background-color: transparent; - display: inline; - padding: 0; - margin: 0; -} - -.object a.inline:hover { - background-color: transparent; - text-decoration: underline; -} - -.object a:hover { - background-color: #777; - text-decoration: none; -} - -.object p { - margin-bottom: 10px; -} - -p.edit { - color: #FFFF00; -} -p.add { - color: #00FF00; -} -p.delete { - color: #FF0000; -} - -#drawControlsContainer { - background-color: #444; - border-right: 1px #000 solid; - width: 360px; - position: absolute; - left: 0; - top: 50px; - bottom: 0; - overflow-y: auto; - display: none; - padding: 0 20px; -} - -[data-mode="draw"] #drawControlsContainer { - display: block; -} - -#drawControls { - width: 250px; - padding: 15px; - margin: 10px auto; - background-color: #555; -} - -#drawBackButton { - margin: 10px auto 0 auto; - display: block; - width: 170px; -} - -#drawControls > * { - width: 100%; - display: flex; - justify-content: center; - margin-bottom: 5px; -} - -#drawControls > * > * { - flex-grow: 1; - margin-right: 5px; -} - -#drawControls > * > *:last-child { - margin-right: 0; -} - -.checkboxLabel { - background-color: #666; - padding: 3px; - cursor: pointer; -} - -.checkboxLabel:hover { - background-color: #777; -} - -#drawControls .checkboxLabel { - display: inline-block; -} - -input[type="checkbox"] { - margin: 3px; - vertical-align: middle; - display: inline-block; - width: 15px; - height: 15px; -} - -#hint { - display: block; - text-align: left; - color: #DDD; -} - -#hint p { - margin-bottom: 10px; -} - -#objectInfo { - display: none; -} - -#objectInfo input { - width: 100%; +#objectDescription p:last-child { + margin-bottom: 0; } #descriptionField { - width: 220px; + width: 100%; height: 70px; } -#infoButtons { - display: flex; - margin-top: 10px; -} - -#infoButtons button { - width: 50px; - flex-grow: 1; - margin-right: 10px; -} - -#infoButtons button:last-child { - margin-right: 0; -} - -.overlay { - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, .8); - display: none; - justify-content: center; - z-index: 1000; -} - -#exportWindow { - margin: 50px auto; - padding: 10px; - width: 100%; - height: calc(100% - 100px); - max-width: 500px; - /*max-height: 300px*/; - - border: 1px #000 solid; - background-color: #555; - - display: flex; - flex-direction: column; - overflow-y: auto; -} - -#exportWindow * { - flex-shrink: 0; - margin-bottom: 10px; -} - -#exportWindow p { - -} - #exportString { - flex-grow: 1; - flex-shrink: 0; -} - -#exportCloseButton { - margin-bottom: 0; - width: 100px; - align-self: flex-end; -} - -#exportOverlay { - display: none; -} - -#coordsWrapper { - min-width: 100px; - position: absolute; - display: flex; - gap: 10px; - z-index: 100; - top: 5px; - left: 364px; -} - -#wrapper.listHidden #coordsWrapper { - top: 49px; - left: 149px; -} - -@media (max-width: 750px) { - #coordsWrapper { - display: none; - } -} -#coords { - background-color: #555; - border: 1px #000 solid; - padding: 6.5px; - font-size: 17px; - display: flex; - align-items: center; - justify-content: center; - text-align: center; -} - -#coords p { - margin: 0; - line-height: inherit; + min-height: 300px; } #bottomBar { position: absolute; - bottom: 10px; - left: 10px; - right: 10px; - display: flex; - gap: 10px; + bottom: 0; + left: 0; + right: 0; } div:not(.listHidden) > #bottomBar { - left: 370px !important; -} - -@media (max-width: 1120px) { - div:not(.listHidden) > #bottomBar { - flex-wrap: wrap; - } - - .listHidden #author { - flex: 1 !important; - } -} - -@media (max-width: 800px) { - #bottomBar { - flex-wrap: wrap; - } - - #timeControls { - min-width: calc(100vw - 390px) !important; - } - - #author { - flex: 1; - min-width: 100% !important; - } + left: 400px !important; } #timeControls { - flex: 1; - background-color: #555; - border: 1px #000 solid; - font-size: 12px; - text-align: center; - min-width: 300px; position: relative; + flex-grow: 2; } #timeControls input { height: 100%; - background: #555; -webkit-appearance: none; appearance: none; width: 100%; } #timeControlsTooltip { - display: none; + opacity: 0; position: absolute; - padding: 0.5em 2em; - background: #555; - border: 1px #000 solid; - justify-content: center; bottom: 40px; - white-space: nowrap; } -#timeControlsTooltip p { - line-height: normal; - margin-bottom: 0; +@supports (backdrop-filter: blur()) { + #timeControlsTooltip div { + -webkit-backdrop-filter: saturate(180%) blur(15px); + backdrop-filter: saturate(180%) blur(15px); + --bs-bg-opacity: .8 !important; + } } -#timeControls:hover #timeControlsTooltip { - display: flex; +#timeControls:hover #timeControlsTooltip, #timeControlsSlider:focus #timeControlsTooltip { + opacity: 1; } .slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; - width: 10px; - height: 25px; - background: #d3d3d3; + width: 1rem; + height: 2rem; + background: var(--bs-light); + border-radius: .25rem; cursor: pointer; - } - - .slider::-moz-range-thumb { + box-shadow: 0 .5rem 1rem rgba(17,17,17,.5); +} + +.slider::-moz-range-thumb { appearance: none; - width: 10px; - height: 25px; - background: #d3d3d3; + width: 1rem; + height: 2rem; + background: var(--bs-light); + border-radius: .25rem; cursor: pointer; - } - -#author { - background-color: #555; - border: 1px #000 solid; - padding: 3px; - font-size: 12px; - z-index: 1100; - min-width: 320px; - text-align: center; - display: flex; - align-items: center; - justify-content: center; -} - -#author p { - margin: 0; - line-height: inherit; -} - -#zoomControls { - width: 90px; - display: flex; - align-self: flex-end; -} - -#zoomControls button { - display: inline-block; - height: 30px; - width: 30px; - margin-left: -1px; - flex-grow: 1; - font-size: 20px; - line-height: 0; - font-weight: 300; - background-size: 15px; - background-repeat: no-repeat; - background-position: center; - background-color: #555; -} - -#zoomControls button:focus { - outline: none; -} - -#zoomControls button:hover { - background-color: #666; -} - -#zoomInButton { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cpath d='M171.429 495.22h162.857M252.857 413.79v162.858' style='fill:none;stroke:%23fff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='translate(-156.438 -398.781)'/%3E%3C/svg%3E"); -} - -button#zoomResetButton { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cpath d='M334.284 576.652h-162.85l-.001-162.866h162.85z' style='fill:none;stroke:%23fff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='translate(-156.438 -398.781)'/%3E%3C/svg%3E"); -} - -#zoomOutButton { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cpath d='M171.429 495.22h162.857' style='fill:none;stroke:%23fff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='translate(-156.438 -398.781)'/%3E%3C/svg%3E"); -} - -#entriesListContainer { - position: absolute; - left: 10px; - top: 50px; - bottom: 0; - padding-bottom: 0; - width: 340px; - display: flex; - flex-direction: column; -} - -@media (max-width: 500px) { - div#entriesListContainer { - width: calc(100% - 20px); - } - - div#entriesListBackground { - width: 100%; - } - - div:not(.listHidden) > #bottomBar { - display: none !important; - } - - div:not(.listHidden) > button#hideListButton { - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='192.844' height='192.875'%3E%3Cg style='stroke:%23fff;stroke-opacity:1'%3E%3Cpath d='m195.278 552.798 115.158-115.157M310.436 552.798 195.278 437.641' style='fill:none;stroke:%23fff;stroke-width:24.74926186;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='matrix(1.21216 0 0 1.21216 -210.083 -503.846)'/%3E%3C/g%3E%3C/svg%3E"); - background-size: 20px; - position: absolute; - top: 55px; - right: 10px; - left: initial; - border: 1px #000 solid; - width: 40px; - height: 40px; - } - - #entriesListNav { - width: calc(100% - 45px); - } -} - -@media (max-width: 350px) { - #entriesListNav > a#drawLink { - display: none; - } -} - -[data-mode="draw"] #entriesListContainer { - display: none; -} - -.listHidden #entriesListContainer { - display: none; + box-shadow: 0 .5rem 1rem rgba(17,17,17,.5); } #entriesListNav { @@ -937,334 +355,14 @@ #entriesListNav > .small:hover { border-color: transparent; } -#entriesListDonate:hover > svg { - text-decoration: none; - background-image: linear-gradient(to bottom, #FFAA00, #FFAA00); - border-radius: 15px; - padding: 3px; - margin: -3px; - height: 28px; - width: 28px; -} -#entriesListDiscord:hover > svg { - text-decoration: none; - background-image: linear-gradient(to bottom, #7289DA, #7289DA); - border-radius: 12px; - padding: 3px; - margin: -3px; - height: 28px; - width: 28px; -} - -#entriesListBackground { - position: absolute; - left: 0; - top: 50px; - bottom: 0; - width: 360px; - z-index: -400; - background-color: #333; - border-right: 1px #000 solid; -} - -[data-mode="draw"] #entriesListBackground { - display: none; -} - -.listHidden #entriesListBackground { - display: none; -} - -#hideListButton { - position: absolute; - height: 100px; - width: 15px; - top: 60px; - left: 360px; - border-left: none; - background-color: #444; - background-size: 7px; - background-repeat: no-repeat; - background-position: center; - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='165.157' height='260.426'%3E%3Cpath d='M310.436 552.798 195.278 437.585l115.158-115.213' style='fill:none;stroke:%23fff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='translate(-170.278 -307.372)'/%3E%3C/svg%3E"); -} - -.listHidden #hideListButton::before { - content: "Show List"; - font-size: 17px; - font-weight: 300; - color: #BBB; - margin-left: 20px; -} - -#hideListButton:hover { - background-color: #555; -} - -[data-mode="draw"] #hideListButton { - display: none; -} - -.listHidden #hideListButton { - background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='272.844' height='177.594'%3E%3Cpath d='M368.07 380.006 252.857 495.164 137.644 380.006' style='fill:none;stroke:%23fff;stroke-width:30;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none' transform='translate(-116.438 -348.781)'/%3E%3C/svg%3E") - ,linear-gradient(to bottom, #555, #444); - background-size: 15px, cover; - background-position: 10px center, 0 0; - top: 49px; - left: 20px; - border: 1px #000 solid; - border-top: 1px #333 solid; - width: 130px; - height: 35px; - z-index: 100; -} - -#hideListButton:focus { - outline: none; -} - -#entriesListControls { - background-color: #555; - border: 1px #000 solid; - color: #CCC; - padding: 10px; - margin-bottom: 10px; -} - -#entriesListControls input:focus { - outline: none; - border-color: #CCC; -} - [data-mode="explore"] #entriesListControls { display: none; } -#atlasSize { - display: block; - margin: 3px 0 5px 0; -} - -#searchList { - width: 100%; -} - -#sortContainer { - -} - -#sortContainer label { - width: 70px; -} - -#sort { - width: 150px; -} - -#entriesListControls { - width: 100%; -} - -#entriesList { - overflow-y: auto; - direction: rtl; - padding-bottom: 10px; - text-align: center; -} - -#entriesList .object { - direction: ltr; - margin: 0 0 10px 5px; - text-align: left; -} - -#aboutContainer { - position: absolute; - top: 50px; - left: 0; - right: 0; - bottom: 0; - background-color: #333; - display: block; - z-index: 2000; - overflow-y: auto; -} - -#aboutBackButton { - margin: 20px 0 20px; - padding: 10px 20px; -} - -#aboutBackButtonContainer { - /*margin: 0 auto; - width: 100%; - max-width: 1300px;*/ -} - -#about { - margin: 0 auto; - width: 100%; - max-width: 1000px; - padding: 10px; -} - -#about a { - white-space: nowrap; -} - -#about h2 { - font-weight: 300; - font-size: 30px; - margin-top: 30px; - margin-bottom: 10px; -} - -#about h3 { - line-height: 1.4em; - text-align: center; -} - -#contributors { - text-align: justify; - margin-top: 15px; - margin-bottom: 15px; -} - -#contributors a { - margin: 3px; - line-height: 26px; -} - -#donateButton { - cursor: pointer; -} - -#donateWindow { - display: inline-block; - z-index: 2000; - max-width: 400px; - background-color: #444; - border: 1px #000 solid; - width: 100%; - text-align: center; - min-height: 50px; - max-height: 500px; - overflow: auto; - height: auto; - align-self: center; -} - -#donateWindow { - top: 20px; - max-height: 100%; - max-width: 800px; -} - -#donateWindow > p { - margin: 2px 0; - padding: 0 20px; - text-align: left; - width: 100%; -} - -#donateWindow > * { - display: inline-block; - margin: 5px 0; -} - -#donateWindow > h2 { - font-weight: 200; - background-color: #555; - width: 100%; - line-height: 1.5em; - margin: 10px 0; - text-shadow: 1px 1px 0 #000; -} - -#donateWindow input { - width: 100%; - max-width: 350px; - font-size: 14px; - background-color: #666; - text-align: center; - cursor: text; - color: #FFF; -} - -#donateWindow button { - padding: 10px 20px; - margin-bottom: 20px; - margin-top: 10px; -} - -h2#abouth2 { - font-size: 40px; - margin-bottom: 20px; - text-shadow: 2px 2px 0 #000; -} - -#viewModes { - position: relative; - display: inline-block; -} - -#viewModes .buffer { - bottom: -10px; - left: 0; - position: absolute; - height: 20px; - width: 100% -} - -#viewModes .dropdown-content { - margin-top: 1.5rem; - top: 10px; - left: 0; - position: absolute; - display: none; - background: #666; - border: 1px #000 solid; - cursor: pointer; - width: 125% -} - -#viewModes .dropdown-content a { - color: #FFF; - text-align: left; - padding: 5px 10px; - display: block; - text-decoration: none; - text-shadow: 1px 1px 0 #444; -} - -#viewModes .dropdown-content a:hover { - background-image: linear-gradient(to bottom, #999, #777); -} - -#viewModes:hover .dropdown-content, -#viewModes:active .dropdown-content { - display: block; -} - body:not([data-dev]) .show-only-on-dev { display: none !important; } -#netlifyBadges { - display: flex; - align-items: center; - gap: .5rem -} - -#donateWindow a.button { - padding: 1rem -} - -#donateWindow a.button svg { - height: 1em; - vertical-align: -0.125em; -} - -#donateWindow a.button path { - color: white; +.nav-link.active { + font-weight: 700; } \ No newline at end of file diff --git a/web/_img/logo.svg b/web/_img/logo.svg index a53fd296..1ce7808f 100644 --- a/web/_img/logo.svg +++ b/web/_img/logo.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/web/_js/draw.js b/web/_js/draw.js index 7026b86e..e4eca5bf 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -15,26 +15,34 @@ function initDraw(){ + // Set up interface wrapper.classList.remove('listHidden') + var backButton = document.getElementById("showListButton"); + backButton.insertAdjacentHTML("afterend", 'Exit Draw Mode'); + + var myOffcanvas = document.getElementById("offcanvasDraw"); + var bsOffcanvas = new bootstrap.Offcanvas(myOffcanvas); + bsOffcanvas.show(); + window.render = render window.renderBackground = renderBackground window.updateHovering = updateHovering + // Initialize variables var finishButton = document.getElementById("finishButton"); var resetButton = document.getElementById("resetButton"); var undoButton = document.getElementById("undoButton"); var redoButton = document.getElementById("redoButton"); - var highlightUnchartedLabel = document.getElementById("highlightUnchartedLabel"); - var objectInfoBox = document.getElementById("objectInfo"); - var hintText = document.getElementById("hint"); + var drawControlsBody = document.getElementById("offcanvasDraw-drawControls"); + var objectInfoBody = document.getElementById("offcanvasDraw-objectInfo"); + var objectInfoForm = document.getElementById("objectInfo"); - var exportButton = document.getElementById("exportButton"); var cancelButton = document.getElementById("cancelButton"); - var exportOverlay = document.getElementById("exportOverlay"); - var exportCloseButton = document.getElementById("exportCloseButton"); + var exportModal = new bootstrap.Modal(document.getElementById("exportModal")) + var exportModalElement = document.getElementById("exportModal") var rShiftPressed = false; var lShiftPressed = false; @@ -116,14 +124,10 @@ function initDraw(){ }); window.addEventListener("keyup", function(e){ - if(e.key == "Enter"){ - finish(); - } else if(e.key == "z" && e.ctrlKey){ + if (e.key == "z" && e.ctrlKey){ undo(); } else if(e.key == "y" && e.ctrlKey){ redo(); - } else if(e.key == "Escape"){ - exportOverlay.style.display = "none"; } else if (e.key === "Shift" ){ if(e.code === "ShiftRight"){ rShiftPressed = false; @@ -135,7 +139,9 @@ function initDraw(){ }); window.addEventListener("keydown", function(e){ - if (e.key === "Shift" ){ + if (e.key == "Enter"){ + finish(); + } else if (e.key === "Shift" ){ if(e.code === "ShiftRight"){ rShiftPressed = true; } else if(e.code === "ShiftLeft"){ @@ -165,37 +171,17 @@ function initDraw(){ reset(); }); - document.getElementById("nameField").addEventListener("keyup", function(e){ - if(e.key == "Enter"){ - exportJson(); - } + // refocus on button when modal is closed + exportModalElement.addEventListener('hidden.bs.modal', function() { + document.getElementById("exportButton").focus(); }); - document.getElementById("websiteField").addEventListener("keyup", function(e){ - if(e.key == "Enter"){ - exportJson(); - } + // bind it the same as you bind a button, but on submit + objectInfoForm.addEventListener('submit', function(e) { + e.preventDefault() + exportJson() }); - document.getElementById("subredditField").addEventListener("keyup", function(e){ - if(e.key == "Enter"){ - exportJson(); - } - }); - - exportButton.addEventListener("click", function(e){ - exportJson(); - }); - - exportCloseButton.addEventListener("click", function(e){ - reset(); - exportOverlay.style.display = "none"; - }); - - exportCloseButton.addEventListener("click", function(e){ - exportDirectPost(); - }) - document.getElementById("highlightUncharted").addEventListener("click", function(e){ highlightUncharted = this.checked; render(path); @@ -221,13 +207,9 @@ function initDraw(){ var directPostUrl = "https://www.reddit.com/r/placeAtlas2/submit?selftext=true&title=New%20Submission&text="+encodeURIComponent(document.getElementById("exportString").value); document.getElementById("exportDirectPost").href=directPostUrl; - exportOverlay.style.display = "flex"; - - textarea.focus(); - textarea.select(); + exportModal.show(); } - function calculateCenter(path){ var area = 0, @@ -275,16 +257,13 @@ function initDraw(){ } function finish(){ - drawing = false; - render(path); - objectInfoBox.style.display = "block"; - hintText.style.display = "none"; - finishButton.style.display = "none"; - undoButton.style.display = "none"; - redoButton.style.display = "none"; - resetButton.style.display = "none"; - highlightUnchartedLabel.style.display = "none"; - document.getElementById("nameField").focus(); + if(drawing) { + drawing = false; + render(path); + objectInfoBody.removeAttribute("style"); + drawControlsBody.style.display = "none"; + document.getElementById("nameField").focus(); + } } function reset(){ @@ -295,13 +274,8 @@ function initDraw(){ redoButton.disabled = true; drawing = true; render(path); - objectInfoBox.style.display = "none"; - hintText.style.display = "block"; - finishButton.style.display = "block"; - undoButton.style.display = "block"; - redoButton.style.display = "block"; - resetButton.style.display = "block"; - highlightUnchartedLabel.style.display = "block"; + objectInfoBody.style.display = "none"; + drawControlsBody.removeAttribute("style"); document.getElementById("nameField").value = ""; document.getElementById("descriptionField").value = ""; @@ -379,11 +353,13 @@ function initDraw(){ ,(e.clientY - (container.clientHeight/2 - innerContainer.clientHeight/2 + zoomOrigin[1] + container.offsetTop))/zoom ]; var coords_p = document.getElementById("coords_p"); - coords_p.innerText = Math.ceil(pos[0]) + ", " + Math.ceil(pos[1]); - + + // Displays coordinates as zero instead of NaN + if (isNaN(pos[0]) == true) { + coords_p.innerText = "0, 0"; + } else { + coords_p.innerText = Math.ceil(pos[0]) + ", " + Math.ceil(pos[1]); + } } } - } - - diff --git a/web/_js/infoblock.js b/web/_js/infoblock.js index 3ee3065c..5033556d 100644 --- a/web/_js/infoblock.js +++ b/web/_js/infoblock.js @@ -14,10 +14,22 @@ */ function createInfoBlock(entry) { - function createInfoParagraph(name, value){ - let entryParagraphPositionElement = document.createElement("p"); + function createInfoItem(name, value){ + let entryParagraphPositionElement = document.createElement("div"); let nameElement = document.createElement("span"); - nameElement.style.fontWeight = "bold"; + nameElement.className = "fw-bold"; + nameElement.innerText = name; + let valueElement = document.createElement("span"); + valueElement.innerText = value; + entryParagraphPositionElement.appendChild(nameElement); + entryParagraphPositionElement.appendChild(valueElement); + return entryParagraphPositionElement; + } + function createInfoListItem(name, value){ + let entryParagraphPositionElement = document.createElement("li"); + entryParagraphPositionElement.className = "list-group-item"; + let nameElement = document.createElement("span"); + nameElement.className = "fw-bold"; nameElement.innerText = name; let valueElement = document.createElement("span"); valueElement.innerText = value; @@ -27,44 +39,62 @@ function createInfoBlock(entry) { } var element = document.createElement("div"); - element.className = "object"; + element.className = "card mb-2 overflow-hidden shadow"; - let headerElement = document.createElement("h2"); + let headerElement = document.createElement("h4"); + headerElement.className = "card-header"; let linkElement = document.createElement("a"); + linkElement.className = "text-decoration-none d-flex justify-content-between"; linkElement.href = "#" + entry.id; - linkElement.innerText = entry.name; + let linkNameElement = document.createElement("span"); + linkNameElement.className = "flex-grow-1 text-break"; + linkNameElement.innerText = entry.name; headerElement.appendChild(linkElement); + linkElement.appendChild(linkNameElement); + linkElement.insertAdjacentHTML("beforeend", '');// ''); + + let bodyElement = document.createElement("div"); element.appendChild(headerElement); - - if (entry.diff) { - let diffElement = createInfoParagraph("Diff: ", entry.diff); - diffElement.className = entry.diff; - element.appendChild(diffElement); - } + element.appendChild(bodyElement); if (entry.description) { - let descElement = document.createElement("p"); - descElement.innerText = entry.description; - element.appendChild(descElement); + let descElement = document.createElement("div"); + descElement.id = "objectDescription"; + // descElement.innerText = entry.description; + descElement.innerHTML = '

' + entry.description.replace(/\n/g, '

'); + bodyElement.appendChild(descElement); } - - let [x, y] = entry.center; - element.appendChild(createInfoParagraph("Position: ", `${Math.floor(x)}, ${Math.floor(y)}`)); - if(entry.path){ - let area = calcPolygonArea(entry.path); - element.appendChild(createInfoParagraph("Area: ", `${area} pixels`)); + let linkListElement = document.createElement("div"); + if (entry.description || entry.website || entry.subreddit) { + bodyElement.className = "card-body d-flex flex-column gap-3"; + + if (entry.website || entry.subreddit) { + linkListElement.className = "d-flex flex-column gap-2"; + bodyElement.appendChild(linkListElement); + } } - + if (entry.website) { + let websiteGroupElement = document.createElement("div"); + websiteGroupElement.className = "btn-group"; + linkListElement.appendChild(websiteGroupElement); + let websiteLinkElement = document.createElement("a"); + websiteLinkElement.className = "btn btn-primary" websiteLinkElement.target = "_blank"; websiteLinkElement.href = entry.website; websiteLinkElement.innerText = "Website"; - element.appendChild(websiteLinkElement); + websiteGroupElement.appendChild(websiteLinkElement); } + + if (entry.subreddit) { + let subredditGroupElement = document.createElement("div"); + subredditGroupElement.className = "btn-group-vertical"; + linkListElement.appendChild(subredditGroupElement); + var subreddits = entry.subreddit.split(","); for (var i in subreddits) { @@ -75,15 +105,52 @@ function createInfoBlock(entry) { subreddit = "/r/" + subreddit; } let subredditLinkElement = document.createElement("a"); + subredditLinkElement.className = "btn btn-primary text-truncate"; subredditLinkElement.target = "_blank"; + subredditLinkElement.rel = "noopener noreferrer"; subredditLinkElement.href = "https://reddit.com" + subreddit; subredditLinkElement.innerText = subreddit; - element.appendChild(subredditLinkElement); + subredditGroupElement.appendChild(subredditLinkElement); } } - let idElement = createInfoParagraph("ID: ", entry.id); - idElement.style.fontFamily = "Dejavu Sans Mono, sans, Sans-Serif;"; - element.appendChild(idElement); + + let listElement = document.createElement("ul"); + listElement.className = "list-group list-group-flush"; + element.appendChild(listElement); + + if (entry.diff) { + let diffElement = createInfoListItem("Diff: ", entry.diff); + if (entry.diff == "add") { + diffElement.className = "list-group-item list-group-item-success"; + } else if (entry.diff == "edit") { + diffElement.className = "list-group-item list-group-item-warning"; + } else if (entry.diff == "delete") { + diffElement.className = "list-group-item list-group-item-danger"; + } + listElement.appendChild(diffElement); + } + + let [x, y] = entry.center; + listElement.appendChild(createInfoListItem("Position: ", `${Math.floor(x)}, ${Math.floor(y)}`)); + + if(entry.path){ + let area = calcPolygonArea(entry.path); + listElement.appendChild(createInfoListItem("Area: ", `${area} pixels`)); + } + + let idElement = createInfoItem("ID: ", entry.id); + let idElementContainer = document.createElement("div"); + idElementContainer.className = "card-footer d-flex justify-content-between align-items-center"; + idElementContainer.appendChild(idElement); + element.appendChild(idElementContainer); + + let editElement = document.createElement("button"); + editElement.type = "button"; + editElement.innerText = "Edit"; + editElement.className = "btn btn-sm btn-outline-primary"; + editElement.href = "./?mode=draw&id=" + entry.id; + idElementContainer.appendChild(editElement); + return element; } \ No newline at end of file diff --git a/web/_js/main.js b/web/_js/main.js index 92acbcc7..8799eaea 100644 --- a/web/_js/main.js +++ b/web/_js/main.js @@ -37,13 +37,13 @@ var lastPosition = [0, 0]; var viewportSize = [0, 0]; -document.getElementById("entriesListDonate").addEventListener("click", function(e){ - document.getElementById("donateOverlay").style.display = "flex"; -}); +// document.getElementById("entriesListDonate").addEventListener("click", function(e){ +// document.getElementById("donateOverlay").style.display = "flex"; +// }); -document.getElementById("closeDonateButton").addEventListener("click", function(e){ - document.getElementById("donateOverlay").style.display = "none"; -}); +// document.getElementById("closeDonateButton").addEventListener("click", function(e){ +// document.getElementById("donateOverlay").style.display = "none"; +// }); function applyView(){ diff --git a/web/_js/time.js b/web/_js/time.js index 76e23a42..db688a2e 100644 --- a/web/_js/time.js +++ b/web/_js/time.js @@ -125,8 +125,8 @@ async function updateTime(index) { atlas = [] } timeCallback(atlas) - if (typeof configObject.timestamp === "number") tooltip.querySelector('p').textContent = new Date(configObject.timestamp*1000).toUTCString() - else tooltip.querySelector('p').textContent = configObject.timestamp + if (typeof configObject.timestamp === "number") tooltip.querySelector('div').textContent = new Date(configObject.timestamp*1000).toUTCString() + else tooltip.querySelector('div').textContent = configObject.timestamp tooltip.style.left = (((slider.offsetWidth)*(slider.value-1)/(slider.max-1)) - tooltip.offsetWidth/2) + "px" } diff --git a/web/_js/view.js b/web/_js/view.js index 55477eaa..62368335 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -33,7 +33,6 @@ var closeObjectsListButton = document.getElementById("closeObjectsListButton"); var filterInput = document.getElementById("searchList"); var entriesList = document.getElementById("entriesList"); -var hideListButton = document.getElementById("hideListButton"); var entriesListShown = false; var sortedAtlas; @@ -42,6 +41,8 @@ var entriesLimit = 50; var entriesOffset = 0; var moreEntriesButton = document.createElement("button"); moreEntriesButton.innerHTML = "Show "+entriesLimit+" more"; +moreEntriesButton.type = "button" +moreEntriesButton.className = "btn btn-primary d-block mb-2 mx-auto" moreEntriesButton.id = "moreEntriesButton"; moreEntriesButton.onclick = function(){ buildObjectsList(null, null); @@ -56,16 +57,6 @@ var lastPos = [0, 0]; var fixed = false; // Fix hovered items in place, so that clicking on links is possible -if(document.documentElement.clientWidth > 2000){ - entriesListShown = true; - wrapper.classList.remove('listHidden') -} - -if(document.documentElement.clientWidth < 2000){ - entriesListShown = false; - wrapper.classList.add('listHidden') -} - filterInput.addEventListener("input", function(e){ entriesOffset = 0; entriesList.innerHTML = ""; @@ -95,25 +86,43 @@ document.getElementById("sort").addEventListener("input", function(e){ }); -hideListButton.addEventListener("click", function(e){ - entriesListShown = !entriesListShown; - if(entriesListShown){ - wrapper.classList.remove('listHidden') - } else { - wrapper.classList.add('listHidden') - } +var showDraw = document.getElementById('offcanvasDraw') +showDraw.addEventListener('show.bs.offcanvas', function() { + wrapper.classList.remove('listHidden'); + applyView(); +}) + +var hideDraw = document.getElementById('offcanvasDraw') +hideDraw.addEventListener('hide.bs.offcanvas', function() { + wrapper.classList.add('listHidden'); + applyView(); +}) + +var showList = document.getElementById('offcanvasList') +showList.addEventListener('show.bs.offcanvas', function(e) { + entriesListShown = true; + wrapper.classList.remove('listHidden'); updateHovering(e); applyView(); render(); updateLines(); - return false; }); -closeObjectsListButton.addEventListener("click", function(e){ +var hideList = document.getElementById('offcanvasList') +hideList.addEventListener('hide.bs.offcanvas', function(e) { + entriesListShown = false; + wrapper.classList.add('listHidden'); + updateHovering(e); + applyView(); + render(); + updateLines(); +}); + +closeObjectsListButton.addEventListener("click", function(){ hovered = []; objectsContainer.innerHTML = ""; updateLines(); - closeObjectsListButton.className = "hidden"; + closeObjectsListButton.className = "d-none"; fixed = false; render(); }); @@ -140,7 +149,7 @@ objectsContainer.addEventListener("scroll", function(e){ updateLines(); }); -window.addEventListener("resize", function(){ +window.addEventListener("resize", function(e){ //console.log(document.documentElement.clientWidth, document.documentElement.clientHeight); var viewportWidth = document.documentElement.clientWidth; @@ -621,7 +630,13 @@ function updateHovering(e, tapped){ ,(e.clientY - (container.clientHeight/2 - innerContainer.clientHeight/2 + zoomOrigin[1] + container.offsetTop))/zoom ]; var coords_p = document.getElementById("coords_p"); - coords_p.innerText = Math.ceil(pos[0]) + ", " + Math.ceil(pos[1]); + + // Displays coordinates as zero instead of NaN + if (isNaN(pos[0]) == true) { + coords_p.innerText = "0, 0"; + } else { + coords_p.innerText = Math.ceil(pos[0]) + ", " + Math.ceil(pos[1]); + } if(pos[0] <= 2200 && pos[0] >= -100 && pos[0] <= 2200 && pos[0] >= -100){ var newHovered = []; @@ -660,9 +675,9 @@ function updateHovering(e, tapped){ } if(hovered.length > 0){ - closeObjectsListButton.className = ""; + closeObjectsListButton.className = "btn btn-secondary shadow"; } else { - closeObjectsListButton.className = "hidden"; + closeObjectsListButton.className = "d-none"; } @@ -689,6 +704,18 @@ function highlightEntryFromUrl(){ document.title = entry.name + " on the 2022 /r/place Atlas"; + var objectEditNav = document.getElementById("objectEditNav"); + if (objectEditNav) { + objectEditNav.href = "./?mode=draw&id=" + id; + objectEditNav.title = "Edit " + entry.name; + } + else { + document.getElementById("showListButton").insertAdjacentHTML("afterend", 'Edit'); + let objectEditNav = document.getElementById("objectEditNav"); + objectEditNav.href = "./?mode=draw&id=" + id; + objectEditNav.title = "Edit " + entry.name; + } + var infoElement = createInfoBlock(entry); objectsContainer.innerHTML = ""; objectsContainer.appendChild(infoElement); @@ -716,7 +743,7 @@ function highlightEntryFromUrl(){ hovered = [entry]; render(); hovered[0].element = infoElement; - closeObjectsListButton.className = ""; + closeObjectsListButton.className = "btn btn-secondary shadow"; updateLines(); fixed = true; } diff --git a/web/about.html b/web/about.html index 35ca116e..2ae73f76 100644 --- a/web/about.html +++ b/web/about.html @@ -24,80 +24,118 @@ - + + - + + + - -

-
- - -

The 2022 /r/place Atlas

+
- -
- Code by . Source on GitHub (2022 Version Github). -
- - -
-
- < Back to the Atlas - - Deploys by Netlify - Deploys by Netlify - -

The 2022 /r/place Atlas

-

This is an Atlas aiming to chart all the artworks created during the /r/place April Fools event on Reddit in 2022.

-

The original code was developed by (mail, reddit) and is available under the free AGPL license on GitHub.

-
-

The currently maintained version of the website is managed by and is obtainable under the same license within a GitHub fork. Images are provided by Alex Tsernoh.

-

Maintaining and updating the website takes work, but I enjoy doing it for free and giving this to people. But if you would like to support me, or the people who helped me with contributions to this project. You're free to support us though PayPal, Patreon, or Ko-Fi.

-

To maintain the same tradition, I will also be offering stickers to anyone donating more then 20$ (Due to the size increase). But, you're not forced to do anything! This only shows appreciation to us and the people who've worked on this project

-
-

Roland Rytz worked on the Atlas full-time (and more!) for over two weeks during the 2017 r/place event.

-

If you'd like to support Roland, you can do so by PayPal.

-

If you donate more than 10(€/$/CHF/mBTC), He'll (hopefully) send you a nice sticker of the 2017 Place canvas!

- -

How to contribute

-

The /r/Place Atlas project relies on user contributions.

-

To contribute a label for an artwork, please read this post on Reddit to learn how to submit a new entry.

-

Alternatively, contributions can be made directly on GitHub.

-

The /r/placeAtlas2 subreddit is also the place to submit all bug reports, feature requests or questions.

- - -

r/placeAtlas2 (Current) Contributors and Maintainers

- -

The 2022 Atlas would not have been possible without the help of our reddit contributors. This section will be updated with all of the contributor's usernames.

-

Thank you to everyone who submitted new entries, amended existing ones, reported bugs and just supported the project in general.

- -

Contact?

-

If you're press, a influencer or anything media connected, or you would like to use the atlas in one. Please contact us beforehand through:

-

- press@stefanocoding.me

-
-

If you need to contact me regarding anything else, you can reach me through:

-

- stefano@stefanocoding.me

-
+ +
-
+ +
+
+ + +
+
+

The 2022 /r/place Atlas

+

This is an Atlas aiming to chart all the artworks created during the /r/place April Fools event on Reddit in 2022.

+

The original code was developed by Roland Rytz (mail, reddit) and is available under the free AGPL license on GitHub.

+
+

The currently maintained version of the website is managed by Stefano Haagmans and is obtainable under the same license within a GitHub fork. Images are provided by Alex Tsernoh.

+

Maintaining and updating the website takes work, but I enjoy doing it for free and giving this to people. But if you would like to support me, or the people who helped me with contributions to this project. You're free to support us though PayPal, Patreon, or Ko-Fi.

+

To maintain the same tradition, I will also be offering stickers to anyone donating more then 20$ (Due to the size increase). But, you're not forced to do anything! This only shows appreciation to us and the people who've worked on this project

+

Roland Rytz worked on the Atlas full-time (and more!) for over two weeks during the 2017 r/place event. If you'd like to support Roland, you can do so by PayPal. If you donate more than 10(€/$/CHF/mBTC), He'll (hopefully) send you a nice sticker of the 2017 Place canvas!

+

How to contribute

+

The /r/place Atlas project relies on user contributions.

+

To contribute a label for an artwork, please read this post on Reddit to learn how to submit a new entry. Alternatively, contributions can be made directly on GitHub.

+

The /r/placeAtlas2 subreddit is also the place to submit all bug reports, feature requests or questions.

+ +

Contributors and Maintainers

+ +

The 2022 Atlas would not have been possible without the help of our reddit contributors. This section will be updated with all of the contributor's usernames.

+

Thank you to everyone who submitted new entries, amended existing ones, reported bugs and just supported the project in general.

+
+
+
+
+

Contact?

+

If you're press, a influencer or anything media connected, or you would like to use the atlas in one. Please contact us beforehand through:

+ +

If you need to contact me regarding anything else, you can reach me through:

+ +
+
+

Sponsor this project

+

Current 2022 Atlas Maintainers:

+ +
+
+

Deployment

+

Site powered by Netlify.

+ + Deploys by Netlify + Deploys by Netlify + +
+
+
+
+ +
+
+ diff --git a/web/index.html b/web/index.html index 4567c057..4f1d4c7e 100644 --- a/web/index.html +++ b/web/index.html @@ -37,13 +37,16 @@ - - + + - + + + + @@ -79,20 +82,44 @@ -
-
- - - -

The 2022 /r/place Atlas

-
+
- + + +
+ +
+ +
@@ -112,160 +139,274 @@

The 2022 /r/place Atlas

Canvas of /r/place in the state of when the experiment was concluded.
- -
- -
- - -
- + + +
+
+ + + +
+
+ +
+
+ Code owned by Place Atlas. Source on GitHub. Site powered by Netlify. Images provided by Alex Tsernoh. +
+
+
+
+
+
Edit Entry
-
-
- -
-
-
- - + + +
+
+
+ + +
+ + - - -
-
- - - -
-
-

Time control slider

- -
-
-

Code owned by . Source on GitHub. Site powered by Netlify. Images provided by Alex Tsernoh.

-
-
- -
- < Back to the Atlas -
-
- - +
+ + +
- - - -
- - - - - - - - -
- - +
+

Please read this Reddit post for instructions.

+
+

You can suggest new entries to the Atlas for art that isn't mapped yet.

+

Click anywhere on the image to start drawing a shape. When you're happy with the result, click the "Finish" button above or press the Enter key.

+

You can then add more information about your object.

+
+
+

Need Help?

+

You can ask for help on our Discord server!

-
-

You can suggest new entries to the Atlas for art that isn't mapped yet.

-

Please read this reddit post for instructions.

-

Click anywhere on the image to start drawing a shape. - When you're happy with the result, click the "Finish" button above or press the Enter key.

-

You can then add more information about your object.

-
-

Need Help?

- You can ask for help on our Discord server!
-
+
- - -
-
- -
-
-

Recommended: Post directly after clicking this button. Don't forget to flair it with the "New Entry" tag.

- -
- or... -

Please copy the text below and submit it as a - new text post to /r/placeAtlas2 on Reddit.

+ +
+
+
@@ -405,7 +408,6 @@
-
From 6d074be100c0925daee94893b4f36f8e9b00d257 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Mon, 25 Apr 2022 23:58:07 -0700 Subject: [PATCH 07/16] Export entry flair label * Added emphasis on flair label * Updated flair label to be contextual based on new or edit * Updated bottom bar layout --- web/_css/style.css | 50 ++++++++++++++++++++++++++++++++++++---------- web/_js/draw.js | 7 +++---- web/_js/time.js | 4 ++-- web/_js/view.js | 10 +++++----- web/index.html | 36 ++++++++++++++++----------------- 5 files changed, 68 insertions(+), 39 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index d69dc0b6..6691a20a 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -178,8 +178,6 @@ #image { z-index: -1500; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; - -ms-interpolation-mode: nearest-neighbor; - font-size: 0 } #highlightCanvas { @@ -189,7 +187,6 @@ #highlightCanvas { width: 100%; image-rendering: -webkit-optimize-contrast; image-rendering: pixelated; - -ms-interpolation-mode: nearest-neighbor; } #objectsList { @@ -267,9 +264,47 @@ #wrapper:not(.listHidden) > #bottomBar { left: 400px !important; } +#author { + flex: 1 1 auto; +} + +#variantControls { + flex: 1 0 auto; +} + #timeControls { position: relative; - flex-grow: 3; + flex: 6 0 300px; +} + +#bottomBar.no-time-slider #timeControls { + display: none; +} + +@media (min-width: 800px) { + #wrapper.listHidden #bottomBar.no-time-slider { + align-items: flex-end; + } + #wrapper.listHidden #bottomBar.no-time-slider #variantControls { + flex: none; + } + #wrapper.listHidden #bottomBar.no-time-slider #author { + flex: none; + margin-left: auto; + } +} + +@media (min-width: 1300px) { + #wrapper:not(.listHidden) #bottomBar.no-time-slider { + align-items: flex-end; + } + #wrapper:not(.listHidden) #bottomBar.no-time-slider #variantControls { + flex: none; + } + #wrapper:not(.listHidden) #bottomBar.no-time-slider #author { + flex: none; + margin-left: auto; + } } #timeControls input { @@ -286,7 +321,7 @@ #timeControlsTooltip { } @supports (backdrop-filter: blur()) or (-webkit-backdrop-filter: blur()) { - #timeControlsTooltip div { + #timeControlsTooltip div, #author { -webkit-backdrop-filter: saturate(180%) blur(15px); backdrop-filter: saturate(180%) blur(15px); --bs-bg-opacity: .8 !important; @@ -405,15 +440,10 @@ .period-group[data-status=error] { box-shadow: 0 0 0 .1rem rgba(var(--bs-danger-rgb), .5); } -/* #periods .period-visible { - margin-bottom: 0; -} */ - #periods #periodsStatus:empty { display: none; } -#timeControls.no-time-slider, .period-group.no-time-slider input, .period-group.no-time-slider label { display: none; diff --git a/web/_js/draw.js b/web/_js/draw.js index 844911e9..3bdcfa40 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -287,6 +287,9 @@ function initDraw() { } document.getElementById("exportDirectPost").href = directPostUrl; + if (entryId == 0) document.getElementById("redditFlair").textContent = "New Entry"; + else document.getElementById("redditFlair").textContent = "Edit Entry"; + exportModal.show(); } @@ -747,7 +750,6 @@ function initPeriodGroups() { const startPeriodEl = periodGroupEl.querySelector('.period-start') const endPeriodEl = periodGroupEl.querySelector('.period-end') - // const periodVisibilityEl = periodGroupEl.querySelector('.period-visible') const periodDeleteEl = periodGroupEl.querySelector('.period-delete') const periodDuplicateEl = periodGroupEl.querySelector('.period-duplicate') const periodVariationEl = periodGroupEl.querySelector('.period-variation') @@ -759,7 +761,6 @@ function initPeriodGroups() { startPeriodEl.previousElementSibling.htmlFor = startPeriodEl.id endPeriodEl.id = "periodEnd" + index endPeriodEl.previousElementSibling.htmlFor = endPeriodEl.id - // periodVisibilityEl.id = "periodVisibility" + index periodVariationEl.id = "periodVariation" + index periodCopyEl.id = "periodCopy" + index @@ -841,7 +842,6 @@ function initPeriodGroups() { periodGroupEl, startPeriodEl, endPeriodEl, - // periodVisibilityEl, periodVariationEl, periodCopyEl }) @@ -861,7 +861,6 @@ function updatePeriodGroups() { periodGroupEl, startPeriodEl, endPeriodEl, - // periodVisibilityEl, periodVariationEl, periodCopyEl } = elements diff --git a/web/_js/time.js b/web/_js/time.js index c382ce32..79fdff57 100644 --- a/web/_js/time.js +++ b/web/_js/time.js @@ -104,8 +104,8 @@ async function updateBackground(newPeriod = currentPeriod, newVariation = curren timelineSlider.max = variationConfig.versions.length - 1; currentPeriod = variationConfig.default; newPeriod = currentPeriod - if (variationConfig.versions.length === 1) timelineSlider.parentElement.classList.add('no-time-slider') - else timelineSlider.parentElement.classList.remove('no-time-slider') + if (variationConfig.versions.length === 1) document.getElementById("bottomBar").classList.add('no-time-slider'); + else document.getElementById("bottomBar").classList.remove('no-time-slider'); } timelineSlider.value = currentPeriod diff --git a/web/_js/view.js b/web/_js/view.js index 126615f6..ed3fe350 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -155,12 +155,12 @@ window.addEventListener("resize", function(e){ if (document.documentElement.clientWidth > 2000 && viewportWidth <= 2000) { entriesListShown = true; - wrapper.className = wrapper.className.replace(/ listHidden/g, ""); + wrapper.classList.remove("listHidden"); } if (document.documentElement.clientWidth < 2000 && viewportWidth >= 2000) { entriesListShown = false; - wrapper.className += " listHidden"; + wrapper.classList.add("listHidden"); } updateHovering(e); @@ -447,7 +447,7 @@ function buildObjectsList(filter = null, sort = null) { objectsContainer.replaceChildren(); entriesListShown = false; - wrapper.className += " listHidden"; + wrapper.classList.add("listHidden"); zoom = 4; renderBackground(atlas); @@ -670,7 +670,7 @@ function updateHovering(e, tapped) { return calcPolygonArea(a.path) - calcPolygonArea(b.path); }); - objectsContainer.replaceChildren() + objectsContainer.replaceChildren(); for (const i in hovered) { const element = createInfoBlock(hovered[i]); @@ -680,7 +680,7 @@ function updateHovering(e, tapped) { hovered[i].element = element; } - if(hovered.length > 0){ + if (hovered.length > 0){ closeObjectsListButton.className = "btn btn-secondary shadow"; } else { closeObjectsListButton.className = "d-none"; diff --git a/web/index.html b/web/index.html index 09e11fed..e0eaa294 100644 --- a/web/index.html +++ b/web/index.html @@ -72,7 +72,7 @@ "@type": "Person", "name": "Stefano Haagmans", "email": "stefano@stefanocoding.me", - "url": "https://stefanocoding.me/", + "url": "https://stefanocoding.me", "familyName": "Haagmans", "givenName": "Stefano", "alternateName": "Codixer", @@ -170,7 +170,7 @@
- Canvas of /r/place in the state of when the experiment was concluded. +
@@ -229,7 +229,6 @@
Atlas Entries List
-
-
+
+
+ + + + +
+
+
-
-
- - -
-
-
- Code owned by Place Atlas. Source on GitHub. Site powered by Netlify. Images provided by Alex Tsernoh. + +
+ Code owned by Place Atlas. Source on GitHub. Site powered by Netlify.
@@ -293,8 +295,8 @@
Draw
-
Timeline
-

+
Timeline
+

@@ -361,7 +363,7 @@
@@ -412,8 +414,7 @@ - - +
-
From 4780cc40208a499bdf1af20eea40d3be431afeeb Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Tue, 26 Apr 2022 00:03:56 -0700 Subject: [PATCH 08/16] Fixed link to organization --- web/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/index.html b/web/index.html index e0eaa294..a198e3eb 100644 --- a/web/index.html +++ b/web/index.html @@ -261,7 +261,7 @@
Atlas Entries List
- Code owned by Place Atlas. Source on GitHub. Site powered by Netlify. + Code owned by Place Atlas. Source on GitHub. Site powered by Netlify.
From 0a6cfc0a5449a1f45cf2c02ef192526249640343 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Tue, 26 Apr 2022 00:52:44 -0700 Subject: [PATCH 09/16] Added entries overflow notice --- web/_css/style.css | 9 +++++++++ web/_js/view.js | 21 ++++++++++++++++----- web/index.html | 2 +- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index 6691a20a..a10e528c 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -208,6 +208,15 @@ #closeObjectsListButton { right: 300px; } +#objectsListOverflowNotice { + max-width: 300px; + width: 100%; + position: absolute; + right: 0; + bottom: 1rem; + box-shadow: 0 .25rem 1rem rgba(17,17,17,.75)!important; +} + @media (max-width: 976px) { #wrapper:not(.listHidden) > #objectsList { max-width: calc(300px - 3rem); diff --git a/web/_js/view.js b/web/_js/view.js index ed3fe350..ef7ff18c 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -29,6 +29,7 @@ const wrapper = document.getElementById("wrapper"); const objectsContainer = document.getElementById("objectsList"); const closeObjectsListButton = document.getElementById("closeObjectsListButton"); +const objectsListOverflowNotice = document.getElementById("objectsListOverflowNotice"); const filterInput = document.getElementById("searchList"); @@ -121,7 +122,7 @@ closeObjectsListButton.addEventListener("click", function(){ hovered = []; objectsContainer.replaceChildren(); updateLines(); - closeObjectsListButton.className = "d-none"; + closeObjectsListButton.classList.add("d-none"); fixed = false; render(); }); @@ -135,7 +136,9 @@ function toggleFixed(e, tapped) { if (!fixed) { updateHovering(e, tapped); render(); + console.log("fixed"); } + objectsListOverflowNotice.classList.add("d-none"); } window.addEventListener("resize", updateLines); @@ -515,7 +518,7 @@ function shuffle() { function resetEntriesList() { entriesOffset = 0; - entriesList.innerHTML = ""; + entriesList.replaceChildren(); entriesList.appendChild(moreEntriesButton); buildObjectsList(filter = null, sort = null) @@ -681,9 +684,17 @@ function updateHovering(e, tapped) { } if (hovered.length > 0){ - closeObjectsListButton.className = "btn btn-secondary shadow"; + closeObjectsListButton.classList.remove("d-none"); + if ((objectsContainer.scrollHeight > objectsContainer.clientHeight) && !tapped) { + objectsListOverflowNotice.classList.remove("d-none"); + } else { + console.log("if else add") + objectsListOverflowNotice.classList.add("d-none"); + } } else { - closeObjectsListButton.className = "d-none"; + closeObjectsListButton.classList.add("d-none"); + console.log("else add") + objectsListOverflowNotice.classList.add("d-none"); } render(); @@ -753,7 +764,7 @@ function highlightEntryFromUrl() { hovered = [entry]; render(); hovered[0].element = infoElement; - closeObjectsListButton.className = "btn btn-secondary shadow"; + closeObjectsListButton.classList.remove("d-none"); updateLines(); fixed = true; } diff --git a/web/index.html b/web/index.html index a198e3eb..351259ad 100644 --- a/web/index.html +++ b/web/index.html @@ -259,7 +259,6 @@
Atlas Entries List
-
Code owned by Place Atlas. Source on GitHub. Site powered by Netlify.
@@ -353,6 +352,7 @@
Need Help?
+ Click the map to lock your selection
- +
Code owned by Place Atlas. Source on GitHub. Site powered by Netlify. From 2411f3a351982eb184a2dfb148c2093dfccfd199 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:13:25 -0700 Subject: [PATCH 12/16] Updated time controls slider appearance --- web/_css/style.css | 44 +++++++++++++++++++++++--------------------- web/_js/time.js | 4 ++-- web/index.html | 4 ++-- 3 files changed, 27 insertions(+), 25 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index dd774274..57ee5773 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -315,12 +315,9 @@ @media (min-width: 1300px) { margin-left: auto; } } - -#timeControls input { - height: 100%; - -webkit-appearance: none; - appearance: none; - width: 100%; +#timeControls { + display: flex; + align-items: center; } #timeControlsTooltip { @@ -343,25 +340,30 @@ #timeControls:hover #timeControlsTooltip, #timeControlsSlider:focus + #timeContr visibility: visible; } -.slider::-webkit-slider-thumb { - -webkit-appearance: none; - appearance: none; - width: 1rem; - height: 2rem; - background: var(--bs-light); +#timeControlsSlider::-webkit-slider-thumb { + width: 0.75rem; + height: 1.5rem; + margin-top: -0.25rem; border-radius: .25rem; - cursor: pointer; - box-shadow: 0 .5rem 1rem rgba(17,17,17,.5); + outline: 1px solid var(--bs-body-bg); } -.slider::-moz-range-thumb { - appearance: none; - width: 1rem; - height: 2rem; - background: var(--bs-light); +#timeControlsSlider::-webkit-slider-runnable-track { + height: 1rem; + border-radius: .25rem; +} + +#timeControlsSlider::-moz-range-thumb { + width: 0.75rem; + height: 1.5rem; + margin-top: -0.25rem; + border-radius: .25rem; + outline: 1px solid var(--bs-body-bg); +} + +#timeControlsSlider::-moz-range-track { + height: 1rem; border-radius: .25rem; - cursor: pointer; - box-shadow: 0 .5rem 1rem rgba(17,17,17,.5); } #entriesList .card { diff --git a/web/_js/time.js b/web/_js/time.js index ba180661..2da63003 100644 --- a/web/_js/time.js +++ b/web/_js/time.js @@ -212,8 +212,8 @@ function updateTooltip(newPeriod, newVariation) { // Clamps position of tooltip to prevent from going off screen const timelineSliderRect = timelineSlider.getBoundingClientRect(); - let min = -timelineSliderRect.left+8; - let max = (window.innerWidth-tooltip.offsetWidth)-timelineSliderRect.left-8; + let min = -timelineSliderRect.left+12; + let max = (window.innerWidth-tooltip.offsetWidth)-timelineSliderRect.left+4; tooltip.style.left = Math.min(Math.max((timelineSlider.offsetWidth)*(timelineSlider.value)/(timelineSlider.max)-tooltip.offsetWidth/2, min), max) + "px"; } diff --git a/web/index.html b/web/index.html index 756332cf..1626533d 100644 --- a/web/index.html +++ b/web/index.html @@ -254,9 +254,9 @@
Atlas Entries List
-
+
- +
From 799835ae353d245e34b26c8ce189b45d06043dc8 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Wed, 27 Apr 2022 14:14:19 -0700 Subject: [PATCH 13/16] Added beta badge Resolves #1318 --- web/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/web/index.html b/web/index.html index 1626533d..aaf0a867 100644 --- a/web/index.html +++ b/web/index.html @@ -120,6 +120,7 @@ The 2022 r/place Atlas + Beta
From 30ae06ceba292a3d3e23e7760a56e06bde537dda Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Thu, 28 Apr 2022 01:32:06 -0700 Subject: [PATCH 15/16] Animated atlas shift Fixed tooltip issue --- web/_css/style.css | 16 +++++++++++----- web/_js/view.js | 40 ++++++++++++++++++++++++++++++++++++---- web/index.html | 2 +- 3 files changed, 48 insertions(+), 10 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index 57ee5773..5f0bd8ed 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -86,9 +86,7 @@ #container { width: calc(100% - 400px); height: 100%; margin-left: 400px; - touch-action: manipulation; - overflow: hidden; overflow-x: hidden; overflow-y: hidden; @@ -159,7 +157,12 @@ noscript { margin-top: 10px; } -.listHidden #container { +#wrapper.listHidden.listTransitioning #container{ + width: calc(100% - 400px); + margin-left: 400px; +} + +.listHidden #container, .listTransitioning #container { width: 100%; margin-left: 0; } @@ -171,6 +174,10 @@ #innerContainer { z-index: -2000; } +body[data-init-done] .listTransitioning #innerContainer { + transition: left .3s ease-in-out; +} + #image { position: absolute; height: 100%; @@ -321,10 +328,9 @@ #timeControls { } #timeControlsTooltip { - opacity: 0; - position: absolute; bottom: 2.75rem; visibility: hidden; + transition: visibility .15s linear, opacity .15s linear; } @supports (backdrop-filter: blur()) or (-webkit-backdrop-filter: blur()) { diff --git a/web/_js/view.js b/web/_js/view.js index 9b484056..9adb1079 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -87,31 +87,62 @@ document.getElementById("sort").addEventListener("input", function (e) { }); var showDraw = document.getElementById('offcanvasDraw') -showDraw.addEventListener('shown.bs.offcanvas', function() { +showDraw.addEventListener('show.bs.offcanvas', function() { + wrapper.classList.add('listTransitioning'); + applyView(); +}) + +var shownDraw = document.getElementById('offcanvasDraw') +shownDraw.addEventListener('shown.bs.offcanvas', function() { wrapper.classList.remove('listHidden'); + wrapper.classList.remove('listTransitioning'); applyView(); }) var hideDraw = document.getElementById('offcanvasDraw') -hideDraw.addEventListener('hidden.bs.offcanvas', function() { +hideDraw.addEventListener('hide.bs.offcanvas', function() { + wrapper.classList.add('listTransitioning'); + applyView(); +}) + +var hiddenDraw = document.getElementById('offcanvasDraw') +hiddenDraw.addEventListener('hidden.bs.offcanvas', function() { wrapper.classList.add('listHidden'); + wrapper.classList.remove('listTransitioning'); applyView(); }) var showList = document.getElementById('offcanvasList') -showList.addEventListener('shown.bs.offcanvas', function(e) { +showList.addEventListener('show.bs.offcanvas', function(e) { + wrapper.classList.add('listTransitioning'); + applyView(); + console.log("show") +}); + +var shownList = document.getElementById('offcanvasList') +shownList.addEventListener('shown.bs.offcanvas', function(e) { entriesListShown = true; wrapper.classList.remove('listHidden'); + wrapper.classList.remove('listTransitioning'); updateHovering(e); applyView(); render(); updateLines(); + console.log("shown") }); var hideList = document.getElementById('offcanvasList') -hideList.addEventListener('hidden.bs.offcanvas', function(e) { +hideList.addEventListener('hide.bs.offcanvas', function(e) { + wrapper.classList.add('listTransitioning'); + applyView(); + console.log("hide") +}); + +var hiddenList = document.getElementById('offcanvasList') +hiddenList.addEventListener('hidden.bs.offcanvas', function(e) { entriesListShown = false; wrapper.classList.add('listHidden'); + wrapper.classList.remove('listTransitioning'); updateHovering(e); applyView(); render(); @@ -684,6 +715,7 @@ function updateHovering(e, tapped) { } if (hovered.length > 0){ + document.getElementById("timeControlsSlider").blur(); closeObjectsListButton.classList.remove("d-none"); if ((objectsContainer.scrollHeight > objectsContainer.clientHeight) && !tapped) { objectsListOverflowNotice.classList.remove("d-none"); diff --git a/web/index.html b/web/index.html index c1c3b6e3..5791debc 100644 --- a/web/index.html +++ b/web/index.html @@ -261,7 +261,7 @@
Atlas Entries List
- +
Code owned by Place Atlas. Source on GitHub. Site powered by Netlify. From 268e69cc049a2e7d66235533e5d4788fe95ed651 Mon Sep 17 00:00:00 2001 From: mxdanger <32040254+mxdanger@users.noreply.github.com> Date: Thu, 28 Apr 2022 02:44:46 -0700 Subject: [PATCH 16/16] Updated loading overlay --- web/_css/style.css | 68 ++++------------------------------------------ web/_js/atlas.js | 8 +++--- web/_js/draw.js | 3 +- web/_js/main.js | 2 +- web/_js/view.js | 11 +++----- web/index.html | 10 ++++--- 6 files changed, 22 insertions(+), 80 deletions(-) diff --git a/web/_css/style.css b/web/_css/style.css index 5f0bd8ed..3092b88e 100644 --- a/web/_css/style.css +++ b/web/_css/style.css @@ -94,75 +94,16 @@ #container { #loading { position: absolute; - background-color: rgba(10, 10, 10, .9); + background-color: rgba(17, 17, 17, .9); top: 0; left: 0; right: 0; bottom: 0; - z-index: -10; + -webkit-backdrop-filter: saturate(180%) blur(10px); + backdrop-filter: saturate(180%) blur(10px); } -#loading > div { - margin: 80px auto; - color: #FFF; - text-align: center; - font-size: 40px; -} - -#loading > div > div:first-child { - width: 200px; - height: 200px; - border-radius: 200px; - border: 7px #CCC solid; - display: inline-block; - border-top-color: #FFAA00; - - animation-duration: 3s; - animation-name: spinner; - animation-iteration-count: infinite; -} - -#loading > div > span { - font-family: "DejaVu Sans", Helvetica, sans-serif; - font-weight: 200; -} - -@keyframes spinner { - from { - transform: rotateZ(0deg); - } - - to { - transform: rotateZ(360deg); - } -} - -.error { - color: #FFF; - font-size: 23px; - margin: 15px 0; -} - -.errorBody { - color: #CC8888; - font-family: monospace; - font-size: 20px; - cursor: text; -} - -noscript { - color: #FFF; - font-size: 23px; - display: block; - margin-top: 10px; -} - -#wrapper.listHidden.listTransitioning #container{ - width: calc(100% - 400px); - margin-left: 400px; -} - -.listHidden #container, .listTransitioning #container { +.listHidden #container{ width: 100%; margin-left: 0; } @@ -274,6 +215,7 @@ #bottomBar { bottom: 0; left: 0; right: 0; + transition: left .3s ease-in-out; } #wrapper:not(.listHidden) > #bottomBar { diff --git a/web/_js/atlas.js b/web/_js/atlas.js index a9815cad..b147bde3 100644 --- a/web/_js/atlas.js +++ b/web/_js/atlas.js @@ -15,10 +15,10 @@ window.addEventListener("error", function (e) { console.error(e); - let errorMessage = "

An error has occurred:

"; - errorMessage += "

" + e.message + "

"; - errorMessage += "

on line " + e.lineno + "

"; - errorMessage += "

If this keeps happening, feel free to tell us on our Discord server.

"; + let errorMessage = "

An error has occurred:

"; + errorMessage += "

" + e.message + "

"; + errorMessage += "

on line " + e.lineno + "

"; + errorMessage += "

If this keeps happening, feel free to tell us on our Discord server.

"; document.getElementById("loadingContent").innerHTML = errorMessage; }); diff --git a/web/_js/draw.js b/web/_js/draw.js index 3bdcfa40..f172df81 100644 --- a/web/_js/draw.js +++ b/web/_js/draw.js @@ -84,7 +84,7 @@ function initDraw() { wrapper.classList.remove('listHidden') var backButton = document.getElementById("showListButton"); - backButton.insertAdjacentHTML("afterend", 'Exit Draw Mode'); + backButton.insertAdjacentHTML("afterend", 'Exit Draw Mode'); backButton.remove(); var myOffcanvas = document.getElementById("offcanvasDraw"); @@ -699,6 +699,7 @@ function initDraw() { }) } else { + document.getElementById("offcanvasDrawLabel").textContent = "New Entry"; pathWithPeriods.push([defaultPeriod, []]) addWebsiteFields("", 0, [0]); addSubredditFields("", 0, [0]); diff --git a/web/_js/main.js b/web/_js/main.js index 3c720f23..c05d157b 100644 --- a/web/_js/main.js +++ b/web/_js/main.js @@ -193,7 +193,7 @@ async function init() { initView(); } - document.getElementById("loading").style.display = "none"; + document.getElementById("loading").classList.add("d-none"); document.getElementById("zoomInButton").addEventListener("click", function (e) { diff --git a/web/_js/view.js b/web/_js/view.js index 9adb1079..5e51cf2a 100644 --- a/web/_js/view.js +++ b/web/_js/view.js @@ -88,60 +88,57 @@ document.getElementById("sort").addEventListener("input", function (e) { var showDraw = document.getElementById('offcanvasDraw') showDraw.addEventListener('show.bs.offcanvas', function() { + wrapper.classList.remove('listHidden'); wrapper.classList.add('listTransitioning'); applyView(); }) var shownDraw = document.getElementById('offcanvasDraw') shownDraw.addEventListener('shown.bs.offcanvas', function() { - wrapper.classList.remove('listHidden'); wrapper.classList.remove('listTransitioning'); applyView(); }) var hideDraw = document.getElementById('offcanvasDraw') hideDraw.addEventListener('hide.bs.offcanvas', function() { + wrapper.classList.add('listHidden'); wrapper.classList.add('listTransitioning'); applyView(); }) var hiddenDraw = document.getElementById('offcanvasDraw') hiddenDraw.addEventListener('hidden.bs.offcanvas', function() { - wrapper.classList.add('listHidden'); wrapper.classList.remove('listTransitioning'); applyView(); }) var showList = document.getElementById('offcanvasList') showList.addEventListener('show.bs.offcanvas', function(e) { + wrapper.classList.remove('listHidden'); wrapper.classList.add('listTransitioning'); applyView(); - console.log("show") }); var shownList = document.getElementById('offcanvasList') shownList.addEventListener('shown.bs.offcanvas', function(e) { entriesListShown = true; - wrapper.classList.remove('listHidden'); wrapper.classList.remove('listTransitioning'); updateHovering(e); applyView(); render(); updateLines(); - console.log("shown") }); var hideList = document.getElementById('offcanvasList') hideList.addEventListener('hide.bs.offcanvas', function(e) { + wrapper.classList.add('listHidden'); wrapper.classList.add('listTransitioning'); applyView(); - console.log("hide") }); var hiddenList = document.getElementById('offcanvasList') hiddenList.addEventListener('hidden.bs.offcanvas', function(e) { entriesListShown = false; - wrapper.classList.add('listHidden'); wrapper.classList.remove('listTransitioning'); updateHovering(e); applyView(); diff --git a/web/index.html b/web/index.html index 5791debc..c55c86e7 100644 --- a/web/index.html +++ b/web/index.html @@ -159,10 +159,12 @@
-
-
-

-   Hang on... +
+
+
+ Loading... +
+

Hang on…