chore: fix lint issues
This commit is contained in:
parent
a49a75171f
commit
96f4485127
8 changed files with 6 additions and 124 deletions
|
|
@ -40,6 +40,7 @@ const appleTouchIcon = await getImage({
|
|||
https://developers.google.com/search/docs/advanced/structured-data/intro-structured-data -->{
|
||||
structuredData && (
|
||||
<script
|
||||
is:inline
|
||||
type="application/ld+json"
|
||||
set:html={JSON.stringify(structuredData)}
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
---
|
||||
// Import the necessary dependencies
|
||||
import { Image } from "astro:assets";
|
||||
import IconBlock from "@components/ui/blocks/IconBlock.astro";
|
||||
import Icon from "@components/ui/icons/Icon.astro";
|
||||
import GrandePhotoCentrale from "../../GrandePhotoCentrale.astro";
|
||||
|
|
@ -18,7 +16,7 @@ interface Props {
|
|||
src: any;
|
||||
alt: string;
|
||||
}
|
||||
// Define props from Astro
|
||||
|
||||
const { title, subTitle, src, alt, features } = Astro.props;
|
||||
---
|
||||
|
||||
|
|
|
|||
|
|
@ -14,11 +14,10 @@ import dpeD from "@/images/dpe-d.png"
|
|||
</h2>
|
||||
<div class="text-pretty leading-tight text-neutral-600 dark:text-neutral-400">
|
||||
<Image
|
||||
class="mx-auto"
|
||||
src={dpeD}
|
||||
alt="DPE de niveau 'D', 149 kWh/m²/an, 23 kg CO2/m²/an"
|
||||
loading={"eager"}
|
||||
inferSize
|
||||
class="mx-auto"
|
||||
loading="eager"
|
||||
/>
|
||||
<p>🐜 Aucun signe d’infestation de termites ✅</p>
|
||||
<p>🧯 Aucune anomalie sur l’installation de gaz ✅</p>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
---
|
||||
// Import the necessary dependencies
|
||||
import EmailFooterInput from "@components/ui/forms/input/EmailFooterInput.astro";
|
||||
import strings from "@utils/navigation.ts";
|
||||
import BrandLogo from "@components/BrandLogo.astro";
|
||||
import { SITE } from "@data/constants";
|
||||
|
||||
const sectionThreeTitle: string = "Rester à jour";
|
||||
---
|
||||
|
||||
<footer class="w-full bg-neutral-300 dark:bg-neutral-900">
|
||||
|
|
@ -25,7 +22,7 @@ const sectionThreeTitle: string = "Rester à jour";
|
|||
{section.section}
|
||||
</h3>
|
||||
<ul class="mt-3 grid space-y-3">
|
||||
{section.links.map((link, index) => (
|
||||
{section.links.map((link) => (
|
||||
<li>
|
||||
<a
|
||||
href={link.url}
|
||||
|
|
@ -39,22 +36,6 @@ const sectionThreeTitle: string = "Rester à jour";
|
|||
</div>
|
||||
))
|
||||
}
|
||||
|
||||
<!--
|
||||
<div class="col-span-2">
|
||||
<h3 class="font-bold text-neutral-800 dark:text-neutral-200">
|
||||
{sectionThreeTitle}
|
||||
</h3>
|
||||
|
||||
<form>
|
||||
<EmailFooterInput />
|
||||
<p class="mt-3 text-sm text-neutral-600 dark:text-neutral-400">
|
||||
"On vous recontacte"
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
-->
|
||||
|
||||
</div>
|
||||
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -1,95 +0,0 @@
|
|||
---
|
||||
import Icon from "@components/ui/icons/Icon.astro";
|
||||
---
|
||||
|
||||
<button
|
||||
type="button"
|
||||
class="focus-visible:ring-secondary group inline-flex items-center rounded-lg p-2.5 text-neutral-600 outline-none ring-zinc-500 transition duration-300 hover:bg-neutral-100 focus:outline-none focus-visible:outline-none focus-visible:ring-1 dark:text-neutral-400 dark:ring-zinc-200 dark:hover:bg-neutral-700"
|
||||
data-bookmark-button="bookmark-button"
|
||||
>
|
||||
<Icon name="bookmark" />
|
||||
</button>
|
||||
|
||||
<script>
|
||||
class Bookmark {
|
||||
private static readonly BOOKMARKS_KEY = "bookmarks";
|
||||
private bookmarkButton: Element | null;
|
||||
|
||||
constructor(private dataAttrValue: string) {
|
||||
this.bookmarkButton = document.querySelector(
|
||||
`[data-bookmark-button="${dataAttrValue}"]`
|
||||
);
|
||||
}
|
||||
|
||||
private getStoredBookmarks(): string[] {
|
||||
const item = localStorage.getItem(Bookmark.BOOKMARKS_KEY);
|
||||
return item ? JSON.parse(item) : [];
|
||||
}
|
||||
|
||||
init(): void {
|
||||
if (this.bookmarkButton && this.isStored()) {
|
||||
this.markAsStored();
|
||||
}
|
||||
|
||||
this.bookmarkButton?.addEventListener("click", () =>
|
||||
this.toggleBookmark()
|
||||
);
|
||||
}
|
||||
|
||||
isStored(): boolean {
|
||||
return this.getStoredBookmarks().includes(window.location.pathname);
|
||||
}
|
||||
markAsStored(): void {
|
||||
if (this.bookmarkButton) {
|
||||
this.bookmarkButton.classList.add("bookmarked");
|
||||
let svgElement = this.bookmarkButton.querySelector("svg");
|
||||
if (svgElement) {
|
||||
svgElement.setAttribute(
|
||||
"class",
|
||||
"h-6 w-6 fill-red-500 dark:fill-red-500"
|
||||
);
|
||||
}
|
||||
let pathElement = svgElement?.querySelector("path");
|
||||
if (pathElement) {
|
||||
pathElement.setAttribute(
|
||||
"class",
|
||||
"fill-current text-red-500 dark:text-red-500"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
unmarkAsStored(): void {
|
||||
if (this.bookmarkButton) {
|
||||
this.bookmarkButton.classList.remove("bookmarked");
|
||||
let svgElement = this.bookmarkButton.querySelector("svg");
|
||||
if (svgElement) {
|
||||
svgElement.setAttribute("class", "h-6 w-6 fill-none");
|
||||
}
|
||||
let pathElement = svgElement?.querySelector("path");
|
||||
if (pathElement) {
|
||||
pathElement.setAttribute(
|
||||
"class",
|
||||
"fill-current text-neutral-500 group-hover:text-red-400 dark:text-neutral-500 group-hover:dark:text-red-400"
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
toggleBookmark(): void {
|
||||
let storedBookmarks = this.getStoredBookmarks();
|
||||
const index = storedBookmarks.indexOf(window.location.pathname);
|
||||
if (index !== -1) {
|
||||
storedBookmarks.splice(index, 1);
|
||||
this.unmarkAsStored();
|
||||
} else {
|
||||
storedBookmarks.push(window.location.pathname);
|
||||
this.markAsStored();
|
||||
}
|
||||
localStorage.setItem(
|
||||
Bookmark.BOOKMARKS_KEY,
|
||||
JSON.stringify(storedBookmarks)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
new Bookmark("bookmark-button").init();
|
||||
</script>
|
||||
|
|
@ -1,5 +1,4 @@
|
|||
---
|
||||
import Icon from "@components/ui/icons/Icon.astro";
|
||||
const { title, url } = Astro.props;
|
||||
|
||||
interface Props {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ If URL is '/' (home page), assign ID as 'home'
|
|||
<script>
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let url = window.location.pathname;
|
||||
let urlSegments = url.split("/");
|
||||
let navId;
|
||||
|
||||
if (url === "/") {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ We set the language of the page to English and add classes for scrollbar and scr
|
|||
<script>
|
||||
import "@scripts/lenisSmoothScroll.js";
|
||||
</script>
|
||||
<script defer data-domain="achat-maison-albi.fr" src="https://plausible.io/js/script.outbound-links.js"></script>
|
||||
<script is:inline defer data-domain="achat-maison-albi.fr" src="https://plausible.io/js/script.outbound-links.js"></script>
|
||||
</head>
|
||||
<body
|
||||
class="bg-neutral-200 selection:bg-yellow-400 selection:text-neutral-700 dark:bg-neutral-800"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue