method added to autocycle through sponsors based on sponsor level and code added to inherit twitter env variables
This commit is contained in:
parent
881518f1f3
commit
e8d3177ec1
14 changed files with 89 additions and 163 deletions
|
|
@ -1,21 +1,32 @@
|
|||
$(document).ready(function() {
|
||||
// will call refreshCurrentEvents every 15 minutes
|
||||
setInterval(refreshCurrentEvents, 900000)
|
||||
// To cycle through tweets
|
||||
var tweets = $('div[id^="tweet"]').hide();
|
||||
var i = 0;
|
||||
setInterval(refreshCurrentEvents,900000);
|
||||
|
||||
(function cycle() {
|
||||
tweets.eq(i).show(0)
|
||||
.delay(5000)
|
||||
.hide(0, cycle);
|
||||
i = ++i % tweets.length;
|
||||
})();
|
||||
// Only show the first child of tweet and sponsor containers on page load
|
||||
$('#tweet-container').children().hide();
|
||||
$('#tweet-container').children().eq(0).show();
|
||||
$('#sponsor-container').children().hide();
|
||||
$('#sponsor-container').children().eq(0).show();
|
||||
|
||||
});
|
||||
setInterval(function(){ cycleVisibleElement($('#tweet-container'))}, 5000)
|
||||
setInterval(function(){ cycleVisibleElement($('#sponsor-container'))}, 10000)
|
||||
});
|
||||
|
||||
// Makes an ajax call for fresh data
|
||||
function refreshCurrentEvents(){
|
||||
$.ajax({
|
||||
url: "conference_wide_screen.js"
|
||||
});
|
||||
};
|
||||
|
||||
// Cycle through children in a container and toggles visibility
|
||||
function cycleVisibleElement(container){
|
||||
var childrens = $(container).children();
|
||||
for(var i = 0; i < childrens.length; i++ ){
|
||||
if(childrens.eq(i).is(":visible")){
|
||||
childrens.eq(i).hide();
|
||||
childrens.eq(++i % childrens.length).show();
|
||||
return
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
*= require osem-schedule-print
|
||||
*= require osem-dashboard
|
||||
*= require osem-splash
|
||||
*= require osem-conference-wide-screen
|
||||
*= require font-awesome
|
||||
*= require osem-fonts
|
||||
*= require bootstrap-markdown
|
||||
|
|
|
|||
|
|
@ -1,77 +0,0 @@
|
|||
@import "breakpoints.css.scss";
|
||||
|
||||
html {
|
||||
position: relative;
|
||||
min-height: 100%;
|
||||
}
|
||||
|
||||
body {
|
||||
/* Margin bottom by 2 times the footer height */
|
||||
// margin-bottom: 60px;
|
||||
/* Margin bottom by navbar height */
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#main-display {
|
||||
// Counter the general padding for #content
|
||||
// margin-bottom: -60px;
|
||||
section {
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
#main-heading {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background-color: #abcdef;
|
||||
}
|
||||
|
||||
|
||||
#event-display{
|
||||
position: absolute;
|
||||
bottom:480px;
|
||||
width: 100%;
|
||||
top: 120px;
|
||||
background-color: #00FF00;
|
||||
}
|
||||
#tweets-display {
|
||||
position: absolute;
|
||||
height: 150px;
|
||||
bottom: 330px;
|
||||
width: 100%;
|
||||
background-color: #F63;
|
||||
}
|
||||
|
||||
#sponsor-display {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
max-height: 330px;
|
||||
background-color: #FF1493;
|
||||
.container {
|
||||
background-color: yellow;
|
||||
max-height: 310px;
|
||||
}
|
||||
|
||||
.img-sponsor {
|
||||
max-height: 50px;
|
||||
margin: 2% auto;
|
||||
}
|
||||
.img-sponsor-1 {
|
||||
max-height: 90px;
|
||||
}
|
||||
.img-sponsor-2 {
|
||||
max-height: 70px;
|
||||
}
|
||||
.img-sponsor-3 {
|
||||
max-height: 50px;
|
||||
}
|
||||
@include breakpoint(xs) {
|
||||
.img-sponsor, .img-sponsor-1, .img-sponsor-3, .img-sponsor-3{
|
||||
max-height: unset;
|
||||
max-width: 280px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue