Switching template rendering to use Handlebars
- Extracting the IE8 notice and SVG templates out into partials - Moving changelog details into a data file
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
[
|
||||
{
|
||||
"label": "September 17, 2015 Release",
|
||||
"changes": [
|
||||
"Fixing styling of labels on repetitions",
|
||||
"Fixing issue with vertical centering of alternation expressions that include empty expressions (see <a href=\"https://github.com/javallone/regexper-static/pull/16\">GitHub issue</a>)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "September 2, 2015 Release",
|
||||
"changes": [
|
||||
"Merging fix for error reporting from (see <a href=\"https://github.com/javallone/regexper-static/pull/15\">GitHub pull request</a>)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "July 5, 2015 Release",
|
||||
"changes": [
|
||||
"Updating Creative Commons license badge URL so it isn't pointing to a redirecting URL anymore"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "June 22, 2015 Release",
|
||||
"changes": [
|
||||
"Tweaking buggy Firefox hash detection code based on JavaScript errors that were logged"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "June 16, 2015 Release",
|
||||
"changes": [
|
||||
"Fixes issue with expressions containing a \"%\" not rendering in Firefox (see <a href=\"https://github.com/javallone/regexper-static/issues/12\">GitHub issue</a>)",
|
||||
"Fixed rendering in IE that was causing \"-->\" to display at the top of the page."
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "April 14, 2015 Release",
|
||||
"changes": [
|
||||
"Rendering speed improved. Most users will probably not see much improvement since logging data indicates that expressing rendering time is typically less than 1 second. Using the <a href=\"http://www.ex-parrot.com/pdw/Mail-RFC822-Address.html\">RFC822 email regular expression</a> though shows a rendering speed improvement from ~120 seconds down to ~80 seconds.",
|
||||
"Fixing a bug that would only occur when attempting to render an expression while another is in the process of rendering"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "March 14, 2015 Release",
|
||||
"changes": [
|
||||
"Removing use of Q for promises in favor of \"native\" ES6 promises (even though they aren't quite native everywhere yet)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "March 13, 2015 Release",
|
||||
"changes": [
|
||||
"Fixes bug with numbering of nested subexpressions (see <a href=\"https://github.com/javallone/regexper-static/issues/7\">GitHub issue</a>)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "February 11, 2015 Release",
|
||||
"changes": [
|
||||
"Various adjustments to analytics: tracking expression rendering time and JS errors",
|
||||
"Escape sequences that match to a specific character now display their hexadecimal code (actually done on January 25, but I forgot to update the changelog)",
|
||||
"Fixing styling issue with header links (see <a href=\"https://github.com/javallone/regexper-static/issues/5\">GitHub issue</a>)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "December 30, 2014 Release",
|
||||
"changes": [
|
||||
"Fixing bug that prevented rendering empty subexpressions",
|
||||
"Fixing minor styling bug when permalink is disabled",
|
||||
"Cleaning up some duplicated styles and JS"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "December 29, 2014 Release",
|
||||
"changes": [
|
||||
"Tweaking analytics data to help with addressing issues in deployed code (work will likely continue on this)",
|
||||
"Added progress bars on the documentation page",
|
||||
"Removed the loading spinner everywhere",
|
||||
"Animated the progress bars"
|
||||
]
|
||||
},
|
||||
{
|
||||
"label": "December 26, 2014 Release",
|
||||
"changes": [
|
||||
"Freshened up design",
|
||||
"Multiline regular expression input field (press Shift-Enter to render)",
|
||||
"Added a changelog",
|
||||
"Added documentation",
|
||||
"All parsing and rendering happens client-side (using <a href=\"http://canopy.jcoglan.com/\">Canopy</a> and <a href=\"http://snapsvg.io/\">Snap.svg</a>)",
|
||||
"Added Download link (not available in older browsers)",
|
||||
"Added display of regular expression flags (ignore case, global, multiline)",
|
||||
"Added indicator of quantifier greedy-ness",
|
||||
"Various improvements to parsing of regular expression",
|
||||
"Rendering of a regular expression can be canceled by pressing Escape"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1 @@
|
||||
module.exports = new Date().toISOString();
|
||||
@@ -0,0 +1,7 @@
|
||||
var fs = require('fs'),
|
||||
path = require('path'),
|
||||
config = require('../../config');
|
||||
|
||||
module.exports = fs.readFileSync(path.join(config.compass.css, 'svg.css'), {
|
||||
encoding: 'utf-8'
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
var layouts = require('handlebars-layouts');
|
||||
|
||||
module.exports.register = function(handlebars) {
|
||||
layouts.register(handlebars);
|
||||
};
|
||||
@@ -0,0 +1,5 @@
|
||||
<div id="deprecation-notice">
|
||||
<h1>Regexper</h1>
|
||||
|
||||
<p>Your browser is no longer supported by the current version of Regexper. Upgrade your browser to the latest version, or visit <a href="http://old.regexper.com/">the old Regexper</a>.</p>
|
||||
</div>
|
||||
@@ -0,0 +1,66 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
|
||||
<title>Regexper{{#if file.frontMatter.title}} - {{file.frontMatter.title}}{{/if}}</title>
|
||||
|
||||
<meta name="description" content="Regular expression visualizer using railroad diagrams" />
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
|
||||
<link rel="shortcut icon" href="/favicon.ico" />
|
||||
<link rel="author" href="humans.txt" />
|
||||
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Bangers&text=Regxpr" />
|
||||
<link rel="stylesheet" href="/css/main.css" />
|
||||
<!-- Built: {{date}} -->
|
||||
</head>
|
||||
<body>
|
||||
<!--[if lte IE 8]>
|
||||
{{> "ie8_notice"}}
|
||||
<![endif]-->
|
||||
<!--[if gt IE 8]> <!-->
|
||||
<script type="text/html" id="svg-container-base">
|
||||
{{> "svg_template"}}
|
||||
</script>
|
||||
|
||||
<header>
|
||||
<div class="logo">
|
||||
<h1><a href="/">Regexper</a></h1>
|
||||
<!-- n. One who regexpes -->
|
||||
<span>You thought you only had two problems…</span>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a class="oi with-text" data-glyph="list-rich" href="/changelog.html">Changelog</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="oi with-text" data-glyph="document" href="/documentation.html">Documentation</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="oi with-text" data-glyph="code" href="https://github.com/javallone/regexper-static">Source on GitHub</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main id="content">
|
||||
{{#block "body"}}{{/block}}
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
{{#block "footer"}}
|
||||
<ul class="inline-list">
|
||||
<li>Created by <a href="mailto:jeff.avallone@gmail.com">Jeff Avallone</a></li>
|
||||
<li>
|
||||
Generated images licensed:
|
||||
<a rel="license" href="http://creativecommons.org/licenses/by/3.0/"><img alt="Creative Commons License" src="https://licensebuttons.net/l/by/3.0/80x15.png" /></a>
|
||||
</li>
|
||||
</ul>
|
||||
{{/block}}
|
||||
</footer>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,25 @@
|
||||
<div class="svg">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
version="1.1">
|
||||
<defs>
|
||||
<style type="text/css">{{svg_styles}}</style>
|
||||
</defs>
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:License rdf:about="http://creativecommons.org/licenses/by/3.0/">
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="progress">
|
||||
<div style="width:0;"></div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user