mirror of
https://github.com/tonytins/tonybark.com.git
synced 2025-03-15 07:21:21 +00:00
feat: border around images
This commit is contained in:
parent
4051184fdb
commit
01edc270d2
2 changed files with 23 additions and 17 deletions
|
@ -17,23 +17,23 @@ import type { Plugin } from "unified";
|
|||
const customSchema = {
|
||||
...defaultSchema,
|
||||
attributes: {
|
||||
...defaultSchema.attributes,
|
||||
font: [...(defaultSchema.attributes?.font ?? []), 'color'],
|
||||
blockquote: [
|
||||
...(defaultSchema.attributes?.blockquote ?? []),
|
||||
// bluesky
|
||||
'className',
|
||||
'dataBlueskyUri',
|
||||
'dataBlueskyCid',
|
||||
// instagram
|
||||
'dataInstgrmCaptioned',
|
||||
'dataInstgrmPermalink',
|
||||
'dataInstgrmVersion'
|
||||
],
|
||||
iframe: [
|
||||
'width', 'height', 'title', 'frameborder', 'allow', 'referrerpolicy', 'allowfullscreen', 'style', 'seamless',
|
||||
['src', /https:\/\/(www.youtube.com|bandcamp.com)\/.*/]
|
||||
],
|
||||
...defaultSchema.attributes,
|
||||
font: [...(defaultSchema.attributes?.font ?? []), 'color'],
|
||||
blockquote: [
|
||||
...(defaultSchema.attributes?.blockquote ?? []),
|
||||
// bluesky
|
||||
'className',
|
||||
'dataBlueskyUri',
|
||||
'dataBlueskyCid',
|
||||
// instagram
|
||||
'dataInstgrmCaptioned',
|
||||
'dataInstgrmPermalink',
|
||||
'dataInstgrmVersion'
|
||||
],
|
||||
iframe: [
|
||||
'width', 'height', 'title', 'frameborder', 'allow', 'referrerpolicy', 'allowfullscreen', 'style', 'seamless',
|
||||
['src', /https:\/\/(www.youtube.com|bandcamp.com)\/.*/]
|
||||
],
|
||||
section: ['dataFootnotes', 'className']
|
||||
},
|
||||
tagNames: [...(defaultSchema.tagNames ?? []), 'font', 'mark', 'iframe', 'section']
|
||||
|
|
|
@ -16,6 +16,12 @@ export default {
|
|||
},
|
||||
'[type="checkbox"]': {
|
||||
'border-radius': '5px'
|
||||
},
|
||||
'img': {
|
||||
'border-style': 'solid',
|
||||
'border-color': 'gray',
|
||||
'border-width': '1px',
|
||||
'border-radius': '1em'
|
||||
}
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue