-
- {{ brand.name }}
+
+
+ {{ brand.name }}
+
-
![]()
+
+
![]()
+
@@ -28,20 +32,25 @@
import log from "electron-log";
import { defineComponent } from "vue";
import type AppState from "~/classes/AppState";
+import bsTooltips from "~/vueModules/bsTooltips";
export default defineComponent({
name: "HomePage",
data() : {
- dataJson: AppState;
+ appState: AppState;
} {
return {
- dataJson: useState("dataJson").value as AppState
+ appState: useState("dataJson").value as AppState
};
},
mounted() {
log.info("index page");
+ bsTooltips.methods.initTooltips();
},
methods: {
+ gotoBrand(brand: TypeBrand) {
+ navigateTo(`/brands/${brand.slug}`);
+ }
},
});
diff --git a/pages/ranges/[slug].vue b/pages/ranges/[slug].vue
index 5a9a80a..cc284c0 100644
--- a/pages/ranges/[slug].vue
+++ b/pages/ranges/[slug].vue
@@ -1,6 +1,6 @@
-
Range {{ router.params.slug }}
+ Range {{ route.params.slug }}
@@ -15,14 +15,14 @@ export default defineComponent({
props: {
},
data(): {
- router: RouteLocationNormalizedLoaded
+ route: RouteLocationNormalizedLoaded
} {
return {
- router: useRoute()
+ route: useRoute()
};
},
mounted() {
- const route = useRoute();
+ const route: RouteLocationNormalizedLoaded = useRoute();
log.info(route);
},
methods: {
diff --git a/plugins/boostrap.ts b/plugins/boostrap.ts
index 316f84a..c27784e 100644
--- a/plugins/boostrap.ts
+++ b/plugins/boostrap.ts
@@ -1,10 +1,29 @@
-import { Modal } from "bootstrap";
-import "bootstrap/dist/js/bootstrap";
+import { Alert, Button, Carousel, Collapse, Dropdown, Modal, Offcanvas, Popover, ScrollSpy, Tab, Toast, Tooltip } from "bootstrap";
export default defineNuxtPlugin(() => {
+ let tooltips: Array
= [];
+
+ // Disable tooltips on reboot.
+ tooltips.forEach((tooltip) => {
+ tooltip.disable();
+ tooltip.hide();
+ });
+ tooltips = [].slice
+ .call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"))
+ .map(function (tooltipTriggerEl) {
+ return new window.bootstrap.Tooltip(tooltipTriggerEl, {
+ customClass: "large-tooltip",
+ delay: {
+ show: 1250,
+ hide: 0,
+ },
+ });
+ });
return {
provide: {
- Modal
+ Alert, Button, Carousel, Collapse, Dropdown,
+ Modal, Offcanvas, Popover, ScrollSpy, Tab,
+ Toast, Tooltip
}
};
});
diff --git a/static/scss/_variables.scss b/static/scss/_variables.scss
index 0608781..e29feb5 100644
--- a/static/scss/_variables.scss
+++ b/static/scss/_variables.scss
@@ -14,6 +14,6 @@ $font-default-family-base: system-ui, -apple-system, "Segoe UI", "Roboto",
"Helvetica Neue", "Arial", "Noto Sans", "Liberation Sans", sans-serif,
"Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; // - The default site font family.
// Display tres haute résolution, augmentation de font size 1rem => 1.8rem
-$font-default-size-base: 2.2rem; // Assumes the browser default, typically `16px`
+$font-default-size-base: 1.4rem; // Assumes the browser default, typically `16px`
$line-default-height-base: 1.5;
diff --git a/static/scss/bootstrap.scss b/static/scss/bootstrap.scss
index c603d45..0fe2e19 100644
--- a/static/scss/bootstrap.scss
+++ b/static/scss/bootstrap.scss
@@ -36,6 +36,7 @@
@import "bootstrap/scss/close";
@import "bootstrap/scss/modal";
@import "bootstrap/scss/accordion";
+@import "bootstrap/scss/toasts";
// 6. Optionally include utilities API last to generate classes based on the Sass map in `_utilities.scss`
@import "bootstrap/scss/utilities/api";
diff --git a/static/scss/layout.scss b/static/scss/layout.scss
index ac4f5b2..454141f 100644
--- a/static/scss/layout.scss
+++ b/static/scss/layout.scss
@@ -6,4 +6,20 @@ html {
body {
min-height: 100vh;
background-color: unset;
+
+ .app-component {
+ display: flex;
+ height: 100vh;
+ flex-direction: column;
+
+ > .container-fluid {
+ flex-grow: 1;
+ padding-top: 1rem;
+ padding-bottom: 1rem;
+ }
+ }
+
+ > footer {
+ box-shadow: 0 -0.125rem 0.25rem rgb(0 0 0 / 7.5%) !important;
+ }
}
diff --git a/vueModules/bsTooltips.ts b/vueModules/bsTooltips.ts
new file mode 100644
index 0000000..a2fd14b
--- /dev/null
+++ b/vueModules/bsTooltips.ts
@@ -0,0 +1,26 @@
+import { Tooltip } from "bootstrap";
+
+let tooltips: Array = [];
+
+export default {
+ methods: {
+ initTooltips() {
+ // Disable tooltips on reboot.
+ tooltips.forEach((tooltip) => {
+ tooltip.disable();
+ tooltip.hide();
+ });
+ tooltips = [].slice
+ .call(document.querySelectorAll("[data-bs-toggle=\"tooltip\"]"))
+ .map(function (tooltipTriggerEl) {
+ return new Tooltip(tooltipTriggerEl, {
+ customClass: "large-tooltip",
+ delay: {
+ show: 1250,
+ hide: 0,
+ },
+ });
+ });
+ },
+ },
+};