Files
Kunthawat Greethong 3ed9f3f3ff 🎨 Fix CSS: Import global.css + plain CSS styles
CSS was not being imported! Fixed:

 Added 'import ../styles/global.css' to BaseLayout.astro
 Rewrote CSS with plain CSS (not @apply which wasn't working)
 Cookie banner has inline styles as backup
 Font size: 16px base
 Solid colors: green-600 (#16a34a), gray-900 (#111827)
 Footer has policy links

Build: 12 pages 
2026-03-10 08:21:30 +07:00

57 lines
1.3 KiB
JavaScript

/**
* @import {CompileContext, Handle, HtmlExtension, Token} from 'micromark-util-types'
*/
import {sanitizeUri} from 'micromark-util-sanitize-uri'
/**
* Create an HTML extension for `micromark` to support GitHub autolink literal
* when serializing to HTML.
*
* @returns {HtmlExtension}
* Extension for `micromark` that can be passed in `htmlExtensions` to
* support GitHub autolink literal when serializing to HTML.
*/
export function gfmAutolinkLiteralHtml() {
return {
exit: {literalAutolinkEmail, literalAutolinkHttp, literalAutolinkWww}
}
}
/**
* @this {CompileContext}
* @type {Handle}
*/
function literalAutolinkWww(token) {
anchorFromToken.call(this, token, 'http://')
}
/**
* @this {CompileContext}
* @type {Handle}
*/
function literalAutolinkEmail(token) {
anchorFromToken.call(this, token, 'mailto:')
}
/**
* @this {CompileContext}
* @type {Handle}
*/
function literalAutolinkHttp(token) {
anchorFromToken.call(this, token)
}
/**
* @this CompileContext
* @param {Token} token
* @param {string | null | undefined} [protocol]
* @returns {undefined}
*/
function anchorFromToken(token, protocol) {
const url = this.sliceSerialize(token)
this.tag('<a href="' + sanitizeUri((protocol || '') + url) + '">')
this.raw(this.encode(url))
this.tag('</a>')
}