Styling changes & docs update
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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265
diff --git a/index.html b/index.html
index ed8c0d1..cfa46b1 100644
--- a/index.html
+++ b/index.html
@@ -28,7 +28,7 @@
Language classes are inherited so you can only define the language once for multiple code snippets.
</li>
<li>
- <strong>Incredibly lightweight</strong>
+ <strong>Light as a feather</strong>
The core is 1.5KB minified & gzipped. Languages add 0.3-0.5KB each, themes are around 1KB.
</li>
<li>
@@ -36,8 +36,9 @@
Supports parallelism with Web Workers, if available.
</li>
<li>
- <strong>Very extensible</strong>
- Its plugin architecture makes it easy to add new features. Very easy to define new languages.
+ <strong>Extensible</strong>
+ Define new languages or extend existing ones.
+ Add new features thanks to Prism’s plugin architecture.
</li>
<li>
<strong>Easy styling</strong>
@@ -126,11 +127,9 @@
<section id="plugins">
<h1>Plugins</h1>
<p>Plugins are additional scripts (and CSS code) that extend Prism’s functionality. Many of the following plugins are official, but are released as plugins to keep the Prism Core small for those who don’t need the extra functionality.</p>
- <ul>
- <li><a href="plugins/line-highlight/">Line highlight: Highlight specific lines and line ranges</a></li>
- <li><a href="plugins/show-invisibles/">Show invisibles: Show tabs and line breaks</a></li>
- </ul>
+ <ul></ul>
+ <p>No assembly required to use them. Just select them in the <a href="download.html">download</a> page.</p>
<p>It’s very easy to <a href="extending.html#writing-plugins">write your own Prism plugins</a>. Did you write a plugin for Prism that you want added to this list? <a href="https://github.com/LeaVerou/prism" target="_blank">Send a pull request</a>!</p>
</section>
@@ -149,6 +148,30 @@
<script src="prism.js" data-default-language="markup"></script>
<script src="utopia.js"></script>
<script src="code.js"></script>
+<script>
+(function(){
+var ul = $('#plugins ul');
+
+for (var id in components.plugins) {
+ if (id == 'meta') {
+ continue;
+ }
+
+ var plugin = components.plugins[id];
+
+ $u.element.create('li', {
+ contents: {
+ tag: 'a',
+ prop: {
+ href: components.plugins.meta.path.replace(/\{id}/g, id)
+ },
+ contents: plugin.title || plugin
+ },
+ inside: ul
+ });
+}
+})();
+</script>
</body>
</html>
\ No newline at end of file
diff --git a/plugins/autolinker/index.html b/plugins/autolinker/index.html
index 6533f6a..12f6f87 100644
--- a/plugins/autolinker/index.html
+++ b/plugins/autolinker/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en" class="simple">
+<html lang="en">
<head>
<meta charset="utf-8" />
diff --git a/plugins/line-highlight/index.html b/plugins/line-highlight/index.html
index 3106135..594fd5b 100644
--- a/plugins/line-highlight/index.html
+++ b/plugins/line-highlight/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en" class="simple">
+<html lang="en">
<head>
<meta charset="utf-8" />
diff --git a/plugins/show-invisibles/index.html b/plugins/show-invisibles/index.html
index 48fdba6..684cc27 100644
--- a/plugins/show-invisibles/index.html
+++ b/plugins/show-invisibles/index.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<html lang="en" class="simple">
+<html lang="en">
<head>
<meta charset="utf-8" />
diff --git a/style.css b/style.css
index 2fcd234..9ff5807 100644
--- a/style.css
+++ b/style.css
@@ -1,4 +1,5 @@
@import url(http://fonts.googleapis.com/css?family=Questrial);
+@import url(http://fonts.googleapis.com/css?family=Arvo);
@font-face {
src: url(http://lea.verou.me/logo.otf);
@@ -11,8 +12,9 @@
section h1,
#features li strong,
-header h2 {
- font: italic 100% Baskerville, Palatino Linotype, Georgia, serif;
+header h2,
+footer p {
+ font: 100% Rockwell, Arvo, serif;
}
/*
@@ -36,7 +38,7 @@ a {
}
section h1 {
- font-size: 300%;
+ font-size: 250%;
}
section section h1 {
@@ -180,13 +182,17 @@ header {
}
#features li {
- margin: 0 4em 2em 0;
+ margin: 0 0 2em 0;
list-style: none;
display: inline-block;
width: 27em;
vertical-align: top;
}
+ #features li:nth-child(odd) {
+ margin-right: 5em;
+ }
+
#features li:before {
content: '✓';
float: left;
@@ -199,37 +205,8 @@ header {
#features li strong {
display: block;
margin-bottom: .1em;
- font-size: 230%;
+ font-size: 200%;
}
-
- .download-button {
- display: block;
- padding: .2em .8em .1em;
- border: 1px solid rgba(0,0,0,0.5);
- border-radius: 10px;
- background: #39a1cf;
- box-shadow: 0 2px 10px black,
- inset 0 1px hsla(0,0%,100%,.3),
- inset 0 .4em hsla(0,0%,100%,.2),
- inset 0 10px 20px hsla(0,0%,100%,.25),
- inset 0 -15px 30px rgba(0,0,0,0.3);
- color: white;
- text-shadow: 0 -1px 2px black;
- text-align: center;
- font-size: 250%;
- line-height: 1.5;
- text-transform: uppercase;
- text-decoration: none;
- hyphens: manual;
- }
-
- .download-button:hover {
- background-color: #7fab14;
- }
-
- .download-button:active {
- box-shadow: inset 0 2px 8px rgba(0,0,0,.8);
- }
header .download-button {
float: right;
@@ -240,7 +217,7 @@ header {
position: relative;
z-index: 1;
float: right;
- margin-right: -4em;
+ margin-right: -1em;
text-align: center;
text-transform: uppercase;
letter-spacing: .2em;
@@ -310,6 +287,35 @@ footer {
column-count: 3;
}
+.download-button {
+ display: block;
+ padding: .2em .8em .1em;
+ border: 1px solid rgba(0,0,0,0.5);
+ border-radius: 10px;
+ background: #39a1cf;
+ box-shadow: 0 2px 10px black,
+ inset 0 1px hsla(0,0%,100%,.3),
+ inset 0 .4em hsla(0,0%,100%,.2),
+ inset 0 10px 20px hsla(0,0%,100%,.25),
+ inset 0 -15px 30px rgba(0,0,0,0.3);
+ color: white;
+ text-shadow: 0 -1px 2px black;
+ text-align: center;
+ font-size: 250%;
+ line-height: 1.5;
+ text-transform: uppercase;
+ text-decoration: none;
+ hyphens: manual;
+}
+
+.download-button:hover {
+ background-color: #7fab14;
+}
+
+.download-button:active {
+ box-shadow: inset 0 2px 8px rgba(0,0,0,.8);
+}
+
#toc {
position: fixed;
left: 3em;
diff --git a/templates/header-main.html b/templates/header-main.html
index 70e1052..0599064 100644
--- a/templates/header-main.html
+++ b/templates/header-main.html
@@ -5,4 +5,7 @@
<p>
Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind.
It’s a spin-off from <a href="http://dabblet.com">Dabblet</a> and is tested there daily by thousands.
-</p>
\ No newline at end of file
+</p>
+
+<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
+<script src="http://www.google-analytics.com/ga.js" async></script>
\ No newline at end of file
diff --git a/templates/header-plugins.html b/templates/header-plugins.html
index 050fa67..57a2377 100644
--- a/templates/header-plugins.html
+++ b/templates/header-plugins.html
@@ -4,5 +4,5 @@
<p>
Prism is a new lightweight, extensible syntax highlighter, built with modern web standards in mind.
- It’s a spin-off from <a href="http://dabblet.com">Dabblet</a> and is tested there daily by thousands of users.
+ It’s a spin-off from <a href="http://dabblet.com">Dabblet</a> and is tested there daily by thousands.
</p>
\ No newline at end of file