carefulmistake
Forum Replies Created
-
Forum: Plugins
In reply to: [Easy Backstretch] Randomised imagesYou can do this by simply adding a randomization to the JS before output. This is what I changed at the bottom of the plugin’s easy-backstretch.php.
<script type=”text/javascript”>
jQuery(document).ready(function($) {
function shuffle(a) {
var j, x, i;
for (i = a.length; i; i -= 1) {
j = Math.floor(Math.random() * i);
x = a[i – 1];
a[i – 1] = a[j];
a[j] = x;
}
return a;
}
var images = [];
<?php foreach($easy_backstretch_images as $image => $data): ?>
images.push(‘<?php echo $data[‘file_url’]; ?>’);
<?php endforeach; ?>
var index = 0;
var backstretchSettings = { fade: <?php echo $easy_backstretch_settings[‘fade’]; ?>, duration:<?php echo $easy_backstretch_settings[‘duration’];?>};
var len = images.length;
var totalDuration = (backstretchSettings.fade + backstretchSettings.duration);
var timer = null;
// Randomizer order before display
shuffle(images);
var rotate = function() {
$(‘<?php echo $easy_backstretch_settings[“div”]; ?>’).backstretch(images[0], backstretchSettings);
timer = setInterval(function() {
index++;
if(index == len) {
index = 0;
}
$(‘<?php echo $easy_backstretch_settings[“div”]; ?>’).backstretch(images[index], backstretchSettings);
}, totalDuration);
};
rotate();
});
</script>Forum: Your WordPress
In reply to: Solo Road Trip – Travel Site BlogThanks for the post! Yes, I build the custom theme with just a couple pre built plugins for the photography.
Forum: Your WordPress
In reply to: Designer using WP as portfolio, what do you think?Hey, thanks for the great comments!
About the thumbs being cropped badly, those are just a quick preview template I setup for easy maintenance. They are the actual design being shown and all cropped at the same place regardless just to grab interest. I may revisit these later down the road but for now the user can just click for further detail.
I thought about going the minimalistic approach for the overall design, which is probably a better choice. Being this is my first WP site though I wanted to push to see what design detail I could achieve with this site.
Thanks, keep em coming!