front/general: rename .tpl to .hbs

This commit is contained in:
rr- 2016-04-01 10:24:04 +02:00
parent a32795e8e6
commit e0af5eff27
11 changed files with 11 additions and 11 deletions

View file

@ -50,12 +50,12 @@ function getConfig() {
function bundleHtml(config) { function bundleHtml(config) {
const minify = require('html-minifier').minify; const minify = require('html-minifier').minify;
const baseHtml = fs.readFileSync('./static/html/index.htm', 'utf-8'); const baseHtml = fs.readFileSync('./static/html/index.htm', 'utf-8');
glob('static/html/**/*.tpl', {}, (er, files) => { glob('static/html/**/*.hbs', {}, (er, files) => {
let templatesHtml = ''; let templatesHtml = '';
for (const file of files) { for (const file of files) {
templatesHtml += util.format( templatesHtml += util.format(
'<template id=\'%s-template\'>%s</template>', '<template id=\'%s-template\'>%s</template>',
path.basename(file, '.tpl').replace('_', '-'), path.basename(file, '.hbs').replace('_', '-'),
fs.readFileSync(file)); fs.readFileSync(file));
} }

View file

@ -3,7 +3,7 @@ Gelbooru and Moebooru. Its name <a href='http://sjp.pwn.pl/sjp/;2527372'>has
its roots in Polish language and has onomatopeic meaning of scraping or its roots in Polish language and has onomatopeic meaning of scraping or
scrubbing</a>. It is pronounced as <em>shoorubooru</em>.</p> scrubbing</a>. It is pronounced as <em>shoorubooru</em>.</p>
<p class="section"><strong>Registration</strong></p> <p class='section'><strong>Registration</strong></p>
<p>The e-mail you enter during account creation is only used to retrieve your <p>The e-mail you enter during account creation is only used to retrieve your
Gravatar and for password reminders. Only you can see it (well, except the Gravatar and for password reminders. Only you can see it (well, except the

View file

@ -17,7 +17,7 @@ the Site.</p>
stumble upon.</li> stumble upon.</li>
</ul> </ul>
<p class="section" id='section-prohibited-content'><strong>Prohibited content</strong></p> <p class='section' id='section-prohibited-content'><strong>Prohibited content</strong></p>
<ul> <ul>
<li>Child pornography: any photograph or photorealistic drawing or movie <li>Child pornography: any photograph or photorealistic drawing or movie
@ -36,7 +36,7 @@ the Site.</p>
signatures.</li> signatures.</li>
</ul> </ul>
<p class="section" id='section-privacy-policy'><strong>Privacy policy</strong></p> <p class='section' id='section-privacy-policy'><strong>Privacy policy</strong></p>
<p>The Site will not disclose the IP address or email address of any user <p>The Site will not disclose the IP address or email address of any user
except to the staff.</p> except to the staff.</p>

View file

@ -1,5 +1,5 @@
<div class='content-wrapper transparent' id='home'> <div class='content-wrapper transparent' id='home'>
<div class='messages'></div> <div class='messages'></div>
<h1>{{name}}</h1> <h1>{{name}}</h1>
<footer>Version: <span class="version">{{version}}</span> (built {{buildDate}})</footer> <footer>Version: <span class='version'>{{version}}</span> (built {{buildDate}})</footer>
</div> </div>

View file

@ -14,7 +14,7 @@
<li> <li>
<label for='user-email'>Email</label> <label for='user-email'>Email</label>
<input id='user-email' name='user-email' type='email' autocomplete='off' placeholder='optional'/> <input id='user-email' name='user-email' type='email' autocomplete='off' placeholder='optional'/>
<p class="hint">Used for password reminder and to show a <a href='http://gravatar.com/'>Gravatar</a>. Leave blank for random Gravatar.</p> <p class='hint'>Used for password reminder and to show a <a href='http://gravatar.com/'>Gravatar</a>. Leave blank for random Gravatar.</p>
</li> </li>
</ul> </ul>
</fieldset> </fieldset>
@ -26,10 +26,10 @@
<div class='info'> <div class='info'>
<p>Registered users can:</p> <p>Registered users can:</p>
<ul> <ul>
<li><i class="fa fa-upload"></i> upload new posts</li> <li><i class='fa fa-upload'></i> upload new posts</li>
<li><i class="fa fa-heart"></i> mark them as favorite</li> <li><i class='fa fa-heart'></i> mark them as favorite</li>
<li><i class="fa fa-commenting-o"></i> add comments</li> <li><i class='fa fa-commenting-o'></i> add comments</li>
<li><i class="fa fa-star-half-o"></i> vote up/down on posts and comments</li> <li><i class='fa fa-star-half-o'></i> vote up/down on posts and comments</li>
</ul> </ul>
<hr/> <hr/>
<p>By creating an account, you are agreeing to the <a href='/help/tos'>Terms of Service</a>.</p> <p>By creating an account, you are agreeing to the <a href='/help/tos'>Terms of Service</a>.</p>