This file contains hidden or 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
--- | |
import cars from "../../../assets/cars.json"; | |
export const prerender = false; | |
import PlotFigure from "../../../components/PlotFigure.astro"; | |
import * as Plot from "@observablehq/plot"; | |
const { year } = Astro.params; | |
// Filtrer les voitures pour l'année spécifiée | |
const filteredCars = cars.filter((car) => car.year.toString() === year); |
This file contains hidden or 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
--- | |
import * as Plot from "@observablehq/plot"; | |
import PlotFigure from "../../components/PlotFigure.astro"; | |
import departements from "../../assets/departements.geojson.json"; | |
import populationMain from "../../assets/populationMain.json"; | |
let selectedYear = 2015; | |
let selectedSex = "Total"; | |
let selectedAge = "Total"; |
This file contains hidden or 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
[ | |
{ | |
"nom": "Jean", | |
"projet": "Alpine.js", | |
"url": "https://alpinejs.dev/" | |
}, | |
{ | |
"nom": "Maxime", | |
"projet": "Tailwind CSS", | |
"url": "https://tailwindcss.com/" |
This file contains hidden or 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
const carré = (x) => x * x; | |
console.log(carré(5)); |
This file contains hidden or 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
function carré(x) { | |
return x * x; | |
} | |
console.log(carré(5)); |
This file contains hidden or 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
for (const unElement of tableau) { | |
console.log(unElement); | |
} |
This file contains hidden or 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
const tableau = [1, 3, 5, 7, 9]; | |
for (let i = 0; i < tableau.length; i++) { | |
console.log(tableau[i]); | |
} |
This file contains hidden or 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
const condition = true; | |
if (condition) { | |
console.log("condition est vraie"); | |
} else { | |
console.log("condition est fausse"); | |
} |
This file contains hidden or 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
<script setup lang="ts"> | |
import { supabase } from "@/supabase"; | |
import BasketProfil from "./BasketProfil.vue"; | |
const props = defineProps<{ | |
max?: number; | |
}>(); | |
const { data: baskets, error } = await supabase | |
.from("basket") |
This file contains hidden or 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
<script setup lang="ts"> | |
import { supabase, user } from '../supabase'; | |
</script> | |
<template> | |
<div> | |
<button v-if="user" @pointerdown="supabase.auth.signOut()"> | |
Se déconnecter ({{user.email}}) | |
</button> | |
<button v-else @pointerdown="supabase.auth.signIn({provider: 'github'})"> | |
Se connecter avec Github |
NewerOlder