diff options
Diffstat (limited to 'nikola/data/themes/bootstrap3')
51 files changed, 421 insertions, 19 deletions
diff --git a/nikola/data/themes/bootstrap3/README.md b/nikola/data/themes/bootstrap3/README.md index f008daf..10e673a 100644 --- a/nikola/data/themes/bootstrap3/README.md +++ b/nikola/data/themes/bootstrap3/README.md @@ -1,4 +1,4 @@ -A bootstrap3 version of the bootstrap theme. +A theme based on Bootstrap 3. There is a variant called bootstrap3-gradients which uses an extra CSS file for a *visually enhanced experience* (according to Bootstrap diff --git a/nikola/data/themes/bootstrap3/assets/css/colorbox.css b/nikola/data/themes/bootstrap3/assets/css/colorbox.css new file mode 120000 index 0000000..5f8b3b0 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/colorbox.css @@ -0,0 +1 @@ +../../../../../../bower_components/jquery-colorbox/example3/colorbox.css
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/images/controls.png b/nikola/data/themes/bootstrap3/assets/css/images/controls.png new file mode 120000 index 0000000..841a726 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/images/controls.png @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/example3/images/controls.png
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/images/loading.gif b/nikola/data/themes/bootstrap3/assets/css/images/loading.gif new file mode 120000 index 0000000..b192a75 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/css/images/loading.gif @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/example3/images/loading.gif
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/css/theme.css b/nikola/data/themes/bootstrap3/assets/css/theme.css index 9ce6472..6964ec6 100644 --- a/nikola/data/themes/bootstrap3/assets/css/theme.css +++ b/nikola/data/themes/bootstrap3/assets/css/theme.css @@ -51,12 +51,6 @@ div.figure > a > img { margin-right: auto; } -div.sidebar, div.admonition, div.attention, div.caution, div.danger, div.error, div.hint, div.important, div.note, div.tip, div.warning { - /* Issue 277 */ - border: 1px solid #aaa; - border-radius: 5px; -} - blockquote p, blockquote { font-size: 17.5px; font-weight: 300; diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ar.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ar.js new file mode 120000 index 0000000..f83073f --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ar.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-ar.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bg.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bg.js new file mode 120000 index 0000000..bafc4e0 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bg.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-bg.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bn.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bn.js new file mode 120000 index 0000000..9b995d8 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-bn.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-bn.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ca.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ca.js new file mode 120000 index 0000000..a749232 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ca.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-ca.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-cs.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-cs.js new file mode 120000 index 0000000..e4a595c --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-cs.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-cs.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-da.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-da.js new file mode 120000 index 0000000..1e9a1d6 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-da.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-da.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-de.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-de.js new file mode 120000 index 0000000..748f53b --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-de.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-de.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-es.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-es.js new file mode 120000 index 0000000..1154fb5 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-es.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-es.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-et.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-et.js new file mode 120000 index 0000000..483e192 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-et.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-et.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fa.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fa.js new file mode 120000 index 0000000..a30b13c --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fa.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-fa.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fi.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fi.js new file mode 120000 index 0000000..2a7e8ad --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fi.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-fi.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fr.js new file mode 120000 index 0000000..e359290 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-fr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-fr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gl.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gl.js new file mode 120000 index 0000000..04fa276 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gl.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-gl.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gr.js new file mode 120000 index 0000000..d8105ab --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-gr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-gr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-he.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-he.js new file mode 120000 index 0000000..72dddf5 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-he.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-he.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hr.js new file mode 120000 index 0000000..34aa3c0 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-hr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hu.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hu.js new file mode 120000 index 0000000..a87f03c --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-hu.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-hu.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-id.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-id.js new file mode 120000 index 0000000..31053b8 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-id.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-id.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-it.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-it.js new file mode 120000 index 0000000..aad9d22 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-it.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-it.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ja.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ja.js new file mode 120000 index 0000000..3ea27c2 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ja.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-ja.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-kr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-kr.js new file mode 120000 index 0000000..3e23b4a --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-kr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-kr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lt.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lt.js new file mode 120000 index 0000000..374b9bb --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lt.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-lt.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lv.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lv.js new file mode 120000 index 0000000..101b476 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-lv.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-lv.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-my.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-my.js new file mode 120000 index 0000000..8e14f15 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-my.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-my.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-nl.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-nl.js new file mode 120000 index 0000000..2d03d48 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-nl.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-nl.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-no.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-no.js new file mode 120000 index 0000000..9af0ba7 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-no.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-no.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pl.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pl.js new file mode 120000 index 0000000..34f8ab1 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pl.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pl.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js new file mode 120000 index 0000000..e20bd38 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-BR.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ro.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ro.js new file mode 120000 index 0000000..555f2e6 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ro.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-ro.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ru.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ru.js new file mode 120000 index 0000000..bac4855 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-ru.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-ru.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-si.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-si.js new file mode 120000 index 0000000..65b0492 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-si.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-si.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sk.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sk.js new file mode 120000 index 0000000..99859fd --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sk.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-sk.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sr.js new file mode 120000 index 0000000..c4fd9d5 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-sr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sv.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sv.js new file mode 120000 index 0000000..d7f26e0 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-sv.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-sv.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-tr.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-tr.js new file mode 120000 index 0000000..86fd98f --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-tr.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-tr.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-uk.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-uk.js new file mode 120000 index 0000000..7cd1336 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-uk.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-uk.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-CN.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-CN.js new file mode 120000 index 0000000..e6c5965 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-CN.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-zh-CN.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-TW.js b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-TW.js new file mode 120000 index 0000000..bd2254c --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/colorbox-i18n/jquery.colorbox-zh-TW.js @@ -0,0 +1 @@ +../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-zh-TW.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 new file mode 100644 index 0000000..c0d986b --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js @@ -0,0 +1,265 @@ +/** + * 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 ); + } + }); + }; + +})(jQuery); diff --git a/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox.js b/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox.js new file mode 120000 index 0000000..5ee7a90 --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/jquery.colorbox.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery-colorbox/jquery.colorbox.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/assets/js/jquery.js b/nikola/data/themes/bootstrap3/assets/js/jquery.js new file mode 120000 index 0000000..966173b --- /dev/null +++ b/nikola/data/themes/bootstrap3/assets/js/jquery.js @@ -0,0 +1 @@ +../../../../../../bower_components/jquery/dist/jquery.js
\ No newline at end of file diff --git a/nikola/data/themes/bootstrap3/parent b/nikola/data/themes/bootstrap3/parent index b7c200a..df967b9 100644 --- a/nikola/data/themes/bootstrap3/parent +++ b/nikola/data/themes/bootstrap3/parent @@ -1 +1 @@ -bootstrap +base diff --git a/nikola/data/themes/bootstrap3/templates/base.tmpl b/nikola/data/themes/bootstrap3/templates/base.tmpl index 16aebce..5f90733 100644 --- a/nikola/data/themes/bootstrap3/templates/base.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base.tmpl @@ -13,10 +13,10 @@ ${template_hooks['extra_head']()} <!-- Menubar --> -<nav class="navbar navbar-inverse navbar-static-top" role="navigation"> +<nav class="navbar navbar-inverse navbar-static-top"> <div class="container"><!-- This keeps the margins nice --> <div class="navbar-header"> - <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-navbar" aria-controls="bs-navbar" aria-expanded="false"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> @@ -32,7 +32,7 @@ ${template_hooks['extra_head']()} % endif </a> </div><!-- /.navbar-header --> - <div class="collapse navbar-collapse navbar-ex1-collapse"> + <div class="collapse navbar-collapse" id="bs-navbar" aria-expanded="false"> <ul class="nav navbar-nav"> ${base.html_navigation_links()} ${template_hooks['menu']()} diff --git a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl index 8ea843a..a1e7508 100644 --- a/nikola/data/themes/bootstrap3/templates/base_helper.tmpl +++ b/nikola/data/themes/bootstrap3/templates/base_helper.tmpl @@ -26,17 +26,20 @@ dir="rtl" \ lang="${lang}"> <head> <meta charset="utf-8"> + <base href="${abs_link(permalink)}"> %if description: <meta name="description" content="${description}"> %endif <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>${title|striphtml} | ${blog_title|striphtml}</title> + %if title == blog_title: + <title>${blog_title|h}</title> + %else: + <title>${title|h} | ${blog_title|h}</title> + %endif ${html_stylesheets()} ${html_feedlinks()} - %if permalink: - <link rel="canonical" href="${abs_link(permalink)}"> - %endif + <link rel="canonical" href="${abs_link(permalink)}"> %if favicons: %for name, file, size in favicons: @@ -129,7 +132,7 @@ lang="${lang}"> <%def name="html_navigation_links()"> %for url, text in navigation_links[lang]: % if isinstance(url, tuple): - <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown">${text} <b class="caret"></b></a> + <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">${text} <b class="caret"></b></a> <ul class="dropdown-menu"> %for suburl, text in url: % if rel_link(permalink, suburl) == "#": @@ -154,7 +157,7 @@ lang="${lang}"> ${rss_link} %elif generate_rss: %if len(translations) > 1: - %for language in translations: + %for language in sorted(translations): <link rel="alternate" type="application/rss+xml" title="RSS (${language})" href="${_link('rss', None, language)}"> %endfor %else: @@ -163,7 +166,7 @@ lang="${lang}"> %endif %if generate_atom: %if len(translations) > 1: - %for language in translations: + %for language in sorted(translations): <link rel="alternate" type="application/atom+xml" title="Atom (${language})" href="${_link('index_atom', None, language)}"> %endfor %else: @@ -173,7 +176,7 @@ lang="${lang}"> </%def> <%def name="html_translations()"> - %for langname in translations.keys(): + %for langname in sorted(translations): %if langname != lang: <li><a href="${abs_link(_link("root", None, langname))}" rel="alternate" hreflang="${langname}">${messages("LANGUAGE", langname)}</a></li> %endif diff --git a/nikola/data/themes/bootstrap3/templates/post.tmpl b/nikola/data/themes/bootstrap3/templates/post.tmpl new file mode 100644 index 0000000..8d9f88a --- /dev/null +++ b/nikola/data/themes/bootstrap3/templates/post.tmpl @@ -0,0 +1,59 @@ +## -*- coding: utf-8 -*- +<%namespace name="helper" file="post_helper.tmpl"/> +<%namespace name="pheader" file="post_header.tmpl"/> +<%namespace name="comments" file="comments_helper.tmpl"/> +<%inherit file="base.tmpl"/> + +<%block name="extra_head"> + ${parent.extra_head()} + % if post.meta('keywords'): + <meta name="keywords" content="${post.meta('keywords')|h}"> + % endif + %if post.description(): + <meta name="description" itemprop="description" content="${post.description()}"> + %endif + <meta name="author" content="${post.author()}"> + %if post.prev_post: + <link rel="prev" href="${post.prev_post.permalink()}" title="${post.prev_post.title()|h}" type="text/html"> + %endif + %if post.next_post: + <link rel="next" href="${post.next_post.permalink()}" title="${post.next_post.title()|h}" type="text/html"> + %endif + % if post.is_draft: + <meta name="robots" content="noindex"> + % endif + ${helper.open_graph_metadata(post)} + ${helper.twitter_card_information(post)} + ${helper.meta_translations(post)} +</%block> + +<%block name="content"> +<article class="post-${post.meta('type')} h-entry hentry postpage" itemscope="itemscope" itemtype="http://schema.org/Article"> + ${pheader.html_post_header()} + <div class="e-content entry-content" itemprop="articleBody text"> + ${post.text()} + </div> + <aside class="postpromonav"> + <nav> + ${helper.html_tags(post)} + ${helper.html_pager(post)} + </nav> + </aside> + % if not post.meta('nocomments') and site_has_comments: + <section class="comments hidden-print"> + <h2>${messages("Comments")}</h2> + ${comments.comment_form(post.permalink(absolute=True), post.title(), post._base_path)} + </section> + % endif + ${helper.mathjax_script(post)} +</article> +${comments.comment_link_script()} +</%block> + +<%block name="sourcelink"> +% if show_sourcelink: + <li> + <a href="${post.source_link()}" id="sourcelink">${messages("Source")}</a> + </li> +% endif +</%block> diff --git a/nikola/data/themes/bootstrap3/templates/tags.tmpl b/nikola/data/themes/bootstrap3/templates/tags.tmpl new file mode 100644 index 0000000..ead3b0a --- /dev/null +++ b/nikola/data/themes/bootstrap3/templates/tags.tmpl @@ -0,0 +1,38 @@ +## -*- coding: utf-8 -*- +<%inherit file="base.tmpl"/> + +<%block name="content"> +<h1>${title}</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"> + % endfor + <li><a class="reference badge" href="${link}">${text}</a> + % if indent_change_after <= 0: + </li> + % endif + % for i in range(-indent_change_after): + </ul> + % if i + 1 < len(indent_levels): + </li> + % endif + % endfor + % endfor + % if items: + <h2>${messages("Tags")}</h2> + % endif +%endif +% if items: + <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> + % endif + % endfor + </ul> +% endif +</%block> |
