mirror of
https://github.com/chinchang/web-maker.git
synced 2025-07-23 23:11:12 +02:00
update js13kgame countdown
This commit is contained in:
@@ -10,10 +10,14 @@ const JS13K = props => {
|
||||
const [daysLeft, setDaysLeft] = useState(0);
|
||||
|
||||
useEffect(() => {
|
||||
const compoDate = new Date('August 13 2024 11:00 GMT');
|
||||
const compoStartDate = new Date('August 13 2024 11:00 GMT');
|
||||
const compoEndDate = new Date('September 13 2024 11:00 GMT');
|
||||
const now = new Date();
|
||||
if (+compoDate > +now) {
|
||||
const _daysLeft = Math.floor((compoDate - now) / 1000 / 3600 / 24);
|
||||
if (+compoStartDate > +now) {
|
||||
const _daysLeft = Math.floor((compoStartDate - now) / 1000 / 3600 / 24);
|
||||
setDaysLeft(_daysLeft);
|
||||
} else if (+compoEndDate > +now) {
|
||||
const _daysLeft = Math.floor((compoEndDate - now) / 1000 / 3600 / 24);
|
||||
setDaysLeft(_daysLeft);
|
||||
}
|
||||
}, []);
|
||||
|
@@ -29,7 +29,7 @@ export function Js13KModal({ show, closeHandler }) {
|
||||
<strong>HTML5 Game Developers</strong>. The fun part of the compo is
|
||||
the file size limit set to <strong>13 kilobytes</strong>. The
|
||||
competition will start at <strong>13:00 CEST, 13th August</strong> and
|
||||
will end at <strong>13:00 CEST, 13th September 2018</strong>.
|
||||
will end at <strong>13:00 CEST, 13th September</strong>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@@ -43,7 +43,8 @@ export function Js13KModal({ show, closeHandler }) {
|
||||
rel="noopener"
|
||||
>
|
||||
Read more about this collaboration
|
||||
</a>.
|
||||
</a>
|
||||
.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
|
@@ -1867,6 +1867,7 @@ body:not(.is-app) .show-when-app {
|
||||
|
||||
.footer__js13k-days-left {
|
||||
padding: 1px 9px;
|
||||
font-size: 0.8em;
|
||||
text-transform: uppercase;
|
||||
background: #b12a34;
|
||||
color: white;
|
||||
|
Reference in New Issue
Block a user