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);
|
const [daysLeft, setDaysLeft] = useState(0);
|
||||||
|
|
||||||
useEffect(() => {
|
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();
|
const now = new Date();
|
||||||
if (+compoDate > +now) {
|
if (+compoStartDate > +now) {
|
||||||
const _daysLeft = Math.floor((compoDate - now) / 1000 / 3600 / 24);
|
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);
|
setDaysLeft(_daysLeft);
|
||||||
}
|
}
|
||||||
}, []);
|
}, []);
|
||||||
|
@@ -29,7 +29,7 @@ export function Js13KModal({ show, closeHandler }) {
|
|||||||
<strong>HTML5 Game Developers</strong>. The fun part of the compo is
|
<strong>HTML5 Game Developers</strong>. The fun part of the compo is
|
||||||
the file size limit set to <strong>13 kilobytes</strong>. The
|
the file size limit set to <strong>13 kilobytes</strong>. The
|
||||||
competition will start at <strong>13:00 CEST, 13th August</strong> and
|
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>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@@ -43,7 +43,8 @@ export function Js13KModal({ show, closeHandler }) {
|
|||||||
rel="noopener"
|
rel="noopener"
|
||||||
>
|
>
|
||||||
Read more about this collaboration
|
Read more about this collaboration
|
||||||
</a>.
|
</a>
|
||||||
|
.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
@@ -1867,6 +1867,7 @@ body:not(.is-app) .show-when-app {
|
|||||||
|
|
||||||
.footer__js13k-days-left {
|
.footer__js13k-days-left {
|
||||||
padding: 1px 9px;
|
padding: 1px 9px;
|
||||||
|
font-size: 0.8em;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
background: #b12a34;
|
background: #b12a34;
|
||||||
color: white;
|
color: white;
|
||||||
|
Reference in New Issue
Block a user