forked from arturadib/strapdown
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
104 lines (71 loc) · 3.82 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html>
<head>
<title>Strapdown.js - Instant and elegant Markdown documents</title>
<meta name="description" content="Create Markdown documents using JavaScript and Bootstrap themes" />
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-924459-10']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<textarea theme="united" style="display:none;">
# Strapdown.js
Strapdown.js makes it embarrassingly simple to create elegant Markdown documents. **No server-side compilation required.** Use it to quickly document your projects, create tutorials, home pages, etc. (For example, the page you are reading was generated by Strapdown).
**Simply copy the HTML template below and drop it on any static file server**:
```html
<!DOCTYPE html>
<html>
<title>Hello Strapdown</title>
<xmp theme="united" style="display:none;">
# Markdown text goes in here
## Chapter 1
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore
et dolore magna aliqua.
## Chapter 2
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
</xmp>
<script src="http://strapdownjs.com/v/0.2/strapdown.js"></script>
</html>
```
### Features
+ Search-engine friendly
+ Cross-browser compatible (tested with mobile Safari, IE 8/9, Firefox, Chrome)
+ Github-flavored Markdown (tables, syntax highlighting, etc)
+ Themeable
### Themes
Bootstrap themes from [Bootswatch.com](http://bootswatch.com) are included for your convenience. Simply include the attribute `theme` in your `<xmp>` tag with one of the following theme names (default is vanilla Bootstrap):
![Bootswatch](bootswatch.png)
### Self-hosting
For convenience the library is hosted at `strapdownjs.com` (as in the source above), but if you prefer to host it yourself make sure to save *all* files contained in `/v/<version_number>`, as the library dynamically loads all necessary stylesheets, etc.
### Limitations
It's an unlikely scenario, but since Strapdown uses the `<xmp>` tag to wrap your Markdown (so that users don't have to escape special HTML characters), your text can't contain the string `</xmp>`.
### Credits
All credit goes to the projects below that make up most of Strapdown.js:
+ [Marked](https://github.com/chjj/marked/) - Fast Markdown parser in JavaScript
+ [Google Code Prettify](http://code.google.com/p/google-code-prettify/) - Syntax highlighting in JavaScript
+ [Twitter Bootstrap](http://twitter.github.com/bootstrap/) - Beautiful, responsive CSS framework
+ [Bootswatch](http://bootswatch.com) - Additional Bootstrap themes
<hr/>
<div style="background:#fafaff; min-height:50px; padding:0 5px; margin:0">
<div style="float:left;">
<img style="width:40px; margin:0; padding-top:5px; margin-right:10px;" src="https://g.twimg.com/Twitter_logo_blue.png"/>
</div>
<div style="padding-top:15px; padding-bottom:10px;">
Follow the author <a href="http://twitter.com/r2r">@r2r</a> on Twitter
</div>
</div>
<a href="https://github.com/arturadib/strapdown"><img style="position: fixed; top: 0; right: 0; border: 0; z-index: 1000; margin: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a>
</textarea>
<script src="v/0.2/strapdown.js"></script>
</body>
</html>