Skip to content

Commit

Permalink
add Jade support
Browse files Browse the repository at this point in the history
  • Loading branch information
marcobiedermann committed Jun 30, 2016
1 parent 3b13e7e commit 2594dd5
Show file tree
Hide file tree
Showing 39 changed files with 485 additions and 1 deletion.
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ git clone https://github.com/marcobiedermann/sublime-head-snippets.git

## Usage

Start typing `head-` in HTML or PHP files and the autocomplete windows opens.
Start typing `head-` in HTML [Jade](http://jade-lang.com/), or PHP files and the autocomplete windows opens.

| Head Tags | Snippet code |
|---|---|
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions snippets/jade/head-360-browser.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<snippet>
<content><![CDATA[
<!-- select rendering engine in order -->
meta(name='renderer', content='${1:webkit|ie-comp|ie-stand}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-360</tabTrigger>
<description>HEAD 360 Browser</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
20 changes: 20 additions & 0 deletions snippets/jade/head-app-links.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<snippet>
<content><![CDATA[
<!-- iOS -->
meta(property='al:ios:url', content='${1:applinks://docs}')
meta(property='al:ios:app_store_id', content='${2:12345}')
meta(property='al:ios:app_name', content='${3:App Links}')
<!-- Android -->
meta(property='al:android:url', content='${4:applinks://docs}')
meta(property='al:android:app_name', content='${3:App Links}')
meta(property='al:android:package', content='${5:org.applinks}')
<!-- Web Fallback -->
meta(property='al:web:url', content='${6:http://applinks.org/documentation}')
<!-- More info: http://applinks.org/documentation/ -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-applinks</tabTrigger>
<description>HEAD App Links</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
30 changes: 30 additions & 0 deletions snippets/jade/head-apple-ios.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<snippet>
<content><![CDATA[
<!-- Smart App Banner -->
meta(name='apple-itunes-app', content='${1:app-id=APP_ID,affiliate-data=AFFILIATE_ID,app-argument=SOME_TEXT}')
<!-- Disable automatic detection and formatting of possible phone numbers -->
meta(name='format-detection', content='${2:telephone=no}')
<!-- Add to Home Screen -->
meta(name='apple-mobile-web-app-capable', content='${3:yes}')
meta(name='apple-mobile-web-app-status-bar-style', content='${4:black}')
meta(name='apple-mobile-web-app-title', content='${5:App Title}')
<!-- Touch Icons -->
link(rel='apple-touch-icon', href='${6:path/to/apple-touch-icon.png}')
link(rel='apple-touch-icon-precomposed', href='${7:path/to/apple-touch-icon-precomposed.png}')
<!-- In most cases, one 180×180px touch icon in the head is enough -->
<!-- If you use art-direction and/or want to have different content for each device, you can add more touch icons -->
<!-- Startup Image -->
link(rel='apple-touch-startup-image', href='${8:path/to/startup.png}')
<!-- More info: https://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-ios</tabTrigger>
<description>HEAD Apple iOS</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
11 changes: 11 additions & 0 deletions snippets/jade/head-apple-safari.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<snippet>
<content><![CDATA[
<!-- Pinned Site -->
link(rel='mask-icon', href='${1:path/to/icon.svg}' color='${2:red}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-safari</tabTrigger>
<description>HEAD Apple Safari</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
25 changes: 25 additions & 0 deletions snippets/jade/head-elements.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<snippet>
<content><![CDATA[
<!-- Document Title -->
title ${1:Page Title}
<!-- Base URL to use for all relative URLs contained within the document -->
base(href='${2:https://example.com/page.html}')
<!-- External CSS -->
link(rel='stylesheet', href='${3:styles.css}')
<!-- In-document CSS -->
<style>
${4:/* ... */}
</style>
<!-- JavaScript -->
script(src='${5:script.js}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-elements</tabTrigger>
<description>HEAD Elements</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
17 changes: 17 additions & 0 deletions snippets/jade/head-facebook-instant-articles.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<snippet>
<content><![CDATA[
meta(charset='utf-8')
meta(property='op:markup_version', content='v1.0')
<!-- The URL of the web version of your article -->
link(rel='canonical', href='${1:http://example.com/article.html}')
<!-- The style to be used for this article -->
meta(property='fb:article_style', content='${2:myarticlestyle}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-fbia</tabTrigger>
<description>HEAD Facebook / Instant Articles</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
20 changes: 20 additions & 0 deletions snippets/jade/head-facebook-open-graph.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<snippet>
<content><![CDATA[
meta(property='fb:app_id', content='${1:123456789}')
meta(property='og:url', content='${2:https://example.com/page.html}')
meta(property='og:type', content='${3:website}')
meta(property='og:title', content='${4:Content Title}')
meta(property='og:image', content='${5:https://example.com/image.jpg}')
meta(property='og:description', content='${6:Description Here}')
meta(property='og:site_name', content='${7:Site Name}')
meta(property='og:locale', content='${8:en_US}')
meta(property='article:author', content='${9}')
<!-- Facebook: https://developers.facebook.com/docs/sharing/webmasters#markup -->
<!-- Open Graph: http://ogp.me/ -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-fbog</tabTrigger>
<description>HEAD Facebook / Open Graph</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
19 changes: 19 additions & 0 deletions snippets/jade/head-favicons.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<snippet>
<content><![CDATA[
<!-- For IE 10 and below -->
<!-- No link, just place a file called favicon.ico in the root directory -->
<!-- For IE 11, Chrome, Firefox, Safari, Opera -->
link(rel='icon', href='${1:path/to/favicon-16.png}', sizes='16x16', type='image/png')
link(rel='icon', href='${2:path/to/favicon-32.png}', sizes='32x32', type='image/png')
link(rel='icon', href='${3:path/to/favicon-48.png}', sizes='48x48', type='image/png')
link(rel='icon', href='${4:path/to/favicon-62.png}', sizes='62x62', type='image/png')
link(rel='icon', href='${5:path/to/favicon-192.png}', sizes='192x192', type='image/png')
<!-- More info: https://bitsofco.de/all-about-favicons-and-touch-icons/ -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-favicon</tabTrigger>
<description>HEAD Favicon</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
13 changes: 13 additions & 0 deletions snippets/jade/head-google-android.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<snippet>
<content><![CDATA[
meta(name='theme-color', content='${1:#E64545}')
<!-- Add to homescreen -->
meta(name='mobile-web-app-capable', content='${2:yes}')
<!-- More info: https://developer.chrome.com/multidevice/android/installtohomescreen -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-android</tabTrigger>
<description>HEAD Google Android</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
13 changes: 13 additions & 0 deletions snippets/jade/head-google-chrome.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<snippet>
<content><![CDATA[
link(rel='chrome-webstore-item', href='${1:https://chrome.google.com/webstore/detail/APP_ID}')
<!-- Disable translation prompt -->
meta(name='google' value='${2:notranslate}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-chrome</tabTrigger>
<description>HEAD Google Chrome</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
13 changes: 13 additions & 0 deletions snippets/jade/head-google-plus-schema.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<snippet>
<content><![CDATA[
link(href='https://plus.google.com/+${1:YourPage}', rel='publisher')
meta(itemprop='name', content='${2:Content Title}')
meta(itemprop='description', content='${3:Content description less than 200 characters}')
meta(itemprop='image', content='${4:https://example.com/image.jpg}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-gplus</tabTrigger>
<description>HEAD Google+ / Schema.org</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
37 changes: 37 additions & 0 deletions snippets/jade/head-internet-explorer.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<snippet>
<content><![CDATA[
meta(http-equiv='x-ua-compatible', content='${1:ie=edge}')
meta(http-equiv='cleartype', content='${2:on}')
meta(name='skype_toolbar', content='${3:skype_toolbar_parser_compatible}')
<!-- Disable link highlighting on IE 10 on Windows Phone (https://blogs.windows.com/buildingapps/2012/11/15/adapting-your-webkit-optimized-site-for-internet-explorer-10/) -->
meta(name='msapplication-tap-highlight', content='${3:no}')
<!-- Pinned sites (https://msdn.microsoft.com/en-us/library/dn255024(v=vs.85).aspx) -->
meta(name='application-name', content='${4:Contoso Pinned Site Caption}')
meta(name='msapplication-tooltip', content='${5:Example Tooltip Text}')
meta(name='msapplication-starturl', content='${6:/}')
meta(name='msapplication-config', content='${7:http://example.com/browserconfig.xml}')
meta(name='msapplication-allowDomainApiCalls', content='${8:true}')
meta(name='msapplication-allowDomainMetaTags', content='${9:true}')
meta(name='msapplication-badge', content='${10:frequency=30; polling-uri=http://example.com/id45453245/polling.xml}')
meta(name='msapplication-navbutton-color', content='${11:#FF3300}')
meta(name='msapplication-notification', content='${12:frequency=60;polling-uri=http://example.com/livetile}')
meta(name='msapplication-square150x150logo', content='${13:path/to/logo.png}')
meta(name='msapplication-square310x310logo', content='${14:path/to/largelogo.png}')
meta(name='msapplication-square70x70logo', content='${15:path/to/tinylogo.png}')
meta(name='msapplication-wide310x150logo', content='${16:path/to/widelogo.png}')
meta(name='msapplication-task', content='${17:name=Check Order Status;action-uri=./orderStatus.aspx?src=IE9;icon-uri=./favicon.ico}')
meta(name='msapplication-task-seperator', content='${18:1}')
meta(name='msapplication-TileColor', content='${19:#FF3300}')
meta(name='msapplication-TileImage', content='${20:path/to/tileimage.jpg}')
meta(name='msapplication-window', content='${21:width=1024;height=768}')
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-ie</tabTrigger>
<description>HEAD Internet Explorer</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
86 changes: 86 additions & 0 deletions snippets/jade/head-link.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
<snippet>
<content><![CDATA[
<!-- Helps prevent duplicate content issues -->
link(rel='canonical', href='${1:https://example.com/2010/06/9-things-to-do-before-entering-social-media.html}')
<!-- Used to be included before the icon link, but is deprecated and no longer is used -->
link(rel='shortlink', href='${2:https://example.com/?p=42}')
<!-- Links to an AMP HTML version of the current document -->
link(rel='amphtml', href='${3:https://example.com/path/to/amp-version.html}')
<!-- Points to a CSS stylesheet -->
link(rel='stylesheet', href='${4:https://example.com/styles.css}')
<!-- Links to a JSON file that specifies 'installation' credentials for web applications -->
link(rel='manifest', href='${5:manifest.json}')
<!-- Links to the author of the document -->
link(rel='author', href='${6:humans.txt}')
<!-- Refers to a copyright statement that applies to the links context -->
link(rel='copyright', href='${7:copyright.html}')
<!-- Gives a reference to a location in your document that may be in another language -->
link(rel='alternate', href='${8:https://es.example.com/}', hreflang='${9:es}')
<!-- Gives information about an author or another person -->
link(rel='me', href='${10:https://google.com/profiles/thenextweb}', type='text/html)
link(rel='me', href='${11:mailto:[email protected]}')
link(rel='me', href='${12:sms:+15035550125}')
<!-- Links to a document that contains an archive link to the current document -->
link(rel='archives', href='${13:https://example.com/2003/05/}', title='${14:May 2003}')
<!-- Links to top level resource in an hierarchical structure -->
link(rel='index', href='${15:https://example.com/}', title='${16:DeWitt Clinton}')
<!-- Gives the starting point of the document -->
link(rel='start', href='${17:https://example.com/photos/pattern_recognition_1_about/}', title='${18:Pattern Recognition 1}')
<!-- Leads to the preceding resource of the sequence the current document is in -->
link(rel='prev', href='${19:https://example.com/opensearch/opensearch-and-openid-a-sure-way-to-get-my-attention/}', title='${20:OpenSearch and OpenID? A sure way to get my attention.}')
<!-- Gives a self reference - useful when the document has multiple possible references -->
link(rel='self' type='application/atom+xml', href='${21:https://example.com/atomFeed.php?page=3}')
<!-- The first, next, previous, and last documents in a series of documents, respectively -->
link(rel='first', href='${22:https://example.com/atomFeed.php}')
link(rel='next', href='${23:https://example.com/atomFeed.php?page=4}')
link(rel='previous', href='${24:https://example.com/atomFeed.php?page=2}')
link(rel='last', href='${25:https://example.com/atomFeed.php?page=147}')
<!-- Used when using a 3rd party service to maintain a blog -->
link(rel='EditURI', href='${26:https://example.com/xmlrpc.php?rsd', type='application/rsd+xml}', title='${27:RSD}')
<!-- Forms an automated comment when another wordpress blog links to your wordpress blog or post -->
link(rel='pingback', href='${28:https://example.com/xmlrpc.php}')
<!-- Notifies a url when you link to it on your site -->
link(rel='webmention', href='${29:https://example.com/webmention}')
<!-- Loads in an external HTML file into the current HTML file -->
link(rel='import', href='${30:component.html}')
<!-- Open Search -->
link(rel='search', href='${31:/open-search.xml}', type='application/opensearchdescription+xml', title='${32:Search Title}')
<!-- Feeds -->
link(rel='alternate', href='${33:https://feeds.feedburner.com/example}', type='application/rss+xml', title='${34:RSS}')
link(rel='alternate', href='${35:https://example.com/feed.atom}', type='application/atom+xml', title='${35:Atom 0.3}')
<!-- Prefetching, preloading, prebrowsing -->
link(rel='dns-prefetch', href='${36://example.com/}')
link(rel='preconnect', href='${37:https://www.example.com/}')
link(rel='prefetch', href='${38:https://www.example.com/}')
link(rel='prerender', href='${39:https://example.com/}')
link(rel='subresource', href='${40:styles.css}')
link(rel='preload', href='${41:image.png}')
<!-- More info: https://css-tricks.com/prefetching-preloading-prebrowsing/ -->
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>head-link</tabTrigger>
<description>HEAD Link</description>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.jade</scope>
</snippet>
Loading

0 comments on commit 2594dd5

Please sign in to comment.