From 7bc0862a6a438c4e64def62f94a5b66f61cf9729 Mon Sep 17 00:00:00 2001 From: Scott Pierce-Wrobel Date: Wed, 12 Jun 2024 14:53:14 -0400 Subject: [PATCH] formats timer to prevent changes glitching on screen, adds location to change date for timer (#92) --- src/components/elements/Timer.svelte | 99 ++++++++++++++------------- src/content/externalLinks.js | 4 ++ src/pages/index.astro | 4 +- src/pages/products/[...product].astro | 2 +- 4 files changed, 58 insertions(+), 51 deletions(-) diff --git a/src/components/elements/Timer.svelte b/src/components/elements/Timer.svelte index f39ac1e..b2a17ad 100644 --- a/src/components/elements/Timer.svelte +++ b/src/components/elements/Timer.svelte @@ -1,53 +1,56 @@ - -
- - {#each [days, hours, minutes, seconds] as time, index} -
-
-

{time}

-

- {index === 0 ? 'DAYS' : index === 1 ? 'HOURS' : index === 2 ? 'MINUTES' : 'SECONDS'} -

-
+ }); + + +
+ + {#each [days, hours, minutes, seconds] as time, index} +
+
+

{time}

+

+ {index === 0 ? 'DAYS' : index === 1 ? 'HOURS' : index === 2 ? 'MINUTES' : 'SECONDS'} +

- {/each} - -
\ No newline at end of file + {/each} + +
diff --git a/src/content/externalLinks.js b/src/content/externalLinks.js index b4734b9..065cdcd 100644 --- a/src/content/externalLinks.js +++ b/src/content/externalLinks.js @@ -8,3 +8,7 @@ export const externalLinks = { deputyCommandantForInformation: 'https://www.information.marines.mil/', marinesDotCom: 'https://www.marines.com/', }; + +export const timerCountdown = { + formatedDate: 'August 1, 2024 23:59:59', +}; diff --git a/src/pages/index.astro b/src/pages/index.astro index cb3aae3..df1f2c4 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -64,7 +64,7 @@ products.sort((a, b) => a.data.order - b.data.order); title="WHAT WE DO" titleClasses="text-mcswf-white text-2xl font-bold md:text-3xl lg:text-4xl" content="Marines are taught to develop mission-specific software for operational units to use in weeks or months, not years. Marines at the Marine Corps Software Factory (MCSWF) are trained by working with industry experts to build the software Marines need." - imageClasses="lg:w-550" + imageClasses="w-full lg:w-550" />
@@ -76,7 +76,7 @@ products.sort((a, b) => a.data.order - b.data.order); title="THE IMPACT" titleClasses="text-mcswf-white text-2xl font-bold md:text-3xl lg:text-4xl" content="By combining traditional military training and modern technology skills, it enables tactical advantage for Marines across the service. The MCSWF pilot will evaluate the demand signal from Fleet Marine Forces, develop a way forward on career paths for technical experts, and evaluate the proper blend of civilian-Marine teaming." - imageClasses="lg:w-550" + imageClasses="w-full lg:w-550" />