Migrate Jade to Pug template engine
Jade templates engine has been renamed to Pug. We are using Pug already on the Blender Cloud repository, following is Flamenco and Attract
This commit is contained in:
parent
62542f0329
commit
811236cff4
@ -49,7 +49,7 @@ and place them in `pillar/web/static/assets/vrview`. Replace `images/loading.gif
|
||||
|
||||
You may also want to compare their
|
||||
[index.html](https://raw.githubusercontent.com/googlevr/vrview/master/index.html) to our
|
||||
`src/templates/vrview.jade`.
|
||||
`src/templates/vrview.pug`.
|
||||
|
||||
When on a HDRi page with the viewer embedded, use this JavaScript code to find the current
|
||||
yaw: `vrview_window.contentWindow.yaw()`. This can be passed as `default_yaw` parameter to
|
||||
|
10
gulpfile.js
10
gulpfile.js
@ -4,7 +4,7 @@ var chmod = require('gulp-chmod');
|
||||
var concat = require('gulp-concat');
|
||||
var gulp = require('gulp');
|
||||
var gulpif = require('gulp-if');
|
||||
var jade = require('gulp-jade');
|
||||
var pug = require('gulp-pug');
|
||||
var livereload = require('gulp-livereload');
|
||||
var plumber = require('gulp-plumber');
|
||||
var rename = require('gulp-rename');
|
||||
@ -38,12 +38,12 @@ gulp.task('styles', function() {
|
||||
});
|
||||
|
||||
|
||||
/* Templates - Jade */
|
||||
/* Templates - Pug */
|
||||
gulp.task('templates', function() {
|
||||
gulp.src('src/templates/**/*.jade')
|
||||
gulp.src('src/templates/**/*.pug')
|
||||
.pipe(gulpif(enabled.failCheck, plumber()))
|
||||
.pipe(gulpif(enabled.cachify, cache('templating')))
|
||||
.pipe(jade({
|
||||
.pipe(pug({
|
||||
pretty: enabled.prettyPug
|
||||
}))
|
||||
.pipe(gulp.dest('pillar/web/templates/'))
|
||||
@ -101,7 +101,7 @@ gulp.task('watch',function() {
|
||||
}
|
||||
|
||||
gulp.watch('src/styles/**/*.sass',['styles']);
|
||||
gulp.watch('src/templates/**/*.jade',['templates']);
|
||||
gulp.watch('src/templates/**/*.pug',['templates']);
|
||||
gulp.watch('src/scripts/*.js',['scripts']);
|
||||
gulp.watch('src/scripts/tutti/**/*.js',['scripts_concat_tutti']);
|
||||
gulp.watch('src/scripts/markdown/**/*.js',['scripts_concat_markdown']);
|
||||
|
@ -13,7 +13,7 @@
|
||||
"gulp-chmod": "~1.3.0",
|
||||
"gulp-concat": "~2.6.0",
|
||||
"gulp-if": "^2.0.1",
|
||||
"gulp-jade": "~1.1.0",
|
||||
"gulp-pug": "~3.2.0",
|
||||
"gulp-livereload": "~3.8.1",
|
||||
"gulp-plumber": "~1.1.0",
|
||||
"gulp-rename": "~1.2.2",
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* == Search ==
|
||||
* index and algolia settings are defined in layout.jade
|
||||
* index and algolia settings are defined in layout.pug
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
@ -1,5 +1,5 @@
|
||||
(function ( $ ) {
|
||||
// See organizations/view_embed.jade for example use.
|
||||
// See organizations/view_embed.pug for example use.
|
||||
$.fn.userSearch = function(algolia_application_id, algolia_public_key, algolia_index_users, on_selected) {
|
||||
var client = algoliasearch(algolia_application_id, algolia_public_key);
|
||||
var index = client.initIndex(algolia_index_users);
|
||||
|
@ -1,4 +1,4 @@
|
||||
#error-container(class="error-403")
|
||||
#error-container.error-403
|
||||
#error-box
|
||||
.error-top-container
|
||||
.error-title Forbidden.
|
@ -1,4 +1,4 @@
|
||||
#error-container(class="error-404")
|
||||
#error-container.error-404
|
||||
#error-box
|
||||
.error-top-container
|
||||
.error-title Not found.
|
@ -1,6 +1,6 @@
|
||||
| {% extends "errors/layout.html" %}
|
||||
| {% block body %}
|
||||
#error_container.412.standalone
|
||||
#error_container.error-412.standalone
|
||||
#error_box
|
||||
.error-title 412. Precondition Failed.
|
||||
|
@ -1,4 +1,4 @@
|
||||
#error_container.412
|
||||
#error_container.error-412
|
||||
#error_box
|
||||
.error-title 412. Precondition Failed.
|
||||
|
@ -21,7 +21,7 @@ html(lang="en")
|
||||
|
||||
body.error
|
||||
|
||||
#error_container.500.standalone
|
||||
#error_container.error-500.standalone
|
||||
#error_box
|
||||
.error-top-container
|
||||
.error-title Something went wrong.
|
@ -1,4 +1,4 @@
|
||||
#error_container.500
|
||||
#error_container.error-500
|
||||
#error_box
|
||||
.error-top-container
|
||||
.error-title Something went wrong.
|
@ -89,7 +89,7 @@ script(type="text/javascript").
|
||||
//- console.log($(this).serialize());
|
||||
$.post($(this).attr('action'), $(this).serialize())
|
||||
.done(function(data){
|
||||
// This function is defined in index.jade.
|
||||
// This function is defined in index.pug.
|
||||
displayUser('{{ user._id }}')
|
||||
.done(function() {
|
||||
$('#user-edit-notification').addClass('success').html('Success!');
|
@ -103,7 +103,7 @@ script(src="{{ url_for('static_pillar', filename='assets/js/vendor/jquery.select
|
||||
|
||||
script(type="text/javascript").
|
||||
|
||||
// This function is also used in edit_embed.jade.
|
||||
// This function is also used in edit_embed.pug.
|
||||
function displayUser(userId) {
|
||||
var url = '/u/' + userId + '/edit';
|
||||
return $.get(url, function(dataHtml){
|
Loading…
x
Reference in New Issue
Block a user