Skip to content

Commit

Permalink
Fixes for prod
Browse files Browse the repository at this point in the history
  • Loading branch information
User committed Sep 19, 2017
1 parent 5afcffc commit 8238a38
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 4 deletions.
10 changes: 9 additions & 1 deletion assets/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -107,4 +107,12 @@ header > p.no-margin {
max-width: 66%;
margin: auto;
}
}
}


/* Wordpress picture */
.aligncenter {
display: block;
max-width: 100%;
margin: 1em auto;
}
9 changes: 6 additions & 3 deletions assets/js/custom.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
var truc = "";
(function($){
$(function(){

function findAndFillLastBlogPost() {
$("#loading-post-icon").addClass("loading");

$.get( "blog/index.html", function( data ) {
$.get( "blog/", function( data ) {
var postBeginning = "<div class=\"post\" id=\"";
var postEnd = String.raw` </div>
</div>`; // be carefull, there must be tabs in this ! Not spaces !! (see blog/index.html)
idxStart = data.indexOf(postBeginning);
idxEnd = data.indexOf(postEnd, idxStart + postBeginning.length) + postEnd.length;
idxEnd = data.indexOf(postBeginning, idxStart + postBeginning.length);
truc = data;
console.log(data);
console.log(idxStart);
console.log(idxEnd);
console.log(idxEnd - idxStart);
Expand All @@ -24,4 +27,4 @@
findAndFillLastBlogPost();

}); // end of document ready
})(jQuery); // end of jQuery name space
})(jQuery); // end of jQuery name space
22 changes: 22 additions & 0 deletions prod_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

function green_echo() {
echo -e "\033[32m$1\033[0m"
}

function red_echo() {
echo -e "\033[31m$1\033[0m"
}

# Verify that the script is launched from the right place
if [ ! "${PWD##*/}" = "website" ]; then
red_echo "You have to launch this script from repo root folder"
exit 1
fi

ln -s ./${PWD##*/}/index.html ../index.html

for D in `find . -maxdepth 1 -type d | grep -v "/\." | grep "./"`
do
ln -s ./${PWD##*/}/$D ../$D
done

0 comments on commit 8238a38

Please sign in to comment.