[Archived] Archived WIP of vielle.dev

Apply prettier

+52 -56
+2 -4
.vscode/settings.json
··· 1 1 { 2 - "cSpell.words": [ 3 - "titlebar" 4 - ] 5 - } 2 + "cSpell.words": ["titlebar"] 3 + }
+1 -4
astro.config.mjs
··· 7 7 8 8 // https://astro.build/config 9 9 export default defineConfig({ 10 - integrations: [ 11 - mdx(), 12 - sitemap(), 13 - ], 10 + integrations: [mdx(), sitemap()], 14 11 15 12 output: "server", 16 13
+2 -4
posts/serious.md
··· 3 3 date: 2999-12-31 4 4 colour: "#008282" 5 5 image: 6 - src: "minecraft.png" 7 - alt: "Highland cows from minecraft" 6 + src: "minecraft.png" 7 + alt: "Highland cows from minecraft" 8 8 --- 9 9 10 10 The Defence of the Realm Act 1914 (4 & 5 Geo. 5. c. 29) (DORA) was passed in the United Kingdom on 8 August 1914, four days after the country entered the First World War. It was added to as the war progressed. It gave the government wide-ranging powers during the war, such as the power to requisition buildings or land needed for the war effort, and to make regulations creating criminal offences. ··· 30 30 > (1) His Majesty in Council has power during the continuance of the present war to issue regulations as to the powers and duties of the Admiralty and Army Council, and of the members of His Majesty's forces, and other persons acting in His behalf, for securing the public safety and the defence of the realm; and may, by such regulations, authorise the trial by courts martial and punishment of persons contravening any of the provisions of such regulations designed— 31 31 > (a) To prevent persons communicating with the enemy or obtaining information for that purpose or any purpose calculated to jeopardise the success of the operations of any of His Majesty's forces or to assist the enemy; or 32 32 > (b) To secure the safety of any means of communication, or of railways, docks or harbours; in like manner as if such persons were subject to military law and had on active service committed an offence under section 5 of the Army Act. 33 - 34 -
+4 -4
posts/test copy 2.md
··· 1 1 --- 2 - title: Why I <3 Variable Fonts 2 + title: Why I <3 Variable Fonts 3 3 date: 2024-12-07 4 - image: 5 - src: "mc_map.png" 6 - alt: "" 4 + image: 5 + src: "mc_map.png" 6 + alt: "" 7 7 colour: yellow 8 8 hasMdx: true 9 9 ---
+1 -3
posts/test copy 2.mdx
··· 10 10 11 11 cmon 12 12 13 - 14 - 15 13 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur vel sem id elit molestie consectetur eu nec urna. In euismod, nulla vel interdum porta, nisl libero molestie enim, quis tempus nisl diam porta urna. Nulla commodo volutpat justo quis luctus. Proin tincidunt congue massa eu maximus. Sed imperdiet laoreet leo, in varius magna posuere tristique. 16 14 Nunc eget hendrerit nibh. Nulla ut metus ipsum. Pellentesque rhoncus sollicitudin turpis ac dapibus. Nam ut luctus nisl. Nam ut consequat lorem, eget porta magna. Phasellus consectetur orci eget felis accumsan, vitae condimentum arcu interdum. Aenean eget mattis velit. Donec vitae dolor pretium, molestie eros eget, venenatis nisi. Morbi et ex ante. Nam a nisl consequat leo pulvinar egestas. 17 15 ··· 77 75 78 76 Quisque pellentesque ante sit amet risus venenatis dictum. Sed ex felis, vehicula eget viverra sed, tincidunt at eros. Vestibulum nec pellentesque ipsum. Praesent non lectus vitae sem dictum tincidunt et non erat. Morbi faucibus felis at tellus suscipit fermentum ac a est. Ut ornare et quam in porttitor. Suspendisse dolor massa, scelerisque ut accumsan placerat, venenatis vitae mi. Maecenas ut dictum tortor. Curabitur tincidunt urna at tellus suscipit, id suscipit felis interdum. Donec pharetra dui vitae urna sollicitudin maximus. Pellentesque non tellus semper, lobortis risus eget, placerat leo. Quisque fringilla pharetra orci nec consectetur. Nullam rutrum porta ligula, ac suscipit mauris maximus vel. 79 77 80 - Pellentesque volutpat lectus vel velit facilisis, commodo aliquam magna vestibulum. Nunc ut lacus eu justo finibus suscipit. Etiam sed vehicula mi. Duis fermentum dapibus eleifend. Suspendisse potenti. Integer id orci eget metus lacinia vestibulum. Quisque elit urna, sollicitudin eu nisl sit amet, ultrices placerat turpis. Morbi sem risus, suscipit at nunc quis, dignissim bibendum neque. Vivamus sit amet mattis mauris. Fusce vestibulum interdum magna ac auctor. Pellentesque vel efficitur ante. Pellentesque arcu metus, pharetra id leo at, vehicula mollis nibh. Sed sit amet posuere ex. Aenean finibus nisl a dui eleifend convallis. Cras pulvinar lacinia lacus, eget pellentesque metus ullamcorper in. Curabitur aliquet malesuada metus, ac mattis turpis. 78 + Pellentesque volutpat lectus vel velit facilisis, commodo aliquam magna vestibulum. Nunc ut lacus eu justo finibus suscipit. Etiam sed vehicula mi. Duis fermentum dapibus eleifend. Suspendisse potenti. Integer id orci eget metus lacinia vestibulum. Quisque elit urna, sollicitudin eu nisl sit amet, ultrices placerat turpis. Morbi sem risus, suscipit at nunc quis, dignissim bibendum neque. Vivamus sit amet mattis mauris. Fusce vestibulum interdum magna ac auctor. Pellentesque vel efficitur ante. Pellentesque arcu metus, pharetra id leo at, vehicula mollis nibh. Sed sit amet posuere ex. Aenean finibus nisl a dui eleifend convallis. Cras pulvinar lacinia lacus, eget pellentesque metus ullamcorper in. Curabitur aliquet malesuada metus, ac mattis turpis.
+4 -3
posts/test copy 3.md
··· 1 1 --- 2 2 title: "yipea" 3 3 date: 2099-12-31 4 - image: 5 - src: "mc_map_art.png" 6 - alt: "" 4 + image: 5 + src: "mc_map_art.png" 6 + alt: "" 7 7 colour: red 8 8 --- 9 + 9 10 whats this about dawg
+2 -2
posts/test copy.md
··· 2 2 title: "Test Post 2" 3 3 date: 2022-12-07 4 4 image: 5 - src: "mc_map.png" 6 - alt: "" 5 + src: "mc_map.png" 6 + alt: "" 7 7 colour: magenta 8 8 --- 9 9
+3 -3
posts/test.md
··· 1 1 --- 2 2 title: "Test Post" 3 3 date: 2024-12-08 4 - image: 5 - src: "mc_map.png" 6 - alt: "minecraft map" 4 + image: 5 + src: "mc_map.png" 6 + alt: "minecraft map" 7 7 colour: blue 8 8 hasMdx: true 9 9 ---
+4 -4
posts/test.mdx
··· 1 - --- 1 + --- 2 2 title: Test Post 3 3 --- 4 4 5 - import Balloon from "@components/blog/balloon.svelte" 5 + import Balloon from "@components/blog/balloon.svelte"; 6 6 7 7 whats this about dawg 8 8 9 9 <div style="padding: 15rem;"></div> 10 10 11 11 <div style="position: absolute"> 12 - <Balloon client:load id={0} boundingWidth={300} boundingHeight={0} /> 13 - </div> 12 + <Balloon client:load id={0} boundingWidth={300} boundingHeight={0} /> 13 + </div>
+1 -1
src/Base.astro
··· 30 30 <title>{title} | vielle.dev</title> 31 31 <script> 32 32 // sets the timezone offset 33 - document.cookie = `timezone=${new Date().toString()}` 33 + document.cookie = `timezone=${new Date().toString()}`; 34 34 </script> 35 35 <!-- default styles (rem, *) --> 36 36 <style is:global>
+1 -3
src/components/blog/Background.astro
··· 8 8 Astro.cookies.get("timezone")?.value ?? 9 9 Astro.request.headers.get("Date") ?? 10 10 Astro.request.headers.get("date") ?? // idk if it cares about capitals so Both 11 - Date.now() 11 + Date.now(), 12 12 ); 13 - 14 - console.log(date); 15 13 16 14 const accurateHours = 17 15 date.getHours() + date.getMinutes() / 60 + date.getSeconds() / 60 ** 2;
+1 -1
src/components/blog/Post.astro
··· 44 44 .map( 45 45 (x, i) => 46 46 `--x-offset-${i}: calc((100svw - ${blog.post.width + 2 * blog.post.xPadding}rem) * ${positions[0] + x[0]} + ${blog.post.xPadding}rem); 47 - --y-offset-${i}: ${blog.post.yLeeway * 2 * (positions[1] + x[1]) - blog.post.yLeeway}rem;` 47 + --y-offset-${i}: ${blog.post.yLeeway * 2 * (positions[1] + x[1]) - blog.post.yLeeway}rem;`, 48 48 ) 49 49 .join("\n")} 50 50
+3 -3
src/components/blog/background/Cloud.astro
··· 36 36 37 37 const vectorOffset = ( 38 38 v: [number, number], 39 - o: [number, number] 39 + o: [number, number], 40 40 ): [number, number] => { 41 41 return [o[0] - v[0], o[1] - v[1]]; 42 42 }; ··· 89 89 ]; 90 90 const newDistance = Math.sqrt( 91 91 (newCenter[0] - p.origin[0]) ** 2 + 92 - (newCenter[1] - p.origin[1]) ** 2 92 + (newCenter[1] - p.origin[1]) ** 2, 93 93 ); 94 94 return { 95 95 origin: vectorOffset(vector(ang, c), p.origin), ··· 120 120 prev: 0, 121 121 output: [] as any[], 122 122 complete: false, 123 - } 123 + }, 124 124 ).output 125 125 } 126 126 <circle cx={r} cy={r} r={r}></circle>
+1 -1
src/components/blog/background/Clouds.astro
··· 44 44 { 45 45 y: 0, 46 46 output: [], 47 - } 47 + }, 48 48 ).output 49 49 } 50 50 </div>
+1 -1
src/components/blog/background/Stars.astro
··· 39 39 const prongs = Math.round( 40 40 blog.background.stars.prongs[0] + 41 41 Math.random() * 42 - (blog.background.stars.prongs[1] - blog.background.stars.prongs[0]) 42 + (blog.background.stars.prongs[1] - blog.background.stars.prongs[0]), 43 43 ); 44 44 45 45 return (
+5 -3
src/components/index/Map.astro
··· 110 110 111 111 const lineLength: number = Math.sqrt( 112 112 (bannerCorner.x - textCorner.x) ** 2 + 113 - (bannerCorner.y - textCorner.y) ** 2 113 + (bannerCorner.y - textCorner.y) ** 2, 114 114 ); 115 115 116 116 const lineAngle: number = Math.atan2( 117 117 bannerCorner.y - textCorner.y, 118 - bannerCorner.x - textCorner.x 118 + bannerCorner.x - textCorner.x, 119 119 ); 120 120 121 121 return ( ··· 190 190 .location { 191 191 display: block; 192 192 --speed: 100ms; 193 - transition: scale var(--speed), filter var(--speed); 193 + transition: 194 + scale var(--speed), 195 + filter var(--speed); 194 196 & * { 195 197 transition: inherit; 196 198 }
+1 -1
src/config.ts
··· 41 41 export const utils = { 42 42 getRandom( 43 43 variance: [number, number] | readonly [number, number], 44 - seed?: number 44 + seed?: number, 45 45 ) { 46 46 return variance[0] + (seed ?? Math.random()) * (variance[1] - variance[0]); 47 47 },
+6 -3
src/content.config.ts
··· 8 8 date: z.date(), 9 9 colour: z.string(), 10 10 image: z.object({ 11 - src: z.string().refine(value => value.endsWith('.png'), (val) => ({ 12 - message: `${val} must end with .png` 13 - })), 11 + src: z.string().refine( 12 + (value) => value.endsWith(".png"), 13 + (val) => ({ 14 + message: `${val} must end with .png`, 15 + }), 16 + ), 14 17 alt: z.string(), 15 18 }), 16 19 hasMdx: z.boolean().default(false),
+1 -1
src/pages/404.astro
··· 14 14 text-decoration: underline; 15 15 } 16 16 </style> 17 - 17 + 18 18 <h1>404 - Page Not Found</h1> 19 19 <p>Sorry, the page you are looking for does not exist.</p> 20 20 <button onclick="history.back()">Go Back</button>
+6 -6
src/pages/blog/[id].astro
··· 1 - --- 1 + --- 2 2 import Base from "@/Base.astro"; 3 3 import { getEntry } from "astro:content"; 4 4 const { id } = Astro.params; 5 5 const r404 = Astro.redirect("/404"); 6 6 7 - if (!id) return r404 7 + if (!id) return r404; 8 8 const post = await getEntry("blog", id); 9 - if (!post) return r404 9 + if (!post) return r404; 10 10 --- 11 11 12 12 <Base title={post.data.title}> 13 - <h1>{post.data.title}</h1> 14 - <p>{JSON.stringify(post)}</p> 15 - </Base> 13 + <h1>{post.data.title}</h1> 14 + <p>{JSON.stringify(post)}</p> 15 + </Base>
+1
src/pages/index.astro
··· 3 3 import Base from "@/Base.astro"; 4 4 import Map from "@/components/index/Map.astro"; 5 5 --- 6 + 6 7 <Base title="home"> 7 8 <style slot="head"> 8 9 body {
+1 -1
tsconfig.json
··· 7 7 "baseUrl": ".", 8 8 "paths": { 9 9 "@/*": ["./src/*"] 10 - }, 10 + } 11 11 } 12 12 }