Skip to content

Instantly share code, notes, and snippets.

@Delta-in-hub
Created December 1, 2022 15:03
Show Gist options
  • Save Delta-in-hub/fb4e7603387eeb78a1ff97e70fee2b6d to your computer and use it in GitHub Desktop.
Save Delta-in-hub/fb4e7603387eeb78a1ff97e70fee2b6d to your computer and use it in GitHub Desktop.
slidev.code-snippets
{
"Image-with-css": {
"prefix": "img",
"body": [
"<img src=\"${1}\" style=\"padding: 1% 1% 1% 1%; width: 100%; \" align=\"\" />"
],
"description": "Image-with-css(t r b l)"
},
"Img-Center": {
"prefix": "img-center",
"body": [
"<p align=\"center\">",
" <img src=\"${1}\" style=\"padding: 1% 1% 1% 1%; width: 100%; \" align=\"\" />",
"</p>"
],
"description": "Img-Center"
},
"footnote": {
"prefix": "footnote",
"body": [
"<sup>${1:1}</sup>",
"<Footnotes v-after separator>",
" <Footnote :number=${1:1} >",
" <a href=\"${2}\">${3} </a>",
" </Footnote>",
"</Footnotes>"
],
"description": "footnote"
},
"start-a-slide": {
"prefix": "slide",
"body": [
"---",
"theme: academic",
"title: '${1:Slidev Intro}'",
"class: text-white",
"coverAuthor: Delta",
"coverAuthorUrl: https://github.com/Delta-in-hub",
"coverBackgroundUrl: ${2:https://tvax2.sinaimg.cn/large/005uNPwHly1h8o7ap8yq0j31li12cdpn.jpg}",
"coverBackgroundSource: unsplash",
"coverBackgroundSourceUrl: ${3:https://unsplash.com/photos/Rd9uwddKoRA}",
"download: true",
"themeConfig:",
" paginationX: r",
" paginationY: t",
" paginationPagesDisabled: [1]",
"",
"hideInToc: true",
"---\n"
],
"description": "start-a-slide"
},
"Table Of Content": {
"prefix": "toc",
"body": [
"<h1>Table of Contents</h1>",
"<br><br><br>",
"<Toc columns=2 maxDepth=2 />",
"",
"<!-- https://cn.sli.dev/builtin/components.html#toc -->"
],
"description": "Table Of Content"
},
"layout: two-cols": {
"prefix": "layout-two",
"body": [
"---",
"layout: two-cols",
"---",
"<!-- Left side -->",
"${1}",
"::right::",
"<!-- Right side -->",
""
],
"description": "layout: two-cols"
},
"layout: figure": {
"prefix": "layout-figure",
"body": [
"---",
"layout: figure",
"figureCaption: ${2:Image title}",
"figureUrl: ${1:example.png}",
"---",
"<!-- 一张图片居中 -->\n"
],
"description": "layout: figure"
},
"layout: figure-side": {
"prefix": "layout-figure-side",
"body": [
"---",
"layout: figure-side",
"figureCaption: ${2:Image title}",
"figureUrl: ${1:example.png}",
"figureX: '${3:l}'",
"---",
""
],
"description": "layout: figure-side"
},
"layout: image": {
"prefix": "layout-image",
"body": [
"---",
"layout: image",
"image: ${1:example.png}",
"---",
"<!-- 一张图片铺满全屏作为背景 -->",
""
],
"description": "layout: full image as bg"
},
"layout/text: center": {
"prefix": "layout-center",
"body": [
"---",
"layout: center",
"class: \"text-center\"",
"---",
"<!-- 垂直居中,文字水平居中 -->",
""
],
"description": "layout/text: center"
},
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment