page_structure = '
';
jQuery(document).ready(function($){
$("body").wrapInner("
");
$("#main").append("");
// INSERTING THE PAGES STRUCTURE
$("body").prepend(page_structure).ready(function(){});
//REMOVE ALL INLINE STYLES
$("#avada-stylesheet-inline-css").remove();
$("*").attr("style", "");
// PUTS ARTIST NAME INTO HEADER
$(".header").html($("h1:first-child").text() + ", " + $(".mentiondiplomes").text() +" ");
// REPLACES IFRAMES WITH THEIR SOURCES (ESPECIALLY FOR SOUNDCLOUD)
$("iframe").each(function(){
$("↘ " + $(this).attr('src') + "
").insertBefore($(this));
});
caption = "";
$("img").each(function(){
// Removes useless around
if($($(this).parent()).is("i")){
$(this).unwrap(" ");
}
// Removes useless around
if($($(this).parent()).is("a")){
$(this).unwrap(" ");
}
// Removes useless around
if($($(this).parent()).is("p")){
$(this).unwrap("
");
}
// Wraps images with a
$(this).wrap("
new_caption = $(this).attr("alt");
if (new_caption != caption) {
$("" + new_caption + " ").insertAfter($(this));
} else {
$(" ").insertAfter($(this));
}
caption = new_caption;
});
// MIX COLORS
function pickHex(color1, color2, weight) {
var p = weight;
var w = p * 2 - 1;
var w1 = (w/1+1) / 2;
var w2 = 1 - w1;
var rgb = [Math.round(color1[0] * w1 + color2[0] * w2),
Math.round(color1[1] * w1 + color2[1] * w2),
Math.round(color1[2] * w1 + color2[2] * w2)];
return rgb;
}
pink = [255, 0, 74];
blue = [19, 19, 70];
articles = $(".fusion-post-content");
for (i = 0; i <= articles.length; i++){
rgb = pickHex(blue, pink, (i + 1)/(articles.length + 1));
$(articles[i]).css("color", "rgb(" + rgb[0] + ", " + rgb[1] + ", " + rgb[2] + ")");
}
// REMOVES EMPTY
//$("p").each(function(){
// console.log($(this).textContent);
// if ($(this).textContent == ""){
// $(this).hide();
// }
//});
});