Merge branch 'feature/eslint' into develop
This commit is contained in:
commit
253aa6a235
85 changed files with 324 additions and 295 deletions
22
.eslintrc.yml
Normal file
22
.eslintrc.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
env:
|
||||
browser: true
|
||||
es6: true
|
||||
extends: 'eslint:recommended'
|
||||
rules:
|
||||
indent:
|
||||
- error
|
||||
- 4
|
||||
linebreak-style:
|
||||
- error
|
||||
- unix
|
||||
quotes:
|
||||
- error
|
||||
- single
|
||||
semi:
|
||||
- error
|
||||
- always
|
||||
no-console:
|
||||
- error
|
||||
- allow:
|
||||
- warn
|
||||
- error
|
28
gulpfile.js
28
gulpfile.js
|
@ -22,17 +22,17 @@ elixir(function(mix) {
|
|||
'assets/css/alertify.css',
|
||||
'assets/css/sanitize.min.css',
|
||||
'assets/css/prism.css',
|
||||
'assets/js/libs/fetch.js',
|
||||
'assets/js/libs/alertify.js',
|
||||
'assets/js/libs/store2.min.js',
|
||||
'assets/js/libs/Autolinker.min.js',
|
||||
'assets/js/libs/marked.min.js',
|
||||
'assets/js/libs/prism.js',
|
||||
'assets/js/form-save.js',
|
||||
'assets/js/links.js',
|
||||
'assets/js/maps.js',
|
||||
'assets/js/newplace.js',
|
||||
'assets/js/newnote.js',
|
||||
'assets/js/fetch.js',
|
||||
'assets/js/alertify.js',
|
||||
'assets/js/store2.min.js',
|
||||
'assets/js/Autolinker.min.js',
|
||||
'assets/js/marked.min.js',
|
||||
'assets/js/prism.js',
|
||||
]);
|
||||
});
|
||||
|
||||
|
@ -60,6 +60,18 @@ gulp.task('br-built-js', function() {
|
|||
.pipe(gulp.dest('public/build/assets/js/'));
|
||||
});
|
||||
|
||||
gulp.task('gzip-built-libs-js', function() {
|
||||
return gulp.src('public/build/assets/js/libs/*.js')
|
||||
.pipe(zopfli({ format: 'gzip', append: true }))
|
||||
.pipe(gulp.dest('public/build/assets/js/libs/'));
|
||||
});
|
||||
|
||||
gulp.task('br-built-libs-js', function() {
|
||||
return gulp.src('public/build/assets/js/libs/*.js')
|
||||
.pipe(brotli.compress({mode: 1, quality: 11}))
|
||||
.pipe(gulp.dest('public/build/assets/js/libs/'));
|
||||
});
|
||||
|
||||
gulp.task('bower', function() {
|
||||
//copy JS files
|
||||
gulp.src([
|
||||
|
@ -69,7 +81,7 @@ gulp.task('bower', function() {
|
|||
'bower_components/Autolinker.js/dist/Autolinker.min.js',
|
||||
'bower_components/marked/marked.min.js',
|
||||
])
|
||||
.pipe(gulp.dest('public/assets/js/'));
|
||||
.pipe(gulp.dest('public/assets/js/libs/'));
|
||||
//copy CSS files
|
||||
gulp.src([
|
||||
'bower_components/alertify.js/dist/css/alertify.css',
|
||||
|
@ -78,4 +90,4 @@ gulp.task('bower', function() {
|
|||
.pipe(gulp.dest('public/assets/css/'));
|
||||
});
|
||||
|
||||
gulp.task('compress', ['gzip-built-css', 'br-built-css', 'gzip-built-js', 'br-built-js']);
|
||||
gulp.task('compress', ['gzip-built-css', 'br-built-css', 'gzip-built-js', 'br-built-js', 'gzip-built-libs-js', 'br-built-libs-js']);
|
||||
|
|
39
package.json
39
package.json
|
@ -1,19 +1,24 @@
|
|||
{
|
||||
"name": "jbuk-frontend",
|
||||
"version": "0.0.1",
|
||||
"repository": "https://github.com/jonnybarnes/jonnybarnes.uk",
|
||||
"license": "CC0-1.0",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.9",
|
||||
"gulp-brotli": "^1.0.1",
|
||||
"gulp-zopfli": "^1.0.0",
|
||||
"laravel-elixir": "^5.0.0",
|
||||
"lint-staged": "^1.0.1",
|
||||
"pre-commit": "^1.1.3"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prod": "gulp --production",
|
||||
"dev": "gulp watch"
|
||||
}
|
||||
"name": "jbuk-frontend",
|
||||
"version": "0.0.1",
|
||||
"repository": "https://github.com/jonnybarnes/jonnybarnes.uk",
|
||||
"license": "CC0-1.0",
|
||||
"devDependencies": {
|
||||
"gulp": "~3.9",
|
||||
"gulp-brotli": "^1.0.1",
|
||||
"gulp-zopfli": "^1.0.0",
|
||||
"laravel-elixir": "^5.0.0",
|
||||
"lint-staged": "^1.0.1",
|
||||
"pre-commit": "^1.1.3"
|
||||
},
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prod": "gulp --production",
|
||||
"dev": "gulp watch",
|
||||
"lint-staged": "lint-staged"
|
||||
},
|
||||
"lint-staged": {
|
||||
"eslint": "public/assets/js/*.js"
|
||||
},
|
||||
"pre-commit": ["lint-staged"]
|
||||
}
|
||||
|
|
4
public/assets/css/global.css
vendored
4
public/assets/css/global.css
vendored
|
@ -11,10 +11,8 @@ html {
|
|||
box-sizing: inherit; }
|
||||
|
||||
#topheader {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-flow: row;
|
||||
-ms-flex-flow: row;
|
||||
flex-flow: row; }
|
||||
|
||||
|
@ -158,7 +156,6 @@ article header {
|
|||
|
||||
body {
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-feature-settings: "liga";
|
||||
font-feature-settings: "liga";
|
||||
font-family: "leitura-news", serif;
|
||||
font-size: 1.2em; }
|
||||
|
@ -173,7 +170,6 @@ h1 {
|
|||
text-decoration: none; }
|
||||
|
||||
nav {
|
||||
-webkit-font-feature-settings: "dlig";
|
||||
font-feature-settings: "dlig"; }
|
||||
|
||||
article header h1 a {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,69 +1,69 @@
|
|||
/* global alertify, store */
|
||||
var feature = {
|
||||
addEventListener : !!window.addEventListener,
|
||||
querySelectorAll : !!document.querySelectorAll,
|
||||
addEventListener : !!window.addEventListener,
|
||||
querySelectorAll : !!document.querySelectorAll
|
||||
};
|
||||
if(feature.addEventListener && feature.querySelectorAll) {
|
||||
this.init();
|
||||
}
|
||||
function init() {
|
||||
var keys = getKeys();
|
||||
for(var i = 0; i < keys.length; i++) {
|
||||
if(store.get(keys[i])) {
|
||||
var formId = keys[i].split("~")[1];
|
||||
document.getElementById(formId).value = store.get(keys[i]);
|
||||
|
||||
if (feature.addEventListener && feature.querySelectorAll) {
|
||||
var keys = getKeys();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
if (store.get(keys[i])) {
|
||||
var formId = keys[i].split('~')[1];
|
||||
document.getElementById(formId).value = store.get(keys[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var timerId = window.setInterval(function() {
|
||||
var saved = false;
|
||||
var inputs = document.querySelectorAll('input[type=text], textarea');
|
||||
for(var i = 0; i < inputs.length; i++) {
|
||||
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
|
||||
if(store.get(key) !== inputs[i].value && inputs[i].value !== "") {
|
||||
store.set(key, inputs[i].value);
|
||||
saved = true;
|
||||
var saved = false;
|
||||
var inputs = document.querySelectorAll('input[type=text], textarea');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
|
||||
if (store.get(key) !== inputs[i].value && inputs[i].value !== '') {
|
||||
store.set(key, inputs[i].value);
|
||||
saved = true;
|
||||
}
|
||||
}
|
||||
if (saved === true) {
|
||||
alertify.logPosition('top right');
|
||||
alertify.success('Auto saved text');
|
||||
}
|
||||
}
|
||||
if(saved === true) {
|
||||
alertify.logPosition('top right');
|
||||
alertify.success('Auto saved text');
|
||||
}
|
||||
}, 5000);
|
||||
var forms = document.querySelectorAll('form');
|
||||
for(var f = 0; f < forms.length; f++) {
|
||||
var form = forms[f];
|
||||
form.addEventListener('submit', function() {
|
||||
window.clearInterval(timerId);
|
||||
var formId = form.id;
|
||||
var storedKeys = store.keys();
|
||||
for(var i = 0; i < storedKeys.length; i++) {
|
||||
if(storedKeys[i].indexOf(formId) > -1) {
|
||||
store.remove(storedKeys[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
for (var f = 0; f < forms.length; f++) {
|
||||
var form = forms[f];
|
||||
form.addEventListener('submit', function() {
|
||||
window.clearInterval(timerId);
|
||||
var formId = form.id;
|
||||
var storedKeys = store.keys();
|
||||
for (var i = 0; i < storedKeys.length; i++) {
|
||||
if (storedKeys[i].indexOf(formId) > -1) {
|
||||
store.remove(storedKeys[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function getKeys() {
|
||||
var keys = [];
|
||||
var formFields = document.querySelectorAll('input[type=text], textarea');
|
||||
for(var f = 0; f < formFields.length; f++) {
|
||||
var parent = getFormElement(formFields[f]);
|
||||
if(parent !== false) {
|
||||
var key = parent.id + '~' + formFields[f].id;
|
||||
keys.push(key);
|
||||
var keys = [];
|
||||
var formFields = document.querySelectorAll('input[type=text], textarea');
|
||||
for (var f = 0; f < formFields.length; f++) {
|
||||
var parent = getFormElement(formFields[f]);
|
||||
if (parent !== false) {
|
||||
var key = parent.id + '~' + formFields[f].id;
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
return keys;
|
||||
}
|
||||
function getFormElement(elem) {
|
||||
if(elem.nodeName.toLowerCase() !== 'body') {
|
||||
var parent = elem.parentNode;
|
||||
if(parent.nodeName.toLowerCase() === 'form') {
|
||||
return parent;
|
||||
if (elem.nodeName.toLowerCase() !== 'body') {
|
||||
var parent = elem.parentNode;
|
||||
if (parent.nodeName.toLowerCase() === 'form') {
|
||||
return parent;
|
||||
} else {
|
||||
return getFormElement(parent);
|
||||
}
|
||||
} else {
|
||||
return getFormElement(parent);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* global Autolinker */
|
||||
//the autlinker object
|
||||
var autolinker = new Autolinker();
|
||||
|
||||
|
@ -6,20 +7,20 @@ var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
|
|||
|
||||
//grab the notes and loop through them
|
||||
var notes = document.querySelectorAll('.e-content');
|
||||
for(var i = 0; i < notes.length; i++) {
|
||||
//get Youtube ID
|
||||
var ytid = notes[i].textContent.match(ytidregex);
|
||||
if(ytid !== null) {
|
||||
var id = ytid[1];
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.classList.add('youtube');
|
||||
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
|
||||
iframe.setAttribute('frameborder', 0);
|
||||
iframe.setAttribute('allowfullscreen', 'true');
|
||||
notes[i].appendChild(iframe);
|
||||
}
|
||||
//now linkify everything
|
||||
var orig = notes[i].innerHTML;
|
||||
var linked = autolinker.link(orig);
|
||||
notes[i].innerHTML = linked;
|
||||
for (var i = 0; i < notes.length; i++) {
|
||||
//get Youtube ID
|
||||
var ytid = notes[i].textContent.match(ytidregex);
|
||||
if (ytid !== null) {
|
||||
var id = ytid[1];
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.classList.add('youtube');
|
||||
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
|
||||
iframe.setAttribute('frameborder', 0);
|
||||
iframe.setAttribute('allowfullscreen', 'true');
|
||||
notes[i].appendChild(iframe);
|
||||
}
|
||||
//now linkify everything
|
||||
var orig = notes[i].innerHTML;
|
||||
var linked = autolinker.link(orig);
|
||||
notes[i].innerHTML = linked;
|
||||
}
|
|
@ -1,6 +1,7 @@
|
|||
/* global L */
|
||||
//This code runs on page load and looks for <div class="map">, then adds map
|
||||
var mapDivs = document.querySelectorAll('.map');
|
||||
for(var i = 0; i < mapDivs.length; i++) {
|
||||
for (var i = 0; i < mapDivs.length; i++) {
|
||||
var mapDiv = mapDivs[i];
|
||||
var latitude = mapDiv.dataset.latitude;
|
||||
var longitude = mapDiv.dataset.longitude;
|
||||
|
@ -8,8 +9,8 @@ for(var i = 0; i < mapDivs.length; i++) {
|
|||
var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
}));
|
||||
var marker = L.marker([latitude, longitude]).addTo(map);
|
||||
detectRetina: true
|
||||
}));
|
||||
L.marker([latitude, longitude]).addTo(map);
|
||||
map.scrollWheelZoom.disable();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* global L */
|
||||
if ('geolocation' in navigator) {
|
||||
var button = document.querySelector('#locate');
|
||||
if (button.addEventListener) {
|
||||
|
@ -39,7 +40,7 @@ function addPlaces(latitude, longitude) {
|
|||
addMap(latitude, longitude);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -57,11 +58,11 @@ function addMap(latitude, longitude, places) {
|
|||
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
detectRetina: true
|
||||
}));
|
||||
//add a marker for the current location
|
||||
var marker = L.marker([latitude, longitude], {
|
||||
draggable: true,
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
//when the location marker is dragged, if the new place form elements exist
|
||||
//update the lat/lng values
|
||||
|
@ -81,13 +82,13 @@ function addMap(latitude, longitude, places) {
|
|||
var noLocation = document.createElement('option');
|
||||
noLocation.setAttribute('selected', 'selected');
|
||||
noLocation.setAttribute('value', 'no-location');
|
||||
noLocText = document.createTextNode('Select no location');
|
||||
var noLocText = document.createTextNode('Select no location');
|
||||
noLocation.appendChild(noLocText);
|
||||
selectEl.appendChild(noLocation);
|
||||
form.insertBefore(selectEl, div);
|
||||
if (places !== null) {
|
||||
//add the places both to the map and <select>
|
||||
places.forEach(function (item, index, array) {
|
||||
places.forEach(function (item) {
|
||||
var option = document.createElement('option');
|
||||
option.setAttribute('value', item[1]);
|
||||
var text = document.createTextNode(item[0]);
|
||||
|
@ -106,7 +107,7 @@ function addMap(latitude, longitude, places) {
|
|||
placeMarker.bindPopup(name, {
|
||||
closeButton: true
|
||||
});
|
||||
placeMarker.on('click', function (e) {
|
||||
placeMarker.on('click', function () {
|
||||
map.panTo([item[2], item[3]]);
|
||||
selectPlace(item[1]);
|
||||
});
|
||||
|
@ -130,7 +131,7 @@ function addMap(latitude, longitude, places) {
|
|||
//add the form elements
|
||||
var nameLabel = document.createElement('label');
|
||||
nameLabel.setAttribute('for', 'place-name');
|
||||
nameLabel.classList.add('place-label')
|
||||
nameLabel.classList.add('place-label');
|
||||
nameLabel.appendChild(document.createTextNode('Place Name:'));
|
||||
var nameEl = document.createElement('input');
|
||||
nameEl.setAttribute('placeholder', 'Name');
|
||||
|
@ -194,8 +195,16 @@ function addMap(latitude, longitude, places) {
|
|||
method: 'post',
|
||||
body: formData
|
||||
})
|
||||
.then(status)
|
||||
.then(json)
|
||||
.then(function (response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
return Promise.reject(new Error(response.statusText));
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (placeJson) {
|
||||
//create the slug from the url
|
||||
var urlParts = placeJson.split('/');
|
||||
|
@ -206,8 +215,8 @@ function addMap(latitude, longitude, places) {
|
|||
form.removeChild(document.querySelector('#place-latitude'));
|
||||
form.removeChild(document.querySelector('#place-longitude'));
|
||||
var labels = document.querySelectorAll('.place-label');
|
||||
for (var label of labels) {
|
||||
form.removeChild(label);
|
||||
for (var i = 0; i < labels.length; ++i) {
|
||||
form.removeChild(labels[i]);
|
||||
}
|
||||
form.removeChild(document.querySelector('#place-submit'));
|
||||
form.removeChild(document.querySelector('#create-new-place'));
|
||||
|
@ -231,16 +240,16 @@ function addMap(latitude, longitude, places) {
|
|||
newPlaceMarker.bindPopup(newName, {
|
||||
closeButton: true
|
||||
});
|
||||
newPlaceMarker.on('click', function (e) {
|
||||
newPlaceMarker.on('click', function () {
|
||||
map.panTo([placeJson['latitude'], placeJson['longitude']]);
|
||||
selectPlace(slug);
|
||||
});
|
||||
//make selected
|
||||
selectPlace(slug);
|
||||
}).catch(function (placeError) {
|
||||
console.log(placeError);
|
||||
console.error(placeError);
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
form.insertBefore(newLocButton, div);
|
||||
}
|
||||
|
@ -270,15 +279,3 @@ function getLongitudeFromMapboxMarker(latlng) {
|
|||
|
||||
return location[1];
|
||||
}
|
||||
|
||||
function status(response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
return Promise.reject(new Error(response.statusText));
|
||||
}
|
||||
}
|
||||
|
||||
function json(response) {
|
||||
return response.json();
|
||||
}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
/* global L */
|
||||
var button = document.querySelector('#locate');
|
||||
|
||||
if (button.addEventListener) {
|
||||
|
@ -12,8 +13,6 @@ function getLocation() {
|
|||
updateForm(position.coords.latitude, position.coords.longitude);
|
||||
addMap(position.coords.latitude, position.coords.longitude);
|
||||
});
|
||||
} else {
|
||||
console.log('I need to do something when geoloaction isn’t available.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,10 +32,10 @@ function addMap(latitude, longitude) {
|
|||
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
detectRetina: true
|
||||
}));
|
||||
var marker = L.marker([latitude, longitude], {
|
||||
draggable: true,
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
marker.on('dragend', function () {
|
||||
var markerLocation = marker.getLatLng();
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -11,10 +11,8 @@ html {
|
|||
box-sizing: inherit; }
|
||||
|
||||
#topheader {
|
||||
display: -webkit-flex;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-webkit-flex-flow: row;
|
||||
-ms-flex-flow: row;
|
||||
flex-flow: row; }
|
||||
|
||||
|
@ -158,7 +156,6 @@ article header {
|
|||
|
||||
body {
|
||||
text-rendering: optimizeLegibility;
|
||||
-webkit-font-feature-settings: "liga";
|
||||
font-feature-settings: "liga";
|
||||
font-family: "leitura-news", serif;
|
||||
font-size: 1.2em; }
|
||||
|
@ -173,7 +170,6 @@ h1 {
|
|||
text-decoration: none; }
|
||||
|
||||
nav {
|
||||
-webkit-font-feature-settings: "dlig";
|
||||
font-feature-settings: "dlig"; }
|
||||
|
||||
article header h1 a {
|
BIN
public/build/assets/css/global-f45e4f1fb0.css.br
Normal file
BIN
public/build/assets/css/global-f45e4f1fb0.css.br
Normal file
Binary file not shown.
BIN
public/build/assets/css/global-f45e4f1fb0.css.gz
Normal file
BIN
public/build/assets/css/global-f45e4f1fb0.css.gz
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
69
public/build/assets/js/form-save-4d4f6e1cb8.js
Normal file
69
public/build/assets/js/form-save-4d4f6e1cb8.js
Normal file
|
@ -0,0 +1,69 @@
|
|||
/* global alertify, store */
|
||||
var feature = {
|
||||
addEventListener : !!window.addEventListener,
|
||||
querySelectorAll : !!document.querySelectorAll
|
||||
};
|
||||
|
||||
if (feature.addEventListener && feature.querySelectorAll) {
|
||||
var keys = getKeys();
|
||||
for (var i = 0; i < keys.length; i++) {
|
||||
if (store.get(keys[i])) {
|
||||
var formId = keys[i].split('~')[1];
|
||||
document.getElementById(formId).value = store.get(keys[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var timerId = window.setInterval(function() {
|
||||
var saved = false;
|
||||
var inputs = document.querySelectorAll('input[type=text], textarea');
|
||||
for (var i = 0; i < inputs.length; i++) {
|
||||
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
|
||||
if (store.get(key) !== inputs[i].value && inputs[i].value !== '') {
|
||||
store.set(key, inputs[i].value);
|
||||
saved = true;
|
||||
}
|
||||
}
|
||||
if (saved === true) {
|
||||
alertify.logPosition('top right');
|
||||
alertify.success('Auto saved text');
|
||||
}
|
||||
}, 5000);
|
||||
var forms = document.querySelectorAll('form');
|
||||
for (var f = 0; f < forms.length; f++) {
|
||||
var form = forms[f];
|
||||
form.addEventListener('submit', function() {
|
||||
window.clearInterval(timerId);
|
||||
var formId = form.id;
|
||||
var storedKeys = store.keys();
|
||||
for (var i = 0; i < storedKeys.length; i++) {
|
||||
if (storedKeys[i].indexOf(formId) > -1) {
|
||||
store.remove(storedKeys[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function getKeys() {
|
||||
var keys = [];
|
||||
var formFields = document.querySelectorAll('input[type=text], textarea');
|
||||
for (var f = 0; f < formFields.length; f++) {
|
||||
var parent = getFormElement(formFields[f]);
|
||||
if (parent !== false) {
|
||||
var key = parent.id + '~' + formFields[f].id;
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
function getFormElement(elem) {
|
||||
if (elem.nodeName.toLowerCase() !== 'body') {
|
||||
var parent = elem.parentNode;
|
||||
if (parent.nodeName.toLowerCase() === 'form') {
|
||||
return parent;
|
||||
} else {
|
||||
return getFormElement(parent);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
BIN
public/build/assets/js/form-save-4d4f6e1cb8.js.br
Normal file
BIN
public/build/assets/js/form-save-4d4f6e1cb8.js.br
Normal file
Binary file not shown.
BIN
public/build/assets/js/form-save-4d4f6e1cb8.js.gz
Normal file
BIN
public/build/assets/js/form-save-4d4f6e1cb8.js.gz
Normal file
Binary file not shown.
|
@ -1,69 +0,0 @@
|
|||
var feature = {
|
||||
addEventListener : !!window.addEventListener,
|
||||
querySelectorAll : !!document.querySelectorAll,
|
||||
};
|
||||
if(feature.addEventListener && feature.querySelectorAll) {
|
||||
this.init();
|
||||
}
|
||||
function init() {
|
||||
var keys = getKeys();
|
||||
for(var i = 0; i < keys.length; i++) {
|
||||
if(store.get(keys[i])) {
|
||||
var formId = keys[i].split("~")[1];
|
||||
document.getElementById(formId).value = store.get(keys[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
var timerId = window.setInterval(function() {
|
||||
var saved = false;
|
||||
var inputs = document.querySelectorAll('input[type=text], textarea');
|
||||
for(var i = 0; i < inputs.length; i++) {
|
||||
var key = getFormElement(inputs[i]).id + '~' + inputs[i].id;
|
||||
if(store.get(key) !== inputs[i].value && inputs[i].value !== "") {
|
||||
store.set(key, inputs[i].value);
|
||||
saved = true;
|
||||
}
|
||||
}
|
||||
if(saved === true) {
|
||||
alertify.logPosition('top right');
|
||||
alertify.success('Auto saved text');
|
||||
}
|
||||
}, 5000);
|
||||
var forms = document.querySelectorAll('form');
|
||||
for(var f = 0; f < forms.length; f++) {
|
||||
var form = forms[f];
|
||||
form.addEventListener('submit', function() {
|
||||
window.clearInterval(timerId);
|
||||
var formId = form.id;
|
||||
var storedKeys = store.keys();
|
||||
for(var i = 0; i < storedKeys.length; i++) {
|
||||
if(storedKeys[i].indexOf(formId) > -1) {
|
||||
store.remove(storedKeys[i]);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function getKeys() {
|
||||
var keys = [];
|
||||
var formFields = document.querySelectorAll('input[type=text], textarea');
|
||||
for(var f = 0; f < formFields.length; f++) {
|
||||
var parent = getFormElement(formFields[f]);
|
||||
if(parent !== false) {
|
||||
var key = parent.id + '~' + formFields[f].id;
|
||||
keys.push(key);
|
||||
}
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
function getFormElement(elem) {
|
||||
if(elem.nodeName.toLowerCase() !== 'body') {
|
||||
var parent = elem.parentNode;
|
||||
if(parent.nodeName.toLowerCase() === 'form') {
|
||||
return parent;
|
||||
} else {
|
||||
return getFormElement(parent);
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
Binary file not shown.
Binary file not shown.
BIN
public/build/assets/js/libs/Autolinker.min-b46556773a.js.gz
Normal file
BIN
public/build/assets/js/libs/Autolinker.min-b46556773a.js.gz
Normal file
Binary file not shown.
Binary file not shown.
BIN
public/build/assets/js/libs/fetch-5e9040330a.js.gz
Normal file
BIN
public/build/assets/js/libs/fetch-5e9040330a.js.gz
Normal file
Binary file not shown.
BIN
public/build/assets/js/libs/marked.min-c2a88705e2.js.gz
Normal file
BIN
public/build/assets/js/libs/marked.min-c2a88705e2.js.gz
Normal file
Binary file not shown.
BIN
public/build/assets/js/libs/prism-f6e997bc6d.js.gz
Normal file
BIN
public/build/assets/js/libs/prism-f6e997bc6d.js.gz
Normal file
Binary file not shown.
BIN
public/build/assets/js/libs/store2.min-c4daa8f871.js.gz
Normal file
BIN
public/build/assets/js/libs/store2.min-c4daa8f871.js.gz
Normal file
Binary file not shown.
26
public/build/assets/js/links-c394f9c920.js
Normal file
26
public/build/assets/js/links-c394f9c920.js
Normal file
|
@ -0,0 +1,26 @@
|
|||
/* global Autolinker */
|
||||
//the autlinker object
|
||||
var autolinker = new Autolinker();
|
||||
|
||||
//the youtube regex
|
||||
var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
|
||||
|
||||
//grab the notes and loop through them
|
||||
var notes = document.querySelectorAll('.e-content');
|
||||
for (var i = 0; i < notes.length; i++) {
|
||||
//get Youtube ID
|
||||
var ytid = notes[i].textContent.match(ytidregex);
|
||||
if (ytid !== null) {
|
||||
var id = ytid[1];
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.classList.add('youtube');
|
||||
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
|
||||
iframe.setAttribute('frameborder', 0);
|
||||
iframe.setAttribute('allowfullscreen', 'true');
|
||||
notes[i].appendChild(iframe);
|
||||
}
|
||||
//now linkify everything
|
||||
var orig = notes[i].innerHTML;
|
||||
var linked = autolinker.link(orig);
|
||||
notes[i].innerHTML = linked;
|
||||
}
|
BIN
public/build/assets/js/links-c394f9c920.js.br
Normal file
BIN
public/build/assets/js/links-c394f9c920.js.br
Normal file
Binary file not shown.
BIN
public/build/assets/js/links-c394f9c920.js.gz
Normal file
BIN
public/build/assets/js/links-c394f9c920.js.gz
Normal file
Binary file not shown.
|
@ -1,25 +0,0 @@
|
|||
//the autlinker object
|
||||
var autolinker = new Autolinker();
|
||||
|
||||
//the youtube regex
|
||||
var ytidregex = /watch\?v=([A-Za-z0-9\-_]+)/;
|
||||
|
||||
//grab the notes and loop through them
|
||||
var notes = document.querySelectorAll('.e-content');
|
||||
for(var i = 0; i < notes.length; i++) {
|
||||
//get Youtube ID
|
||||
var ytid = notes[i].textContent.match(ytidregex);
|
||||
if(ytid !== null) {
|
||||
var id = ytid[1];
|
||||
var iframe = document.createElement('iframe');
|
||||
iframe.classList.add('youtube');
|
||||
iframe.setAttribute('src', '//www.youtube.com/embed/' + id);
|
||||
iframe.setAttribute('frameborder', 0);
|
||||
iframe.setAttribute('allowfullscreen', 'true');
|
||||
notes[i].appendChild(iframe);
|
||||
}
|
||||
//now linkify everything
|
||||
var orig = notes[i].innerHTML;
|
||||
var linked = autolinker.link(orig);
|
||||
notes[i].innerHTML = linked;
|
||||
}
|
Binary file not shown.
Binary file not shown.
|
@ -1,6 +1,7 @@
|
|||
/* global L */
|
||||
//This code runs on page load and looks for <div class="map">, then adds map
|
||||
var mapDivs = document.querySelectorAll('.map');
|
||||
for(var i = 0; i < mapDivs.length; i++) {
|
||||
for (var i = 0; i < mapDivs.length; i++) {
|
||||
var mapDiv = mapDivs[i];
|
||||
var latitude = mapDiv.dataset.latitude;
|
||||
var longitude = mapDiv.dataset.longitude;
|
||||
|
@ -8,8 +9,8 @@ for(var i = 0; i < mapDivs.length; i++) {
|
|||
var map = L.mapbox.map(mapDiv, 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
}));
|
||||
var marker = L.marker([latitude, longitude]).addTo(map);
|
||||
detectRetina: true
|
||||
}));
|
||||
L.marker([latitude, longitude]).addTo(map);
|
||||
map.scrollWheelZoom.disable();
|
||||
}
|
BIN
public/build/assets/js/maps-a6a01a253b.js.br
Normal file
BIN
public/build/assets/js/maps-a6a01a253b.js.br
Normal file
Binary file not shown.
BIN
public/build/assets/js/maps-a6a01a253b.js.gz
Normal file
BIN
public/build/assets/js/maps-a6a01a253b.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
/* global L */
|
||||
if ('geolocation' in navigator) {
|
||||
var button = document.querySelector('#locate');
|
||||
if (button.addEventListener) {
|
||||
|
@ -39,7 +40,7 @@ function addPlaces(latitude, longitude) {
|
|||
addMap(latitude, longitude);
|
||||
}
|
||||
}).catch(function (err) {
|
||||
console.log(err);
|
||||
console.error(err);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -57,11 +58,11 @@ function addMap(latitude, longitude, places) {
|
|||
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
detectRetina: true
|
||||
}));
|
||||
//add a marker for the current location
|
||||
var marker = L.marker([latitude, longitude], {
|
||||
draggable: true,
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
//when the location marker is dragged, if the new place form elements exist
|
||||
//update the lat/lng values
|
||||
|
@ -81,13 +82,13 @@ function addMap(latitude, longitude, places) {
|
|||
var noLocation = document.createElement('option');
|
||||
noLocation.setAttribute('selected', 'selected');
|
||||
noLocation.setAttribute('value', 'no-location');
|
||||
noLocText = document.createTextNode('Select no location');
|
||||
var noLocText = document.createTextNode('Select no location');
|
||||
noLocation.appendChild(noLocText);
|
||||
selectEl.appendChild(noLocation);
|
||||
form.insertBefore(selectEl, div);
|
||||
if (places !== null) {
|
||||
//add the places both to the map and <select>
|
||||
places.forEach(function (item, index, array) {
|
||||
places.forEach(function (item) {
|
||||
var option = document.createElement('option');
|
||||
option.setAttribute('value', item[1]);
|
||||
var text = document.createTextNode(item[0]);
|
||||
|
@ -106,7 +107,7 @@ function addMap(latitude, longitude, places) {
|
|||
placeMarker.bindPopup(name, {
|
||||
closeButton: true
|
||||
});
|
||||
placeMarker.on('click', function (e) {
|
||||
placeMarker.on('click', function () {
|
||||
map.panTo([item[2], item[3]]);
|
||||
selectPlace(item[1]);
|
||||
});
|
||||
|
@ -130,7 +131,7 @@ function addMap(latitude, longitude, places) {
|
|||
//add the form elements
|
||||
var nameLabel = document.createElement('label');
|
||||
nameLabel.setAttribute('for', 'place-name');
|
||||
nameLabel.classList.add('place-label')
|
||||
nameLabel.classList.add('place-label');
|
||||
nameLabel.appendChild(document.createTextNode('Place Name:'));
|
||||
var nameEl = document.createElement('input');
|
||||
nameEl.setAttribute('placeholder', 'Name');
|
||||
|
@ -194,8 +195,16 @@ function addMap(latitude, longitude, places) {
|
|||
method: 'post',
|
||||
body: formData
|
||||
})
|
||||
.then(status)
|
||||
.then(json)
|
||||
.then(function (response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
return Promise.reject(new Error(response.statusText));
|
||||
}
|
||||
})
|
||||
.then(function (response) {
|
||||
return response.json();
|
||||
})
|
||||
.then(function (placeJson) {
|
||||
//create the slug from the url
|
||||
var urlParts = placeJson.split('/');
|
||||
|
@ -206,8 +215,8 @@ function addMap(latitude, longitude, places) {
|
|||
form.removeChild(document.querySelector('#place-latitude'));
|
||||
form.removeChild(document.querySelector('#place-longitude'));
|
||||
var labels = document.querySelectorAll('.place-label');
|
||||
for (var label of labels) {
|
||||
form.removeChild(label);
|
||||
for (var i = 0; i < labels.length; ++i) {
|
||||
form.removeChild(labels[i]);
|
||||
}
|
||||
form.removeChild(document.querySelector('#place-submit'));
|
||||
form.removeChild(document.querySelector('#create-new-place'));
|
||||
|
@ -231,16 +240,16 @@ function addMap(latitude, longitude, places) {
|
|||
newPlaceMarker.bindPopup(newName, {
|
||||
closeButton: true
|
||||
});
|
||||
newPlaceMarker.on('click', function (e) {
|
||||
newPlaceMarker.on('click', function () {
|
||||
map.panTo([placeJson['latitude'], placeJson['longitude']]);
|
||||
selectPlace(slug);
|
||||
});
|
||||
//make selected
|
||||
selectPlace(slug);
|
||||
}).catch(function (placeError) {
|
||||
console.log(placeError);
|
||||
console.error(placeError);
|
||||
});
|
||||
})
|
||||
});
|
||||
});
|
||||
form.insertBefore(newLocButton, div);
|
||||
}
|
||||
|
@ -270,15 +279,3 @@ function getLongitudeFromMapboxMarker(latlng) {
|
|||
|
||||
return location[1];
|
||||
}
|
||||
|
||||
function status(response) {
|
||||
if (response.status >= 200 && response.status < 300) {
|
||||
return Promise.resolve(response);
|
||||
} else {
|
||||
return Promise.reject(new Error(response.statusText));
|
||||
}
|
||||
}
|
||||
|
||||
function json(response) {
|
||||
return response.json();
|
||||
}
|
BIN
public/build/assets/js/newnote-36ff29cdef.js.br
Normal file
BIN
public/build/assets/js/newnote-36ff29cdef.js.br
Normal file
Binary file not shown.
BIN
public/build/assets/js/newnote-36ff29cdef.js.gz
Normal file
BIN
public/build/assets/js/newnote-36ff29cdef.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,3 +1,4 @@
|
|||
/* global L */
|
||||
var button = document.querySelector('#locate');
|
||||
|
||||
if (button.addEventListener) {
|
||||
|
@ -12,8 +13,6 @@ function getLocation() {
|
|||
updateForm(position.coords.latitude, position.coords.longitude);
|
||||
addMap(position.coords.latitude, position.coords.longitude);
|
||||
});
|
||||
} else {
|
||||
console.log('I need to do something when geoloaction isn’t available.');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,10 +32,10 @@ function addMap(latitude, longitude) {
|
|||
var map = L.mapbox.map('map', 'jonnybarnes.gnoihnim')
|
||||
.setView([latitude, longitude], 15)
|
||||
.addLayer(L.mapbox.tileLayer('jonnybarnes.gnoihnim', {
|
||||
detectRetina: true,
|
||||
detectRetina: true
|
||||
}));
|
||||
var marker = L.marker([latitude, longitude], {
|
||||
draggable: true,
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
marker.on('dragend', function () {
|
||||
var markerLocation = marker.getLatLng();
|
BIN
public/build/assets/js/newplace-89a1be080e.js.br
Normal file
BIN
public/build/assets/js/newplace-89a1be080e.js.br
Normal file
Binary file not shown.
BIN
public/build/assets/js/newplace-89a1be080e.js.gz
Normal file
BIN
public/build/assets/js/newplace-89a1be080e.js.gz
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -1,18 +1,18 @@
|
|||
{
|
||||
"assets/css/alertify.css": "assets/css/alertify-d84546f82d.css",
|
||||
"assets/css/global.css": "assets/css/global-ef9dfef096.css",
|
||||
"assets/css/global.css": "assets/css/global-f45e4f1fb0.css",
|
||||
"assets/css/prism.css": "assets/css/prism-5c98941a94.css",
|
||||
"assets/css/projects.css": "assets/css/projects-d945298e4f.css",
|
||||
"assets/css/sanitize.min.css": "assets/css/sanitize.min-535bccd783.css",
|
||||
"assets/js/Autolinker.min.js": "assets/js/Autolinker.min-b46556773a.js",
|
||||
"assets/js/alertify.js": "assets/js/alertify-269e23cb46.js",
|
||||
"assets/js/fetch.js": "assets/js/fetch-5e9040330a.js",
|
||||
"assets/js/form-save.js": "assets/js/form-save-7849d1a5f3.js",
|
||||
"assets/js/links.js": "assets/js/links-ea4c99f585.js",
|
||||
"assets/js/maps.js": "assets/js/maps-ffa37774ae.js",
|
||||
"assets/js/marked.min.js": "assets/js/marked.min-c2a88705e2.js",
|
||||
"assets/js/newnote.js": "assets/js/newnote-c1700073b7.js",
|
||||
"assets/js/newplace.js": "assets/js/newplace-18722f800b.js",
|
||||
"assets/js/prism.js": "assets/js/prism-f6e997bc6d.js",
|
||||
"assets/js/store2.min.js": "assets/js/store2.min-c4daa8f871.js"
|
||||
"assets/js/form-save.js": "assets/js/form-save-4d4f6e1cb8.js",
|
||||
"assets/js/libs/Autolinker.min.js": "assets/js/libs/Autolinker.min-b46556773a.js",
|
||||
"assets/js/libs/alertify.js": "assets/js/libs/alertify-269e23cb46.js",
|
||||
"assets/js/libs/fetch.js": "assets/js/libs/fetch-5e9040330a.js",
|
||||
"assets/js/libs/marked.min.js": "assets/js/libs/marked.min-c2a88705e2.js",
|
||||
"assets/js/libs/prism.js": "assets/js/libs/prism-f6e997bc6d.js",
|
||||
"assets/js/libs/store2.min.js": "assets/js/libs/store2.min-c4daa8f871.js",
|
||||
"assets/js/links.js": "assets/js/links-c394f9c920.js",
|
||||
"assets/js/maps.js": "assets/js/maps-a6a01a253b.js",
|
||||
"assets/js/newnote.js": "assets/js/newnote-36ff29cdef.js",
|
||||
"assets/js/newplace.js": "assets/js/newplace-89a1be080e.js"
|
||||
}
|
|
@ -26,7 +26,7 @@ Edit Article « Admin CP
|
|||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="{{ elixir('assets/js/marked.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/marked.min.js') }}"></script>
|
||||
<script>
|
||||
var preview = document.createElement('div');
|
||||
preview.classList.add('preview');
|
||||
|
|
|
@ -29,7 +29,7 @@ New Article « Admin CP
|
|||
|
||||
@section('scripts')
|
||||
@parent
|
||||
<script src="{{ elixir('assets/js/marked.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/marked.min.js') }}"></script>
|
||||
<script>
|
||||
var preview = document.createElement('div');
|
||||
preview.classList.add('preview');
|
||||
|
@ -41,8 +41,8 @@ New Article « Admin CP
|
|||
preview.innerHTML = marked(markdown);
|
||||
}, 5000);
|
||||
</script>
|
||||
<script src="{{ elixir('assets/js/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/form-save.js') }}"></script>
|
||||
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/alertify.css') }}">
|
||||
|
|
|
@ -26,8 +26,8 @@ New Note « Admin CP
|
|||
<script src="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/newnote.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/form-save.js') }}"></script>
|
||||
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/alertify.css') }}">
|
||||
|
|
|
@ -19,6 +19,8 @@ New Place « Admin CP
|
|||
@stop
|
||||
|
||||
@section('scripts')
|
||||
<script src="/assets/js/libs/mapbox.v2.2.1.js"></script>
|
||||
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css">
|
||||
<script src="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/newplace.js') }}"></script>
|
||||
@stop
|
||||
|
|
|
@ -22,10 +22,10 @@ Notes « Jonny Barnes
|
|||
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css">
|
||||
<script src="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/Autolinker.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/Autolinker.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/links.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/maps.js') }}"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/prism.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/prism.js') }}"></script>
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/prism.css') }}">
|
||||
@stop
|
||||
|
|
|
@ -35,9 +35,9 @@ New Note « Jonny Barnes
|
|||
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css">
|
||||
<script src="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/fetch.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/fetch.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/store2.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/alertify.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/form-save.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/newnote.js') }}"></script>
|
||||
|
||||
|
|
|
@ -25,6 +25,6 @@ Articles « Jonny Barnes
|
|||
@stop
|
||||
|
||||
@section('scripts')
|
||||
<script src="{{ elixir('assets/js/prism.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/prism.js') }}"></script>
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/prism.css') }}">
|
||||
@stop
|
||||
|
|
|
@ -34,10 +34,10 @@
|
|||
<link rel="stylesheet" href="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.css">
|
||||
<script src="https://api.mapbox.com/mapbox.js/v2.2.3/mapbox.js"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/Autolinker.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/Autolinker.min.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/links.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/maps.js') }}"></script>
|
||||
|
||||
<script src="{{ elixir('assets/js/prism.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/prism.js') }}"></script>
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/prism.css') }}">
|
||||
@stop
|
||||
|
|
|
@ -19,6 +19,6 @@
|
|||
@stop
|
||||
|
||||
@section('scripts')
|
||||
<script src="{{ elixir('assets/js/prism.js') }}"></script>
|
||||
<script src="{{ elixir('assets/js/libs/prism.js') }}"></script>
|
||||
<link rel="stylesheet" href="{{ elixir('assets/css/prism.css') }}">
|
||||
@stop
|
||||
|
|
Loading…
Add table
Reference in a new issue