Skip to content

Instantly share code, notes, and snippets.

@pongstr
Last active August 29, 2015 14:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pongstr/d097a27400ff52a09146 to your computer and use it in GitHub Desktop.
Save pongstr/d097a27400ff52a09146 to your computer and use it in GitHub Desktop.
Markdown Syntax using Github Flavoured Markdown. !@#$%^&*()__!@#$%^&*()
<!doctype html>
<html ng-app="app">
<head>
<meta charset="utf-8">
<title>jQuery Plugin</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<!-- Vanilla Stuff, Normalize Only -->
<link href="/bower/normalize.css/normalize.css" rel="stylesheet">
<!-- Bootstrap & Octicons
<link rel="stylesheet" href="/bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="/bower_components/octicons/octicons/octicons.css">
-->
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
</body>
</html>
// my-wdiget.js
+function ($) { 'use strict';
var Plugin = function (element, options) {
this.element = element;
this.options = options ? options : Plugin.DEFAULTS;
return this;
};
Plugin.VERSION = '0.1.0';
Plugin.DEFAULTS = {};
$.fn.awesome = function (opts) {
var options = $.extend({}, $.fn.awesome.defaults, opts);
return this.each (function () {
var awesome = new Plugin ($(this)[0], options);
awesome();
});
};
$.fn.awesome.defaults = Plugin.DEFAULTS;
}(jQuery);
/*! my-wdiget.less */
@base: #f938ab;
.box-shadow(@style, @c) when (iscolor(@c)) {
-webkit-box-shadow: @style @c;
box-shadow: @style @c;
}
.box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)) {
.box-shadow(@style, rgba(0, 0, 0, @alpha));
}
.box {
color: saturate(@base, 5%);
border-color: lighten(@base, 30%);
div { .box-shadow(0 0 5px, 30%) }
}

Table of Contents

  1. Headings
  2. Paragraph
  3. Lists
  4. Blockquote
  5. Emphasis
  6. Links
  7. Images
  8. Code Formatting

Headings

Markdown Syntax:

h1. Markdown Heading
====================

h2. Markdown Heading
--------------------

### h3. Markdown Heading
#### h4. Markdown Heading
##### h5. Markdown Heading
###### h6. Markdown Heading

Output:

h1. Markdown Heading

h2. Markdown Heading

h3. Markdown Heading

h4. Markdown Heading

h5. Markdown Heading
h6. Markdown Heading

Paragraphs

Markdown Syntax:

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis 
parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper 
nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, 
eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

Output:

Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula.

Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec ullamcorper nulla non metus auctor fringilla. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Donec ullamcorper nulla non metus auctor fringilla.

Lists

Markdown Syntax:

Unordered List

- Lorem ipsum dolor sit amet
- Consectetur adipiscing elit
- Integer molestie lorem at massa
  - Facilisis in pretium nisl aliquet
  - Nulla volutpat aliquam velit
  - Phasellus iaculis neque
- Purus sodales ultricies
- Vestibulum laoreet porttitor sem
- Ac tristique libero volutpat at
- Faucibus porta lacus fringilla vel

Ordered List

1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa
4. Facilisis in pretium nisl aliquet
5. Nulla volutpat aliquam velit
6. Phasellus iaculis neque
7. Purus sodales ultricies
8. Vestibulum laoreet porttitor sem
9. Ac tristique libero volutpat at
10. Faucibus porta lacus fringilla vel

Output:

Unordered List

  • Lorem ipsum dolor sit amet
  • Consectetur adipiscing elit
  • Integer molestie lorem at massa
    • Facilisis in pretium nisl aliquet
    • Nulla volutpat aliquam velit
    • Phasellus iaculis neque
  • Purus sodales ultricies
  • Vestibulum laoreet porttitor sem
  • Ac tristique libero volutpat at
  • Faucibus porta lacus fringilla vel

Ordered List

  1. Lorem ipsum dolor sit amet
  2. Consectetur adipiscing elit
  3. Integer molestie lorem at massa
  4. Facilisis in pretium nisl aliquet
  5. Nulla volutpat aliquam velit
  6. Phasellus iaculis neque
  7. Purus sodales ultricies
  8. Vestibulum laoreet porttitor sem
  9. Ac tristique libero volutpat at
  10. Faucibus porta lacus fringilla vel

Blockquote

Markdown Syntax:

> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.   
> *-Someone famous in Source Title*

Output:

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.
-Someone famous in Source Title

Emphasis

Markdown Syntax:

The following snippet of text is **rendered as bold text**.

The following snippet of text is **rendered as italicized text**.

Output:

The following snippet of text is rendered as bold text.

The following snippet of text is rendered as italicized text.

Links

Markdown Syntax:

[Google](http://google.com/), [Yahoo](http://yahoo.com/), [MSN](http://msn.com/)

Output:

Google, Yahoo, MSN

Images

Markdown Syntax:

![alternate text goes here](/path/to/image.jpg)

Output:

Haters gonna hate

Code Formatting

Inline Code

Use single backticks (`) to format text in a special monospace format. Everything within the backticks appear as-is, with no other special formatting.

Markdown Syntax:

  For example, `<section>` should be wrapped as inline.

Output:

For example, <code>section</code> should be wrapped as inline.


Code Block

You can use triple backticks (```) to format text as its own distinct block.

Markdown Syntax:

```html
  <!doctype html>
  <html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Document Title</title>
    
    <meta name="author" content="author_name">
    <meta name="description" content="description goes here">
    <meta name="keywords" content="keywords goes here">
    
    <link rel="stylesheet" href="/path/to/stylesheet.css">
  </head>
  <body>
    <!-- content goes here -->
    ...
    
    <script src="/path/to/jquery.js">l&t;/script>
    <script src="/path/to/app.js"></script>
  </body>
</html>
```

Output:

  <!doctype html>
  <html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Document Title</title>
    
    <meta name="author" content="author_name">
    <meta name="description" content="description goes here">
    <meta name="keywords" content="keywords goes here">
    
    <link rel="stylesheet" href="/path/to/stylesheet.css">
  </head>
  <body>
    <!-- content goes here -->
    ...
    
    <script src="/path/to/jquery.js"></script>
    <script src="/path/to/app.js"></script>
  </body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment