summaryrefslogtreecommitdiffstats
path: root/nikola/data/themes/bootstrap-jinja/assets
diff options
context:
space:
mode:
authorLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:02 -0300
committerLibravatarAgustin Henze <tin@sluc.org.ar>2015-07-08 07:35:02 -0300
commitb0b24795b24ee6809397fbbadf42f31f310a219f (patch)
tree46d05bb47460b4ec679211717c4ab07414b80d9c /nikola/data/themes/bootstrap-jinja/assets
parent5ec02211214350ee558fd9f6bb052264fd24f75e (diff)
Imported Upstream version 7.6.0upstream/7.6.0
Diffstat (limited to 'nikola/data/themes/bootstrap-jinja/assets')
-rw-r--r--[l---------]nikola/data/themes/bootstrap-jinja/assets/css/theme.css206
l---------nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js1
l---------nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js1
l---------nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js1
-rw-r--r--[l---------]nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js266
l---------nikola/data/themes/bootstrap-jinja/assets/js/jquery.js1
6 files changed, 473 insertions, 3 deletions
diff --git a/nikola/data/themes/bootstrap-jinja/assets/css/theme.css b/nikola/data/themes/bootstrap-jinja/assets/css/theme.css
index 7566a80..4fc31a8 120000..100644
--- a/nikola/data/themes/bootstrap-jinja/assets/css/theme.css
+++ b/nikola/data/themes/bootstrap-jinja/assets/css/theme.css
@@ -1 +1,205 @@
-../../../bootstrap/assets/css/theme.css \ No newline at end of file
+#container {
+ width: 960px;
+ margin: 50 auto;
+}
+
+#contentcolumn {
+ max-width: 760px;
+}
+#q {
+ width: 150px;
+}
+
+img {
+ max-width: 90%;
+}
+
+.postbox {
+ border-bottom: 2px solid darkgrey;
+ margin-bottom: 12px;
+}
+
+.footerbox {padding: 15px; text-align: center; margin-bottom: 15px;}
+
+td.label {
+ /* Issue #290 */
+ background-color: inherit;
+}
+
+.footnote-reference {
+ /* Issue 290 */
+ vertical-align: super;
+ font-size: xx-small;
+}
+
+.caption {
+ /* Issue 292 */
+ text-align: center;
+ padding-top: 1em;
+}
+
+div.figure > img,
+div.figure > a > img {
+ /* Issue 292 */
+ display: block;
+ margin-left: auto;
+ 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;
+ line-height: 1.25;
+}
+
+ul.bricks > li {
+ display: inline;
+ background-color: lightblue;
+ padding: 8px;
+ border-radius: 5px;
+ line-height: 3;
+ white-space:nowrap;
+ margin: 3px;
+}
+
+ul.breadcrumb > li:before {
+ content: " / ";
+}
+
+pre, pre code {
+ white-space: pre;
+ word-wrap: normal;
+ overflow: auto;
+}
+
+article.post-micro {
+ font-family: Georgia, 'Times New Roman', Times, serif;
+ font-size: 1.5em;
+}
+
+.image-block {
+ display: inline-block;
+}
+
+.flowr_row {
+ width: 100%;
+}
+
+.tags {
+ padding-left: 0;
+ margin-left: -5px;
+ list-style: none;
+ text-align: center;
+
+}
+
+.tags > li {
+ display: inline-block;
+ min-width: 10px;
+ padding: 3px 7px;
+ font-size: 12px;
+ font-weight: bold;
+ line-height: 1;
+ color: #fff;
+ text-align: center;
+ white-space: nowrap;
+ vertical-align: baseline;
+ background-color: #999;
+ border-radius: 10px;
+}
+
+.tags > li a {
+ color: #fff;
+}
+
+.metadata p:before,
+.postlist .listdate:before {
+ content: " — ";
+}
+
+.metadata p:first-of-type:before {
+ content: "";
+}
+
+.metadata p {
+ display: inline;
+}
+
+.posttranslations h3 {
+ display: inline;
+ font-size: 1em;
+ font-weight: bold;
+}
+
+.posttranslations h3:last-child {
+ display: none;
+}
+
+.entry-content {
+ margin-top: 1em;
+}
+
+.navbar .brand {
+ padding: 0 20px;
+}
+
+.navbar .brand #blog-title {
+ padding: 10px 0;
+ display: inline-block;
+}
+
+.sr-only {
+ position: absolute;
+ width: 1px;
+ height: 1px;
+ padding: 0;
+ margin: -1px;
+ overflow: hidden;
+ clip: rect(0, 0, 0, 0);
+ border: 0;
+}
+
+.sr-only-focusable:active,
+.sr-only-focusable:focus {
+ position: static;
+ width: auto;
+ height: auto;
+ margin: 0;
+ overflow: visible;
+ clip: auto;
+}
+
+/* hat tip bootstrap/html5 boilerplate */
+@media print {
+ *, *:before, *:after {
+ font-family: Garamond, Junicode, serif;
+ }
+
+ body {
+ font-size: 12pt;
+ }
+
+ article .entry-title a[href]:after,
+ article .metadata a[href]:after,
+ article .tags a[href]:after {
+ content: "";
+ }
+
+ article .metadata .sourceline {
+ display: none;
+ }
+
+ article .metadata .linkline a[href]:after {
+ content: " (" attr(href) ")";
+ }
+
+ .navbar {
+ display: none;
+ }
+}
diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-bn.js
new file mode 120000
index 0000000..9b995d8
--- /dev/null
+++ b/nikola/data/themes/bootstrap-jinja/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/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-BR.js
new file mode 120000
index 0000000..e20bd38
--- /dev/null
+++ b/nikola/data/themes/bootstrap-jinja/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/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js b/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js
deleted file mode 120000
index 76f289e..0000000
--- a/nikola/data/themes/bootstrap-jinja/assets/js/colorbox-i18n/jquery.colorbox-pt-br.js
+++ /dev/null
@@ -1 +0,0 @@
-../../../../../../../bower_components/jquery-colorbox/i18n/jquery.colorbox-pt-br.js \ No newline at end of file
diff --git a/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js b/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js
index c195756..c0d986b 120000..100644
--- a/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js
+++ b/nikola/data/themes/bootstrap-jinja/assets/js/flowr.plugin.js
@@ -1 +1,265 @@
-../../../bootstrap/assets/js/flowr.plugin.js \ No newline at end of file
+/**
+ * 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/bootstrap-jinja/assets/js/jquery.js b/nikola/data/themes/bootstrap-jinja/assets/js/jquery.js
new file mode 120000
index 0000000..966173b
--- /dev/null
+++ b/nikola/data/themes/bootstrap-jinja/assets/js/jquery.js
@@ -0,0 +1 @@
+../../../../../../bower_components/jquery/dist/jquery.js \ No newline at end of file