diff --git a/readme.md b/readme.md index c4a69d4..851e92f 100644 --- a/readme.md +++ b/readme.md @@ -25,7 +25,7 @@ git clone https://github.com/marcobiedermann/sublime-head-snippets.git ## Usage -Start typing `head-` in HTML [Jade](http://jade-lang.com/), or PHP files and the autocomplete windows opens. +Start typing `head-` in HTML, [HAML](http://haml.info/), [Jade](http://jade-lang.com/), or PHP files and the autocomplete windows opens. | Head Tags | Snippet code | |---|---| diff --git a/snippets/haml/head-360-browser.sublime-snippet b/snippets/haml/head-360-browser.sublime-snippet new file mode 100644 index 0000000..a2f5c55 --- /dev/null +++ b/snippets/haml/head-360-browser.sublime-snippet @@ -0,0 +1,11 @@ + + +%meta{:name => "renderer", :content => "${1:webkit|ie-comp|ie-stand}"} +]]> + + head-360 + HEAD 360 Browser + + text.haml + diff --git a/snippets/haml/head-app-links.sublime-snippet b/snippets/haml/head-app-links.sublime-snippet new file mode 100644 index 0000000..00289b7 --- /dev/null +++ b/snippets/haml/head-app-links.sublime-snippet @@ -0,0 +1,20 @@ + + +%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}"} + +%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}"} + +%meta{:property => "al:web:url", :content => "${6:http://applinks.org/documentation}"} + +]]> + + head-applinks + HEAD App Links + + text.haml + diff --git a/snippets/haml/head-apple-ios.sublime-snippet b/snippets/haml/head-apple-ios.sublime-snippet new file mode 100644 index 0000000..f45584e --- /dev/null +++ b/snippets/haml/head-apple-ios.sublime-snippet @@ -0,0 +1,30 @@ + + +%meta{:name => "apple-itunes-app", :content => "${1:app-id=APP_ID,affiliate-data=AFFILIATE_ID,app-argument=SOME_TEXT}"} + +%meta{:name => "format-detection", :content => "${2:telephone=no}"} + +%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}"} + + +%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}"} + + + + +%link{:rel => "apple-touch-startup-image", :href => "${8:path/to/startup.png}"} + + +]]> + + head-ios + HEAD Apple iOS + + text.haml + diff --git a/snippets/haml/head-apple-safari.sublime-snippet b/snippets/haml/head-apple-safari.sublime-snippet new file mode 100644 index 0000000..d4dbe7b --- /dev/null +++ b/snippets/haml/head-apple-safari.sublime-snippet @@ -0,0 +1,11 @@ + + +%link{:rel => "mask-icon", :href => "${1:path/to/icon.svg}", :color => "${2:red}"} +]]> + + head-safari + HEAD Apple Safari + + text.haml + diff --git a/snippets/haml/head-elements.sublime-snippet b/snippets/haml/head-elements.sublime-snippet new file mode 100644 index 0000000..da8686a --- /dev/null +++ b/snippets/haml/head-elements.sublime-snippet @@ -0,0 +1,23 @@ + + +%title ${1:Page Title} + + +%base{:href => "${2:https://example.com/page.html}"} + + +%link{:rel => "stylesheet", :href => "${3:styles.css}"} + + +%style /**/ + + +%script{:src => "${5:script.js}"} +]]> + + head-elements + HEAD Elements + + text.haml + diff --git a/snippets/haml/head-facebook-instant-articles.sublime-snippet b/snippets/haml/head-facebook-instant-articles.sublime-snippet new file mode 100644 index 0000000..c407953 --- /dev/null +++ b/snippets/haml/head-facebook-instant-articles.sublime-snippet @@ -0,0 +1,17 @@ + + "utf-8"} +%meta{:property => "op:markup_version", :content => "v1.0"} + + +%link{:rel => "canonical", :href => "${1:http://example.com/article.html}"} + + +%meta{:property => "fb:article_style", :content => "${2:myarticlestyle}"} +]]> + + head-fbia + HEAD Facebook / Instant Articles + + text.haml + diff --git a/snippets/haml/head-facebook-open-graph.sublime-snippet b/snippets/haml/head-facebook-open-graph.sublime-snippet new file mode 100644 index 0000000..3529de5 --- /dev/null +++ b/snippets/haml/head-facebook-open-graph.sublime-snippet @@ -0,0 +1,20 @@ + + "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}"} + + +]]> + + head-fbog + HEAD Facebook / Open Graph + + text.haml + diff --git a/snippets/haml/head-favicons.sublime-snippet b/snippets/haml/head-favicons.sublime-snippet new file mode 100644 index 0000000..a4ae9bf --- /dev/null +++ b/snippets/haml/head-favicons.sublime-snippet @@ -0,0 +1,19 @@ + + + + + +%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"} + +]]> + + head-favicon + HEAD Favicon + + text.haml + diff --git a/snippets/haml/head-google-android.sublime-snippet b/snippets/haml/head-google-android.sublime-snippet new file mode 100644 index 0000000..68c388f --- /dev/null +++ b/snippets/haml/head-google-android.sublime-snippet @@ -0,0 +1,13 @@ + + "theme-color", :content => "${1:#E64545}"} + +%meta{:name => "mobile-web-app-capable", :content => "${2:yes}"} + +]]> + + head-android + HEAD Google Android + + text.haml + diff --git a/snippets/haml/head-google-chrome.sublime-snippet b/snippets/haml/head-google-chrome.sublime-snippet new file mode 100644 index 0000000..0d5c8e3 --- /dev/null +++ b/snippets/haml/head-google-chrome.sublime-snippet @@ -0,0 +1,13 @@ + + "chrome-webstore-item", :href => "${1:https://chrome.google.com/webstore/detail/APP_ID}"} + + +%meta{:name => "google", :value => "${2:notranslate}"} +]]> + + head-chrome + HEAD Google Chrome + + text.haml + diff --git a/snippets/haml/head-google-plus-schema.sublime-snippet b/snippets/haml/head-google-plus-schema.sublime-snippet new file mode 100644 index 0000000..4434c20 --- /dev/null +++ b/snippets/haml/head-google-plus-schema.sublime-snippet @@ -0,0 +1,13 @@ + + "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}"} +]]> + + head-gplus + HEAD Google+ / Schema.org + + text.haml + diff --git a/snippets/haml/head-internet-explorer.sublime-snippet b/snippets/haml/head-internet-explorer.sublime-snippet new file mode 100644 index 0000000..fd2caee --- /dev/null +++ b/snippets/haml/head-internet-explorer.sublime-snippet @@ -0,0 +1,37 @@ + + "x-ua-compatible", :content => "${1:ie=edge}"} +%meta{":http-equiv" => "cleartype", :content => "${2:on}"} +%meta{:name => "skype_toolbar", :content => "${3:skype_toolbar_parser_compatible}"} + + +%meta{:name => "msapplication-tap-highlight", :content => "${3:no}"} + + +%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}"} +]]> + + head-ie + HEAD Internet Explorer + + text.haml + diff --git a/snippets/haml/head-link.sublime-snippet b/snippets/haml/head-link.sublime-snippet new file mode 100644 index 0000000..1266c31 --- /dev/null +++ b/snippets/haml/head-link.sublime-snippet @@ -0,0 +1,87 @@ + + +%link{:rel => "canonical", :href => "${1:https://example.com/2010/06/9-things-to-do-before-entering-social-media.html}"} + + +%link{:rel => "shortlink", :href => "${2:https://example.com/?p=42}"} + + +%link{:rel => "amphtml", :href => "${3:https://example.com/path/to/amp-version.html}"} + + +%link{:rel => "stylesheet", :href => "${4:https://example.com/styles.css}"} + + +%link{:rel => "manifest", :href => "${5:manifest.json}"} + + +%link{:rel => "author", :href => "${6:humans.txt}"} + + +%link{:rel => "copyright", :href => "${7:copyright.html}"} + + +%link{:rel => "alternate", :href => "${8:https://es.example.com/}", :hreflang => "${9:es}"} + + +%link{:rel => "me", :href => "${10:https://google.com/profiles/thenextweb}", :type => "text/html"} +%link{:rel => "me", :href => "${11:mailto:name@example.com}"} +%link{:rel => "me", :href => "${12:sms:+15035550125}"} + + +%link{:rel => "archives", :href => "${13:https://example.com/2003/05/}", :title => "${14:May 2003}"} + + +%link{:rel => "index", :href => "${15:https://example.com/}", :title => "${16:DeWitt Clinton}"} + + +%link{:rel => "start", :href => "${17:https://example.com/photos/pattern_recognition_1_about/}", :title => "${18:Pattern Recognition 1}"} + + +%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.}"} + + +%link{:rel => "self", :type => "application/atom+xml", :href => "${21:https://example.com/atomFeed.php?page=3}"} + + +%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}"} + + +%link{:rel => "EditURI", :href => "${26:https://example.com/xmlrpc.php?rsd", :type => "application/rsd+xml}", :title => "${27:RSD}"} + + +%link{:rel => "pingback", :href => "${28:https://example.com/xmlrpc.php}"} + + +%link{:rel => "webmention", :href => "${29:https://example.com/webmention}"} + + +%link{:rel => "import", :href => "${30:component.html}"} + + +%link{:rel => "search", :href => "${31:/open-search.xml}", :type => "application/opensearchdescription+xml", :title => "${32:Search Title}"} + + +%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}"} + + +%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}"} + +]]> + + head-link + HEAD Link + + text.haml + diff --git a/snippets/haml/head-meta.sublime-snippet b/snippets/haml/head-meta.sublime-snippet new file mode 100644 index 0000000..78507be --- /dev/null +++ b/snippets/haml/head-meta.sublime-snippet @@ -0,0 +1,96 @@ + + "utf-8"} + +%meta{":http-equiv" => "x-ua-compatible", :content => "${1:ie=edge}"} + +%meta{:name => "viewport", :content => "${2:width=device-width initial-scale=1 shrink-to-fit=no}"} + + + + +%meta{":http-equiv" => "Content-Security-Policy", :content => "${3:default-src 'self'}"} + + + + +%meta{:name => "application-name", :content => "${4:Application Name}"} + + + +%meta{:name => "description", :content => "${5:A description of the page}"} + + + +%meta{:name => "robots", :content => "${6:index,follow,noodp}"} + + +%meta{:name => "googlebot", :content => "${7:index,follow}"} + + +%meta{:name => "google", :content => "${8:nositelinkssearchbox}"} + + +%meta{:name => "google", :content => "${9:notranslate}"} + + +%meta{:name => "google-site-verification", :content => "${10:verification_token}"} + + +%meta{:name => "generator", :content => "${11:program}"} + + +%meta{:name => "subject", :content => "${12:your website's subject}"} + + +%meta{:name => "abstract", :content => "${12}"} + + +%meta{:name => "topic", :content => "${14}"} + + +%meta{:name => "summary", :content => "${15}"} + + +%meta{:name => "classification", :content => "${16:business}"} + + +%meta{:name => "url", :content => "${17:https://example.com/}"} + + +%meta{:name => "identifier-URL", :content => "${18:https://example.com/}"} + +%meta{:name => "directory", :content => "${19:submission}"} + + +%meta{:name => "category", :content => "${20:}"} + + +%meta{:name => "coverage", :content => "${21:Worldwide}"} + + +%meta{:name => "distribution", :content => "${22:Global}"} + + +%meta{:name => "rating", :content => "${23:General}"} + + +%meta{:name => "referrer", :content => "${24:never}"} + + +%meta{:name => "format-detection", :content => "${25:telephone=no}"} + + +%meta{:name => "ICBM", :content => "${26:latitude longitude}"} +%meta{:name => "geo.position", :content => "${27:latitude;longitude}"} + +%meta{:name => "geo.region", :content => "${28:country[-state]}"} + +%meta{:name => "geo.placename", :content => "${29:city/town}"} +]]> + + head-meta + HEAD Meta + + text.haml + diff --git a/snippets/haml/head-minimum.sublime-snippet b/snippets/haml/head-minimum.sublime-snippet new file mode 100644 index 0000000..4f53c48 --- /dev/null +++ b/snippets/haml/head-minimum.sublime-snippet @@ -0,0 +1,14 @@ + + "utf-8"} +%meta{":http-equiv" => "x-ua-compatible", :content => "${1:ie=edge}"} +%meta{:name => "viewport", :content => "${2:width=device-width initial-scale=1}"} + +%title ${3:Page Title} +]]> + + head-minimum + HEAD Recommended Minimum + + text.haml + diff --git a/snippets/haml/head-oembed.sublime-snippet b/snippets/haml/head-oembed.sublime-snippet new file mode 100644 index 0000000..68fc589 --- /dev/null +++ b/snippets/haml/head-oembed.sublime-snippet @@ -0,0 +1,11 @@ + + "alternate", :type => "application/json+oembed", :href => "${1:http://example.com/services/oembed?url=http%3A%2F%2Fexample.com%2Ffoo%2F&format=json}", :title => "${2:oEmbed Profile: JSON}"} +%link{:rel => "alternate", :type => "text/xml+oembed", :href => "${3:http://example.com/services/oembed?url=http%3A%2F%2Fexample.com%2Ffoo%2F&format=xml}", :title => "${4:oEmbed Profile: XML}"} +]]> + + head-oebmed + HEAD OEmbed + + text.haml + diff --git a/snippets/haml/head-qq-mobile-browser.sublime-snippet b/snippets/haml/head-qq-mobile-browser.sublime-snippet new file mode 100644 index 0000000..2f8a53a --- /dev/null +++ b/snippets/haml/head-qq-mobile-browser.sublime-snippet @@ -0,0 +1,15 @@ + + +%meta{:name => "x5-orientation", :content => "${1:landscape/portrait}"} + +%meta{:name => "x5-fullscreen", :content => "${2:true}"} + +%meta{:name => "x5-page-mode", :content => "${3:app}"} +]]> + + head-qq + HEAD QQ Mobile Browser + + text.haml + diff --git a/snippets/haml/head-twitter.sublime-snippet b/snippets/haml/head-twitter.sublime-snippet new file mode 100644 index 0000000..3ee6b6c --- /dev/null +++ b/snippets/haml/head-twitter.sublime-snippet @@ -0,0 +1,18 @@ + + "twitter:card", :content => "${1:summary}"} +%meta{:name => "twitter:site", :content => "@${2:site_account}"} +%meta{:name => "twitter:creator", :content => "@${3:individual_account}"} +%meta{:name => "twitter:url", :content => "${4:https://example.com/page.html}"} +%meta{:name => "twitter:title", :content => "${5:Content Title}"} +%meta{:name => "twitter:description", :content => "${6:Content description less than 200 characters}"} +%meta{:name => "twitter:image", :content => "${7:https://example.com/image.jpg}"} + + +]]> + + head-twitter + HEAD Twitter + + text.haml + diff --git a/snippets/haml/head-uc-mobile-browser.sublime-snippet b/snippets/haml/head-uc-mobile-browser.sublime-snippet new file mode 100644 index 0000000..3f4710e --- /dev/null +++ b/snippets/haml/head-uc-mobile-browser.sublime-snippet @@ -0,0 +1,23 @@ + + +%meta{:name => "screen-orientation", :content => "${1:landscape/portrait}"} + +%meta{:name => "full-screen", :content => "${2:yes}"} + +%meta{:name => "imagemode", :content => "${3:force}"} + +%meta{:name => "browsermode", :content => "${4:application}"} + +%meta{:name => "nightmode", :content => "${5:disable}"} + +%meta{:name => "layoutmode", :content => "${6:fitscreen}"} + +%meta{:name => "wap-font-scale", :content => "${7:no}"} +]]> + + head-uc + HEAD UC Mobile Browser + + text.haml +