Skip to content

Instantly share code, notes, and snippets.

@xgqfrms
Last active February 24, 2023 15:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xgqfrms/889ad513f91b4cbe9ae8da4770fab554 to your computer and use it in GitHub Desktop.
Save xgqfrms/889ad513f91b4cbe9ae8da4770fab554 to your computer and use it in GitHub Desktop.
gist multi files demo

gist multi files demo

add file

image

多个文件会通过 hash 值进行定位和区分 file-???-type

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-gist-multi-files-demo-md

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-index-html

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-script-js

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-style-css

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-gist-multi-files-demo-md

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-index-html

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-script-js

https://gist.github.com/xgqfrms/889ad513f91b4cbe9ae8da4770fab554#file-style-css

h5t

xgqfrms/vscode#68

{
  "HTML5 Template": {
    "prefix": "h5t",
    "body": [
      "<!DOCTYPE html>",
      "<html lang=\"zh-Hans\">",
      "<head>",
      "    <meta charset=\"UTF-8\">",
      "    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">",
      "    <meta http-equiv=\"X-UA-Compatible\" content=\"ie=edge\">",
      "    <meta name=\"author\" content=\"xgqfrms\">",
      "    <meta name=\"generator\" content=\"VS code\">",
      "    <title>$1</title>",
      "</head>",
      "<body>",
      "    <header>",
      "        <h1>$2</h1>",
      "    </header>",
      "    <main>",
      "        <section>",
      "            <a href=\"https://feiqa.xgqfrms.xyz/index.html\">$3</a>",
      "        </section>",
      "        <article></article>",
      "    </main>",
      "    <footer>",
      "        <p>copyright&copy; xgqfrms 2022</p>",
      "    </footer>",
      "</body>",
      "</html>"
    ],
    "description": "HTML5 Template & code snippets!"
  }
}

js6

{
  "JavaScript ES6 Template": {
    "prefix": "js6",
    "body": [
      "\"use strict\";",
      "",
      "/**",
      " * ",
      " * @author xgqfrms",
      " * @license MIT",
      " * @copyright xgqfrms",
      " * @created 2020-01-0$1",
      " * ",
      " * @description $2",
      " * @augments $3",
      " * @example $4",
      " * @link $5",
      " * ",
      " */",
      "",
      "const $2Generator = ($5datas = [], debug = false) => {",
      "    let result = ``;",
      "    // do something...",
      "    return $7result;",
      "};",
      "",
      "",
      "",
      "export default $2;",
      "",
      "export {",
      "    $2,",
      "};",
      "",
    ],
    "description": "JavaScript ES6 Template & code snippets!"
  }
}

c3t

{
    "CSS3 Template": {
        "prefix": "c3t",
        "body": [
            "@charset \"UTf-8\";",
            "",
            "/* $1.css */\n",
            ":root {",
            "    --cololr: #fff;",
            "    --default-cololr: #000;",
            "    --new-cololr: #0f0;",
            "}",
            "",
            "html{",
            "    font-size: 62.5%;",
            "    /* 10px = 1rem */",
            "}",
            "",
            "* {",
            "    box-sizing: border-box;",
            "    -moz-box-sizing: border-box;",
            "    -webkit-box-sizing: border-box;",
            "}",
            "",
            "html, body, div, h1, h2, h3, h4, h5, h6, hr, p, blockquote, dl, dt, dd, ul, ol, li, pre, form, fieldset, object, code, legend, button, input, textarea, th, td, a, img, video {",
            "    margin: 0;",
            "    padding: 0;",
            "    border: 0;",
            "    outline: 0;",
            "}",
            "",
        ],
        "description": "CSS3 Template & code snippets!"
    }
}
@xgqfrms
Copy link
Author

xgqfrms commented Feb 24, 2023

创建后,就无法直接添加文件了;只能添加评论;❌

image

@xgqfrms
Copy link
Author

xgqfrms commented Feb 24, 2023

编辑时候,可以重新添加文件 ✅

image

@xgqfrms
Copy link
Author

xgqfrms commented Feb 24, 2023

文件会按照文件名称字母先后顺序进行排序

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment