diff options
Diffstat (limited to 'nikola/data/themes/bootstrap3')
17 files changed, 311 insertions, 276 deletions
diff --git a/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.css b/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.css new file mode 120000 index 0000000..78d39af --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.css @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/css/bootstrap-theme.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.min.css b/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.min.css new file mode 120000 index 0000000..200c765 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/bootstrap-theme.min.css @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/css/bootstrap-theme.min.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/bootstrap.css b/nikola/data/themes/bootstrap3/assets/css/bootstrap.css new file mode 120000 index 0000000..013623e --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/bootstrap.css @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/css/bootstrap.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/bootstrap.min.css b/nikola/data/themes/bootstrap3/assets/css/bootstrap.min.css new file mode 120000 index 0000000..5bc6076 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/bootstrap.min.css @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/css/bootstrap.min.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/bootstrap.js b/nikola/data/themes/bootstrap3/assets/js/bootstrap.js new file mode 120000 index 0000000..26aa1fd --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/bootstrap.js @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/js/bootstrap.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/bootstrap.min.js b/nikola/data/themes/bootstrap3/assets/js/bootstrap.min.js new file mode 120000 index 0000000..c4cdf6c --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/bootstrap.min.js @@ -0,0 +1 @@ +../../../../../../bower_components/bootstrap/dist/js/bootstrap.min.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js b/nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js index c0d986b..a6ab900 100644 --- a/nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js +++ b/nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js @@ -1,265 +1,271 @@ /** - * Flowr.js - Simple jQuery plugin to emulate Flickr's justified view - * For usage information refer to http://github.com/kalyan02/flowr-js - * - * - * @author: Kalyan Chakravarthy (http://KalyanChakravarthy.net) - * @version: v0.1 - */ -(function($){ - //$("#container2").css( 'border', '1px solid #ccc'); - $.fn.flowr = function(options) { - - $this = this; - var ROW_CLASS_NAME = 'flowr-row'; // Class name for the row of flowy - var MAX_LAST_ROW_GAP = 25; // If the width of last row is lesser than max-width, recalculation is needed - var NO_COPY_FIELDS = [ 'complete', 'data', 'responsive' ]; // these attributes will not be carried forward for append related calls - var DEFAULTS = { - 'data' : [], - 'padding' : 5, // whats the padding between flowy items - 'height' : 240, // Minimum height an image row should take - 'render' : null, // callback function to get the tag - 'append' : false, // TODO - 'widthAttr' : 'width', // a custom data structure can specify which attribute refers to height/width - 'heightAttr' : 'height', - 'maxScale' : 1.5, // In case there is only 1 elment in last row - 'maxWidth' : this.width()-1, // 1px is just for offset - 'itemWidth' : null, // callback function for width - 'itemHeight' : null, // callback function for height - 'complete' : null, // complete callback - 'rowClassName' : ROW_CLASS_NAME, - 'rows' : -1, // Maximum number of rows to render. -1 for no limit. - 'responsive' : true // make content responsive - }; - var settings = $.extend( DEFAULTS, options); - - // If data is being appended, we already have settings - // If we already have settings, retrieve them - if( settings.append && $this.data('lastSettings') ) { - lastSettings = $this.data('lastSettings'); - - // Copy over the settings from previous init - for( attr in DEFAULTS ) { - if( NO_COPY_FIELDS.indexOf(attr)<0 && settings[attr] == DEFAULTS[attr] ) { - settings[attr] = lastSettings[attr]; - } - } - - // Check if we have an incomplete last row - lastRow = $this.data('lastRow'); - if( lastRow.data.length > 0 && settings.maxWidth-lastRow.width > MAX_LAST_ROW_GAP ) { - // Prepend the incomplete row to newly loaded data and redraw - lastRowData = lastSettings.data.slice( lastSettings.data.length - lastRow.data.length - 1 ); - settings.data = lastRowData.concat(settings.data); - - // Remove the incomplete row - // TODO: Don't reload this stuff later. Reattach to new row. - $( '.' + settings.rowClassName + ':last', $this ).detach(); - } else { - // console.log( lastRow.data.length ); - // console.log( lastRow.width ); - } - } - - // only on the first initial call - if( !settings.responsive && !settings.append ) - $this.width( $this.width() ); - - // Basic sanity checks - if( !(settings.data instanceof Array) ) - return; - - if( typeof(settings.padding) != 'number' ) - settings.padding = parseInt( settings.padding ); - - if( typeof(settings.itemWidth) != 'function' ) { - settings.itemWidth = function(data) { - return data[ settings.widthAttr ]; - } - } - - if( typeof(settings.itemHeight) != 'function' ) { - settings.itemHeight = function(data) { - return data[ settings.heightAttr ]; - } - } - - // A standalone utility to calculate the item widths for a particular row - // Returns rowWidth: width occupied & data : the items in the new row - var utils = { - getNextRow : function( data, settings ) { - var itemIndex = 0; - var itemsLength = data.length; - var lineItems = []; - var lineWidth = 0; - var maxWidth = settings.maxWidth; - var paddingSize = settings.padding; - - // console.log( 'maxItems=' + data.length ); - - requiredPadding = function() { - var extraPads = arguments.length == 1 ? arguments[0] : 0; - return (lineItems.length - 1 + extraPads) * settings.padding; - } - - while( lineWidth + requiredPadding() < settings.maxWidth && (itemIndex < itemsLength) ) { - var itemData = data[ itemIndex ]; - var itemWidth = settings.itemWidth.call( $this, itemData ); - var itemHeight = settings.itemHeight.call( $this, itemData ); - - var minHeight = settings.height; - var minWidth = Math.floor( itemWidth * settings.height / itemHeight ); - - var newLineWidth = lineWidth + minWidth + requiredPadding(1); - - if (minWidth > settings.maxWidth) { - // very short+wide images like panoramas - // show them even if ugly, as wide as possible - minWidth = settings.maxWidth-1; - minHeight = settings.height * minHeight / minWidth; - } - - // console.log( 'lineWidth = ' + lineWidth ); - // console.log( 'newLineWidth = ' + newLineWidth ); - if( newLineWidth < settings.maxWidth ) { - lineItems.push({ - 'height' : minHeight, - 'width' : minWidth, - 'itemData' : itemData - }); - - lineWidth += minWidth; - itemIndex ++; - } else { - // We'd have exceeded width. So break off to scale. - // console.log( 'breaking off = ' + itemIndex ); - // console.log( 'leave off size = ' + lineItems.length ); - break; - } - } //while - - // Scale the size to max width - testWidth=0; - if( lineWidth < settings.maxWidth ) { - var fullScaleWidth = settings.maxWidth - requiredPadding() - 10; - var currScaleWidth = lineWidth; - var scaleFactor = fullScaleWidth / currScaleWidth; - if( scaleFactor > settings.maxScale ) - scaleFactor = 1; - - var newHeight = Math.round( settings.height * scaleFactor ); - for( i=0; i<lineItems.length; i++ ) { - var lineItem = lineItems[ i ]; - lineItem.width = Math.floor(lineItem.width * scaleFactor); - lineItem.height = newHeight; - - testWidth += lineItem.width; - } - } - - return { - data : lineItems, - width : testWidth + requiredPadding() - }; - }, //getNextRow - reorderContent : function(){ - /* - TODO: optimize for faster resizing by reusing dom objects instead of killing the dom - */ - var _initialWidth = $this.data('width'); - var _newWidth = $this.width(); - var _change = _initialWidth - _newWidth; - - if(_initialWidth!=_newWidth) { - $this.html(''); - var _settings = $this.data( 'lastSettings' ); - _settings.data = $this.data( 'data' ); - _settings.maxWidth = $this.width() - 1; - $this.flowr( _settings ); - } - } - } //utils - - // If the resposive var is set to true then listen for resize method - // and prevent resizing from happening twice if responsive is set again during append phase! - if( settings.responsive && !$this.data('__responsive') ) { - $(window).resize(function(){ - initialWidth = $this.data('width'); - newWidth = $this.width(); - - //initiate resize - if( initialWidth != newWidth ) { - var task_id = $this.data('task_id'); - if( task_id ) { - task_id = clearTimeout( task_id ); - task_id = null; - } - task_id = setTimeout( utils.reorderContent, 80 ); - $this.data('task_id', task_id ); - } - }); - $this.data('__responsive',true); - } - - - return this.each(function(){ - - // Get a copy of original data. 1 level deep copy is sufficient. - var data = settings.data.slice(0); - var rowData = null; - var currentRow = 0; - var currentItem = 0; - - // Store all the data - var allData = $this.data( 'data' ) || []; - for(i=0;i<data.length;i++) { - allData.push( data[i] ); - } - $this.data( 'data', allData ); - - // While we have a new row - while( ( rowData = utils.getNextRow(data,settings) ) != null && rowData.data.length > 0 ) { - if( settings.rows > 0 && currentRow >= settings.rows ) - break; - // remove the number of elements in the new row from the top of data stack - data.splice( 0, rowData.data.length ); - - // Create a new row div, add class, append the htmls and insert the flowy items - var $row = $('<div>').addClass(settings.rowClassName); - for( i=0; i<rowData.data.length; i++ ) { - var displayData = rowData.data[i]; - // Get the HTML object from custom render function passed as argument - var displayObject = settings.render.call( $this, displayData ); - displayObject = $(displayObject); - // Set some basic stuff - displayObject - .css( 'width', displayData.width ) - .css( 'height', displayData.height ) - .css( 'margin-left', i==0 ? '0' : settings.padding + "px" ); //TODO:Refactor - $row.append( displayObject ); - - currentItem++; - } - $this.append( $row ); - // console.log ( "I> rowData.data.length="+rowData.data.length +" rowData.width="+rowData.width ); - - currentRow++; - $this.data('lastRow', rowData ); - } - // store the current state of settings and the items in last row - // we'll need this info when we append more items - $this.data('lastSettings', settings ); - - // onComplete callback - // pass back info about list of rows and items rendered - if( typeof (settings.complete) == 'function' ) { - var completeData = { - renderedRows : currentRow, - renderedItems : currentItem - } - settings.complete.call( $this, completeData ); - } - }); - }; + * Flowr.js - Simple jQuery plugin to emulate Flickr's justified view + * For usage information refer to http://github.com/kalyan02/flowr-js + * + * + * @author: Kalyan Chakravarthy (http://KalyanChakravarthy.net) + * @version: v0.1 + */ +(function($) { + //$("#container2").css( 'border', '1px solid #ccc'); + $.fn.flowr = function(options) { + + $this = this; + var ROW_CLASS_NAME = 'flowr-row'; // Class name for the row of flowy + var MAX_LAST_ROW_GAP = 25; // If the width of last row is lesser than max-width, recalculation is needed + var NO_COPY_FIELDS = ['complete', 'data', 'responsive']; // these attributes will not be carried forward for append related calls + var DEFAULTS = { + 'data': [], + 'padding': 5, // whats the padding between flowy items + 'height': 240, // Minimum height an image row should take + 'render': null, // callback function to get the tag + 'append': false, // TODO + 'widthAttr': 'width', // a custom data structure can specify which attribute refers to height/width + 'heightAttr': 'height', + 'maxScale': 1.5, // In case there is only 1 elment in last row + 'maxWidth': this.width() - 1, // 1px is just for offset + 'itemWidth': null, // callback function for width + 'itemHeight': null, // callback function for height + 'complete': null, // complete callback + 'rowClassName': ROW_CLASS_NAME, + 'rows': -1, // Maximum number of rows to render. -1 for no limit. + 'responsive': true // make content responsive + }; + var settings = $.extend(DEFAULTS, options); + + // If data is being appended, we already have settings + // If we already have settings, retrieve them + if (settings.append && $this.data('lastSettings')) { + lastSettings = $this.data('lastSettings'); + + // Copy over the settings from previous init + for (attr in DEFAULTS) { + if (NO_COPY_FIELDS.indexOf(attr) < 0 && settings[attr] == DEFAULTS[attr]) { + settings[attr] = lastSettings[attr]; + } + } + + // Check if we have an incomplete last row + lastRow = $this.data('lastRow'); + if (lastRow.data.length > 0 && settings.maxWidth - lastRow.width > MAX_LAST_ROW_GAP) { + // Prepend the incomplete row to newly loaded data and redraw + lastRowData = lastSettings.data.slice(lastSettings.data.length - lastRow.data.length - 1); + settings.data = lastRowData.concat(settings.data); + + // Remove the incomplete row + // TODO: Don't reload this stuff later. Reattach to new row. + $('.' + settings.rowClassName + ':last', $this).detach(); + } else { + // console.log( lastRow.data.length ); + // console.log( lastRow.width ); + } + } + + // only on the first initial call + if (!settings.responsive && !settings.append) + $this.width($this.width()); + + // Basic sanity checks + if (!(settings.data instanceof Array)) + return; + + if (typeof(settings.padding) != 'number') + settings.padding = parseInt(settings.padding); + + if (typeof(settings.itemWidth) != 'function') { + settings.itemWidth = function(data) { + return data[settings.widthAttr]; + } + } + + if (typeof(settings.itemHeight) != 'function') { + settings.itemHeight = function(data) { + return data[settings.heightAttr]; + } + } + + // A standalone utility to calculate the item widths for a particular row + // Returns rowWidth: width occupied & data : the items in the new row + var utils = { + getNextRow: function(data, settings) { + var itemIndex = 0; + var itemsLength = data.length; + var lineItems = []; + var lineWidth = 0; + var maxWidth = settings.maxWidth; + var paddingSize = settings.padding; + + // console.log( 'maxItems=' + data.length ); + + requiredPadding = function() { + var extraPads = arguments.length == 1 ? arguments[0] : 0; + return (lineItems.length - 1 + extraPads) * settings.padding; + } + + while (lineWidth + requiredPadding() < settings.maxWidth && (itemIndex < itemsLength)) { + var itemData = data[itemIndex]; + var itemWidth = settings.itemWidth.call($this, itemData); + var itemHeight = settings.itemHeight.call($this, itemData); + + var minHeight = settings.height; + var minWidth = Math.floor(itemWidth * settings.height / itemHeight); + + + if (minWidth > settings.maxWidth) { + // very short+wide images like panoramas + // show them even if ugly, as wide as possible + minWidth = settings.maxWidth - 1 - requiredPadding(1); + minHeight = settings.height * minHeight / minWidth; + } + var newLineWidth = lineWidth + minWidth; + + // console.log( 'lineWidth = ' + lineWidth ); + // console.log( 'newLineWidth = ' + newLineWidth ); + if (newLineWidth < settings.maxWidth) { + lineItems.push({ + 'height': minHeight, + 'width': minWidth, + 'itemData': itemData + }); + + lineWidth += minWidth; + itemIndex++; + } else { + // We'd have exceeded width. So break off to scale. + // console.log( 'breaking off = ' + itemIndex ); + // console.log( 'leave off size = ' + lineItems.length ); + break; + } + } //while + + // Scale the size to max width + testWidth = 0; + if (lineWidth < settings.maxWidth) { + var fullScaleWidth = settings.maxWidth - requiredPadding() - 10; + var currScaleWidth = lineWidth; + var scaleFactor = fullScaleWidth / currScaleWidth; + if (scaleFactor > settings.maxScale) + scaleFactor = 1; + + var newHeight = Math.round(settings.height * scaleFactor); + for (i = 0; i < lineItems.length; i++) { + var lineItem = lineItems[i]; + lineItem.width = Math.floor(lineItem.width * scaleFactor); + lineItem.height = newHeight; + + testWidth += lineItem.width; + } + } + + return { + data: lineItems, + width: testWidth + requiredPadding() + }; + }, //getNextRow + reorderContent: function() { + /* + TODO: optimize for faster resizing by reusing dom objects instead of killing the dom + */ + var _initialWidth = $this.data('width'); + var _newWidth = $this.width(); + var _change = _initialWidth - _newWidth; + + if (_initialWidth != _newWidth) { + $this.html(''); + var _settings = $this.data('lastSettings'); + _settings.data = $this.data('data'); + _settings.maxWidth = $this.width() - 1; + $this.flowr(_settings); + } + } + } //utils + + // If the resposive var is set to true then listen for resize method + // and prevent resizing from happening twice if responsive is set again during append phase! + if (settings.responsive && !$this.data('__responsive')) { + $(window).resize(function() { + initialWidth = $this.data('width'); + newWidth = $this.width(); + + //initiate resize + if (initialWidth != newWidth) { + var task_id = $this.data('task_id'); + if (task_id) { + task_id = clearTimeout(task_id); + task_id = null; + } + task_id = setTimeout(utils.reorderContent, 80); + $this.data('task_id', task_id); + } + }); + $this.data('__responsive', true); + } + + + return this.each(function() { + + // Get a copy of original data. 1 level deep copy is sufficient. + var data = settings.data.slice(0); + var rowData = null; + var currentRow = 0; + var currentItem = 0; + + // Store all the data + var allData = $this.data('data') || []; + for (i = 0; i < data.length; i++) { + allData.push(data[i]); + } + $this.data('data', allData); + + // While we have a new row + while ((rowData = utils.getNextRow(data, settings)) != null && rowData.data.length > 0) { + if (settings.rows > 0 && currentRow >= settings.rows) + break; + // remove the number of elements in the new row from the top of data stack + data.splice(0, rowData.data.length); + + // Create a new row div, add class, append the htmls and insert the flowy items + var $row = $('<div>').addClass(settings.rowClassName); + var slack = $this[0].clientWidth - rowData.width - 2 * settings.padding + for (i = 0; i < rowData.data.length; i++) { + var displayData = rowData.data[i]; + // Get the HTML object from custom render function passed as argument + var displayObject = settings.render.call($this, displayData); + displayObject = $(displayObject); + extraw = Math.floor(slack/rowData.data.length) + if (i == 0) { + extraw += slack % rowData.data.length + } + // Set some basic stuff + displayObject + .css('width', displayData.width + extraw) + .css('height', displayData.height) + .css('margin-bottom', settings.padding + "px") + .css('margin-left', i == 0 ? '0' : settings.padding + "px"); //TODO:Refactor + $row.append(displayObject); + + currentItem++; + } + $this.append($row); + // console.log ( "I> rowData.data.length="+rowData.data.length +" rowData.width="+rowData.width ); + + currentRow++; + $this.data('lastRow', rowData); + } + // store the current state of settings and the items in last row + // we'll need this info when we append more items + $this.data('lastSettings', settings); + + // onComplete callback + // pass back info about list of rows and items rendered + if (typeof(settings.complete) == 'function') { + var completeData = { + renderedRows: currentRow, + renderedItems: currentItem + } + settings.complete.call($this, completeData); + } + }); + }; })(jQuery); diff --git a/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox-min.js b/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox-min.js new file mode 120000 index 0000000..9e40fd4 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox-min.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery-colorbox/jquery.colorbox-min.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/jquery.min.js b/nikola/data/themes/bootstrap3/assets/js/jquery.min.js new file mode 120000 index 0000000..5c080da --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/jquery.min.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery/dist/jquery.min.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/jquery.min.map b/nikola/data/themes/bootstrap3/assets/js/jquery.min.map new file mode 120000 index 0000000..7e2c217 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/jquery.min.map @@ -0,0 +1 @@ +../../../../../../bower_components/jquery/dist/jquery.min.map
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/templates/authors.tmpl b/nikola/data/themes/bootstrap3/templates/authors.tmpl new file mode 100644 index 0000000..2d3bbf5 --- /dev/null +++ b/nikola/data/themes/bootstrap3/templates/authors.tmpl @@ -0,0 +1,17 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> + +<%block name="content"> +% if items: + <h2>${messages("Authors")}</h2> +% endif +% if items: + <ul class="list-inline"> + % for text, link in items: + % if text not in hidden_authors: + <li><a class="reference badge" href="${link}">${text|h}</a></li> + % endif + % endfor + </ul> +% endif +</%block> diff --git a/nikola/data/themes/bootstrap3/templates/base.tmpl b/nikola/data/themes/bootstrap3/templates/base.tmpl index 5f90733..ab7805b 100644 --- a/nikola/data/themes/bootstrap3/templates/base.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base.tmpl @@ -24,11 +24,11 @@ ${template_hooks['extra_head']()} </button> <a class="navbar-brand" href="${abs_link(_link("root", None, lang))}"> %if logo_url: - <img src="${logo_url}" alt="${blog_title}" id="logo"> + <img src="${logo_url}" alt="${blog_title|h}" id="logo"> %endif % if show_blog_title: - <span id="blog-title">${blog_title}</span> + <span id="blog-title">${blog_title|h}</span> % endif </a> </div><!-- /.navbar-header --> diff --git a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl index a1e7508..587a933 100644 --- a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl @@ -26,9 +26,11 @@ dir="rtl" \ lang="${lang}"> <head> <meta charset="utf-8"> + % if use_base_tag: <base href="${abs_link(permalink)}"> + % endif %if description: - <meta name="description" content="${description}"> + <meta name="description" content="${description|h}"> %endif <meta name="viewport" content="width=device-width, initial-scale=1"> %if title == blog_title: @@ -38,6 +40,7 @@ lang="${lang}"> %endif ${html_stylesheets()} + <meta content="${theme_color}" name="theme-color"> ${html_feedlinks()} <link rel="canonical" href="${abs_link(permalink)}"> diff --git a/nikola/data/themes/bootstrap3/templates/gallery.tmpl b/nikola/data/themes/bootstrap3/templates/gallery.tmpl index 3d6c01a..af0c194 100644 --- a/nikola/data/themes/bootstrap3/templates/gallery.tmpl +++ b/nikola/data/themes/bootstrap3/templates/gallery.tmpl @@ -17,7 +17,7 @@ %if folders: <ul> % for folder, ftitle in folders: - <li><a href="${folder}"><i class="glyphicon glyphicon-folder-open"></i> ${ftitle}</a></li> + <li><a href="${folder}"><i class="glyphicon glyphicon-folder-open"></i> ${ftitle|h}</a></li> % endfor </ul> %endif @@ -27,8 +27,8 @@ <noscript> <ul class="thumbnails"> %for image in photo_array: - <li><a href="${image['url']}" class="thumbnail image-reference" title="${image['title']}"> - <img src="${image['url_thumb']}" alt="${image['title']}" /></a> + <li><a href="${image['url']}" class="thumbnail image-reference" title="${image['title']|h}"> + <img src="${image['url_thumb']}" alt="${image['title']|h}" /></a> %endfor </ul> </noscript> diff --git a/nikola/data/themes/bootstrap3/templates/listing.tmpl b/nikola/data/themes/bootstrap3/templates/listing.tmpl index 7b09e3e..8c43806 100644 --- a/nikola/data/themes/bootstrap3/templates/listing.tmpl +++ b/nikola/data/themes/bootstrap3/templates/listing.tmpl @@ -7,10 +7,10 @@ ${ui.bar(crumbs)} %if folders or files: <ul class="list-unstyled"> % for name in folders: - <li><a href="${name}"><i class="glyphicon glyphicon-folder-open"></i> ${name}</a> + <li><a href="${name|u}"><i class="glyphicon glyphicon-folder-open"></i> ${name|h}</a> % endfor % for name in files: - <li><a href="${name}.html"><i class="glyphicon glyphicon-file"></i> ${name}</a> + <li><a href="${name|u}.html"><i class="glyphicon glyphicon-file"></i> ${name|h}</a> % endfor </ul> %endif diff --git a/nikola/data/themes/bootstrap3/templates/post.tmpl b/nikola/data/themes/bootstrap3/templates/post.tmpl index 8d9f88a..469c1e1 100644 --- a/nikola/data/themes/bootstrap3/templates/post.tmpl +++ b/nikola/data/themes/bootstrap3/templates/post.tmpl @@ -10,9 +10,9 @@ <meta name="keywords" content="${post.meta('keywords')|h}"> % endif %if post.description(): - <meta name="description" itemprop="description" content="${post.description()}"> + <meta name="description" itemprop="description" content="${post.description()|h}"> %endif - <meta name="author" content="${post.author()}"> + <meta name="author" content="${post.author()|h}"> %if post.prev_post: <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html"> %endif diff --git a/nikola/data/themes/bootstrap3/templates/tags.tmpl b/nikola/data/themes/bootstrap3/templates/tags.tmpl index ead3b0a..061bb39 100644 --- a/nikola/data/themes/bootstrap3/templates/tags.tmpl +++ b/nikola/data/themes/bootstrap3/templates/tags.tmpl @@ -2,16 +2,16 @@ <%inherit file="base.tmpl"/> <%block name="content"> -<h1>${title}</h1> +<h1>${title|h}</h1> % if cat_items: % if items: <h2>${messages("Categories")}</h2> % endif % for text, full_name, path, link, indent_levels, indent_change_before, indent_change_after in cat_hierarchy: % for i in range(indent_change_before): - <ul class="unstyled"> + <ul class="list-inline"> % endfor - <li><a class="reference badge" href="${link}">${text}</a> + <li><a class="reference badge" href="${link}">${text|h}</a> % if indent_change_after <= 0: </li> % endif @@ -30,7 +30,7 @@ <ul class="list-inline"> % for text, link in items: % if text not in hidden_tags: - <li><a class="reference badge" href="${link}">${text}</a></li> + <li><a class="reference badge" href="${link}">${text|h}</a></li> % endif % endfor </ul> |
