Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: b83c2d93e1a7
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: a52f395eb26d
Choose a head ref
  • 4 commits
  • 3 files changed
  • 1 contributor

Commits on Jan 4, 2016

  1. fix #2202

    ralsina committed Jan 4, 2016
    Copy the full SHA
    4d44d47 View commit details

Commits on Jan 5, 2016

  1. Copy the full SHA
    0f29307 View commit details

Commits on Jan 6, 2016

  1. Copy the full SHA
    186c50a View commit details
  2. make things atomic

    ralsina committed Jan 6, 2016
    Copy the full SHA
    a52f395 View commit details
Showing with 10 additions and 6 deletions.
  1. +1 −0 CHANGES.txt
  2. +2 −2 nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js
  3. +7 −4 nikola/state.py
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -16,6 +16,7 @@ Bugfixes
--------

* Decide is_mathjax based on current language tags (Issue #2205)
* Don't duplicate images in flowr when resizing page (Issue #2202)

New in v7.7.4
=============
4 changes: 2 additions & 2 deletions nikola/data/themes/bootstrap3/assets/js/flowr.plugin.js
Original file line number Diff line number Diff line change
@@ -180,7 +180,7 @@
}
} //utils

// If the resposive var is set to true then listen for resize method
// If the responsive 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() {
@@ -211,7 +211,7 @@
var currentItem = 0;

// Store all the data
var allData = $this.data('data') || [];
var allData = [];
for (i = 0; i < data.length; i++) {
allData.push(data[i]);
}
11 changes: 7 additions & 4 deletions nikola/state.py
Original file line number Diff line number Diff line change
@@ -28,6 +28,7 @@

import json
import os
import shutil

from . import utils

@@ -47,12 +48,12 @@ def __init__(self, path):
self._path = path
utils.makedirs(os.path.dirname(path))
self.data = {}
if os.path.isfile(path):
with open(path) as inf:
self.data = json.load(inf)

def get(self, key):
"""Get data stored in key."""
if os.path.isfile(path):
with open(path) as inf:
self.data = json.load(inf)
return self.data.get(key)

def set(self, key, value):
@@ -67,5 +68,7 @@ def delete(self, key):
self._save()

def _save(self):
with open(self._path, 'w') as outf:
tpath = self._path + '.tmp'
with open(tpath, 'w') as outf:
json.dump(self.data, outf, sort_keys=True, indent=2)
shutil.move(tpath, self.path)