Skip to content

Adds support for slim #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion settings/html.completion.cson
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
'.text.html, .text.css, .source.js':
'.text.html, .text.css, .source.js, .text.slim':
'editor':
'completions': [

Expand Down
2 changes: 1 addition & 1 deletion settings/icons.fontawesome.cson
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion settings/icons.glyphicons.cson
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
2 changes: 1 addition & 1 deletion settings/icons.octicons.cson
Original file line number Diff line number Diff line change
@@ -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'
Expand Down
301 changes: 301 additions & 0 deletions snippets/components-slim.cson
Original file line number Diff line number Diff line change
@@ -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.}}
"""
57 changes: 57 additions & 0 deletions snippets/grind-slim.cson
Original file line number Diff line number Diff line change
@@ -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
"""
Loading