-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from felix-berlin/185-wrong-behavior-when-usi…
…ng-a-base-url-different-from refactor: crumb generation
- Loading branch information
Showing
13 changed files
with
194 additions
and
425 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
import { defineConfig } from 'astro/config'; | ||
import { defineConfig } from "astro/config"; | ||
|
||
import mdx from "@astrojs/mdx"; | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
integrations: [mdx()] | ||
}); | ||
base: "/astro-breadcrumbs", | ||
trailingSlash: "always", | ||
integrations: [mdx()], | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
import Layout from "../../../../layouts/Layout.astro"; | ||
import Breadcrumbs from "../../../../../../src/Breadcrumbs.astro"; | ||
--- | ||
|
||
<Layout title="Welcome to Astro Breadcrumbs."> | ||
<main> | ||
<h2> | ||
Example 7 - With trailing slash | ||
<Breadcrumbs /> | ||
</h2> | ||
</main> | ||
</Layout> | ||
<style> | ||
main { | ||
margin: auto; | ||
padding: 1em; | ||
max-width: 60ch; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,78 @@ | ||
--- | ||
import Layout from "../layouts/Layout.astro"; | ||
import Card from "../components/Card.astro"; | ||
import Breadcrumbs from "../../../src/Breadcrumbs.astro"; | ||
--- | ||
|
||
<Layout title="Welcome to Astro Breadcrumbs."> | ||
<main> | ||
<h1>Welcome to <span class="text-gradient">Astro</span> Breadcrumbs</h1> | ||
<p class="instructions"> | ||
Check out the <code>src/pages/en/category/astro/page.astro</code> directory | ||
to see the code example.<br /> | ||
</p> | ||
<ul role="list" class="link-card-grid"> | ||
<Card | ||
href="/en/category/astro/page" | ||
title="Examples" | ||
body="Explore how to use Astro Breadcrumbs." | ||
/> | ||
<Card | ||
href="https://github.com/felix-berlin/astro-breadcrumbs/" | ||
title="Github" | ||
body="Astro Breadcrumbs Github Page" | ||
/> | ||
</ul> | ||
</main> | ||
<main> | ||
<h1>Welcome to <span class="text-gradient">Astro</span> Breadcrumbs</h1> | ||
<Breadcrumbs /> | ||
<p class="instructions"> | ||
Check out the <code>src/pages/en/category/astro/page.astro</code> directory | ||
to see the code example.<br /> | ||
</p> | ||
<ul role="list" class="link-card-grid"> | ||
<Card | ||
href="/en/category/astro/page" | ||
title="Examples" | ||
body="Explore how to use Astro Breadcrumbs." | ||
/> | ||
<Card | ||
href="/astro-breadcrumbs/en/category/astro/page" | ||
title="Examples using base url" | ||
body="Explore how to use Astro Breadcrumbs." | ||
/> | ||
<Card | ||
href="https://github.com/felix-berlin/astro-breadcrumbs/" | ||
title="Github" | ||
body="Astro Breadcrumbs Github Page" | ||
/> | ||
</ul> | ||
</main> | ||
</Layout> | ||
|
||
<style> | ||
main { | ||
margin: auto; | ||
padding: 1.5rem; | ||
max-width: 60ch; | ||
} | ||
h1 { | ||
font-size: 3rem; | ||
font-weight: 800; | ||
margin: 0; | ||
} | ||
.text-gradient { | ||
background-image: var(--accent-gradient); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
background-size: 400%; | ||
background-position: 0%; | ||
} | ||
.instructions { | ||
line-height: 1.6; | ||
margin: 1rem 0; | ||
border: 1px solid rgba(var(--accent), 25%); | ||
background-color: white; | ||
padding: 1rem; | ||
border-radius: 0.4rem; | ||
} | ||
.instructions code { | ||
font-size: 0.875em; | ||
font-weight: bold; | ||
background: rgba(var(--accent), 12%); | ||
color: rgb(var(--accent)); | ||
border-radius: 4px; | ||
padding: 0.3em 0.45em; | ||
} | ||
.instructions strong { | ||
color: rgb(var(--accent)); | ||
} | ||
.link-card-grid { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr)); | ||
gap: 1rem; | ||
padding: 0; | ||
} | ||
main { | ||
margin: auto; | ||
padding: 1.5rem; | ||
max-width: 60ch; | ||
} | ||
h1 { | ||
font-size: 3rem; | ||
font-weight: 800; | ||
margin: 0; | ||
} | ||
.text-gradient { | ||
background-image: var(--accent-gradient); | ||
-webkit-background-clip: text; | ||
-webkit-text-fill-color: transparent; | ||
background-size: 400%; | ||
background-position: 0%; | ||
} | ||
.instructions { | ||
line-height: 1.6; | ||
margin: 1rem 0; | ||
border: 1px solid rgba(var(--accent), 25%); | ||
background-color: white; | ||
padding: 1rem; | ||
border-radius: 0.4rem; | ||
} | ||
.instructions code { | ||
font-size: 0.875em; | ||
font-weight: bold; | ||
background: rgba(var(--accent), 12%); | ||
color: rgb(var(--accent)); | ||
border-radius: 4px; | ||
padding: 0.3em 0.45em; | ||
} | ||
.instructions strong { | ||
color: rgb(var(--accent)); | ||
} | ||
.link-card-grid { | ||
display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(24ch, 1fr)); | ||
gap: 1rem; | ||
padding: 0; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.