xgqfrms / FEIQA

FEIQA: Front End Interviews Question & Answers
https://feiqa.xgqfrms.xyz
MIT License
7 stars 0 forks source link

code snippets #15

Open xyzdata opened 6 years ago

xyzdata commented 6 years ago

code snippets

https://github.com/xgqfrms/FEIQA/tree/master/000-xyz/templates

xyzdata commented 6 years ago

code snippets

https://github.com/xgqfrms/FEIQA/tree/master/000-xyz/templates

c3t

CSS3 Template

new version

{
    "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!"
    }
}

old version


{
    "CSS3 Template": {
        "prefix": "c3t",
        "body": [
            "@charset \"UTf-8\";",
            "",
            "/* $1.css */\n",
            ":root {",
            "   --cololr: $2;",
            "   --default-cololr: $2;",
            "   --new-cololr: $3;",
            "}",
        ],
        "description": "CSS3 Template & code snippets!"
    }
}

js6r


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

h5t


{
    "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>",
            "    <section>",
            "        <h1>$2</h1>",
            "        <a href=\"https://feiqa.xgqfrms.xyz/index.html\">$3</a>",
            "    </section>",
            "</body>",
            "</html>"
        ],
        "description": "HTML5 Template & code snippets!"
    }
}
xgqfrms commented 6 years ago

https://www.cnblogs.com/xgqfrms/p/9513681.html

xgqfrms commented 3 years ago

https://github.com/xgqfrms/vscode

xgqfrms commented 3 years ago

sct

SCSS Template

{
    "SCSS Template": {
        "prefix": "sct",
        "body": [
            "@charset \"UTf-8\";",
            "",
            "/* $1.css */\n",
            ":root {",
            "   --cololr: $2;",
            "   --default-cololr: $2;",
            "   --new-cololr: $3;",
            "}",
        ],
        "description": "SCSS Template & code snippets!"
    }
}