feat: styling

This commit is contained in:
Anthony Fu 2022-11-14 00:05:32 +08:00
parent 8424b7b98b
commit 4adab40932
17 changed files with 330 additions and 36 deletions

11
composables/santize.ts Normal file
View file

@ -0,0 +1,11 @@
import SanitizeHTML from 'sanitize-html'
export function sanitize(text: string) {
return SanitizeHTML(text, {
allowedAttributes: {
a: ['href', 'name', 'target', 'class'],
span: ['class'],
img: ['src', 'srcset', 'alt', 'title', 'width', 'height', 'loading'],
},
})
}