diff --git a/src/components/sections/Hero.svelte b/src/components/sections/Hero.svelte index 40ed323..f73555c 100644 --- a/src/components/sections/Hero.svelte +++ b/src/components/sections/Hero.svelte @@ -13,6 +13,7 @@ export let linkText = ''; export let externalLink = false; export let backgroundImg = ''; + export let bgPos = 'center'; export let componentHeightClasses = ''; const colorSpecificClasses = { @@ -22,7 +23,7 @@
diff --git a/src/content/config.js b/src/content/config.js index 4a69e45..60c3f30 100644 --- a/src/content/config.js +++ b/src/content/config.js @@ -22,21 +22,13 @@ const cohortCollection = defineCollection({ const productCollection = defineCollection({ type: 'data', - schema: z.object({ + schema: ({ image }) => z.object({ product: z.string(), description: z.string(), - background: z.object({ - src: z.string(), - alt: z.string(), - }), - image: z.object({ - src: z.string(), - alt: z.string(), - }), - image2: z.object({ - src: z.string(), - alt: z.string(), - }), + background: image(), + image: image(), + imageAlt: z.string(), + image2: image(), order: z.number(), heading: z.string(), bullets: z.array(z.string()), @@ -75,20 +67,32 @@ const stepsCollection = defineCollection({ const contactUsCollection = defineCollection({ type: 'data', - schema: z.object({ + schema: ({ image }) => z.object({ heading: z.string(), description: z.string(), shortDescription: z.string(), - background: z.object({ - src: z.string(), - alt: z.string(), - }), + background: image(), + backgroundAlt: z.string(), buttonLink: z.string(), buttonText: z.string(), externalLink: z.boolean(), }), }); +const rolesCollection = defineCollection({ + type: 'content', + schema: ({ image }) => z.object({ + role: z.string(), + // url: z.string(), + image: image(), + image_wide: image(), + icon: z.string(), + image_alt_text: z.string(), + image_focus: z.string(), + about: z.string(), + }) +}) + // 3. Export a single `collections` object to register your collection(s) // This key should match your collection directory name in "src/content" export const collections = { @@ -98,4 +102,5 @@ export const collections = { aboutMetrics: aboutMetricsCollection, steps: stepsCollection, contactUs: contactUsCollection, + roles: rolesCollection, }; diff --git a/src/content/contactUs/applyNow.yaml b/src/content/contactUs/applyNow.yaml index 91c6c6a..6214e9e 100644 --- a/src/content/contactUs/applyNow.yaml +++ b/src/content/contactUs/applyNow.yaml @@ -1,9 +1,8 @@ heading: 'WANT TO SEE WHAT WE ARE ALL ABOUT?' description: 'Be a part of MCSWF.' shortDescription: '' -background: - src: '/images/marines_at_long_table.jpg' - alt: ' ' +background: 'src/images/marines_at_long_table.jpg' +backgroundAlt: ' ' buttonText: 'SEE ROLES' buttonLink: '/roles' externalLink: false \ No newline at end of file diff --git a/src/content/contactUs/getInTouch.yaml b/src/content/contactUs/getInTouch.yaml index 517b90f..f749d31 100644 --- a/src/content/contactUs/getInTouch.yaml +++ b/src/content/contactUs/getInTouch.yaml @@ -1,9 +1,8 @@ heading: 'HAVE A QUESTION?' description: 'Get in touch with MCSWF.' shortDescription: '' -background: - src: '/images/get_in_touch.png' - alt: ' ' +background: 'src/images/get_in_touch.png' +backgroundAlt: ' ' buttonText: 'GET IN TOUCH' buttonLink: 'mailto:MCSWF@usmc.mil?subject=About MCSWF' externalLink: true diff --git a/src/content/contactUs/proposeApp.yaml b/src/content/contactUs/proposeApp.yaml index 4e5c8d5..55ca72c 100644 --- a/src/content/contactUs/proposeApp.yaml +++ b/src/content/contactUs/proposeApp.yaml @@ -1,9 +1,8 @@ heading: 'HAVE A PROBLEM THAT WE CAN HELP WITH?' description: 'Propose an App for the future or request an app Demo.' shortDescription: 'Propose an App for the future.' -background: - src: '/images/mcswf_out_brief.jpeg' - alt: ' ' +background: 'src/images/mcswf_out_brief.jpeg' +backgroundAlt: ' ' buttonText: 'PROPOSE AN APP' buttonLink: 'https://docs.google.com/forms/d/e/1FAIpQLSeBdmywSNZEq2wo5QxGwFsnhu72OT_baajgJ8O3_1scMdosEA/viewform' externalLink: true \ No newline at end of file diff --git a/src/content/products/SnapDB.yaml b/src/content/products/SnapDB.yaml index 67fe8c3..f3ef8b2 100644 --- a/src/content/products/SnapDB.yaml +++ b/src/content/products/SnapDB.yaml @@ -1,14 +1,11 @@ product: 'Snap Database' description: "The Strategic Capabilities Office commissioned Snap Database to address the issue of transmitting information via a signal. SnapDB creates a local QR code that can display a message when viewed by an unmanned aerial system (UAS)." -background: - src: '/images/snapdb_header.jpg' - alt: 'Marine gesturing at a television that says SnapDB' -image: - src: '/images/iPhone_x.svg' - alt: 'Snap Database on an iPhone' -image2: - src: '/images/SnapDb_qrCode.svg' - alt: 'Snap Database on an iPhone' +background: 'src/images/snapdb_header.jpg' +alt: 'Marine gesturing at a television that says SnapDB' +image: 'src/images/iPhone_x.svg' +imageAlt: 'Snap Database on an iPhone' +image2: 'src/images/SnapDb_qrCode.svg' +image2Alt: 'QR code on the ground' order: 3 heading: "Snap Database" bullets: diff --git a/src/content/products/my-career.yaml b/src/content/products/my-career.yaml index 49a8bc0..b2aa64e 100644 --- a/src/content/products/my-career.yaml +++ b/src/content/products/my-career.yaml @@ -1,14 +1,10 @@ product: 'myCareer' description: "Sponsored by Manpower Management Enlisted Assignments to optimize the roadshow process. Marines are able to reserve their spot in line and push key information to monitors prior to sitting down for a discussion. This saves Marines time and optimizes the discussion." -background: - src: '/images/shaking_hands.png' - alt: ' ' -image: - src: '/images/mycareer.gif' - alt: ' ' -image2: - src: '/images/shaking_hands.png' - alt: ' ' +background: 'src/images/shaking_hands.png' +image: 'src/images/mycareer.gif' +imageAlt: 'myCareer app in action' +image2: 'src/images/shaking_hands.png' +image2Alt: '' order: 2 heading: "Manpower Management Enlisted Assignments" bullets: diff --git a/src/content/products/sparta.yaml b/src/content/products/sparta.yaml index bf70562..20c2221 100644 --- a/src/content/products/sparta.yaml +++ b/src/content/products/sparta.yaml @@ -1,14 +1,10 @@ product: 'SPARTA' description: "Sensor Processor & Analysis Radar Translation Application (SPARTA) takes commercial off the shelf radars and provides the ability to visualize maritime vessels, process the sensor data, and disseminate to common operating picture. Feature builds include an Android version, UAS integration, and correlating and fusing multiple sensors." -background: - src: '/images/marine_night_timelapse.jpg' - alt: ' ' -image: - src: '/images/sparta_handheld.gif' - alt: ' ' -image2: - src: '/images/Sparta_phone.svg' - alt: ' ' +background: 'src/images/marine_night_timelapse.jpg' +image: 'src/images/sparta_handheld.gif' +imageAlt: 'Sparta app on tactical phone' +image2: 'src/images/Sparta_phone.svg' +image2Alt: ' ' order: 1 heading: "Visualize Maritime Vessels \n Process Sensor Data \n Disseminate" bullets: diff --git a/src/content/roles/01_swe.md b/src/content/roles/01_swe.md index d41377f..5412c8c 100644 --- a/src/content/roles/01_swe.md +++ b/src/content/roles/01_swe.md @@ -1,8 +1,9 @@ --- role: SOFTWARE ENGINEER +slug: swe url: swe -image: mcswf_marine.png -image_wide: seHeader.png +image: src/images/mcswf_marine.png +image_wide: src/images/seHeader.png icon: software_engineer.svg image_alt_text: Marine Software Engineer image_focus: right diff --git a/src/content/roles/02_prod_designer.md b/src/content/roles/02_prod_designer.md index 700c6cb..97fd2f0 100644 --- a/src/content/roles/02_prod_designer.md +++ b/src/content/roles/02_prod_designer.md @@ -1,9 +1,9 @@ --- role: PRODUCT DESIGNER -url: product_designer -image: marine_product_designer.png +slug: product_designer +image: src/images/marine_product_designer.png icon: product_designer.svg -image_wide: designer.png +image_wide: src/images/designer.png image_alt_text: Marine Product Designer image_focus: left about: > diff --git a/src/content/roles/03_prod_manager.md b/src/content/roles/03_prod_manager.md index 013ffc3..8e214f4 100644 --- a/src/content/roles/03_prod_manager.md +++ b/src/content/roles/03_prod_manager.md @@ -1,9 +1,9 @@ --- role: PRODUCT MANAGER -url: product_manager -image: marine_pm.png +slug: product_manager +image: src/images/marine_pm.png icon: product_manager.svg -image_wide: marine_pm_wide.png +image_wide: src/images/marine_pm_wide.png image_alt_text: Marine Product Manager image_focus: right about: > diff --git a/public/images/GenPuma.png b/src/images/GenPuma.png similarity index 100% rename from public/images/GenPuma.png rename to src/images/GenPuma.png diff --git a/public/images/MarineBlues.png b/src/images/MarineBlues.png similarity index 100% rename from public/images/MarineBlues.png rename to src/images/MarineBlues.png diff --git a/public/images/Overview_hero.svg b/src/images/Overview_hero.svg similarity index 100% rename from public/images/Overview_hero.svg rename to src/images/Overview_hero.svg diff --git a/public/images/SnapDb_qrCode.svg b/src/images/SnapDb_qrCode.svg similarity index 100% rename from public/images/SnapDb_qrCode.svg rename to src/images/SnapDb_qrCode.svg diff --git a/public/images/Sparta.gif b/src/images/Sparta.gif similarity index 100% rename from public/images/Sparta.gif rename to src/images/Sparta.gif diff --git a/public/images/Sparta_phone.svg b/src/images/Sparta_phone.svg similarity index 100% rename from public/images/Sparta_phone.svg rename to src/images/Sparta_phone.svg diff --git a/public/images/charlie-1.png b/src/images/charlie-1.png similarity index 100% rename from public/images/charlie-1.png rename to src/images/charlie-1.png diff --git a/public/images/combined_wide.png b/src/images/combined_wide.png similarity index 100% rename from public/images/combined_wide.png rename to src/images/combined_wide.png diff --git a/public/images/designer.png b/src/images/designer.png similarity index 100% rename from public/images/designer.png rename to src/images/designer.png diff --git a/public/images/dress_blues_wide.png b/src/images/dress_blues_wide.png similarity index 100% rename from public/images/dress_blues_wide.png rename to src/images/dress_blues_wide.png diff --git a/public/images/ega_network.jpg b/src/images/ega_network.jpg similarity index 100% rename from public/images/ega_network.jpg rename to src/images/ega_network.jpg diff --git a/public/images/gen_marine_network_wide.jpg b/src/images/gen_marine_network_wide.jpg similarity index 100% rename from public/images/gen_marine_network_wide.jpg rename to src/images/gen_marine_network_wide.jpg diff --git a/public/images/get_in_touch.png b/src/images/get_in_touch.png similarity index 100% rename from public/images/get_in_touch.png rename to src/images/get_in_touch.png diff --git a/public/images/happy_sparta.png b/src/images/happy_sparta.png similarity index 100% rename from public/images/happy_sparta.png rename to src/images/happy_sparta.png diff --git a/public/images/headset_marine.png b/src/images/headset_marine.png similarity index 100% rename from public/images/headset_marine.png rename to src/images/headset_marine.png diff --git a/public/images/iPhone_x.svg b/src/images/iPhone_x.svg similarity index 100% rename from public/images/iPhone_x.svg rename to src/images/iPhone_x.svg diff --git a/public/images/marine_flight_sim.jpeg b/src/images/marine_flight_sim.jpeg similarity index 100% rename from public/images/marine_flight_sim.jpeg rename to src/images/marine_flight_sim.jpeg diff --git a/public/images/marine_mcswf_coder.jpeg b/src/images/marine_mcswf_coder.jpeg similarity index 100% rename from public/images/marine_mcswf_coder.jpeg rename to src/images/marine_mcswf_coder.jpeg diff --git a/public/images/marine_networks_wide.jpg b/src/images/marine_networks_wide.jpg similarity index 100% rename from public/images/marine_networks_wide.jpg rename to src/images/marine_networks_wide.jpg diff --git a/public/images/marine_night_timelapse.jpg b/src/images/marine_night_timelapse.jpg similarity index 100% rename from public/images/marine_night_timelapse.jpg rename to src/images/marine_night_timelapse.jpg diff --git a/public/images/marine_pm.png b/src/images/marine_pm.png similarity index 100% rename from public/images/marine_pm.png rename to src/images/marine_pm.png diff --git a/public/images/marine_pm_wide.png b/src/images/marine_pm_wide.png similarity index 100% rename from public/images/marine_pm_wide.png rename to src/images/marine_pm_wide.png diff --git a/public/images/marine_product_designer.png b/src/images/marine_product_designer.png similarity index 100% rename from public/images/marine_product_designer.png rename to src/images/marine_product_designer.png diff --git a/public/images/marine_pushup.png b/src/images/marine_pushup.png similarity index 100% rename from public/images/marine_pushup.png rename to src/images/marine_pushup.png diff --git a/public/images/marine_silo.png b/src/images/marine_silo.png similarity index 100% rename from public/images/marine_silo.png rename to src/images/marine_silo.png diff --git a/public/images/marine_start_with_why.jpeg b/src/images/marine_start_with_why.jpeg similarity index 100% rename from public/images/marine_start_with_why.jpeg rename to src/images/marine_start_with_why.jpeg diff --git a/public/images/marine_working.png b/src/images/marine_working.png similarity index 100% rename from public/images/marine_working.png rename to src/images/marine_working.png diff --git a/public/images/marines_at_long_table.jpg b/src/images/marines_at_long_table.jpg similarity index 100% rename from public/images/marines_at_long_table.jpg rename to src/images/marines_at_long_table.jpg diff --git a/public/images/matt-11.png b/src/images/matt-11.png similarity index 100% rename from public/images/matt-11.png rename to src/images/matt-11.png diff --git a/public/images/mcswf_and_miu.jpeg b/src/images/mcswf_and_miu.jpeg similarity index 100% rename from public/images/mcswf_and_miu.jpeg rename to src/images/mcswf_and_miu.jpeg diff --git a/public/images/mcswf_instruction_wide.png b/src/images/mcswf_instruction_wide.png similarity index 100% rename from public/images/mcswf_instruction_wide.png rename to src/images/mcswf_instruction_wide.png diff --git a/public/images/mcswf_marine.png b/src/images/mcswf_marine.png similarity index 100% rename from public/images/mcswf_marine.png rename to src/images/mcswf_marine.png diff --git a/public/images/mcswf_out_brief.jpeg b/src/images/mcswf_out_brief.jpeg similarity index 100% rename from public/images/mcswf_out_brief.jpeg rename to src/images/mcswf_out_brief.jpeg diff --git a/public/images/mycareer.gif b/src/images/mycareer.gif similarity index 100% rename from public/images/mycareer.gif rename to src/images/mycareer.gif diff --git a/public/images/proposal_meeting.png b/src/images/proposal_meeting.png similarity index 100% rename from public/images/proposal_meeting.png rename to src/images/proposal_meeting.png diff --git a/public/images/seHeader.png b/src/images/seHeader.png similarity index 100% rename from public/images/seHeader.png rename to src/images/seHeader.png diff --git a/public/images/shaking_hands.png b/src/images/shaking_hands.png similarity index 100% rename from public/images/shaking_hands.png rename to src/images/shaking_hands.png diff --git a/public/images/snapdb_header.jpg b/src/images/snapdb_header.jpg similarity index 100% rename from public/images/snapdb_header.jpg rename to src/images/snapdb_header.jpg diff --git a/public/images/sparta_handheld.gif b/src/images/sparta_handheld.gif similarity index 100% rename from public/images/sparta_handheld.gif rename to src/images/sparta_handheld.gif diff --git a/src/pages/about.astro b/src/pages/about.astro index 053006d..55b1637 100644 --- a/src/pages/about.astro +++ b/src/pages/about.astro @@ -1,5 +1,6 @@ --- import Layout from '@layouts/Layout.astro'; +// import { getImage } from 'astro:assets'; import Hero from '@components/sections/Hero.svelte'; import MaxWidthContainer from '@components/sections/MaxWidthContainer.svelte'; import ContentImageFull from '@components/sections/ContentImageFull.svelte'; @@ -11,6 +12,9 @@ import { externalLinks } from '@content/externalLinks.js'; import { getCollection, type CollectionEntry } from 'astro:content'; import '../styles/global.css'; +// import aboutBackground from "@images/mcswf_and_miu.jpeg" +// const optimizedBackground = await getImage({src: aboutBackground, format: 'webp'}); + displaySiteBanner.set(true); const metrics = await getCollection('aboutMetrics'); --- @@ -21,7 +25,7 @@ const metrics = await getCollection('aboutMetrics'); titleColor="yellow" description="The Marine Corps Software Factory welcomes Marines from any MOS who have the aptitude, competence, and discipline to serve in key roles on software development teams." descriptionClasses="w-full md:w-[500px] lg:w-[750px] font-light" - backgroundImg="/images/mcswf_and_miu.jpeg" + backgroundImg="src/images/mcswf_and_miu.jpeg" />
@@ -68,7 +72,7 @@ const metrics = await getCollection('aboutMetrics');
diff --git a/src/pages/index.astro b/src/pages/index.astro index 298688c..324fb0f 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -9,7 +9,6 @@ import ContentImageFull from '../components/sections/ContentImageFull.svelte'; import { getCollection } from 'astro:content'; // Get products collection import { displaySiteBanner } from '../components/stores.js'; import MetricCard from '@components/cards/MetricCard.svelte'; -import { externalLinks } from '@content/externalLinks.js'; import '../styles/global.css'; import '../styles/fonts.css'; @@ -28,7 +27,7 @@ products.sort((a, b) => a.data.order - b.data.order); link="/about" linkText="LEARN MORE" contentClasses={'text-base md:text-2xl'} - backgroundImg="/images/headset_marine.png" + backgroundImg="src/images/headset_marine.png" />
@@ -55,7 +54,7 @@ products.sort((a, b) => a.data.order - b.data.order);
a.data.order - b.data.order); /> diff --git a/src/pages/products/index.astro b/src/pages/products/index.astro index f3ac73f..ed4746e 100644 --- a/src/pages/products/index.astro +++ b/src/pages/products/index.astro @@ -21,7 +21,7 @@ products.sort((a, b) => a.data.order - b.data.order); titleClasses="w-64 md:w-full" description="Real solutions to real problems - Created for Marines, by Marines at the Marine Corps Software Factory." descriptionClasses="w-full sm:w-80 md:w-[500px] font-light" - backgroundImg="/images/Overview_hero.svg" + backgroundImg="src/images/Overview_hero.svg" class="bg-top" /> diff --git a/src/pages/roles/[...role].astro b/src/pages/roles/[...role].astro index a28285e..e63590e 100644 --- a/src/pages/roles/[...role].astro +++ b/src/pages/roles/[...role].astro @@ -5,40 +5,51 @@ import FooterFull from '@components/FooterFull.svelte'; import CohortGroup from '@components/sections/CohortGroup.svelte'; import { displaySiteBanner } from '@components/stores.js'; import { externalLinks } from '@content/externalLinks.js'; -import { getCollection } from 'astro:content'; +import { getCollection, type CollectionEntry } from 'astro:content'; import '../../styles/global.css'; displaySiteBanner.set(false); +// export async function getStaticPaths() { +// const posts = await Astro.glob('../../content/roles/*.md'); +// return posts.map(({ frontmatter, compiledContent }) => { +// return { +// params: { role: frontmatter.url, image_url: frontmatter.image }, +// props: { frontmatter, compiledContent }, +// }; +// }); +// } + export async function getStaticPaths() { - const posts = await Astro.glob('../../content/roles/*.md'); - return posts.map(({ frontmatter, compiledContent }) => { - return { - params: { role: frontmatter.url, image_url: frontmatter.image }, - props: { frontmatter, compiledContent }, - }; - }); + const roles= await getCollection('roles'); + return roles.map( (entry) => ({ + params: { role: entry.slug }, + props: { entry }, + })); } -const { frontmatter, compiledContent } = Astro.props; -const content = compiledContent(); + +const { entry } = Astro.props; +const { Content } = await entry.render(); + const entries = await getCollection('cohorts'); --- - + -
-
-
+
+
+ +
+
+
diff --git a/src/pages/training.astro b/src/pages/training.astro index a9cf0a0..c136edc 100644 --- a/src/pages/training.astro +++ b/src/pages/training.astro @@ -31,7 +31,7 @@ displaySiteBanner.set(false); link={externalLinks.recruitingApplication} linkText="APPLY NOW" externalLink={true} - backgroundImg="/images/dress_blues_wide.png" + backgroundImg="src/images/dress_blues_wide.png" class="bg-top" /> @@ -42,7 +42,7 @@ displaySiteBanner.set(false); content="Software is developed using Agile methodology in teams. Teams consist of a Product Manager (PM), a user interface/user experience (UI/UX) designer, and software developers." link="/roles/" linkText="LEARN MORE" - image="/images/charlie-1.png" + image="src/images/charlie-1.png" imageAltText="A Marine Lieutenant Colonel looking at the camera" imagePosition="right" /> @@ -53,7 +53,7 @@ displaySiteBanner.set(false); content="Every member of the team is essential to the rapid development of an application that satisfies the critical requirements of the Fleet Marine Forces. Teams remain together throughout the software development lifecycle. For approximately nine months, they are paired with an industry expert for daily tasks, ensuring that they are using the technology industry's best practices." link="/roles/" linkText="LEARN MORE" - image="/images/happy_sparta.png" + image="src/images/happy_sparta.png" imageAltText="A Marine presenting software" imagePosition="left" /> diff --git a/tsconfig.json b/tsconfig.json index 13042ed..b5af676 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,6 +10,7 @@ "@layouts/*": ["src/layouts/*"], "@pages/*": ["src/pages/*"], "@content/*": ["src/content/*"], + "@images/*": ["src/images/*"], }, }, "exclude": [