Skip to content

Instantly share code, notes, and snippets.

View Princesseuh's full-sized avatar
💐
Probably wishing I was making bouquets instead

Erika Princesseuh

💐
Probably wishing I was making bouquets instead
View GitHub Profile
<!-- Usage -->
<svg width="26px" height="26px">
<title>Some Title</title>
<use xlink:href="#icon:arrow-up" width="26px" height="26px"></use>
</svg>
<!-- Definitions, somewhere in the HTML -->
<svg style="position: absolute; width: 0; height: 0; overflow: hidden">
<symbol
xmlns="http://www.w3.org/2000/svg"
@Princesseuh
Princesseuh / Image.astro
Created January 13, 2023 13:18
Image Component
---
// @ts-ignore
import { getImage } from '../dist/index.js';
import { warnForMissingAlt } from './index.js';
import type { ImgHTMLAttributes } from './index.js';
import type { ImageMetadata, TransformOptions, OutputFormat } from '../dist/index.js';
interface LocalImageProps
extends Omit<TransformOptions, 'src'>,
Omit<ImgHTMLAttributes, 'src' | 'width' | 'height'> {
// Vite plugin to parse markdown
function markdownPlugin() {
return {
name: 'markdown',
transform(code, id) {
if (!id.endsWith('.md')) return
return `export default ${JSON.stringify(marked(code))}`
}
}
}
<Fragment>
<CardsNav minimal={minimal} class="deploy-guides-nav" links={services.map(({ title, slug, supports }) => ({
title,
href: `/${lang}/guides/deploy/${slug}/`,
logo: slug,
tags: Object.fromEntries(supports.map((s) => [s, t(`deploy.${s}Tag`)!])),
}))}></CardsNav>
</Fragment>
export default function DeployGuidesNav__AstroComponent_(_props: Record<string, any>): any {}
import { Code } from 'astro/components';
<Fragment>
<div class="TabBox">
<div class="tab-bar">
<div id="install-npm" class="active toggle"><h5>npm</h5></div>
<div id="install-yarn" class="toggle"><h5>yarn</h5></div>
</div>
<div id="npm">
@Princesseuh
Princesseuh / Image.astro
Last active January 30, 2022 04:13
Astro + eleventy-img
---
import Image from "@11ty/eleventy-img"
import { generateImage } from "utils.ts"
import { Markdown } from "astro/components"
const {
src,
alt,
caption,
options = {},
sizes = "",
@Princesseuh
Princesseuh / caswe
Created February 11, 2021 10:47
Canadian French keyboard + Swedish Å
default partial
xkb_symbols "swe" {
include "ca(fr)"
name[Group1]= "Canadian French + Swedish Å";
key <AC01> { [ a, A, aring, Aring ] };
include "level3(lalt_switch)"
};
@Princesseuh
Princesseuh / cloudSettings
Last active April 5, 2021 19:32
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-04-05T19:32:05.901Z","extensionVersion":"v3.4.3"}