ctrl+shift+p filters: :st2 :st3 :win :osx :linux
浏览

jade代码片段

P233 全部

Sublime Text 2 的 jade代码片段

标签 代码片段

详情

  • 2015.02.25.18.52.50
  • github.com
  • github.com
  • 9 年前
  • 9 分钟前
  • 12 年前

安装量

  • 总计 37K
  • Win 19K
  • Mac 11K
  • Linux 7K
8 月 6 8 月 5 8 月 4 8 月 3 8 月 2 8 月 1 7 月 31 7 月 30 7 月 29 7 月 28 7 月 27 7 月 26 7 月 25 7 月 24 7 月 23 7 月 22 7 月 21 7 月 20 7 月 19 7 月 18 7 月 17 7 月 16 7 月 15 7 月 14 7 月 13 7 月 12 7 月 11 7 月 10 7 月 9 7 月 8 7 月 7 7 月 6 7 月 5 7 月 4 7 月 3 7 月 2 7 月 1 6 月 30 6 月 29 6 月 28 6 月 27 6 月 26 6 月 25 6 月 24 6 月 23
Windows 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
Mac 1 1 0 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

说明文件

源代码
raw.​githubusercontent.​com

Sublime Text 2 的 jade代码片段

一组 jade 代码片段。欢迎提出建议。

安装

强烈建议通过包控制安装此存储库。

代码片段列表

条件判断

if =>

if condition
  //- code

if else =>

if condition
  //- code
else
  //- code

each =>

each value in variable
  //- code...

case =>

case condition
  when condition
    //- code
  default
    //- code

属性

id => id=""

cla => class=""

hre => href=""

src => src=""

typ => type=""

nam => name=""

rel => rel=""

con => content=""

val => value=""

tar => target=""

act => action=""

met => method=""

pla => placeholder=""

ari => aria-*=""

itemt => itemtype="http://schema.org/*"

items => itemscope=""

itemp => itemprop

rol => role=""

data => data-*=""

元素

a => a(href="http://", target="_blank")

img => img(src="image/", alt="")

scr => script(type="text/javascript", src="")

lin => link(rel="stylesheet", type="text/css", href="")

表单

form => form(id="", method="", action="")

inp => input(type="text", placeholder="")

but => button(type="button", placeholder="")

tex => textarea(placeholder="")

pli => p > label(for="") + input(id="", type="")

特定的 jade 语法

exte => extend

inc => include

mix => mixin name(param1, param2)

过滤器

st => :stylus

le => :less

md => :markdown

cd => :cdata

co => :coffeescript

模板

tem =>

doctype html
html
  head(lang="en")
    title ${1:title name}
    meta(http-equiv="content-type", content="text/html; charset=UTF-8")
    meta(name="description", content="")
    meta(name="keywords", content="")
    meta(name="viewport", content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;")
    // if lt IE 9
      script(type="text/javascript", src="js/html5shiv.js")
    link(rel="stylesheet", href="css/style.css", type="text/css")
  body
    header
      h1
    .container

    footer

    script(type="text/javascript", src="js/jquery-1.11.0.min.js")
    // if IE
      script(type="text/javascript", src="js/placeholder.js")

tplh5bp =>

doctype html
//- TODO: Don't forget to set lang !!
html(class="no-js")
  head
    //- TODO: Check if it's the good charset
    meta(charset='utf-8')
    meta(http-equiv='X-UA-Compatible', content='IE=edge')
    title
    meta(name='description', content='')
    meta(name='viewport', content='width=device-width, initial-scale=1')
    //- TODO : Place favicon.ico and apple-touch-icon.png in the root directory
    block css
      link(rel='stylesheet', href='css/normalize.css')
      link(rel='stylesheet', href='css/main.css')
    block top-script
      script(src='js/vendor/modernizr-2.7.1.min.js')
  body
    //-
      Add your site or application content here
    block main
      p Hello world! This is HTML5 Boilerplate.

    block bottom-script
      script(src='//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js')
      script.
        window.jQuery || document.write('<script src="js/vendor/jquery-1.11.0.min.js"><\/script>')
      script(src='js/plugins.js')
      script(src='js/main.js')
      //- TODO : Google Analytics: change UA-XXXXX-X to be your site\'s ID.
      script.
        (function(b,o,i,l,e,r){b.GoogleAnalyticsObject=l;b[l]||(b[l]=
        function(){(b[l].q=b[l].q||[]).push(arguments)});b[l].l=+new Date;
        e=o.createElement(i);r=o.getElementsByTagName(i)[0];
        e.src='//www.google-analytics.com/analytics.js';
        r.parentNode.insertBefore(e,r)}(window,document,'script','ga'));
        ga('create','UA-XXXXX-X');ga('send','pageview');

其他

ie => // if lt IE 9

贡献者

rs459