Skip to content
Browse files

Initial commit

  • Loading branch information...
1 parent b2f40e6 commit 2884deb34ade1b5afe89a15e261b412df15f6329 @anselmdk anselmdk committed
Showing with 18,848 additions and 5 deletions.
  1. +0 −5 README
  2. +186 −0 README.md
  3. +104 −0 _deletepreviewfiles.php
  4. +5 −0 _preview/README.md
  5. +3 −0 _preview/assets/gallery.css
  6. BIN _preview/assets/gallery1.jpg
  7. BIN _preview/assets/gallery10.jpg
  8. BIN _preview/assets/gallery11.jpg
  9. BIN _preview/assets/gallery12.jpg
  10. BIN _preview/assets/gallery2.jpg
  11. BIN _preview/assets/gallery3.jpg
  12. BIN _preview/assets/gallery4.jpg
  13. BIN _preview/assets/gallery5.jpg
  14. BIN _preview/assets/gallery6.jpg
  15. BIN _preview/assets/gallery7.jpg
  16. BIN _preview/assets/gallery8.jpg
  17. BIN _preview/assets/gallery9.jpg
  18. BIN _preview/assets/iceberg.jpg
  19. +335 −0 _preview/gallery-base.html
  20. +335 −0 _preview/gallery-green.html
  21. +296 −0 _preview/page-base.html
  22. +296 −0 _preview/page-green.html
  23. +1,372 −0 _preview/thirdparty/Markdown.Converter.js
  24. +37 −0 config.rb
  25. +4,519 −0 css/cloudy-base.css
  26. +4,515 −0 css/cloudy-green.css
  27. +372 −0 css/editor.css
  28. +13 −0 css/ie.css
  29. +98 −0 css/preview.css
  30. +28 −0 css/print.css
  31. +1 −0 css/typography.css
  32. +35 −0 docs/en/preview-maintenance.md
  33. BIN icons/apple-touch-icon.png
  34. BIN icons/favicon.ico
  35. BIN images/inline/noise.png
  36. +20 −0 javascript/cloudy.js
  37. +29 −0 javascript/ie.js
  38. +83 −0 javascript/preview.js
  39. +117 −0 scss/_cloudy-bootstrap.scss
  40. +119 −0 scss/_cloudy-responsive.scss
  41. +46 −0 scss/_cloudy.scss
  42. +26 −0 scss/_fonts.scss
  43. +20 −0 scss/_form.scss
  44. +223 −0 scss/_layout.scss
  45. +8 −0 scss/_modules.scss
  46. +14 −0 scss/cloudy-base.scss
  47. +55 −0 scss/cloudy-green.scss
  48. +1 −0 scss/colorschemes/_base.scss
  49. +99 −0 scss/colorschemes/_green.scss
  50. +53 −0 scss/editor.scss
  51. +25 −0 scss/ie.scss
  52. +1 −0 scss/layout.css
  53. +1 −0 scss/modules/_blog.scss
  54. +6 −0 scss/modules/_forum.scss
  55. +32 −0 scss/modules/_gallery.scss
  56. +98 −0 scss/preview.scss
  57. +35 −0 scss/print.scss
  58. +1 −0 scss/typography.scss
  59. +121 −0 scss/typography/_cloudy-tables.scss
  60. +222 −0 scss/typography/_cloudy-type.scss
  61. +65 −0 scss/typography/_typography.scss
  62. +1 −0 scss/variables/_base.scss
  63. +102 −0 scss/variables/_green.scss
  64. +15 −0 templates/Includes/Footer.ss
  65. +7 −0 templates/Includes/Logo.ss
  66. +36 −0 templates/Includes/Navigation.ss
  67. +90 −0 templates/Includes/Preview.ss
  68. +15 −0 templates/Includes/PreviewAssets.ss
  69. +40 −0 templates/Includes/Sidebar.ss
  70. +30 −0 templates/Includes/SocialButtons.ss
  71. +12 −0 templates/Includes/TopNavigation.ss
  72. +35 −0 templates/Layout/BlogEntry.ss
  73. +28 −0 templates/Layout/BlogHolder.ss
  74. +28 −0 templates/Layout/BlogTree.ss
  75. +51 −0 templates/Layout/ForumHolder.ss
  76. +29 −0 templates/Layout/GalleryPage.ss
  77. +14 −0 templates/Layout/Page.ss
  78. +48 −0 templates/Layout/Page_results.ss
  79. +86 −0 templates/Page.ss
  80. +13 −0 thirdparty/bootstrap/LICENSE
  81. +28 −0 thirdparty/bootstrap/README.md
  82. BIN thirdparty/bootstrap/img/glyphicons-halflings-white.png
  83. BIN thirdparty/bootstrap/img/glyphicons-halflings.png
  84. +106 −0 thirdparty/bootstrap/js/README.md
  85. +91 −0 thirdparty/bootstrap/js/bootstrap-alert.js
  86. +98 −0 thirdparty/bootstrap/js/bootstrap-button.js
  87. +154 −0 thirdparty/bootstrap/js/bootstrap-carousel.js
  88. +136 −0 thirdparty/bootstrap/js/bootstrap-collapse.js
  89. +92 −0 thirdparty/bootstrap/js/bootstrap-dropdown.js
  90. +209 −0 thirdparty/bootstrap/js/bootstrap-modal.js
  91. +95 −0 thirdparty/bootstrap/js/bootstrap-popover.js
  92. +125 −0 thirdparty/bootstrap/js/bootstrap-scrollspy.js
  93. +130 −0 thirdparty/bootstrap/js/bootstrap-tab.js
  94. +270 −0 thirdparty/bootstrap/js/bootstrap-tooltip.js
  95. +51 −0 thirdparty/bootstrap/js/bootstrap-transition.js
  96. +271 −0 thirdparty/bootstrap/js/bootstrap-typeahead.js
  97. +28 −0 thirdparty/bootstrap/scss/_accordion.scss
  98. +70 −0 thirdparty/bootstrap/scss/_alerts.scss
  99. +22 −0 thirdparty/bootstrap/scss/_breadcrumbs.scss
  100. +146 −0 thirdparty/bootstrap/scss/_button-groups.scss
  101. +165 −0 thirdparty/bootstrap/scss/_buttons.scss
  102. +121 −0 thirdparty/bootstrap/scss/_carousel.scss
  103. +18 −0 thirdparty/bootstrap/scss/_close.scss
  104. +44 −0 thirdparty/bootstrap/scss/_code.scss
  105. +18 −0 thirdparty/bootstrap/scss/_component-animations.scss
  106. +131 −0 thirdparty/bootstrap/scss/_dropdowns.scss
  107. +516 −0 thirdparty/bootstrap/scss/_forms.scss
  108. +8 −0 thirdparty/bootstrap/scss/_grid.scss
  109. +20 −0 thirdparty/bootstrap/scss/_hero-unit.scss
  110. +16 −0 thirdparty/bootstrap/scss/_labels.scss
  111. +17 −0 thirdparty/bootstrap/scss/_layouts.scss
  112. +538 −0 thirdparty/bootstrap/scss/_mixins.scss
  113. +72 −0 thirdparty/bootstrap/scss/_modals.scss
  114. +292 −0 thirdparty/bootstrap/scss/_navbar.scss
Sorry, we could not display the entire diff because it was too big.
View
5 README
@@ -1,5 +0,0 @@
-# Cloudy by Anselm Christophersen
-
-a Silverstripe Theme
-
-Cloudy is due to be released as Open Source end of March 2012.
View
186 README.md
@@ -0,0 +1,186 @@
+# Cloudy Silverstripe Theme
+
+This theme has been handcrafted by [Anselm Christophersen](http://www.anselm.dk) during January/February 2012 for the Silverstripe Theme Contest.
+
+The theme was a finalist, and was ranked overall second in terms of code quality. You can read more about that on the [Silverstripe Blog](http://www.silverstripe.org/and-the-winner-of-the-theme-contest-is../).
+
+You can see some demo pages here:
+
+* [Normal page (blue color scheme)](http://cloudy.title.dk/themes/cloudy/_preview/page-base.html)
+* [Gallery (green color scheme)](http://cloudy.title.dk/themes/cloudy/_preview/gallery-green.html)
+* [Standard installation](http://cloudy.title.dk/)
+
+
+
+
+## Copyright and license
+
+This theme is copygright 2012 title.dk/Anselm Christophersen and licensed under the [Apache license](http://www.apache.org/licenses/LICENSE-2.0). Third party libraries that are used in this theme are licensed under their repective licenses.
+
+
+## Installation
+
+ * Copy the theme into the `themes/` directory of your SilverStripe project. If you've named it correctly, there should be a directory called `themes/cloudy/templates`.
+
+ * Add the following to your `mysite/_config.php` file. Remove any existing `SSViewer::set_theme` lines.
+
+
+
+
+## About this Theme
+
+### Features
+Being built on top of the great [Twitter Bootstrap 2 Framework](http://twitter.github.com/bootstrap/), Cloudy should be seen not only as a theme, but also as a toolbox for getting started with Silverstripe, suitable both for beginners as well as advanced users.
+
+* Works right out-of-the box in both SS3 and SS2.4.
+* Very easy to customize as it includes different color schemes. Furthermore, Cloudy uses the Compass/SCSS preprocessor, so color variables can easily be altered.
+* The CSS is still editable without having Compass installed!
+* Language-select dropdown for multi-language sites, as well as a top menu for logged in users.
+* Features as the top menu, the quotes, and the social buttons are easy to disable.
+* Responsive CSS allows specific layout for small screens, mobile and tablet devices.
+
+
+### Bundled
+* All Twitter Bootstrap 2's widgets, for easily adding advanced buttons, tab navigations, modal boxes, tooltips, and image carousels. If you don't need this, you can easily opt for the small footprint javascript version.
+* Open source icon font Websymbols, allows to easily change icons like the Cloud icon, and to add additional social media and top menu icons.
+* Uses no images beyond that! All graphic effects are CSS3. Falback is provided by Compass's legacy feature.
+* 2 example pages. Use these to get get a head-start with content setup!
+
+### Compatibility
+
+* Works well on all modern browsers and works on IE7/8 as good as it can get.
+* Mostly follows code practices set out in Silverstripe Ltd.'s modules and previous themes.
+* Includes sub themes for blog & forum, and is easy to extend with additional sub themes.
+
+#### Silverstripe Compatibility & Supported Modules
+This theme has been tested with the following Silverstripe configurations
+
+* Silverstripe 3 alpha 2
+ * translatable (requires some minor tweaks)
+ * thinc gallery (requires some minor tweaks)
+ * blog and forum didn't seem two be working so well on this release yet. Hence they have been tested on SS2
+* Silverstripe 2.4.7
+ * blog
+ * forum (the forum support should be seen preliminary)
+
+
+#### SS3 Tweaks
+The current development version of SS3 seems to have some troubles with Fulltextsearchable/translatable. The following has been done to make them work:
+
+* Removing the following line in the `enable` method in `/sapphire/search/FulltextSearchable.php`:
+`if(DB::getConn()->getDatabaseServer() == 'mysql') {`
+
+
+## Working with Content
+
+For content editing, Cloudy mostly adheres to Silverstripe standards.
+A minor non-standard thing is that you can integrate sub headings in the title.
+[See an example here](themes/cloudy/_preview/gallery-base.html).
+This can be done by wrapping your heading within a html `<small>` element like this: `Gallery<small>Another easy-pluggable module</small>`.
+
+The rest is probably best explained by inspecting the example pages (see the `_preview` directory).
+
+Bootstrap comes with some great styles, especially for tables which are all set up in Cloudy. An example of how to use these will be added soon.
+
+## Configuration
+
+### Icons
+The theme comes bundled with many icons. See examples here:
+
+* [The Websymbols typeface](http://www.justbenicestudio.com/studio/websymbols/)
+* [The Glyphicicons bundled with Twitter Bootstrap](http://twitter.github.com/bootstrap/base-css.html#icons)
+
+Use above reference to change the logo icon in `Logo.ss`, the toolbar icons in `TopNavigation.ss`, and the social icons in `Footer.ss`. All files are found in `templates/Includes`.
+
+
+
+### Search and Language Dropdown
+
+Examples for a Cloudy configuration.
+
+You can add these in your `/mysite/_config.php` file:
+
+ #Enable Search
+ FulltextSearchable::enable();
+
+ #Translatable
+ #This requires the translatable and a couple of small tweaks
+ #in the current SS3 alpha
+ Object::add_extension('SiteTree', 'Translatable');
+ Object::add_extension('SiteConfig', 'Translatable');
+
+### Social Buttons
+
+This theme contains a template with social media buttons.
+As their many dependencies are not a joy to develop with, they have been uncommented, but are easy to enable for live sites.
+In order to enable the buttons, edit `templates/Includes/Sidebar.ss`, and change the uncommented code to this: `<% include SocialButtons %>`.
+
+
+### Color Schemes
+Cloudy comes with 2 color schemes. Green and base.
+The base color scheme mainly uses the Twitter Bootstrap colors. Fortunately they fit very well with the Silverstripe colors.
+
+#### Change the Color Scheme
+
+Switching between the color schemes can be done by editing the `templates/Page.ss` file. Find the line that contains `require themedCSS` and change it to either `cloudy-base` or `cloudy-green`, or which ever additional color scheme you might have installed. The name corresponds to the css file to be found in the `css` directory.
+
+#### Rolling your own Color Scheme
+Editing the css is fairly straight-forward. It is recommended to not overwrite the current themes, but to make your own, and call it something like `cloudy-myscheme`.
+The recommended way is to do this by using [Compass](http://compass-style.org/), but you can also perfectly just use plain CSS.
+
+##### Using plain CSS
+1. Copy either `css/cloudy-base.css` or `css/cloudy-green.css`, and create your own file in the `css` directory
+2. Edit the `require themedCSS` part in `templates/Page.ss` to reflect your new scheme.
+3. Start editing
+
+##### Using Compass
+Using Compass you can take advantage of built-in variables and all modules from the Twitter Bootstrap 2 library, which have been carefully converted to SCSS by [Brajeshwar](https://github.com/brajeshwar/bootstrap-sass-scss-compass).
+Start by having a look at `scss/cloudy-green.scss`. That should take you a long way. And don't forget to cd into the cloudy directory and running `compass watch`.
+
+When working with compass you may remove the hash in front of the last line in `config.rb`: `sass_options = {:debug_info => true}`. If you do this, compass will compile your stylesheets with [FireSass](https://github.com/nex3/firesass) debug info, which is very useful when developing (you'll need to install the FireSass Firebug extension for this to work).
+
+## The Preview Feature
+The theme contains a "Preview" feature to show some live examples on changing colors, and to show some typography and module examples.
+
+### Removing the Preview Feature
+The "Preview" feature adds some JS/CSS and html code to the theme. As these are only for illustration purposes, it also contains a script to easily remove the entire preview feature.
+
+### Troubleshooting Problems when removing the Preview Feature
+Usually the "Preview Feature" can be removed easily by just pressing the button `Delete preview files` on the home page.
+If this for some reason doesn't work, here's some info how to solve this:
+
+
+* **First try: Changing permissions**
+ * If you are on OSX/Linux, try to cd into the themes folder and run `chmod -R 777 ./cloudy`.
+ * If you are running Windows, file permissions can be adjusted by right-clicking the Cloudy folder, and editing properties.
+ * If the theme has been directly installed on a web server, log in via ftp, right-click the cloudy directory, give it all permissions, and remember to click the option to recursively do the same for all sub directories
+* **Second try: Removing files manually.**
+Sometimes you would be in the situation, that you don't have access to editing your permissions. In this case, here is info on how to go ahead, removing the preview files manually:
+ * Delete `_deletepreviewfiles.php`. This is the file that should have automated your work in the first place.
+ * Delete the `_preview` directory
+ * In Delete `templates/Includes/` delete `Preview.ss` and `PreviewAssets.ss`
+ * Delete `javascript/preview.js`
+ * Delete `scss/preview.scss` and `css/preview.css"`
+ * Edit `templates/Page.ss` and delete the line `<% include PreviewAssets %>`
+ * Edit `templates/Layout/Page.ss` and delta the line `<% include Preview %>`
+
+**Remember:** If you are doing this on a live site, once the preview files have been removed, it is good practice to remove the write access to your theme folder.
+
+
+## Planned Features
+As Cloudy has been designed and build as a contribution to the 2012 Silverstripe Theme Contest, not all features made it to become part of the initial release.
+The following features are planned for coming releases:
+
+* Completely translatable (I didn't make it for the deadline, sorry...). Also the preview feature and the documentation.
+* Cutting down the length of this Readme file and placing additional documentation in a `docs/en` folder. This way other translations have proper place.
+* Additional color schemes
+* 3rd level navigation: Use tabs!
+* Support the most popular and actively maintained modules
+These are planned to be kept fully supported (and others will probably be added)
+ * blog
+ * userforms
+ * event calendar
+* More typography examples, showing all headings, and table layouts
+ * documentation on how to properly use the `editor.css` styles within tinyMCE
+* Built-in JS scheme selector in examples
+* Fixing some minor issues with the responsive design in portrait mode on iPad
View
104 _deletepreviewfiles.php
@@ -0,0 +1,104 @@
+<?php //Run this script with ?delete=1 to delete all preview files
+
+//Uncomment the two lines below to activate this script
+echo "This script has been temporarily disabled while the jury is looking at it, but it works! <br />" .
+"See the file <code>_deletepreviewfiles.php</code> for reference.";
+exit();
+
+
+if (isset($_GET["delete"])) {
+ $msg = "";
+
+ //Cleaning up Page.ss 1
+ $file = "templates/Page.ss";
+ if (!is_writeable($file)) {
+ $msg = "The file \"$file\" can't be edited. Please check your permissions and try again.";
+ exit();
+ }
+ $str = file_get_contents($file);
+ $str = str_replace("<%-- Loading of preview assets. They will be deleted automatically if you choose not to keep them --%>", "", $str);
+ $str = str_replace("<% include PreviewAssets %>", "", $str);
+ file_put_contents($file, $str);
+
+ //Cleaning up Page.ss 2
+ $file = "templates/Layout/Page.ss";
+ if (!is_writeable($file)) {
+ $msg = "The file \"$file\" can't be edited. Please check your permissions and try again.";
+ exit();
+ }
+ $str = file_get_contents($file);
+ $str = str_replace("<%-- Loading of the preview template. It will be deleted automatically if you choose not to keep it --%>", "", $str);
+ $str = str_replace("<% include Preview %>", "", $str);
+ file_put_contents($file, $str);
+
+
+ //exit();
+
+ //removing includes from Page.ss
+
+ //deleting includes & js, css & scss
+ deleteFile("templates/Includes/Preview.ss");
+ deleteFile("templates/Includes/PreviewAssets.ss");
+ deleteFile("javascript/preview.js");
+ deleteFile("scss/preview.scss");
+ deleteFile("css/preview.css");
+
+
+ //deleting the preview directory
+ $directory = "_preview";
+ $delRT = deleteDirectory($directory);
+ if ($delRT == 1) {
+ //nothing
+ } else {
+ echo $delRT;
+ exit();
+ }
+
+ //deleting this file
+ deleteFile("_deletepreviewfiles.php");
+
+ echo "success";
+ exit();
+
+} else {
+ echo "You need to append ?delete=1 to delete the preview files";
+ exit();
+}
+
+
+function deleteFile($file){
+ if (!is_writeable($file)) {
+ return "The file \"$file\" can't be deleted. Please check your permissions and try again.";
+ }
+
+ $msg = "";
+
+ if (file_exists($file)) {
+ unlink($file);
+ $msg = "deleted file $file";
+ } else {
+ $msg = "File doesn't exist";
+ }
+
+ return $msg;
+
+}
+
+
+
+function deleteDirectory($dir) {
+ if (!is_writeable($dir)) {
+ return "The directory \"$dir\" can't be deleted. Please check your permissions and try again.";
+ }
+
+ if (!file_exists($dir)) return true;
+ if (!is_dir($dir)) return unlink($dir);
+ foreach (scandir($dir) as $item) {
+ if ($item == '.' || $item == '..') continue;
+ //echo $item . "<br />";
+ if (!deleteDirectory($dir.DIRECTORY_SEPARATOR.$item)) return false;
+ }
+ //this sometimes gives errors, it seems it has something to do with the svn files
+ //the easiest bet to counter this on a OSX/LINUX environment is to cd into the themes folder and run "chmod -R 777 ./cloudy"
+ return rmdir($dir);
+}
View
5 _preview/README.md
@@ -0,0 +1,5 @@
+# Cloudy Preview
+This directory containes a number of preview files so you can get an impression of how cloudy looks, without having to install the theme, and corresponding modules.
+The folder also contains some asset files, that only serve as illustration.
+
+Feel free to delete this folder once you have installed the theme!
View
3 _preview/assets/gallery.css
@@ -0,0 +1,3 @@
+
+ul#Gallery {list-style: none;margin:10px 0px 0px 0px;padding:0px;}
+ul#Gallery li {float:left;padding:0px 5px 5px 0px;}
View
BIN _preview/assets/gallery1.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery10.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery11.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery12.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery2.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery3.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery4.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery5.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery6.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery7.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery8.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/gallery9.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN _preview/assets/iceberg.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
335 _preview/gallery-base.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Cloudy - Gallery</title>
+ <meta name="generator" content="SilverStripe - http://silverstripe.org" />
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+<meta name="x-page-id" content="7" />
+<meta name="x-cms-edit-link" content="admin/page/edit/show/7" />
+<link rel="alternate" type="text/html" title="Gallerie" hreflang="de-DE" href="/home/gallerie/" />
+
+
+
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <link rel="apple-touch-icon-precomposed" href="themes/cloudy/icons/apple-touch-icon.png" />
+
+
+ <link rel="shortcut icon" href="../icons/favicon.ico" />
+
+
+
+ <link rel="stylesheet" media="print" href="../css/print.css" />
+
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+
+ <script src="../javascript/cloudy.js"></script>
+
+
+ <script src="../thirdparty/bootstrap/js/bootstrap-dropdown.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-transition.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-collapse.js"></script>
+ <!--
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-alert.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-modal.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-scrollspy.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tab.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tooltip.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-popover.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-button.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-carousel.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-typeahead.js"></script>
+ -->
+
+
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <!--[if lte IE 9]>
+ <link rel="stylesheet" href="../thirdparty/heygrady-textshadow/jquery.textshadow.css">
+ <script src="../thirdparty/heygrady-textshadow/jquery.textshadow.js"></script>
+ <link rel="stylesheet" href="../css/ie.css">
+ <script src="../javascript/ie.js"></script>
+ <![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="assets/gallery.css?m=1327802097" />
+ <link rel="stylesheet" type="text/css" href="../css/cloudy-base.css?m=1329617235" />
+</head>
+
+ <body class="GalleryPage">
+ <div class="container">
+ <div class="alert alert-info" style="position:absolute;top:4px;z-index:100;padding:4px 10px 4px 10px;margin-right:10px;">
+ <strong>NOTE:</strong> This is a preview of the Cloudy theme. <a class="btn " href="/"><i class="icon-home"></i> Back to my site</a>
+ </div>
+
+ <header>
+ <div id="Logo">
+
+<a href="/">
+
+ <h1>Cloudy <span class="icon">C</span></h1>
+ <p>a Silverstripe theme by Anselm Christophersen</p>
+
+
+</a>
+
+ </div>
+ <div id="TopNavigation">
+
+
+
+ <span>You're logged in as Default Admin </span>
+ <span>|</span>
+ <a href="/admin/myprofile" target="_blank"><span class="icon">U </span><span class="text">Edit profile</span></a>
+ <span>|</span>
+ <a href="/admin" target="_blank"><span class="icon">S </span><span class="text">Admin</span></a>
+
+ <span>|</span>
+ <a href="/Security/logout"><span class="icon">X </span><span class="text">Log out</span></a>
+
+
+ </div>
+ <form id="SearchForm_SearchForm" action="/gallery/SearchForm" method="get" enctype="application/x-www-form-urlencoded">
+ <fieldset>
+
+ <div id="Search" class="field text nolabel">
+
+ <div class="middleColumn">
+
+ <input type="text" name="Search" value="Search" class="text nolabel" id="SearchForm_SearchForm_Search" />
+ </div>
+
+
+</div>
+
+ <input type="hidden" name="locale" value="en_US" class="hidden" id="SearchForm_SearchForm_locale">
+
+
+
+
+ <input type="submit" name="action_results" value="Go" class="action action" id="SearchForm_SearchForm_action_results">
+
+
+ </fieldset>
+</form>
+
+ </header>
+
+ <div id="Navigation">
+
+<div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+
+ <div class="nav-collapse">
+ <ul class="nav">
+
+ <li class="link first"><a href="/" title="Home">Home</a></li>
+
+ <li class="link first"><a href="/about-the-theme/" title="About the Theme">About the Theme</a></li>
+
+ <li class="link first"><a href="/about-us/" title="About Us">About Us</a></li>
+
+ <li class="link first"><a href="/contact-us/" title="Contact Us">Contact Us</a></li>
+
+ <li class="current first"><a href="/gallery/" title="Gallery &lt;small&gt;Another easy-pluggable module&lt;/small&gt;">Gallery</a></li>
+
+
+ <li class="link first"><a href="/blog/" title="Blog">Blog</a></li>
+
+ </ul>
+
+ <ul class="nav pull-right">
+ <li class="dropdown">
+ <a href="/gallery/#"
+ class="dropdown-toggle"
+ data-toggle="dropdown">
+ English (US)
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+
+
+ <li class="de-DE"><a href="/home/gallerie/">German</a></li>
+
+ </ul>
+ </li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+</div>
+ </div>
+
+ <div id="Layout">
+
+<div class="page-header">
+ <h1>Gallery <small>Another easy-pluggable module</small></h1>
+</div>
+<div class="row">
+ <div class="span3">
+
+<div id="Sidebar">
+
+
+ <div class="content well" style="padding: 8px 0;">
+
+ <ul class="nav nav-list">
+
+
+ <li class="current">
+ <a href="/gallery/">
+ <i class="icon-home icon-white"></i>
+ Gallery
+ </a>
+ </li>
+
+
+
+ <li class="link">
+ <a href="/gallery/another-gallery/">
+
+ <i class="icon-file "></i>
+ Another Gallery
+ </a>
+ </li>
+
+ <li class="link">
+ <a href="/gallery/yet-another-gallery/">
+ <i class="icon-file "></i>
+ Yet another gallery
+ </a>
+ </li>
+
+
+ </ul>
+ </div>
+
+
+
+ <blockquote>
+ <p>Software built on pride and love of subject is superior to software built for profit.</p>
+ <small>Ravi Simhambhatla, CIO, Virgin America</small>
+ </blockquote>
+
+
+
+
+
+
+ </div>
+
+ </div>
+ <div class="span9 typography">
+
+
+ <ul id="Gallery">
+
+ <li>
+ <a title="gallery 1">
+ <img src="assets/gallery1.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 2">
+ <img src="assets/gallery2.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 3">
+ <img src="assets/gallery3.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 4">
+ <img src="assets/gallery4.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 5">
+ <img src="assets/gallery5.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 6">
+ <img src="assets/gallery6.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 7">
+ <img src="assets/gallery7.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 8">
+ <img src="assets/gallery8.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 9">
+ <img src="assets/gallery9.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 10">
+ <img src="assets/gallery10.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 11">
+ <img src="assets/gallery11.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 12">
+ <img src="assets/gallery12.jpg" alt="" />
+ </a>
+ </li>
+
+ </ul>
+
+
+ <div class="clearfix">
+ <p>This is an example of a simple gallery. The gallery used here is Chris Weber's very simple gallery. <br/>It is available here: <a href="https://github.com/webair/thinc.silverstripe.gallery">https://github.com/webair/thinc.silverstripe.gallery</a>.</p>
+
+ </div>
+
+
+ </div>
+</div>
+ </div>
+ <footer>
+
+<div class="content typography left">
+ <p>Copyright &copy; 2012 | Cloudy: a Silverstripe theme by Anselm Christophersen |
+ Powered by <a href="http://silverstripe.org" target="_blank">SilverStripe</a>. <br />
+
+ </p>
+</div>
+
+
+<div class="content typography right">
+ <div><span class="icon">R</span> <a target="_blank" href="http://www.anselm.dk">www.anselm.dk</a></div> |
+ <div><span class="icon">@</span> <a target="_blank" href="mailto:ac@anselm.dk">ac@anselm.dk</a></div> |
+ <div><span class="icon">t</span> <a target="_blank" href="http://twitter.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">f</span> <a target="_blank" href="http://facebook.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">m</span> <a target="_blank" href="http://vimeo.com/anselmdk">anselmdk</a></div>
+
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
View
335 _preview/gallery-green.html
@@ -0,0 +1,335 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Cloudy - Gallery</title>
+ <meta name="generator" content="SilverStripe - http://silverstripe.org" />
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+<meta name="x-page-id" content="7" />
+<meta name="x-cms-edit-link" content="admin/page/edit/show/7" />
+<link rel="alternate" type="text/html" title="Gallerie" hreflang="de-DE" href="/home/gallerie/" />
+
+
+
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <link rel="apple-touch-icon-precomposed" href="themes/cloudy/icons/apple-touch-icon.png" />
+
+
+ <link rel="shortcut icon" href="../icons/favicon.ico" />
+
+
+
+ <link rel="stylesheet" media="print" href="../css/print.css" />
+
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+
+ <script src="../javascript/cloudy.js"></script>
+
+
+ <script src="../thirdparty/bootstrap/js/bootstrap-dropdown.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-transition.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-collapse.js"></script>
+ <!--
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-alert.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-modal.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-scrollspy.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tab.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tooltip.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-popover.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-button.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-carousel.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-typeahead.js"></script>
+ -->
+
+
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <!--[if lte IE 9]>
+ <link rel="stylesheet" href="../thirdparty/heygrady-textshadow/jquery.textshadow.css">
+ <script src="../thirdparty/heygrady-textshadow/jquery.textshadow.js"></script>
+ <link rel="stylesheet" href="../css/ie.css">
+ <script src="../javascript/ie.js"></script>
+ <![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="assets/gallery.css?m=1327802097" />
+ <link rel="stylesheet" type="text/css" href="../css/cloudy-green.css?m=1329617235" />
+</head>
+
+ <body class="GalleryPage">
+ <div class="container">
+ <div class="alert alert-info" style="position:absolute;top:4px;z-index:100;padding:4px 10px 4px 10px;margin-right:10px;">
+ <strong>NOTE:</strong> This is a preview of the Cloudy theme. <a class="btn " href="/"><i class="icon-home"></i> Back to my site</a>
+ </div>
+
+ <header>
+ <div id="Logo">
+
+<a href="/">
+
+ <h1>Cloudy <span class="icon">C</span></h1>
+ <p>a Silverstripe theme by Anselm Christophersen</p>
+
+
+</a>
+
+ </div>
+ <div id="TopNavigation">
+
+
+
+ <span>You're logged in as Default Admin </span>
+ <span>|</span>
+ <a href="/admin/myprofile" target="_blank"><span class="icon">U </span><span class="text">Edit profile</span></a>
+ <span>|</span>
+ <a href="/admin" target="_blank"><span class="icon">S </span><span class="text">Admin</span></a>
+
+ <span>|</span>
+ <a href="/Security/logout"><span class="icon">X </span><span class="text">Log out</span></a>
+
+
+ </div>
+ <form id="SearchForm_SearchForm" action="/gallery/SearchForm" method="get" enctype="application/x-www-form-urlencoded">
+ <fieldset>
+
+ <div id="Search" class="field text nolabel">
+
+ <div class="middleColumn">
+
+ <input type="text" name="Search" value="Search" class="text nolabel" id="SearchForm_SearchForm_Search" />
+ </div>
+
+
+</div>
+
+ <input type="hidden" name="locale" value="en_US" class="hidden" id="SearchForm_SearchForm_locale">
+
+
+
+
+ <input type="submit" name="action_results" value="Go" class="action action" id="SearchForm_SearchForm_action_results">
+
+
+ </fieldset>
+</form>
+
+ </header>
+
+ <div id="Navigation">
+
+<div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+
+ <div class="nav-collapse">
+ <ul class="nav">
+
+ <li class="link first"><a href="/" title="Home">Home</a></li>
+
+ <li class="link first"><a href="/about-the-theme/" title="About the Theme">About the Theme</a></li>
+
+ <li class="link first"><a href="/about-us/" title="About Us">About Us</a></li>
+
+ <li class="link first"><a href="/contact-us/" title="Contact Us">Contact Us</a></li>
+
+ <li class="current first"><a href="/gallery/" title="Gallery &lt;small&gt;Another easy-pluggable module&lt;/small&gt;">Gallery</a></li>
+
+
+ <li class="link first"><a href="/blog/" title="Blog">Blog</a></li>
+
+ </ul>
+
+ <ul class="nav pull-right">
+ <li class="dropdown">
+ <a href="/gallery/#"
+ class="dropdown-toggle"
+ data-toggle="dropdown">
+ English (US)
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+
+
+ <li class="de-DE"><a href="/home/gallerie/">German</a></li>
+
+ </ul>
+ </li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+</div>
+ </div>
+
+ <div id="Layout">
+
+<div class="page-header">
+ <h1>Gallery <small>Another easy-pluggable module</small></h1>
+</div>
+<div class="row">
+ <div class="span3">
+
+<div id="Sidebar">
+
+
+ <div class="content well" style="padding: 8px 0;">
+
+ <ul class="nav nav-list">
+
+
+ <li class="current">
+ <a href="/gallery/">
+ <i class="icon-home icon-white"></i>
+ Gallery
+ </a>
+ </li>
+
+
+
+ <li class="link">
+ <a href="/gallery/another-gallery/">
+
+ <i class="icon-file "></i>
+ Another Gallery
+ </a>
+ </li>
+
+ <li class="link">
+ <a href="/gallery/yet-another-gallery/">
+ <i class="icon-file "></i>
+ Yet another gallery
+ </a>
+ </li>
+
+
+ </ul>
+ </div>
+
+
+
+ <blockquote>
+ <p>Software built on pride and love of subject is superior to software built for profit.</p>
+ <small>Ravi Simhambhatla, CIO, Virgin America</small>
+ </blockquote>
+
+
+
+
+
+
+ </div>
+
+ </div>
+ <div class="span9 typography">
+
+
+ <ul id="Gallery">
+
+ <li>
+ <a title="gallery 1">
+ <img src="assets/gallery1.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 2">
+ <img src="assets/gallery2.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 3">
+ <img src="assets/gallery3.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 4">
+ <img src="assets/gallery4.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 5">
+ <img src="assets/gallery5.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 6">
+ <img src="assets/gallery6.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 7">
+ <img src="assets/gallery7.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 8">
+ <img src="assets/gallery8.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 9">
+ <img src="assets/gallery9.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 10">
+ <img src="assets/gallery10.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 11">
+ <img src="assets/gallery11.jpg" alt="" />
+ </a>
+ </li>
+ <li>
+ <a title="gallery 12">
+ <img src="assets/gallery12.jpg" alt="" />
+ </a>
+ </li>
+
+ </ul>
+
+
+ <div class="clearfix">
+ <p>This is an example of a simple gallery. The gallery used here is Chris Weber's very simple gallery. <br/>It is available here: <a href="https://github.com/webair/thinc.silverstripe.gallery">https://github.com/webair/thinc.silverstripe.gallery</a>.</p>
+
+ </div>
+
+
+ </div>
+</div>
+ </div>
+ <footer>
+
+<div class="content typography left">
+ <p>Copyright &copy; 2012 | Cloudy: a Silverstripe theme by Anselm Christophersen |
+ Powered by <a href="http://silverstripe.org" target="_blank">SilverStripe</a>. <br />
+
+ </p>
+</div>
+
+
+<div class="content typography right">
+ <div><span class="icon">R</span> <a target="_blank" href="http://www.anselm.dk">www.anselm.dk</a></div> |
+ <div><span class="icon">@</span> <a target="_blank" href="mailto:ac@anselm.dk">ac@anselm.dk</a></div> |
+ <div><span class="icon">t</span> <a target="_blank" href="http://twitter.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">f</span> <a target="_blank" href="http://facebook.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">m</span> <a target="_blank" href="http://vimeo.com/anselmdk">anselmdk</a></div>
+
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
View
296 _preview/page-base.html
@@ -0,0 +1,296 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Cloudy - Good Design Takes Time</title>
+ <meta name="generator" content="SilverStripe - http://silverstripe.org" />
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+<meta name="x-page-id" content="17" />
+<meta name="x-cms-edit-link" content="admin/page/edit/show/17" />
+<link rel="alternate" type="text/html" title="Good Design Takes Time" hreflang="de-DE" href="/good-design-takes-time-de-de/" />
+
+
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <link rel="apple-touch-icon-precomposed" href="themes/cloudy/icons/apple-touch-icon.png" />
+
+
+ <link rel="shortcut icon" href="../icons/favicon.ico" />
+
+
+
+ <link rel="stylesheet" media="print" href="../css/print.css" />
+
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+
+ <script src="../javascript/cloudy.js"></script>
+
+
+ <script src="../thirdparty/bootstrap/js/bootstrap-dropdown.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-transition.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-collapse.js"></script>
+ <!--
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-alert.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-modal.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-scrollspy.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tab.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tooltip.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-popover.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-button.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-carousel.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-typeahead.js"></script>
+ -->
+
+
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <!--[if lte IE 9]>
+ <link rel="stylesheet" href="../thirdparty/heygrady-textshadow/jquery.textshadow.css">
+ <script src="../thirdparty/heygrady-textshadow/jquery.textshadow.js"></script>
+ <link rel="stylesheet" href="../css/ie.css">
+ <script src="../javascript/ie.js"></script>
+ <![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="../css/cloudy-base.css?m=1329617235" />
+</head>
+
+ <body class="Page">
+ <div class="container">
+ <div class="alert alert-info" style="position:absolute;top:4px;z-index:100;padding:4px 10px 4px 10px;margin-right:10px;">
+ <strong>NOTE:</strong> This is a preview of the Cloudy theme. <a class="btn " href="/"><i class="icon-home"></i> Back to my site</a>
+ </div>
+ <header>
+ <div id="Logo">
+
+<a href="/">
+
+ <h1>Cloudy <span class="icon">C</span></h1>
+ <p>a Silverstripe theme by Anselm Christophersen</p>
+
+
+</a>
+
+ </div>
+ <div id="TopNavigation">
+
+
+
+ <span>You're logged in as Default Admin </span>
+ <span>|</span>
+ <a href="/admin/myprofile" target="_blank"><span class="icon">U </span><span class="text">Edit profile</span></a>
+ <span>|</span>
+ <a href="/admin" target="_blank"><span class="icon">S </span><span class="text">Admin</span></a>
+
+ <span>|</span>
+ <a href="/Security/logout"><span class="icon">X </span><span class="text">Log out</span></a>
+
+
+ </div>
+ <form id="SearchForm_SearchForm" action="/about-the-theme/good-design-takes-time/SearchForm" method="get" enctype="application/x-www-form-urlencoded">
+ <fieldset>
+
+ <div id="Search" class="field text nolabel">
+
+ <div class="middleColumn">
+
+ <input type="text" name="Search" value="Search" class="text nolabel" id="SearchForm_SearchForm_Search" />
+ </div>
+
+
+</div>
+
+ <input type="hidden" name="locale" value="en_US" class="hidden" id="SearchForm_SearchForm_locale">
+
+
+
+
+ <input type="submit" name="action_results" value="Go" class="action action" id="SearchForm_SearchForm_action_results">
+
+
+ </fieldset>
+</form>
+
+ </header>
+
+ <div id="Navigation">
+
+<div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+
+ <div class="nav-collapse">
+ <ul class="nav">
+
+ <li class="link first"><a href="/" title="Home">Home</a></li>
+
+ <li class="section first"><a href="/about-the-theme/" title="About the Theme">About the Theme</a></li>
+
+ <li class="link first"><a href="/about-us/" title="About Us">About Us</a></li>
+
+ <li class="link first"><a href="/contact-us/" title="Contact Us">Contact Us</a></li>
+
+ <li class="link first"><a href="/gallery/" title="Gallery &lt;small&gt;Another easy-pluggable module&lt;/small&gt;">Gallery</a></li>
+
+
+ <li class="link first"><a href="/blog/" title="Blog">Blog</a></li>
+
+ </ul>
+
+ <ul class="nav pull-right">
+ <li class="dropdown">
+ <a href="/about-the-theme/good-design-takes-time/#"
+ class="dropdown-toggle"
+ data-toggle="dropdown">
+ English (US)
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+
+
+ <li class="de-DE"><a href="/good-design-takes-time-de-de/">German</a></li>
+
+ </ul>
+ </li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+</div>
+ </div>
+
+ <div id="Layout">
+
+<div class="page-header">
+ <h1>Good Design Takes Time</h1>
+</div>
+<div class="row">
+ <div class="span3">
+
+<div id="Sidebar">
+
+
+ <div class="content well" style="padding: 8px 0;">
+ <ul class="nav nav-list">
+
+
+
+ <li class="section">
+ <a href="/about-the-theme/">
+ <i class="icon-home "></i>
+ About the Theme
+ </a>
+ </li>
+
+
+
+ <li class="link">
+ <a href="/about-the-theme/some-more-info/">
+ <i class="icon-file "></i>
+
+ Some more Info
+ </a>
+ </li>
+
+ <li class="current">
+ <a href="/about-the-theme/good-design-takes-time/">
+ <i class="icon-file icon-white"></i>
+ Good Design Takes Time
+ </a>
+ </li>
+
+ <li class="link">
+
+ <a href="/about-the-theme/check-out-the-gallery/">
+ <i class="icon-file "></i>
+ Check out the Gallery
+ </a>
+ </li>
+
+ </ul>
+ </div>
+
+
+
+ <blockquote>
+ <p>Software built on pride and love of subject is superior to software built for profit.</p>
+
+ <small>Ravi Simhambhatla, CIO, Virgin America</small>
+ </blockquote>
+
+
+
+
+
+
+ </div>
+ </div>
+ <div class="span9 typography">
+ <div class="pull-right"><img class="right" title="" src="assets/iceberg.jpg" alt=""/><br/><em class="imgtitle right">Image by Uwe Kils/Wikipedia</em></div>
+<h2>Standing on the Shoulders of Giants</h2>
+
+<p>Today we have a plethora of possibilities, but time is scarce.<br/> There is so much great open source software shooting up everywhere.<br/> And, good design takes time.</p>
+<p>In this hand-craftet theme for <strong>Silverstripe 2.4</strong> and <strong>Silverstripe 3</strong>, I'm combining these factors. The outcome is a simple, easy-to use, but yet multi faceted theme. The <em>Cloudy</em> theme is inspired by, and borrows some of the code from the great <em>Twitter Bootstrap 2</em> framework. Thank you <a>@mdo</a>, and <a>@fat</a>, and everyone <a>@twitter</a>! <br/>And, thank you of course, everyone <a>@silverstripe</a> for providing the world with such a great product. I'm enjoying it every day.</p>
+
+<p>A special dedication goes to all my great colleagues <a>@cphcloud</a>. The title is for you, and I'll also provide a CPH Cloud-colored color scheme ;).</p>
+<p><em>Anselm Christophersen (<a>@anselmdk</a>), February 2012</em></p>
+<h3>Features</h3>
+<ul><li>Works right out-of-the box in both <em>SS3</em> and <em>SS2.4</em>.</li>
+
+<li>Very easy to customize as it includes different color schemes. Furthermore, <em>Cloudy</em> uses the <em>Compass/SCSS</em> preprocessor, so color variables can easily be altered. <br/>The CSS is still editable without having <em>Compass</em> installed!</li>
+<li>Language-select dropdown for multi-language sites, as well as a top menu for logged in users.</li>
+<li>Features as the top menu, the quotes, and the social buttons are easy to disable.</li>
+<li>Responsive CSS allows specific layout for small screens, mobile and tablet devices.</li>
+
+</ul><h3>Bundled</h3>
+<ul><li>All <em>Twitter Bootstrap 2's</em> widgets, for easily adding advanced buttons, tab navigations, modal boxes, tooltips, and image carousels. If you don't need this, you can easily opt for the small footprint javascript version.</li>
+<li>Open source icon font <a href="http://www.justbenicestudio.com/studio/websymbols/">Websymbols</a>, allows to easily change icons like the <em>Cloud</em> icon, and to add additional social media and top menu icons.</li>
+<li>Uses no images beyond that! All graphic effects are CSS3. Falback is provided by <em>Compass</em>'s legacy feature.</li>
+
+<li>2 example pages. Use these to get get a head-start with content setup!</li>
+</ul><h3>Compatibility</h3>
+<ul><li>Works well on all modern browsers and works on IE7/8 as good as it can get.</li>
+<li>Mostly follows code practices set out in <em>Silverstripe Ltd.'s</em> modules and previous themes.</li>
+<li>Includes sub themes for blog &amp; forum, and is easy to extend with additional sub themes.</li>
+</ul>
+
+
+
+
+ </div>
+
+</div>
+ </div>
+ <footer>
+
+<div class="content typography left">
+ <p>Copyright &copy; 2012 | Cloudy: a Silverstripe theme by Anselm Christophersen |
+ Powered by <a href="http://silverstripe.org" target="_blank">SilverStripe</a>. <br />
+ </p>
+</div>
+
+
+<div class="content typography right">
+ <div><span class="icon">R</span> <a target="_blank" href="http://www.anselm.dk">www.anselm.dk</a></div> |
+ <div><span class="icon">@</span> <a target="_blank" href="mailto:ac@anselm.dk">ac@anselm.dk</a></div> |
+ <div><span class="icon">t</span> <a target="_blank" href="http://twitter.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">f</span> <a target="_blank" href="http://facebook.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">m</span> <a target="_blank" href="http://vimeo.com/anselmdk">anselmdk</a></div>
+
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
View
296 _preview/page-green.html
@@ -0,0 +1,296 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <title>Cloudy - Good Design Takes Time</title>
+ <meta name="generator" content="SilverStripe - http://silverstripe.org" />
+<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
+<meta name="x-page-id" content="17" />
+<meta name="x-cms-edit-link" content="admin/page/edit/show/17" />
+<link rel="alternate" type="text/html" title="Good Design Takes Time" hreflang="de-DE" href="/good-design-takes-time-de-de/" />
+
+
+
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
+
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
+ <link rel="apple-touch-icon-precomposed" href="themes/cloudy/icons/apple-touch-icon.png" />
+
+
+ <link rel="shortcut icon" href="../icons/favicon.ico" />
+
+
+
+ <link rel="stylesheet" media="print" href="../css/print.css" />
+
+
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
+
+ <script src="../javascript/cloudy.js"></script>
+
+
+ <script src="../thirdparty/bootstrap/js/bootstrap-dropdown.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-transition.js"></script>
+ <script src="../thirdparty/bootstrap/js/bootstrap-collapse.js"></script>
+ <!--
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-alert.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-modal.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-scrollspy.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tab.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-tooltip.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-popover.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-button.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-carousel.js"></script>
+ <script src="themes/cloudy/thirdparty/bootstrap/js/bootstrap-typeahead.js"></script>
+ -->
+
+
+
+ <!--[if lt IE 9]>
+ <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
+ <![endif]-->
+ <!--[if lte IE 9]>
+ <link rel="stylesheet" href="../thirdparty/heygrady-textshadow/jquery.textshadow.css">
+ <script src="../thirdparty/heygrady-textshadow/jquery.textshadow.js"></script>
+ <link rel="stylesheet" href="../css/ie.css">
+ <script src="../javascript/ie.js"></script>
+ <![endif]-->
+
+ <link rel="stylesheet" type="text/css" href="../css/cloudy-green.css?m=1329617235" />
+</head>
+
+ <body class="Page">
+ <div class="container">
+ <div class="alert alert-info" style="position:absolute;top:4px;z-index:100;padding:4px 10px 4px 10px;margin-right:10px;">
+ <strong>NOTE:</strong> This is a preview of the Cloudy theme. <a class="btn " href="/"><i class="icon-home"></i> Back to my site</a>
+ </div>
+ <header>
+ <div id="Logo">
+
+<a href="/">
+
+ <h1>Cloudy <span class="icon">C</span></h1>
+ <p>a Silverstripe theme by Anselm Christophersen</p>
+
+
+</a>
+
+ </div>
+ <div id="TopNavigation">
+
+
+
+ <span>You're logged in as Default Admin </span>
+ <span>|</span>
+ <a href="/admin/myprofile" target="_blank"><span class="icon">U </span><span class="text">Edit profile</span></a>
+ <span>|</span>
+ <a href="/admin" target="_blank"><span class="icon">S </span><span class="text">Admin</span></a>
+
+ <span>|</span>
+ <a href="/Security/logout"><span class="icon">X </span><span class="text">Log out</span></a>
+
+
+ </div>
+ <form id="SearchForm_SearchForm" action="/about-the-theme/good-design-takes-time/SearchForm" method="get" enctype="application/x-www-form-urlencoded">
+ <fieldset>
+
+ <div id="Search" class="field text nolabel">
+
+ <div class="middleColumn">
+
+ <input type="text" name="Search" value="Search" class="text nolabel" id="SearchForm_SearchForm_Search" />
+ </div>
+
+
+</div>
+
+ <input type="hidden" name="locale" value="en_US" class="hidden" id="SearchForm_SearchForm_locale">
+
+
+
+
+ <input type="submit" name="action_results" value="Go" class="action action" id="SearchForm_SearchForm_action_results">
+
+
+ </fieldset>
+</form>
+
+ </header>
+
+ <div id="Navigation">
+
+<div class="navbar">
+ <div class="navbar-inner">
+ <div class="container">
+ <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </a>
+
+ <div class="nav-collapse">
+ <ul class="nav">
+
+ <li class="link first"><a href="/" title="Home">Home</a></li>
+
+ <li class="section first"><a href="/about-the-theme/" title="About the Theme">About the Theme</a></li>
+
+ <li class="link first"><a href="/about-us/" title="About Us">About Us</a></li>
+
+ <li class="link first"><a href="/contact-us/" title="Contact Us">Contact Us</a></li>
+
+ <li class="link first"><a href="/gallery/" title="Gallery &lt;small&gt;Another easy-pluggable module&lt;/small&gt;">Gallery</a></li>
+
+
+ <li class="link first"><a href="/blog/" title="Blog">Blog</a></li>
+
+ </ul>
+
+ <ul class="nav pull-right">
+ <li class="dropdown">
+ <a href="/about-the-theme/good-design-takes-time/#"
+ class="dropdown-toggle"
+ data-toggle="dropdown">
+ English (US)
+ <b class="caret"></b>
+ </a>
+ <ul class="dropdown-menu">
+
+
+ <li class="de-DE"><a href="/good-design-takes-time-de-de/">German</a></li>
+
+ </ul>
+ </li>
+ </ul>
+
+ </div><!--/.nav-collapse -->
+ </div>
+ </div>
+</div>
+ </div>
+
+ <div id="Layout">
+
+<div class="page-header">
+ <h1>Good Design Takes Time</h1>
+</div>
+<div class="row">
+ <div class="span3">
+
+<div id="Sidebar">
+
+
+ <div class="content well" style="padding: 8px 0;">
+ <ul class="nav nav-list">
+
+
+
+ <li class="section">
+ <a href="/about-the-theme/">
+ <i class="icon-home "></i>
+ About the Theme
+ </a>
+ </li>
+
+
+
+ <li class="link">
+ <a href="/about-the-theme/some-more-info/">
+ <i class="icon-file "></i>
+
+ Some more Info
+ </a>
+ </li>
+
+ <li class="current">
+ <a href="/about-the-theme/good-design-takes-time/">
+ <i class="icon-file icon-white"></i>
+ Good Design Takes Time
+ </a>
+ </li>
+
+ <li class="link">
+
+ <a href="/about-the-theme/check-out-the-gallery/">
+ <i class="icon-file "></i>
+ Check out the Gallery
+ </a>
+ </li>
+
+ </ul>
+ </div>
+
+
+
+ <blockquote>
+ <p>Software built on pride and love of subject is superior to software built for profit.</p>
+
+ <small>Ravi Simhambhatla, CIO, Virgin America</small>
+ </blockquote>
+
+
+
+
+
+
+ </div>
+ </div>
+ <div class="span9 typography">
+ <div class="pull-right"><img class="right" title="" src="assets/iceberg.jpg" alt=""/><br/><em class="imgtitle right">Image by Uwe Kils/Wikipedia</em></div>
+<h2>Standing on the Shoulders of Giants</h2>
+
+<p>Today we have a plethora of possibilities, but time is scarce.<br/> There is so much great open source software shooting up everywhere.<br/> And, good design takes time.</p>
+<p>In this hand-craftet theme for <strong>Silverstripe 2.4</strong> and <strong>Silverstripe 3</strong>, I'm combining these factors. The outcome is a simple, easy-to use, but yet multi faceted theme. The <em>Cloudy</em> theme is inspired by, and borrows some of the code from the great <em>Twitter Bootstrap 2</em> framework. Thank you <a>@mdo</a>, and <a>@fat</a>, and everyone <a>@twitter</a>! <br/>And, thank you of course, everyone <a>@silverstripe</a> for providing the world with such a great product. I'm enjoying it every day.</p>
+
+<p>A special dedication goes to all my great colleagues <a>@cphcloud</a>. The title is for you, and I'll also provide a CPH Cloud-colored color scheme ;).</p>
+<p><em>Anselm Christophersen (<a>@anselmdk</a>), February 2012</em></p>
+<h3>Features</h3>
+<ul><li>Works right out-of-the box in both <em>SS3</em> and <em>SS2.4</em>.</li>
+
+<li>Very easy to customize as it includes different color schemes. Furthermore, <em>Cloudy</em> uses the <em>Compass/SCSS</em> preprocessor, so color variables can easily be altered. <br/>The CSS is still editable without having <em>Compass</em> installed!</li>
+<li>Language-select dropdown for multi-language sites, as well as a top menu for logged in users.</li>
+<li>Features as the top menu, the quotes, and the social buttons are easy to disable.</li>
+<li>Responsive CSS allows specific layout for small screens, mobile and tablet devices.</li>
+
+</ul><h3>Bundled</h3>
+<ul><li>All <em>Twitter Bootstrap 2's</em> widgets, for easily adding advanced buttons, tab navigations, modal boxes, tooltips, and image carousels. If you don't need this, you can easily opt for the small footprint javascript version.</li>
+<li>Open source icon font <a href="http://www.justbenicestudio.com/studio/websymbols/">Websymbols</a>, allows to easily change icons like the <em>Cloud</em> icon, and to add additional social media and top menu icons.</li>
+<li>Uses no images beyond that! All graphic effects are CSS3. Falback is provided by <em>Compass</em>'s legacy feature.</li>
+
+<li>2 example pages. Use these to get get a head-start with content setup!</li>
+</ul><h3>Compatibility</h3>
+<ul><li>Works well on all modern browsers and works on IE7/8 as good as it can get.</li>
+<li>Mostly follows code practices set out in <em>Silverstripe Ltd.'s</em> modules and previous themes.</li>
+<li>Includes sub themes for blog &amp; forum, and is easy to extend with additional sub themes.</li>
+</ul>
+
+
+
+
+ </div>
+
+</div>
+ </div>
+ <footer>
+
+<div class="content typography left">
+ <p>Copyright &copy; 2012 | Cloudy: a Silverstripe theme by Anselm Christophersen |
+ Powered by <a href="http://silverstripe.org" target="_blank">SilverStripe</a>. <br />
+ </p>
+</div>
+
+
+<div class="content typography right">
+ <div><span class="icon">R</span> <a target="_blank" href="http://www.anselm.dk">www.anselm.dk</a></div> |
+ <div><span class="icon">@</span> <a target="_blank" href="mailto:ac@anselm.dk">ac@anselm.dk</a></div> |
+ <div><span class="icon">t</span> <a target="_blank" href="http://twitter.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">f</span> <a target="_blank" href="http://facebook.com/anselmdk">anselmdk</a></div> |
+ <div><span class="icon">m</span> <a target="_blank" href="http://vimeo.com/anselmdk">anselmdk</a></div>
+
+</div>
+
+ </footer>
+ </div>
+
+ </body>
+</html>
View
1,372 _preview/thirdparty/Markdown.Converter.js
@@ -0,0 +1,1372 @@
+/*
+from http://code.google.com/p/pagedown/source/browse/
+
+
+A javascript port of Markdown, as used on Stack Overflow
+and the rest of Stack Exchange network.
+
+Largely based on showdown.js by John Fraser (Attacklab).
+
+Original Markdown Copyright (c) 2004-2005 John Gruber
+ <http://daringfireball.net/projects/markdown/>
+
+
+Original Showdown code copyright (c) 2007 John Fraser
+
+Modifications and bugfixes (c) 2009 Dana Robinson
+Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+
+
+var Markdown;
+
+if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module
+ Markdown = exports;
+else
+ Markdown = {};
+
+// The following text is included for historical reasons, but should
+// be taken with a pinch of salt; it's not all true anymore.
+
+//
+// Wherever possible, Showdown is a straight, line-by-line port
+// of the Perl version of Markdown.
+//
+// This is not a normal parser design; it's basically just a
+// series of string substitutions. It's hard to read and
+// maintain this way, but keeping Showdown close to the original
+// design makes it easier to port new features.
+//
+// More importantly, Showdown behaves like markdown.pl in most
+// edge cases. So web applications can do client-side preview
+// in Javascript, and then build identical HTML on the server.
+//
+// This port needs the new RegExp functionality of ECMA 262,
+// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
+// should do fine. Even with the new regular expression features,
+// We do a lot of work to emulate Perl's regex functionality.
+// The tricky changes in this file mostly have the "attacklab:"
+// label. Major or self-explanatory changes don't.
+//
+// Smart diff tools like Araxis Merge will be able to match up
+// this file with markdown.pl in a useful way. A little tweaking
+// helps: in a copy of markdown.pl, replace "#" with "//" and
+// replace "$text" with "text". Be sure to ignore whitespace
+// and line endings.
+//
+
+
+//
+// Usage:
+//
+// var text = "Markdown *rocks*.";
+//
+// var converter = new Markdown.Converter();
+// var html = converter.makeHtml(text);
+//
+// alert(html);
+//
+// Note: move the sample code to the bottom of this
+// file before uncommenting it.
+//
+
+(function () {
+
+ function identity(x) { return x; }
+ function returnFalse(x) { return false; }
+
+ function HookCollection() { }
+
+ HookCollection.prototype = {
+
+ chain: function (hookname, func) {
+ var original = this[hookname];
+ if (!original)
+ throw new Error("unknown hook " + hookname);
+
+ if (original === identity)
+ this[hookname] = func;
+ else
+ this[hookname] = function (x) { return func(original(x)); }
+ },
+ set: function (hookname, func) {
+ if (!this[hookname])
+ throw new Error("unknown hook " + hookname);
+ this[hookname] = func;
+ },
+ addNoop: function (hookname) {
+ this[hookname] = identity;
+ },
+ addFalse: function (hookname) {
+ this[hookname] = returnFalse;
+ }
+ };
+
+ Markdown.HookCollection = HookCollection;
+
+ // g_urls and g_titles allow arbitrary user-entered strings as keys. This
+ // caused an exception (and hence stopped the rendering) when the user entered
+ // e.g. [push] or [__proto__]. Adding a prefix to the actual key prevents this
+ // (since no builtin property starts with "s_"). See
+ // http://meta.stackoverflow.com/questions/64655/strange-wmd-bug
+ // (granted, switching from Array() to Object() alone would have left only __proto__
+ // to be a problem)
+ function SaveHash() { }
+ SaveHash.prototype = {
+ set: function (key, value) {
+ this["s_" + key] = value;
+ },
+ get: function (key) {
+ return this["s_" + key];
+ }
+ };
+
+ Markdown.Converter = function () {
+ var pluginHooks = this.hooks = new HookCollection();
+ pluginHooks.addNoop("plainLinkText"); // given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
+ pluginHooks.addNoop("preConversion"); // called with the orignal text as given to makeHtml. The result of this plugin hook is the actual markdown source that will be cooked
+ pluginHooks.addNoop("postConversion"); // called with the final cooked HTML code. The result of this plugin hook is the actual output of makeHtml
+
+ //
+ // Private state of the converter instance:
+ //
+
+ // Global hashes, used by various utility routines
+ var g_urls;
+ var g_titles;
+ var g_html_blocks;
+
+ // Used to track when we're inside an ordered or unordered list
+ // (see _ProcessListItems() for details):
+ var g_list_level;
+
+ this.makeHtml = function (text) {
+
+ //
+ // Main function. The order in which other subs are called here is
+ // essential. Link and image substitutions need to happen before
+ // _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the <a>
+ // and <img> tags get encoded.
+ //
+
+ // This will only happen if makeHtml on the same converter instance is called from a plugin hook.
+ // Don't do that.
+ if (g_urls)
+ throw new Error("Recursive call to converter.makeHtml");
+
+ // Create the private state objects.
+ g_urls = new SaveHash();
+ g_titles = new SaveHash();
+ g_html_blocks = [];
+ g_list_level = 0;
+
+ text = pluginHooks.preConversion(text);
+
+ // attacklab: Replace ~ with ~T
+ // This lets us use tilde as an escape char to avoid md5 hashes
+ // The choice of character is arbitray; anything that isn't
+ // magic in Markdown will work.
+ text = text.replace(/~/g, "~T");
+
+ // attacklab: Replace $ with ~D
+ // RegExp interprets $ as a special character
+ // when it's in a replacement string
+ text = text.replace(/\$/g, "~D");
+
+ // Standardize line endings
+ text = text.replace(/\r\n/g, "\n"); // DOS to Unix
+ text = text.replace(/\r/g, "\n"); // Mac to Unix
+
+ // Make sure text begins and ends with a couple of newlines:
+ text = "\n\n" + text + "\n\n";
+
+ // Convert all tabs to spaces.
+ text = _Detab(text);
+
+ // Strip any lines consisting only of spaces and tabs.
+ // This makes subsequent regexen easier to write, because we can
+ // match consecutive blank lines with /\n+/ instead of something
+ // contorted like /[ \t]*\n+/ .
+ text = text.replace(/^[ \t]+$/mg, "");
+
+ // Turn block-level HTML blocks into hash entries
+ text = _HashHTMLBlocks(text);
+
+ // Strip link definitions, store in hashes.
+ text = _StripLinkDefinitions(text);
+
+ text = _RunBlockGamut(text);
+
+ text = _UnescapeSpecialChars(text);
+
+ // attacklab: Restore dollar signs
+ text = text.replace(/~D/g, "$$");
+
+ // attacklab: Restore tildes
+ text = text.replace(/~T/g, "~");
+
+ text = pluginHooks.postConversion(text);
+
+ g_html_blocks = g_titles = g_urls = null;
+
+ return text;
+ };
+
+ function _StripLinkDefinitions(text) {
+ //
+ // Strips link definitions from text, stores the URLs and titles in
+ // hash references.
+ //
+
+ // Link defs are in the form: ^[id]: url "optional title"
+
+ /*
+ text = text.replace(/
+ ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1
+ [ \t]*
+ \n? // maybe *one* newline
+ [ \t]*
+ <?(\S+?)>? // url = $2
+ (?=\s|$) // lookahead for whitespace instead of the lookbehind removed below
+ [ \t]*
+ \n? // maybe one newline
+ [ \t]*
+ ( // (potential) title = $3
+ (\n*) // any lines skipped = $4 attacklab: lookbehind removed
+ [ \t]+
+ ["(]
+ (.+?) // title = $5
+ [")]
+ [ \t]*
+ )? // title is optional
+ (?:\n+|$)
+ /gm, function(){...});
+ */
+
+ text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*<?(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,
+ function (wholeMatch, m1, m2, m3, m4, m5) {
+ m1 = m1.toLowerCase();
+ g_urls.set(m1, _EncodeAmpsAndAngles(m2)); // Link IDs are case-insensitive
+ if (m4) {
+ // Oops, found blank lines, so it's not a title.
+ // Put back the parenthetical statement we stole.
+ return m3;
+ } else if (m5) {
+ g_titles.set(m1, m5.replace(/"/g, "&quot;"));
+ }
+
+ // Completely remove the definition from the text
+ return "";
+ }
+ );
+
+ return text;
+ }
+
+ function _HashHTMLBlocks(text) {
+
+ // Hashify HTML blocks:
+ // We only want to do this for block-level HTML tags, such as headers,
+ // lists, and tables. That's because we still want to wrap <p>s around
+ // "paragraphs" that are wrapped in non-block-level tags, such as anchors,
+ // phrase emphasis, and spans. The list of tags we're looking for is
+ // hard-coded:
+ var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"
+ var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"
+
+ // First, look for nested blocks, e.g.:
+ // <div>
+ // <div>
+ // tags for inner block must be indented.
+ // </div>
+ // </div>
+ //
+ // The outermost tags must start at the left margin for this to match, and
+ // the inner nested divs must be indented.
+ // We need to do this before the next, more liberal match, because the next
+ // match will start at the first `<div>` and stop at the first `</div>`.
+
+ // attacklab: This regex can be expensive when it fails.
+
+ /*
+ text = text.replace(/
+ ( // save in $1
+ ^ // start of line (with /m)
+ <($block_tags_a) // start tag = $2
+ \b // word break
+ // attacklab: hack around khtml/pcre bug...
+ [^\r]*?\n // any number of lines, minimally matching
+ </\2> // the matching end tag
+ [ \t]* // trailing spaces/tabs
+ (?=\n+) // followed by a newline
+ ) // attacklab: there are sentinel newlines at end of document
+ /gm,function(){...}};
+ */
+ text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, hashElement);
+
+ //
+ // Now match more liberally, simply from `\n<tag>` to `</tag>\n`
+ //
+
+ /*
+ text = text.replace(/
+ ( // save in $1
+ ^ // start of line (with /m)
+ <($block_tags_b) // start tag = $2