initInstagramFeed = (function(){
var igID = '10054954'; //lukeharby
var igClientID = '37f944b55b27422d973fdea0e1c803cb';
var igClientSecret = '1897b131caa24988b6d61ea30531353a';
var count = 33; // weird max image?
var accessToken = '10054954.1677ed0.c830fee08ea9418a8fa8a795d49364ac';
$.ajax({
type: "GET",
dataType: "jsonp",
cache: false,
url: "https://api.instagram.com/v1/users/" + igID + "/media/recent/?access_token=" + accessToken + '&count=' + count,
success: function(data) {
for (var i = 0; i < count; i++) {
$(".instagram-wrapper").append("<a target='_blank' href='" + data.data[i].link +"'><img src='" + data.data[i].images.thumbnail.url +"' /></a>");
}
console.log(data);
},
error: function(){
console.log('Something went wrong', data);
}
});
}());
// globals
if (typeof bbs == 'undefined') {
bbs = {};
}
// for switching color themes
bbs.theme = localStorage.getItem('rmz_bbs-auto-theme') || 'default';
bbs.themeLink = $('#theme-css-link');
if (bbs.themeLink.data('theme') !== bbs.theme){
bbs.themeLink.attr({
'href': 'static/css/theme_' + bbs.theme + '.css',
'data-theme': bbs.theme
});
$('body').attr('data-theme', bbs.theme);
}
$(document).ready(function(){
var themeInputs = $('.theme-input');
themeInputs.prop('checked', false);
themeInputs.filter('[value='+bbs.theme+']').prop('checked', true);
$('body').attr('data-theme', bbs.theme);
// color-theme switch
themeInputs.on('change', function(){
console.log('111');
var newTheme = $(this).val();
if (bbs.theme !== newTheme){
bbs.theme = newTheme;
bbs.themeLink.attr({
'href': 'static/css/theme_' + bbs.theme + '.css',
'data-theme': bbs.theme
});
$('body').attr('data-theme', bbs.theme);
localStorage.setItem('rmz_bbs-auto-theme', bbs.theme);
} else return;
});
})
html, body{
margin:0;
padding:0;
height:auto !important;
min-height:100%;
}
.main {
height: 100%;
padding: 0;
margin: 0;
overflow-y: scroll;
display: -webkit-flex;
display: -moz-flex;
display: -ms-flex;
display: flex;
-webkit-flex-direction: column;
-moz-flex-direction: column;
-ms-flex-direction: column;
flex-direction: column;*/
background: #fff;
font-family: tinos, arial, sans-serif;
}