Skip to content

Commit

Permalink
Website: New assets directory for all web-only files (#2180)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment authored Jun 27, 2020
1 parent 964de5a commit 91fdd0b
Show file tree
Hide file tree
Showing 63 changed files with 261 additions and 280 deletions.
7 changes: 1 addition & 6 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,11 @@ hide-*.js
.DS_Store
CNAME
.github/
assets/
examples/
img/
templates/
tests/
scripts/
*.tgz
*.html
style.css
favicon.png
logo.svg
bower.json
composer.json
gulpfile.js
Expand Down
2 changes: 1 addition & 1 deletion scripts/code.js → assets/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if(!document.body.addEventListener) {

$$('[data-plugin-header]').forEach(function (element) {
var plugin = components.plugins[element.getAttribute('data-plugin-header')];
element.innerHTML = '<div class="intro" data-src="templates/header-plugins.html" data-type="text/html"></div>\n'
element.innerHTML = '<div class="intro" data-src="assets/templates/header-plugins.html" data-type="text/html"></div>\n'
+ '<h2>' + plugin.title + '</h2>\n<p>' + plugin.description + '</p>';
});

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><a href="index.html"><img src="logo.svg" alt="Prism" /></a></h1>
<h1><a href="index.html"><img src="assets/logo.svg" alt="Prism" /></a></h1>

<a href="download.html" class="download-button">Download</a>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1><a href="index.html"><img src="logo.svg" alt="Prism" /> plugins</a></h1>
<h1><a href="index.html"><img src="assets/logo.svg" alt="Prism" /> plugins</a></h1>

<a href="download.html" class="download-button">Download</a>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 2 additions & 10 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,9 @@
},
"ignore": [
"**/.*",
"img",
"templates",
"assets",
"tests",
"CNAME",
"*.html",
"style.css",
"favicon.png",
"logo.svg",
"download.js",
"prefixfree.min.js",
"utopia.js",
"code.js"
"*.html"
]
}
20 changes: 10 additions & 10 deletions download.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>

<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<link rel="icon" href="assets/favicon.png" />
<title>Download ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<style>
form label {
Expand Down Expand Up @@ -124,15 +124,15 @@
border-bottom-left-radius: 0;
}
</style>
<script src="scripts/prefixfree.min.js"></script>
<script src="assets/prefixfree.min.js"></script>

<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>

<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<div class="intro" data-src="assets/templates/header-main.html" data-type="text/html"></div>

<h2>Customize your download</h2>
<p>Select your compression level, as well as the languages and plugins you need.</p>
Expand Down Expand Up @@ -170,16 +170,16 @@ <h2>Customize your download</h2>

</section>

<footer data-src="templates/footer.html" data-type="text/html"></footer>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>

<script src="scripts/utopia.js"></script>
<script src="assets/utopia.js"></script>
<script src="prism.js"></script>
<script src="components.js"></script>
<script src="dependencies.js"></script>
<script src="scripts/code.js"></script>
<script src="scripts/vendor/promise.js"></script>
<script src="scripts/vendor/FileSaver.min.js"></script>
<script src="scripts/download.js"></script>
<script src="assets/code.js"></script>
<script src="assets/vendor/promise.js"></script>
<script src="assets/vendor/FileSaver.min.js"></script>
<script src="assets/download.js"></script>

</body>
</html>
18 changes: 9 additions & 9 deletions examples.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>

<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<link rel="icon" href="assets/favicon.png" />
<title>Examples ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<style>
#languages {
Expand Down Expand Up @@ -43,15 +43,15 @@
padding-left: 40px;
}
</style>
<script src="scripts/prefixfree.min.js"></script>
<script src="assets/prefixfree.min.js"></script>

<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>

<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<div class="intro" data-src="assets/templates/header-main.html" data-type="text/html"></div>

<h2>Examples</h2>
<p>The examples in this page serve a dual purpose: They act as unit tests, making it easy to spot bugs, and at the same time demonstrate what Prism can do, on simple and on edge cases.</p>
Expand Down Expand Up @@ -97,14 +97,14 @@ <h1>Per language examples</h1>
</section>
<section id="examples"></section>

<footer data-src="templates/footer.html" data-type="text/html"></footer>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>

<script src="scripts/utopia.js"></script>
<script src="assets/utopia.js"></script>
<script src="prism.js"></script>
<script src="components.js"></script>
<script src="scripts/code.js"></script>
<script src="scripts/vendor/promise.js"></script>
<script src="scripts/examples.js"></script>
<script src="assets/code.js"></script>
<script src="assets/vendor/promise.js"></script>
<script src="assets/examples.js"></script>

</body>
</html>
14 changes: 7 additions & 7 deletions extending.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
<head>

<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<link rel="icon" href="assets/favicon.png" />
<title>Extending Prism ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<link rel="stylesheet" href="plugins/line-highlight/prism-line-highlight.css" data-noprefix />
<script src="scripts/prefixfree.min.js"></script>
<script src="assets/prefixfree.min.js"></script>
<style>
ol.indent {
margin: 1em 0;
Expand All @@ -22,7 +22,7 @@
<body class="language-javascript">

<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<div class="intro" data-src="assets/templates/header-main.html" data-type="text/html"></div>

<h2>Extending Prism</h2>
<p>Prism is awesome out of the box, but it’s even awesomer when it’s customized to your own needs. This section will help you write new language definitions, plugins and all-around Prism hacking.</p>
Expand Down Expand Up @@ -367,14 +367,14 @@ <h1>API documentation</h1>
<p>All public and stable parts of <a href="docs/">Prism's API are documented here</a>.</p>
</section>

<footer data-src="templates/footer.html" data-type="text/html"></footer>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>

<script src="scripts/utopia.js"></script>
<script src="assets/utopia.js"></script>
<script src="prism.js"></script>
<script src="plugins/autoloader/prism-autoloader.js"></script>
<script src="plugins/line-highlight/prism-line-highlight.js"></script>
<script src="components.js"></script>
<script src="scripts/code.js"></script>
<script src="assets/code.js"></script>

</body>
</html>
14 changes: 7 additions & 7 deletions faq.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<head>

<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<link rel="icon" href="assets/favicon.png" />
<title>FAQ ▲ Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<style>
#toc {
Expand All @@ -16,15 +16,15 @@
color: black;
}
</style>
<script src="scripts/prefixfree.min.js"></script>
<script src="assets/prefixfree.min.js"></script>

<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>

<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<div class="intro" data-src="assets/templates/header-main.html" data-type="text/html"></div>

<h2>FAQ</h2>
<p>Frequently Asked Questions, with a few Questions I want people to Frequently Ask.</p>
Expand Down Expand Up @@ -121,9 +121,9 @@ <h1>How can I use different highlighting for tokens with the same name in differ
}</code></pre>
</section>

<footer data-src="templates/footer.html" data-type="text/html"></footer>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>

<script src="scripts/utopia.js"></script>
<script src="assets/utopia.js"></script>
<script src="prism.js"></script>
<script src="plugins/autoloader/prism-autoloader.min.js"></script>
<script>
Expand Down Expand Up @@ -229,7 +229,7 @@ <h1>How can I use different highlighting for tokens with the same name in differ
showTokens();
}());
</script>
<script src="scripts/code.js"></script>
<script src="assets/code.js"></script>

</body>
</html>
8 changes: 1 addition & 7 deletions gulpfile.js/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -320,13 +320,7 @@ async function changes() {

function changedWebsite(info) {
if (info.changes.length > 0 && info.changes.every(c => {
if (/[\w-]+\.(?:html|svg)$/.test(c.file)) {
return true;
}
if (/^scripts(?:\/[\w-]+)*\/[\w-]+\.js$/.test(c.file)) {
return true;
}
return ['style.css'].indexOf(c.file) >= 0;
return /[\w-]+\.html$/.test(c.file) || /^assets\//.test(c.file);
})) {
addEntry('Other >> Website', info);
return true;
Expand Down
34 changes: 17 additions & 17 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
window.console && console.log('foo');
</script>
<meta charset="utf-8" />
<link rel="icon" href="favicon.png" />
<link rel="icon" href="assets/favicon.png" />
<title>Prism</title>
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="assets/style.css" />
<link rel="stylesheet" href="themes/prism.css" data-noprefix />
<script src="scripts/prefixfree.min.js"></script>
<script src="assets/prefixfree.min.js"></script>

<script>var _gaq = [['_setAccount', 'UA-33746269-1'], ['_trackPageview']];</script>
<script src="https://www.google-analytics.com/ga.js" async></script>
</head>
<body>

<header>
<div class="intro" data-src="templates/header-main.html" data-type="text/html"></div>
<div class="intro" data-src="assets/templates/header-main.html" data-type="text/html"></div>

<ul id="features">
<li>
Expand Down Expand Up @@ -57,14 +57,14 @@ <h1>Used By</h1>
<p>Prism is used on several websites, small and large. Some of them are:</p>

<div class="used-by-logos">
<a href="https://www.smashingmagazine.com/" target="_blank"><img src="img/logo-smashing.png" alt="Smashing Magazine" /></a>
<a href="https://alistapart.com/" target="_blank"><img src="img/logo-ala.png" alt="A List Apart" /></a>
<a href="https://developer.mozilla.org/" target="_blank"><img src="img/logo-mdn.png" alt="Mozilla Developer Network (MDN)" /></a>
<a href="https://css-tricks.com/" target="_blank"><img src="img/logo-css-tricks.png" alt="CSS-Tricks" /></a>
<a href="https://www.sitepoint.com/" target="_blank"><img src="img/logo-sitepoint.png" alt="SitePoint" /></a>
<a href="https://www.drupal.org/" target="_blank"><img src="img/logo-drupal.png" alt="Drupal" /></a>
<a href="https://reactjs.org/" target="_blank"><img src="img/logo-react.png" alt="React" /></a>
<a href="https://stripe.com/" target="_blank"><img src="img/logo-stripe.png" alt="Stripe" /></a>
<a href="https://www.smashingmagazine.com/" target="_blank"><img src="assets/img/logo-smashing.png" alt="Smashing Magazine" /></a>
<a href="https://alistapart.com/" target="_blank"><img src="assets/img/logo-ala.png" alt="A List Apart" /></a>
<a href="https://developer.mozilla.org/" target="_blank"><img src="assets/img/logo-mdn.png" alt="Mozilla Developer Network (MDN)" /></a>
<a href="https://css-tricks.com/" target="_blank"><img src="assets/img/logo-css-tricks.png" alt="CSS-Tricks" /></a>
<a href="https://www.sitepoint.com/" target="_blank"><img src="assets/img/logo-sitepoint.png" alt="SitePoint" /></a>
<a href="https://www.drupal.org/" target="_blank"><img src="assets/img/logo-drupal.png" alt="Drupal" /></a>
<a href="https://reactjs.org/" target="_blank"><img src="assets/img/logo-react.png" alt="React" /></a>
<a href="https://stripe.com/" target="_blank"><img src="assets/img/logo-stripe.png" alt="Stripe" /></a>
</div>
</section>

Expand All @@ -75,13 +75,13 @@ <h1>Examples</h1>
<pre data-src="prism.js"></pre>

<p>This page’s CSS code, highlighted with Prism:</p>
<pre data-src="style.css"></pre>
<pre data-src="assets/style.css"></pre>

<p>This page’s HTML, highlighted with Prism:</p>
<pre data-src="index.html"></pre>

<p>This page’s logo (SVG), highlighted with Prism:</p>
<pre data-src="logo.svg"></pre>
<pre data-src="assets/logo.svg"></pre>

<p>If you’re still not sold, you can <a href="examples.html">view more examples</a> or <a href="test.html">try it out for yourself</a>.</p>
</section>
Expand Down Expand Up @@ -292,12 +292,12 @@ <h1>Credits</h1>
</ul>
</section>

<footer data-src="templates/footer.html" data-type="text/html"></footer>
<footer data-src="assets/templates/footer.html" data-type="text/html"></footer>

<script src="scripts/utopia.js"></script>
<script src="assets/utopia.js"></script>
<script src="prism.js"></script>
<script src="components.js"></script>
<script src="scripts/code.js"></script>
<script src="assets/code.js"></script>
<script>
(function() {
var languageItems = [];
Expand Down
Loading

0 comments on commit 91fdd0b

Please sign in to comment.