Created
November 22, 2016 02:19
-
-
Save atmartins/41cba2f28158559602a71e6f3eee10b6 to your computer and use it in GitHub Desktop.
Atom Snippets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Your snippets | |
# | |
# Atom snippets allow you to enter a simple prefix in the editor and hit tab to | |
# expand the prefix into a larger code block with templated values. | |
# | |
# You can create a new snippet in this file by typing "snip" and then hitting | |
# tab. | |
# | |
# An example CoffeeScript snippet to expand log to console.log: | |
# | |
# '.source.coffee': | |
# 'Console log': | |
# 'prefix': 'log' | |
# 'body': 'console.log $1' | |
# | |
# This file uses CoffeeScript Object Notation (CSON). | |
# If you are unfamiliar with CSON, you can read more about it here: | |
# https://github.com/bevry/cson#what-is-cson | |
# | |
# HTML: .text.html.basic | |
# CSS: .source.css | |
# SASS: .source.sass | |
# JavaScript: .source.js | |
# JSON: .source.json | |
# PHP: .text.html.php | |
# Java: .source.java | |
# Ruby: .text.html.erb | |
# Python: .source.python | |
# plain text (including markdown): .text.plain | |
# | |
'.text.html, .source.php': | |
'modernizr': | |
'prefix': 'modernizr-cdn' | |
'body': '<script src="https://cdnjs.cloudflare.com/ajax/libs/modernizr/2.8.3/modernizr.min.js"></script>' | |
'angular cdn script tag': | |
'prefix': 'angular-cdn' | |
'body': '<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script>' | |
'angular-route cdn script tag': | |
'prefix': 'angular-route-cdn' | |
'body': '<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-route.min.js"></script>' | |
'jquery cdn script tag': | |
'prefix': 'jquery-cdn' | |
'body': '<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>' | |
'bootstrap cdn style tag': | |
'prefix': 'bootstrap-style-cdn' | |
'body': '<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css"/>' | |
'bootstrap cdn script tag': | |
'prefix': 'bootstrap-script-cdn' | |
'body': '<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>' | |
'font-awesome cdn style tag': | |
'prefix': 'font-awesome-style-cdn' | |
'body': '<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"/>' | |
'style src basic': | |
'prefix': 'style' | |
'body': '<link rel="stylesheet" type="text/css" href="$1"/>' | |
'style block basic': | |
'prefix': 'styleblock' | |
'body': """ | |
<style> | |
$1 | |
</style> | |
""" | |
'script src basic': | |
'prefix': 'script' | |
'body': '<script src="$1"></script>' | |
'script block basic': | |
'prefix': 'scriptblock' | |
'body': """ | |
<script type="application/javascript"> | |
$1 | |
</script> | |
""" | |
'html simple': | |
'prefix': 'html' | |
'body': """ | |
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
$1 | |
</head> | |
<body> | |
$2 | |
</body> | |
</html> | |
""" | |
'html angular': | |
'prefix': 'html-angular' | |
'body': """ | |
<!doctype html> | |
<html ng-app="$1"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
</head> | |
<body> | |
<div ng-cloak ng-view></div> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular.min.js"></script> | |
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.7/angular-route.min.js"></script> | |
<script src="/main.js$3"></script> | |
</body> | |
</html> | |
""" | |
'html production': | |
'prefix': 'htmlpro' | |
'body': """ | |
<!doctype html> | |
<html class="no-js" lang="en-US"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="canonical" href=""/> | |
<link rel="apple-touch-icon" href="apple-touch-icon.png"> | |
<!-- Place favicon.ico in the root directory --> | |
<link rel="stylesheet" href="css/normalize.css"> | |
<link rel="stylesheet" href="css/main.css"> | |
<script src="js/vendor/modernizr-2.8.3.min.js"></script> | |
</head> | |
<body> | |
<!--[if lt IE 8]> | |
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p> | |
<![endif]--> | |
<!-- Add your site or application content here --> | |
<p>Hello world! This is HTML5 Boilerplate.</p> | |
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script> | |
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.12.0.min.js"><\/script>')</script> | |
<script src="js/plugins.js"></script> | |
<script src="js/main.js"></script> | |
<!-- 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='https://www.google-analytics.com/analytics.js'; | |
r.parentNode.insertBefore(e,r)}(window,document,'script','ga')); | |
ga('create','UA-XXXXX-X','auto');ga('send','pageview'); | |
</script> | |
</body> | |
</html> | |
""" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment