Skip to content

Commit

Permalink
🎨 Toast Finished
Browse files Browse the repository at this point in the history
  • Loading branch information
Funasitien committed Aug 31, 2024
1 parent 935c7ff commit 3e253a8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 10 deletions.
20 changes: 12 additions & 8 deletions public/bs-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,10 @@ DOC
--base-dark: #5a595a;
--bg-tone: #ced2d6;

--font-interaction: "Minecraft Ten", system-ui, -apple-system, "Segoe UI",
Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: "Minecraft Ten", SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
--font-sans-serif: "Minecraft Five", system-ui, -apple-system, "Segoe UI",
--font-interaction: "Minecraft Five", system-ui, -apple-system, "Segoe UI",
Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--font-sans-serif: var(--bs-font-sans-serif);
--bs-font-monospace: "Minecraft Ten", SFMono-Regular, Menlo, Monaco, Consolas,
"Liberation Mono", "Courier New", monospace;
--bs-border-radius: 0;
Expand Down Expand Up @@ -144,14 +140,20 @@ body {
background-color: var(--bg-tone);
}

.toast-header {
font-family: var(--font-interaction);
color: var(--font)
}

.outline {
outline: 4px solid var(--outline);
border-bottom: 8px solid var(--base-dark);
}

.card,
.alert,
.dropdown-menu {
.dropdown-menu,
.toast {
padding: 1rem;
background-color: var(--base-tone);
outline: 4px solid var(--outline);
Expand All @@ -161,6 +163,8 @@ body {
color: var(--font);
--bs-dropdown-border-color: none;
--bs-dropdown-link-hover-bg: var(--base-light);
--bs-toast-border-color: none;
--bs-toast-header-bg: var(--base-light);
}

.modal-content {
Expand Down Expand Up @@ -395,4 +399,4 @@ body {
border-block: 4px solid var(--white-light);
border-radius: 0;
color: var(--black-tone);
}
}
15 changes: 13 additions & 2 deletions src/pages/index.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import Bootstrap from "../layouts/Bootstrap.astro";
import Form from "../components/Form.astro";
import bootstrap from "bootstrap";
---

<Bootstrap title="Index" theme="dark">
Expand Down Expand Up @@ -218,7 +219,8 @@ import Form from "../components/Form.astro";
</div>
</div>

<div class="toast-container position-fixed top-0 end-0 p-3">
<div
class="toast-container position-fixed top-0 end-0 p-3">
<div
id="liveToast"
class="toast"
Expand Down Expand Up @@ -294,7 +296,16 @@ import Form from "../components/Form.astro";
<div class="card-body"><Form /></div>
</div>

<script is:inline>
<script type="importmap">
{
"imports": {
"@popperjs/core": "https://cdn.jsdelivr.net/npm/@popperjs/core@2.11.8/dist/esm/popper.min.js",
"bootstrap": "https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.esm.min.js"
}
}
</script>

<script type="module">
const toastTrigger = document.getElementById("liveToastBtn");
const toastLiveExample = document.getElementById("liveToast");

Expand Down

0 comments on commit 3e253a8

Please sign in to comment.