diff --git a/content/en/_index.md b/content/en/_index.md new file mode 100644 index 0000000000..a3cb57b764 --- /dev/null +++ b/content/en/_index.md @@ -0,0 +1,124 @@ +--- +title: Open-source parametric 3D CAD +description: Design, refine, and make real-world objects with FreeCAD. +title_class: accent +buttons: + - link: /download/ + label: Download FreeCAD + class: primary + latest: true + - link: latest-release + label: Read release notes + class: secondary +hero: + title: Design in FreeCAD + link: /features/ +--- + +{{< block title="What do you want to do?" css_class="section onboarding-section" title_class="accent" >}} + +{{< group css_class="onboarding-card" >}} + +{{< onboarding_marker number="01" icon="download" >}} + +### Start designing + +Download FreeCAD and begin your first parametric model. + +{{< button url="/download/" label="Download FreeCAD" icon="download" >}} + +{{< /group >}} + +{{< group css_class="onboarding-card" >}} + +{{< onboarding_marker number="02" icon="gear" >}} + +### Explore what FreeCAD can do + +Browse workflows for product design, BIM, manufacturing, and 3D printing. + +{{< button url="/features/" label="Explore workflows" icon="gear" >}} + +{{< /group >}} + +{{< group css_class="onboarding-card" >}} + +{{< onboarding_marker number="03" icon="manual" >}} + +### Learn FreeCAD + +Find documentation, examples, and guidance for your next step. + +{{< button url="/docs/" label="Open documentation" icon="manual" >}} + +{{< /group >}} + +{{< /block >}} + + +{{< block title="Why FreeCAD?" css_class="pastel4 proof-strip" >}} + +{{< group >}} + +### Parametric and editable + +Build with constraints, expressions, and a clear modeling history that stays editable as designs change. + +{{< /group >}} + +{{< group >}} + +### Open formats, no lock-in + +Import and export STEP, IFC, STL, DXF, SVG, and more. Keep native FCStd files and move projects between tools. + +{{< /group >}} + +{{< group >}} + +### Cross-platform and extensible + +Run FreeCAD on Windows, macOS, or GNU/Linux, then extend it with Python, macros, and addons. + +{{< /group >}} + +{{< /block >}} + + +{{< block title="A workflow for every kind of making" css_class="workflow-section" >}} + +{{< workflow_grid >}} + +{{< /block >}} + + +{{< block title="Latest release" css_class="pastel5" >}} + +FreeCAD’s current release brings refinements, new tools, quality-of-life improvements, and hundreds of fixes across the workbenches. + +{{< collection "download/releases" 1 >}} + +{{< button url="/download/" label="Explore downloads and release notes" icon="download" >}} + +{{< /block >}} + + +{{< block title="From the project" css_class="section project-section" >}} + +{{< collection "news" 3 >}} + +{{< button url="/news/" label="Read all FreeCAD news" icon="time" >}} + +{{< /block >}} + + +{{< block title="Ready to build?" css_class="pastel6" >}} + +Download FreeCAD, find a starting point in the documentation, or join the community around the project. + +{{< button url="/download/" label="Download FreeCAD" icon="download" >}} +{{< button url="/docs/" label="Start with the documentation" icon="manual" >}} +{{< button url="/community/" label="Join the community" icon="people" >}} +{{< button url="/donate/" label="Support the project" icon="heart" >}} + +{{< /block >}} diff --git a/content/en/donate/_index.md b/content/en/donate/_index.md index 44a607ba0e..3875b940d5 100644 --- a/content/en/donate/_index.md +++ b/content/en/donate/_index.md @@ -23,34 +23,28 @@ donate: messages: default: Choose the monthly sponsorship level corporate_label: Corporate -icon_cms: favorite +icon_cms: heart --- ### Donations Frequently Asked Questions {{< details summary="Why donate to FreeCAD?" name="faq" >}} -Why donate to FreeCAD? +Your donations help fund infrastructure, development grants, community events, and the day-to-day work that keeps FreeCAD available as free and open-source software. {{< /details >}} {{< details summary="How to donate?" name="faq" >}} -How to donate? +Choose a one-time donation or monthly sponsorship above, select an amount, and follow the payment instructions. Contributions are handled by the FreeCAD Project Association. {{< /details >}} {{< details summary="Sponsorship Tiers" name="faq" id="tiers" >}} -Normal Sponsorship info. - -Bronze Sponsorship info. - -Silver Sponsorship info. - -Gold Sponsorship info. +Monthly sponsors can choose a tier that fits their budget. Every tier supports the same project and receives our thanks; larger contributions simply provide more sustained support. {{< /details >}} {{< details summary="Corporate Sponsorship" name="faq" id="corporate" >}} -Corporate Sponsorship info. +Companies can support FreeCAD as corporate sponsors. This is a useful way to invest in an open tool that many teams and industries rely on; please contact the FreeCAD Project Association for details. {{< /details >}} {{< details summary="Payment options" name="faq" >}} -Payment options info. -{{< /details >}} \ No newline at end of file +The available payment methods and currencies are shown by the donation form. If your preferred option is not available, contact the project association before sending a contribution. +{{< /details >}} diff --git a/content/en/download/_index.md b/content/en/download/_index.md index d779f282cf..6f188dbce8 100644 --- a/content/en/download/_index.md +++ b/content/en/download/_index.md @@ -1,7 +1,7 @@ --- -title: Launch into design! +title: Download FreeCAD linkTitle: Download -description: Get FreeCAD and start with freedom right away. +description: Choose your platform and get the latest stable release. icon_cms: download --- @@ -12,7 +12,7 @@ icon_cms: download ## What's New in the Latest Release -FreeCAD 1.1 focuses on refinement and key features to enhance workflow and stability for everyone. +The latest FreeCAD release focuses on refinement and key features to enhance workflow and stability for everyone. With many quality of life improvements to all workbenches, hundreds of bug fixes, and updated libraries, designing with FreeCAD is more fun and powerful than ever. Oh, full freedom included by the way. @@ -32,7 +32,7 @@ designing with FreeCAD is more fun and powerful than ever. Oh, full freedom incl ## See the source code, it's open! {class="accent"} -Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. +FreeCAD is developed in the open by contributors around the world. Inspect the source, report issues, improve documentation, or submit a patch — the project welcomes participation at every level. {{< /group >}} diff --git a/content/en/features/_index.md b/content/en/features/_index.md index c6d4eef5fb..b568f16916 100644 --- a/content/en/features/_index.md +++ b/content/en/features/_index.md @@ -3,10 +3,14 @@ title: Innovate Without Limits linkTitle: Features description: Powerful and open parametric design for everyone. icon_cms: bolt +cover: + image: assembly.webp + caption: Parametric FreeCAD assembly model + alt: A parametric FreeCAD assembly model --- -{{< block title="Made to build for the real world" css_class="grid" title_class="accent" >}} +{{< block title="Made to build for the real world" css_class="grid" title_class="accent" id="real-world-design" >}} {{< group >}} @@ -36,7 +40,7 @@ FreeCAD features an advanced geometry engine based on Open CASCADE Technology. I {{< /block >}} -{{< block title="A wi(l)dly parametric environment" css_class="dots" >}} +{{< block title="A wi(l)dly parametric environment" css_class="dots" id="parametric-automation" >}} {{< group >}} @@ -64,7 +68,7 @@ FreeCAD allows to import and export models and data to dozens of different file {{< /block >}} -{{< block title="A large multi-specialty ecosystem" css_class="section" >}} +{{< block title="A large multi-specialty ecosystem" css_class="section" id="bim-and-ecosystem" >}} ![Building Information Modeling](bim.webp "Building Information Modeling") @@ -96,4 +100,4 @@ FreeCAD is made for everybody, by everybody. Developed and maintained by a commu {{< carousel "1.webp" "2.webp" "3.webp" "4.webp" >}} -{{< /block >}} \ No newline at end of file +{{< /block >}} diff --git a/themes/trigo/assets/css/custom.css b/themes/trigo/assets/css/custom.css index acd7dacd10..965a050c1b 100644 --- a/themes/trigo/assets/css/custom.css +++ b/themes/trigo/assets/css/custom.css @@ -16,12 +16,14 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. align-content: space-evenly; flex-wrap: wrap; gap: var(--gap); - width: var(--width); + width: min(var(--width), 100%); margin: var(--gap) auto; z-index: 2; } .download-card { + position: relative; + min-width: 0; flex: 1 1 25%; display: flex; flex-direction: column; @@ -32,6 +34,21 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. box-shadow: var(--shadow); } +.download-card.recommended { + outline: calc(var(--line) * 2) solid var(--accent); +} + +.download-recommended { + display: inline-block; + margin-block-end: calc(var(--gap) * 0.5); + padding: calc(var(--gap) * 0.25) calc(var(--gap) * 0.5); + color: var(--entry); + font-size: var(--s); + font-weight: bold; + background: var(--accent); + border-radius: var(--radius); +} + .download-platform { text-align: center; } @@ -50,10 +67,13 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. .download-buttons { display: flex; flex-direction: column; + gap: calc(var(--gap) * 0.25); } .download-buttons .button { display: inline-block; + width: 100%; + margin-inline: 0; } .download-buttons span { @@ -65,10 +85,38 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. .download-release { display: flex; flex-direction: column; + width: min(var(--width), 100%); + margin-inline: auto; } -.download-release h4 { +.download-release-meta { + display: flex; + flex-wrap: wrap; + align-items: baseline; + justify-content: center; + gap: calc(var(--gap) * 0.5); color: var(--secondary); + text-align: center; +} + +.download-release-kicker { + color: var(--accent); + font-weight: bold; +} + +.download-release-meta strong { + font-size: var(--l); +} + +.download-release-meta time { + color: var(--tertiary); + font-size: var(--s); +} + +.download-release-intro { + margin-block-start: 0; + color: var(--tertiary); + text-align: center; } @@ -734,4 +782,199 @@ a.sponsor-entry:hover { text-align: center; background: var(--entry); border-radius: var(--radius); -} \ No newline at end of file +} + + +/* Homepage proof points and workflow cards */ + +main .block-shortcode[id] { + scroll-margin-top: calc(var(--header-height) + var(--gap)); +} + +.kind-home .onboarding-section .block-content { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + align-items: stretch; + max-width: var(--width); +} + +.kind-home .onboarding-section .block-content > .group { + position: relative; + display: flex; + flex-direction: column; + width: 100%; + max-width: none; + margin: 0; + padding: calc(var(--gap) * 1.25); + background: var(--entry); + border-radius: var(--radius); + box-shadow: var(--shadow); +} + +.kind-home .onboarding-section .block-content > .group::before { + content: ""; + position: absolute; + inset-block: 0; + inset-inline-start: 0; + width: var(--line); + background: var(--accent); + border-radius: var(--radius) 0 0 var(--radius); +} + +.kind-home .onboarding-marker { + display: flex; + align-items: center; + justify-content: space-between; + gap: var(--gap); + margin-block-end: var(--gap); + color: var(--accent); +} + +.kind-home .onboarding-marker-icon { + display: grid; + place-items: center; + width: calc(var(--gap) * 2.5); + height: calc(var(--gap) * 2.5); + color: var(--accent); + background: color-mix(in srgb, var(--accent) 12%, var(--entry)); + border-radius: var(--radius); +} + +.kind-home .onboarding-marker-icon .icon { + width: var(--l); + height: var(--l); +} + +.kind-home .onboarding-marker-number { + font-size: var(--s); + font-weight: bold; + letter-spacing: 0.12em; + opacity: 0.65; +} + +.kind-home .onboarding-card h3 { + margin-top: 0; + text-align: left; + color: var(--accent); +} + +.kind-home .onboarding-card > p { + flex: 1; +} + +.kind-home .onboarding-card .button-shortcode { + margin-top: var(--gap); +} + +.kind-home .proof-strip .block-content { + align-items: stretch; +} + +.kind-home .proof-strip .group { + padding: var(--gap); + text-align: center; +} + +.kind-home .proof-strip .group h3 { + margin-top: 0; + color: var(--accent); +} + +.kind-home .workflow-section .block-content { + display: block; + max-width: var(--width); +} + +.kind-home .workflow-section .block-content > .workflow-grid { + max-width: var(--width); + width: 100%; +} + +.workflow-grid { + display: grid; + grid-template-columns: repeat(3, minmax(0, 1fr)); + gap: calc(var(--gap) * 1.5); + width: 100%; + max-width: var(--width); + margin: auto; +} + +.workflow-card { + display: flex; + flex-direction: column; + overflow: hidden; + color: var(--secondary); + background: var(--entry); + border-radius: var(--radius); + box-shadow: var(--shadow); + transition: var(--transition); +} + +.workflow-card:hover { + color: var(--secondary); + filter: var(--filter); + transform: var(--transform-hover); +} + +.workflow-card:focus-visible { + outline: var(--outline-focus); +} + +.workflow-card-image { + height: clamp(11rem, 15vw, 17rem); + overflow: hidden; + background: var(--tone); +} + +.workflow-card-image img { + width: 100%; + height: 100%; + object-fit: cover; +} + +.workflow-card-content { + display: flex; + flex: 1; + flex-direction: column; + align-items: flex-start; + padding: calc(var(--gap) * 1.25); +} + +.workflow-card-content h3 { + margin: 0 0 calc(var(--gap) * 0.5); + color: var(--secondary); +} + +.workflow-card-description { + flex: 1; + color: var(--tertiary); +} + +.workflow-card-description p { + margin: 0; + font-size: var(--m); +} + +.workflow-card-link { + margin-top: var(--gap); + color: var(--accent); + font-weight: bold; +} + +.workflow-card-link span { + margin-inline-start: calc(var(--gap) * 0.25); +} + +.kind-home .project-section .block-content { + flex-wrap: wrap; +} + +.kind-home .project-section .block-content > div:first-child { + flex: 1 1 100%; + max-width: var(--width); +} + +.kind-home .project-section .block-content > .button-shortcode { + flex: 0 1 100%; + max-width: var(--width); +} diff --git a/themes/trigo/assets/css/hero.css b/themes/trigo/assets/css/hero.css index 13d2f33859..2173ff1e6d 100644 --- a/themes/trigo/assets/css/hero.css +++ b/themes/trigo/assets/css/hero.css @@ -7,6 +7,7 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. /* Hero CSS stylesheet. */ .hero { + --hero-pattern: color-mix(in srgb, var(--accent) 22%, transparent); min-height: calc(var(--width) * 0.25); height: auto; overflow: hidden; @@ -20,6 +21,7 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. gap: var(--gap); text-align: center; position: relative; + isolation: isolate; background: radial-gradient( 80% 70% at -5% -5%, @@ -44,7 +46,44 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. transition: var(--transition); } +.hero::before { + content: ""; + position: absolute; + inset: 0; + z-index: -1; + pointer-events: none; + background-image: + repeating-linear-gradient( + 30deg, + transparent 0 63px, + var(--hero-pattern) 63px 64px + ), + repeating-linear-gradient( + 150deg, + transparent 0 63px, + var(--hero-pattern) 63px 64px + ); + background-size: 64px 64px; + opacity: 0.9; + -webkit-mask-image: radial-gradient( + ellipse 72% 100% at 80% 50%, + black 0 28%, + transparent 88% + ); + mask-image: radial-gradient( + ellipse 72% 100% at 80% 50%, + black 0 28%, + transparent 88% + ); +} + +.hero > * { + position: relative; + z-index: 1; +} + .dark .hero { + --hero-pattern: color-mix(in srgb, var(--accent) 17%, transparent); background: radial-gradient( 80% 70% at -5% -5%, @@ -74,9 +113,36 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. gap: var(--gap); flex: 1; max-width: calc(var(--width) * 0.5); + min-width: 0; color: var(--secondary); } +.hero > .title, +.hero > .description { + width: var(--width); + max-width: 100%; + text-align: center; + text-wrap: balance; +} + +.hero > .title { + display: block; +} + +.hero > .description { + display: block; +} + +.hero-copy { + justify-content: center; +} + +.hero-visual { + align-items: center; + justify-content: center; + overflow: hidden; +} + a.hero-column:hover { filter: var(--filter); transform: var(--transform-hover); @@ -88,7 +154,8 @@ main > :is(.hero:only-child, .not-found) { } .kind-home .hero { - min-height: calc(var(--width) * 0.5); + min-height: clamp(34rem, 76vh, 50rem); + width: 100%; flex-direction: row; } @@ -96,11 +163,78 @@ main > :is(.hero:only-child, .not-found) { .description, .hero .button, .metadata { - display: inline-flex; + display: flex; max-width: var(--width); z-index: 2; } +.kind-home .hero .title { + display: block; + font-size: clamp(2.5rem, 5vw, 5rem); + line-height: 1.05; + text-wrap: balance; +} + +.kind-home .hero .description { + font-size: clamp(1.2rem, 2vw, 1.75rem); + line-height: 1.35; + text-wrap: balance; +} + +.kind-home .hero .hero-details { + display: flex; + flex-direction: column; + align-items: center; + gap: calc(var(--gap) * 0.35); +} + +.kind-home .hero .hero-meta, +.kind-home .hero .hero-trust { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: calc(var(--gap) * 0.5); + margin: 0; + font-size: var(--s); + line-height: 1.4; +} + +.kind-home .hero .hero-meta { + color: var(--secondary); +} + +.kind-home .hero .hero-trust { + color: var(--tertiary); +} + +.kind-home .content, +.kind-home .content p { + text-align: left; + text-align-last: left; +} + +.hero .buttons { + display: flex; + flex-wrap: wrap; + justify-content: center; + gap: calc(var(--gap) * 0.5); +} + +.hero .button.primary { + color: var(--primary); + background: var(--accent); +} + +.hero .button.primary:hover { + color: var(--primary); + background: var(--accent-hover); +} + +.hero .button.secondary { + background: transparent; + box-shadow: none; +} + .kind-page:not(.layout-archives) :is(.title, .description) { color: var(--secondary); } @@ -127,7 +261,7 @@ main > :is(.hero:only-child, .not-found) { justify-content: center; align-content: center; text-decoration: none; - white-space: nowrap; + white-space: normal; cursor: pointer; transition: var(--transition); box-shadow: var(--shadow); @@ -162,7 +296,7 @@ input:checked + .button, filter: var(--filter); } -.button:focus { +.button:focus-visible { outline: var(--outline-focus); } @@ -198,6 +332,33 @@ input:checked + .button, z-index: 1; } +.hero-visual .cover { + position: relative; + width: 100%; + max-width: 100%; + padding: calc(var(--gap) * 0.5); + border: var(--line) solid color-mix(in srgb, var(--accent) 20%, transparent); + border-radius: var(--radius); + background: color-mix(in srgb, var(--entry) 30%, transparent); + box-shadow: 0 1rem 3rem color-mix(in srgb, var(--primary) 12%, transparent); +} + +.hero-visual .cover img { + width: 100%; + min-width: 0; + max-width: 100%; + max-height: min(50vh, 32rem); + object-fit: contain; +} + +.hero-visual > .title { + display: block; + width: 100%; + max-width: 100%; + overflow-wrap: anywhere; + text-wrap: balance; +} + .cover svg.svg { width: auto; min-width: calc(var(--width) * 0.5); diff --git a/themes/trigo/assets/css/media.css b/themes/trigo/assets/css/media.css index 330e844c2a..796c230c46 100644 --- a/themes/trigo/assets/css/media.css +++ b/themes/trigo/assets/css/media.css @@ -67,8 +67,24 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. /* List and Single pages */ .kind-home .hero { - min-height: calc(100vh - var(--header-height)); + min-height: auto; flex-direction: column; + align-items: stretch; + padding-block: clamp(3rem, 12vw, 6rem); + } + + .kind-home .hero-copy, + .kind-home .hero-visual { + width: 100%; + max-width: var(--width); + } + + .kind-home .hero-copy { + order: 1; + } + + .kind-home .hero-visual { + order: 2; } .hero { @@ -81,6 +97,72 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. flex: none; } + .hero > .title, + .hero > .description, + .download-release, + .download-release-meta, + .download-release-intro, + .download-box { + width: 100%; + max-width: 100%; + min-width: 0; + } + + .hero > .title { + font-size: clamp(1.8rem, 8vw, 2.25rem); + } + + .download-release, + .download-box { + margin-inline: 0; + } + + .download-release-meta { + flex-direction: column; + align-items: center; + gap: calc(var(--gap) * 0.25); + } + + .download-box { + flex-direction: column; + align-items: stretch; + } + + .download-platform { + display: flex; + flex-direction: column; + align-items: center; + } + + .download-recommended { + display: block; + width: fit-content; + margin-inline: auto; + } + + .download-card { + flex: 1 1 auto; + width: 100%; + } + + .kind-home .hero .title { + font-size: clamp(2.25rem, 11vw, 4rem); + } + + .kind-home .hero-visual > .title { + font-size: clamp(2rem, 9vw, 3.25rem); + } + + .kind-home .hero .buttons { + align-items: stretch; + flex-direction: column; + } + + .kind-home .hero .button { + width: 100%; + margin-inline: 0; + } + .metadata, .card { flex-direction: column; @@ -98,6 +180,34 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. height: calc(100vh - var(--header-height)); } + .kind-home .hero-visual .cover img { + height: auto; + max-height: none; + width: 100%; + } + + .hero::before { + background-size: 48px 48px; + opacity: 0.55; + -webkit-mask-image: radial-gradient( + ellipse 110% 60% at 50% 45%, + black 0 22%, + transparent 88% + ); + mask-image: radial-gradient( + ellipse 110% 60% at 50% 45%, + black 0 22%, + transparent 88% + ); + } + + .kind-home .hero-visual > .title, + .kind-home .hero-visual .cover { + width: 100%; + max-width: 20rem; + margin-inline: auto; + } + main:has(> .toc + .content) .content { padding-block-start: 0; } @@ -158,6 +268,19 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. max-width: calc(var(--width) - (var(--gap) * 2)); } + .workflow-grid { + grid-template-columns: 1fr; + gap: var(--gap); + } + + .kind-home .onboarding-section .block-content { + grid-template-columns: 1fr; + } + + .workflow-card-image { + height: clamp(12rem, 55vw, 18rem); + } + .footer-menu > ul > li { flex: 1; min-width: calc(var(--width) * 0.4); @@ -267,6 +390,14 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. } +@media screen and (max-width: 900px) and (min-width: 501px) { + + .workflow-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + + /* Bigger screen devices (e.g. desktops, laptops, high-end tablets). */ @media screen and (min-width: 1000px) { @@ -281,10 +412,19 @@ SPDX-FileNotice: Part of the Trigo theme for Hugo. /* Reduced motion devices. */ -@media (prefers-reduced-motion) { +@media (prefers-reduced-motion: reduce) { :root { --transform-hover: none; --transform-active: none; } + + *, + *::before, + *::after { + animation-duration: 0.01ms !important; + animation-iteration-count: 1 !important; + scroll-behavior: auto !important; + transition-duration: 0.01ms !important; + } } diff --git a/themes/trigo/layouts/_partials/custom/download.html b/themes/trigo/layouts/_partials/custom/download.html index 69804902c0..17826a643c 100644 --- a/themes/trigo/layouts/_partials/custom/download.html +++ b/themes/trigo/layouts/_partials/custom/download.html @@ -37,13 +37,18 @@
{{- end -}} -

- {{- printf "%s %s · %s" - (i18n "download" | default "Download") - (partial "utils/format_semver.html" $release.Params.versions) - ($release.Lastmod | time.Format ":date_long") - -}} -

+
+ Latest stable release + FreeCAD {{ partial "utils/format_semver.html" $release.Params.versions }} + + Read release notes +
+ +

+ Choose your operating system. All downloads are free and open source. +

@@ -101,6 +106,33 @@

{{ $platform.label }}

}, 1500); }); }); + + const userAgent = navigator.userAgent || ''; + const userPlatform = navigator.userAgentData?.platform || navigator.platform || ''; + let recommendedPlatform = ''; + + if (!/Android|iPhone|iPad/i.test(userAgent)) { + if (/Win/i.test(userPlatform)) { + recommendedPlatform = 'windows'; + } else if (/Mac/i.test(userPlatform)) { + recommendedPlatform = 'mac'; + } else if (/Linux/i.test(userPlatform)) { + recommendedPlatform = 'linux'; + } + } + + if (recommendedPlatform) { + const card = document.getElementById(recommendedPlatform); + + if (card) { + card.classList.add('recommended'); + + const badge = document.createElement('span'); + badge.className = 'download-recommended'; + badge.textContent = 'Recommended for you'; + card.querySelector('.download-platform').prepend(badge); + } + } {{- if $page.IsPage -}}
{{- end -}} diff --git a/themes/trigo/layouts/_partials/head/page_head.html b/themes/trigo/layouts/_partials/head/page_head.html index fc91c3540a..fcb1cd2a13 100644 --- a/themes/trigo/layouts/_partials/head/page_head.html +++ b/themes/trigo/layouts/_partials/head/page_head.html @@ -11,7 +11,7 @@ */ -}} -{{- $title := cond .IsHome site.Title (printf "%s | %s" site.Title .LinkTitle) -}} +{{- $title := printf "%s | %s" site.Title .LinkTitle -}} {{- $description := or .Description site.Params.site_description -}} @@ -61,4 +61,4 @@ {{- partial "opengraph.html" . -}} {{- end -}} {{- end -}} - \ No newline at end of file + diff --git a/themes/trigo/layouts/_partials/main/cover.html b/themes/trigo/layouts/_partials/main/cover.html index b7d9aa9040..3b08dc7e66 100644 --- a/themes/trigo/layouts/_partials/main/cover.html +++ b/themes/trigo/layouts/_partials/main/cover.html @@ -17,6 +17,15 @@ {{- $page := .Page -}} {{- $cover := "" -}} {{- $caption := "" -}} +{{- $alt := "" -}} +{{- $loading := "" -}} +{{- $priority := "" -}} + +{{- if reflect.IsMap . -}} + {{- $page = .page -}} + {{- $loading = .loading -}} + {{- $priority = .priority -}} +{{- end -}} {{- with $page.Params.cover -}} {{- with .image -}} @@ -49,6 +58,7 @@ {{- end -}} {{- $caption = .caption | plainify -}} + {{- $alt = .alt | plainify -}} {{- end -}} {{- /* Cover fallbacks. */ -}} @@ -83,10 +93,12 @@ {{- partialCached "utils/process_image.html" (dict "image" . - "alt" "" + "alt" ($alt | default $caption) "title" $caption + "loading" $loading + "priority" $priority "attributes" dict - ) $key -}} + ) (printf "%s-%s-%s" $key $loading $priority) -}} {{- else -}} {{- warnf "Cover MediaType not supported for %q in page %q" $cover $page.LinkTitle -}} diff --git a/themes/trigo/layouts/_partials/utils/process_image.html b/themes/trigo/layouts/_partials/utils/process_image.html index dacfdd9c6f..6ea68a8e7c 100644 --- a/themes/trigo/layouts/_partials/utils/process_image.html +++ b/themes/trigo/layouts/_partials/utils/process_image.html @@ -22,9 +22,9 @@ {{- $resize_format := site.Params.resize_format | default "webp" -}} {{- $resize_dimensions := site.Params.resize_dimensions | default (slice 400 800 1600) -}} -{{- $loading := site.Params.image_loading | default "lazy" -}} -{{- $priority := site.Params.image_priority | default "low" -}} -{{- $decoding := site.Params.image_decoding | default "async" -}} +{{- $loading := .loading | default site.Params.image_loading | default "lazy" -}} +{{- $priority := .priority | default site.Params.image_priority | default "low" -}} +{{- $decoding := .decoding | default site.Params.image_decoding | default "async" -}} {{- $width := 0 -}} {{- $height := 0 -}} @@ -91,4 +91,4 @@ {{- end -}} {{- end -}}> -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/themes/trigo/layouts/_shortcodes/block.html b/themes/trigo/layouts/_shortcodes/block.html index 10407326d0..7079d1dc43 100644 --- a/themes/trigo/layouts/_shortcodes/block.html +++ b/themes/trigo/layouts/_shortcodes/block.html @@ -11,6 +11,7 @@ @param {string} [css_class] – Optional CSS class for whole block container. @param {string} [title_class] – Optional CSS class for title. @param {string} [content_class] – Optional CSS class for content. + @param {string} [id] – Optional stable anchor ID for the block. @return {HTML} Render full-width block layout container with optional title and content. @@ -35,6 +36,7 @@ {{- $block_class := cond (.IsNamedParams) (.Get "css_class") (.Get 2) -}} {{- $title_class := cond (.IsNamedParams) (.Get "title_class") (.Get 3) -}} {{- $content_class := cond (.IsNamedParams) (.Get "content_class") (.Get 4) -}} + {{- $block_id := cond (.IsNamedParams) (.Get "id") (.Get 5) -}} {{- $block_classes := slice "block-shortcode" "wide" -}} {{- with $block_class -}} @@ -61,7 +63,7 @@ {{- $content_classes = $content_classes | append . -}} {{- end -}} -
+ {{- with $title -}}

@@ -78,4 +80,4 @@

{{- else -}} {{- warnf "%q shortcode: missing required 'content' argument on %s" .Name .Position -}} -{{- end -}} \ No newline at end of file +{{- end -}} diff --git a/themes/trigo/layouts/_shortcodes/onboarding_marker.html b/themes/trigo/layouts/_shortcodes/onboarding_marker.html new file mode 100644 index 0000000000..76c407f8cd --- /dev/null +++ b/themes/trigo/layouts/_shortcodes/onboarding_marker.html @@ -0,0 +1,4 @@ +{{- /* Decorative numbered marker for homepage onboarding cards. */ -}} +{{- $number := cond .IsNamedParams (.Get "number") (.Get 0) -}} +{{- $icon := cond .IsNamedParams (.Get "icon") (.Get 1) -}} + diff --git a/themes/trigo/layouts/_shortcodes/workflow_grid.html b/themes/trigo/layouts/_shortcodes/workflow_grid.html new file mode 100644 index 0000000000..09fb232af5 --- /dev/null +++ b/themes/trigo/layouts/_shortcodes/workflow_grid.html @@ -0,0 +1,8 @@ +{{- /* Homepage workflow cards sourced from the features page bundle. */ -}} +{{- $page := site.GetPage "/features/" -}} +{{- $cards := slice + (dict "image" "assembly.webp" "anchor" "real-world-design" "title" "Product design and manufacture" "description" "Create editable solids, assemblies, technical drawings, and toolpaths for CNC workflows. Revise a design without starting over.") + (dict "image" "bim.webp" "anchor" "bim-and-ecosystem" "title" "Architecture and BIM" "description" "Work with building information, quantities, and documentation using dedicated BIM and Draft workbenches.") + (dict "image" "sketch.webp" "anchor" "parametric-automation" "title" "Sketch, print, and automate" "description" "Prepare models for 3D printing, run finite-element analyses, or extend FreeCAD with Python, macros, and community workbenches.") +-}} + diff --git a/themes/trigo/layouts/home.html b/themes/trigo/layouts/home.html index d3b054538b..4ae1102eb5 100644 --- a/themes/trigo/layouts/home.html +++ b/themes/trigo/layouts/home.html @@ -7,6 +7,7 @@ {{- /* Homepage template: - Render title, description and custom buttons from homepage front matter. + - Resolve the latest release for the versioned download CTA and release-notes link. - Render hero article with its title and cover (fall back to homepage cover). - Render homepage content. */ -}} @@ -16,21 +17,54 @@ {{- $buttons := .Params.buttons -}} {{- $hero := .Params.hero | default hugo.Sites.Default.Home.Params.hero -}} + {{- $release_section := site.GetPage "/download/releases/" -}} + {{- $latest_release := false -}} + + {{- with $release_section -}} + {{- with .Pages.ByDate.Reverse -}} + {{- $latest_release = index . 0 -}} + {{- end -}} + {{- end -}} + + {{- $latest_version := "" -}} + + {{- with $latest_release -}} + {{- $latest_version = .Params.versions -}} + + {{- if reflect.IsSlice $latest_version -}} + {{- $latest_version = index $latest_version (sub (len $latest_version) 1) -}} + {{- end -}} + {{- end -}}
-
+

{{- .Title -}}

{{- with .Description -}} -

+

{{- . -}} -

+

{{- end -}} -

🚧 Work in Progress... Come back soon! 🏗️

+
+

+ Windows + + macOS + + GNU/Linux +

+

+ Free and open source + + Open formats + + Editable project files +

+
{{- with $buttons -}}
@@ -39,6 +73,16 @@

🚧 Work in Progress... Come back soon! 🏗️

{{- $button_link := .link -}} {{- $button_label := .label -}} + {{- if and .latest $latest_version -}} + {{- $button_label = printf "%s %s" $button_label $latest_version -}} + {{- end -}} + + {{- if eq $button_link "latest-release" -}} + {{- with $latest_release -}} + {{- $button_link = .RelPermalink -}} + {{- end -}} + {{- end -}} + {{- with site.GetPage $button_link -}} {{- $key := partialCached "utils/cache_key.html" . . -}} {{- $button_link = partialCached "utils/link_redirect.html" . $key -}} @@ -89,9 +133,11 @@

🚧 Work in Progress... Come back soon! 🏗️

{{- with $hero_link -}} + {{- else -}} + + {{- end -}} {{- end -}}