diff --git a/settings/html.completion.cson b/settings/html.completion.cson index 343822c..2c91fd4 100644 --- a/settings/html.completion.cson +++ b/settings/html.completion.cson @@ -1,4 +1,4 @@ -'.text.html, .text.css, .source.js': +'.text.html, .text.css, .source.js, .text.slim': 'editor': 'completions': [ diff --git a/settings/icons.fontawesome.cson b/settings/icons.fontawesome.cson index 9242401..f51f915 100644 --- a/settings/icons.fontawesome.cson +++ b/settings/icons.fontawesome.cson @@ -1,4 +1,4 @@ -'.text.html, .source.css, .source.sass, .source.less, .source.jade': +'.text.html, .source.css, .source.sass, .source.less, .source.jade, .text.slim': 'editor': 'completions': [ 'fa-lg' diff --git a/settings/icons.glyphicons.cson b/settings/icons.glyphicons.cson index 01631a7..d6e41da 100644 --- a/settings/icons.glyphicons.cson +++ b/settings/icons.glyphicons.cson @@ -1,4 +1,4 @@ -'.text.html, .source.css, .source.sass, .source.less, .source.jade': +'.text.html, .source.css, .source.sass, .source.less, .source.jade, .text.slim': 'editor': 'completions': [ 'glyphicon-asterisk' diff --git a/settings/icons.octicons.cson b/settings/icons.octicons.cson index 12f902e..83a215a 100644 --- a/settings/icons.octicons.cson +++ b/settings/icons.octicons.cson @@ -1,4 +1,4 @@ -'.text.html, .source.css, .source.sass, .source.less, .source.jade': +'.text.html, .source.css, .source.sass, .source.less, .source.jade, .text.slim': 'editor': 'completions': [ 'octicon-alert' diff --git a/snippets/components-slim.cson b/snippets/components-slim.cson new file mode 100644 index 0000000..e5492fd --- /dev/null +++ b/snippets/components-slim.cson @@ -0,0 +1,301 @@ +".text.slim": + + 'Icon': + 'prefix': 'icon' + 'body': """ + .glyphicon.glyphicon-$1 + """ + + 'Octicons by GitHub': + 'prefix': 'oi' + 'body': """ + .${1:mega-}octicon.octicon-$2 + $0 + """ + + 'Fontawesome Icon': + 'prefix': 'fa' + 'body': """ + i.fa.fa-$1 + """ + + 'Button': + 'prefix': 'btn' + 'body': """ + button.btn.${1:btn-default} type="button" + $2 + """ + + 'Button Modal': + 'prefix': 'btn-modal' + 'body': """ + button.btn.$1{btn-primary} data-toggle="modal" data-target="#$2" + $3 + """ + + 'Dropdown': + 'prefix': 'dropdown' + 'body': """ + .dropdown + button.btn.dropdown-toggle.sr-only data-toggle="dropdown" id="$1" type="button" + $2 + span.caret + ul.dropdown-menu aria-labelledby="$3" role="menu" + $4 + """ + + 'Menu Item': + 'prefix': 'menuitem' + 'body': """ + li role="presentation" + a role="menuitem" tabindex="-1" href="${1:#}" + $2 + """ + + 'Menu Header': + 'prefix': 'menuheader' + 'body': """ + li.dropdown-header role="presentation" + $1 + """ + + 'Menu Divider': + 'prefix': 'menudivider' + 'body': """ + li.divider role="presentation" + """ + + 'Button Group': + 'prefix': 'btn-group' + 'body': """ + .btn-group.${1:btn-group-${2:sm}} + ${3:btn} + """ + + 'Button Group Vertical': + 'prefix': 'btn-group-vertical' + 'body': """ + .btn-group-vertical.${1:btn-group-${2:sm}} + ${3:btn} + """ + + 'Button Toolbar': + 'prefix': 'btn-toolbar' + 'body': """ + .btn-toolbar role="toolbar" + ${1:btngroup} + """ + + 'Input Group': + 'prefix': 'input-group' + 'body': """ + .input-group + span.input-group-addon $1 + input.form-control placeholder="$2" type="text" / + $3 + """ + + 'Tab': + 'prefix': 'nav-tabs' + 'body': """ + ul.nav.nav-tabs + $1 + """ + + 'Item': + 'prefix': 'item' + 'body': """ + li + a.href="${1:#}" + $2 + """ + + 'Pills': + 'prefix': 'nav-pills' + 'body': """ + ul.nav.nav-pills$1 + $2 + """ + + 'Navbar': + 'prefix': 'nav-' + 'body': """ + nav.navbar class=("navbar-default${1: navbar-fixed-top}") role="navigation" + .container + $2 + """ + + 'Breadcrumbs': + 'prefix': 'breadcrumb' + 'body': """ + ol.breadcrumb + $1 + """ + + 'Pagination': + 'prefix': 'pagination' + 'body': """ + ul.pagination + li + a href="#" « + $1 + li + a href="#" » + """ + + "Pager": + 'prefix': 'pager' + 'body': """ + ul.pager + $1 + """ + + 'Label': + 'prefix': 'label-' + 'body': """ + span.label.${1:label-default} + $2 + """ + + 'Badge': + 'prefix': 'badge' + 'body': """ + span.badge$1 + $2 + """ + + 'Jumbotron': + 'prefix': 'jumbotron' + 'body': """ + .jumbotron + h1 ${1:Hello, world!} + p $2 + """ + + 'Page Header': + 'prefix': 'page-header' + 'body': """ + .page-header + h1 + | $1 + small + | $2 + """ + + 'Thumbnail': + 'prefix': 'thumbnail' + 'body': """ + a.thumbnail href="#" + ${1:img src="" alt="$2"} + """ + + 'Alert': + 'prefix': 'alert' + 'body': """ + .alert.${1:alert-success} + $2 + """ + + 'Alert Close': + 'prefix': 'close' + 'body': """ + button.close type="button data-dismiss="alert" aria-hidden="true" + × + """ + + 'Alert Link': + 'prefix': 'alert-link' + 'body': """ + a.alert-link href="${1:#} + $2 + """ + + 'Progress Bar': + 'prefix': 'progress-' + 'body': """ + .progress + .progress-bar aria-valuemax="100" aria-valuemin="0" aria-valuenow="$1" role="progressbar" style=("width: $2%;") + span.sr-only $2 + """ + + 'List Group': + 'prefix': 'list-group' + 'body': """ + ul.list-group + ${1:li.list-group-item} + $2 + """ + + 'List Group Item': + 'prefix': 'list-item' + 'body': """ + li.list-group-item + $1 + """ + + 'Panel': + 'prefix': 'panel' + 'body': """ + .panel.panel-default + .panel-heading + h3.panel-title $1 + .panel-body + $2 + .panel-footer + $3 + """ + + 'Well': + 'prefix': 'well' + 'body': """ + .well.${1:well-sm} + $2 + """ + + 'Blockquote Reverse': + 'prefix': 'blockquote-reverse' + 'body': """ + blockquote.blockquote-reverse$1 + $2 + """ + + 'List Unstyled': + 'prefix': 'list-unstyled' + 'body': """ + ul.list-unstyled + li + $1 + $2 + """ + + 'List Inline': + 'prefix': 'list-inline' + 'body': """ + ul.list-inline + li $1 + $2 + """ + + 'Dl Horizontal': + 'prefix': 'dl-horizontal' + 'body': """ + dl.dl-horizontal + ${1:dt $2} + dd $3 + """ + + 'Table': + 'prefix': 'table-' + 'body': """ + table.table$1 + $2 + """ + + 'Form Group': + 'prefix': 'form-group' + 'body': """ + .form-group + label for="$1" $2 + input.form-control type="${3:text}" id="$4" placeholder="$5" / + ${6:p.help-block ${7:Help text here.}} + """ diff --git a/snippets/grind-slim.cson b/snippets/grind-slim.cson new file mode 100644 index 0000000..1d3985a --- /dev/null +++ b/snippets/grind-slim.cson @@ -0,0 +1,57 @@ +'.text.slim': + + 'Container': + 'prefix': 'con' + 'body': """ + .container + $1 + """ + + 'Container Fluid': + 'prefix': 'conf' + 'body': """ + .container-fluid + $1 + """ + + 'Row': + 'prefix': 'row' + 'body': """ + .row + $1 + """ + + 'Column': + 'prefix': 'col-' + 'body': """ + .col-${1:xs|sm|md|lg}-${2:1-12} + $3 + """ + + 'Column Extra Small': + 'prefix': 'col-xs' + 'body': """ + .col-xs-${1:1-12} + $0 + """ + + 'Column Small': + 'prefix': 'col-sm' + 'body': """ + .col-sm-${1:1-12} + $0 + """ + + 'Column Medium': + 'prefix': 'col-md' + 'body': """ + .col-md-${1:1-12} + $0 + """ + + 'Column Large': + 'prefix': 'col-lg' + 'body': """ + .col-lg-${1:1-12} + $0 + """ diff --git a/snippets/templates-slim.cson b/snippets/templates-slim.cson new file mode 100644 index 0000000..84d157f --- /dev/null +++ b/snippets/templates-slim.cson @@ -0,0 +1,181 @@ +'.text.slim': + 'Basic HTML Template': + 'prefix': 'html-' + 'body': """ + doctype html + html lang="en" + head + meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" / + meta charset="utf-8" / + meta content="IE=edge" http-equiv="X-UA-Compatible" / + meta content="width=device-width, initial-scale=1" name="viewport" / + title $1 + /! Bootstrap + link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" / + link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" / + body + /! jQuery (necessary for Bootstrap's JavaScript plugins) + script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" + /! Include all compiled plugins (below), or include individual files as needed + script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" + """ + + 'Minimal HTML Template (No Comment)': + 'prefix': 'html-min' + 'body': """ + doctype html + html lang="en" + head + meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" / + meta charset="utf-8" / + meta content="IE=edge" http-equiv="X-UA-Compatible" / + meta content="width=device-width, initial-scale=1" name="viewport" / + title $1 + link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" / + link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css" rel="stylesheet" / + body + $2 + script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js" + script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" + """ + + 'HTML Template (Using Octicons by GitHub)': + 'prefix': 'html-oi' + 'body': """ + doctype html + html lang="en" + head + meta content=("text/html; charset=UTF-8") http-equiv="Content-Type" / + meta charset="utf-8" / + meta content="IE=edge" http-equiv="X-UA-Compatible" / + meta content="width=device-width, initial-scale=1" name="viewport" / + title $1 + link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet" / + link href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.1.0/octicons.min.css" rel="stylesheet" / + body + $0 + script src="https://cdn.jsdelivr.net/jquery/2.1.3/jquery.min.js" + script src="https://cdn.jsdelivr.net/bootstrap/3.3.5/js/bootstrap.min.js" + """ + + 'Modal': + 'prefix': 'modal' + 'body': """ + .modal.fade aria-hidden="true" aria-labelledby="$2" id="$1" role="dialog" tabindex="-1" + .modal-dialog + .modal-content + ${3: + .modal-header + button.close aria-hidden="true" data-dismiss="modal" type="button" × + h4.modal-title id="$4" $5 + } + .modal-body + $6 + ${7: + .modal-footer + button.btn.btn-default data-dismiss="modal" type="button" ${8:Close} + button.btn.btn-primary type="button" $9 + } + """ + + 'Accordion': + 'prefix': 'accordion' + 'body': """ + .panel-group id="$1" + .panel.panel-default + .panel-heading + h4.panel-title + a data-parent="#$2" data-toggle="collapse" href="#$3" + $4 + .panel-collapse.collapse.in id="$5" + .panel-body + $6 + """ + + 'Accordion Item': + 'prefix': 'accordion-item' + 'body': """ + .panel.panel-default + .panel-heading + h4.panel-title + a data-parent="#$1" data-toggle="collapse" href="#$2" + $3 + .panel-collapse.collapse.in id="$4" + .panel-body + $5 + $6 + """ + + 'Carousel': + 'prefix': 'carousel' + 'body': """ + .carousel.slide data-ride="carousel" id="${1:carousel-generic}" + /! Indicators + ol.carousel-indicators + li.active data-slide-to="0" data-target="#${1:carousel-generic}" + li data-slide-to="1" data-target="#${1:carousel-generic}" + li data-slide-to="2" data-target="#${1:carousel-generic}" + /! Wrapper for slides + .carousel-inner + .item.active + img alt="$3" src="$2" / + .carousel-caption + $4 + $5 + /! Controls + a.left.carousel-control data-slide="prev" href="#${1:carousel-generic}" + span.glyphicon.glyphicon-chevron-left + a.right.carousel-control data-slide="next" href="#${1:carousel-generic}" + span.glyphicon.glyphicon-chevron-right + """ + + 'Carousel Item': + 'prefix': 'carousel-item' + 'body': """ + .item.active + img alt="$2" src="$1" / + .carousel-caption + h3 $3 + p $4 + """ + + 'Navbar': + 'prefix': 'navbar' + 'body': """ + nav.navbar.navbar-default role="navigation" + .container-fluid + .navbar-header + button.navbar-toggle data-target="\#${1:navbar}" data-toggle="collapse" type="button" + span.sr-only Toggle navigation + span.icon-bar + span.icon-bar + span.icon-bar + a.navbar-brand href="#" $2 + /! Collect the nav links, forms, and other content for toggling + .collapse.navbar-collapse id="${1:navbar}" + ul.nav.navbar-nav + li.active + a href="#" Home + li + a href="#" $3 + form.navbar-form.navbar-left role="search" + .form-group + input.form-control placeholder="Search" type="text" / + button.btn.btn-default type="submit" Submit + ul.nav.navbar-nav.navbar-right + li + a href="#" $4 + """ + + 'Navbar Dropdown': + 'prefix': 'navbar-dropdown' + 'body': """ + li.dropdown + a.dropdown-toggle data-toggle="dropdown" href="#" + ${1:Menu Item} + b.caret + ul.dropdown-menu + li + a href="#" $2 + li.divider + """ diff --git a/snippets/typography-slim.cson b/snippets/typography-slim.cson new file mode 100644 index 0000000..224747c --- /dev/null +++ b/snippets/typography-slim.cson @@ -0,0 +1,69 @@ +'.text.slim': + + 'Initialism': + 'prefix': 'initialism' + 'body': 'abbr title="$1" class="initialism" $2' + + 'Lead': + 'prefix': 'lead' + 'body': 'p.lead $0' + + 'Heading 1': + 'prefix': 'h1-' + 'body': """ + h1 + $1 + ${2:small + $3 + } + """ + + 'Heading 2': + 'prefix': 'h2-' + 'body': """ + h2 + $1 + ${2:small + $3 + } + """ + + 'Heading 3': + 'prefix': 'h3-' + 'body': """ + h3 + $1 + ${2:small + $3 + } + """ + + 'Heading 4': + 'prefix': 'h4-' + 'body': """ + h4 + $1 + ${2:small + $3 + } + """ + + 'Heading 5': + 'prefix': 'h5-' + 'body': """ + h5 + $1 + ${2:small + $3 + } + """ + + 'Heading 6': + 'prefix': 'h6-' + 'body': """ + h6 + $1 + ${2:small + $3 + } + """