Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Stuff Bigger #64

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@
<div id="breaking-news" class="hidden">
<div class="content">!! BREAKING NEWS !!</div>
</div>
<div id="news-counts" class="hidden">
<div class="content">
<div class="content-sm">!! COUNTDOWNS !!</div>
<div class="content-lg"> ## </div>
</div>
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row" id="status">


</div>
<div class="row" id="alerts">
<div class="col-xs-2" id="s1">Studio Red</div>
Expand All @@ -74,4 +80,5 @@
<script src="scripts/main.min.js"></script>

</body>

</html>
31 changes: 28 additions & 3 deletions src/scripts/timelord.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,25 @@ window.Timelord = {
if (Timelord.news) {
if (minute == 59) {
if (second < 45) {
Timelord.setCurrentShowName("News intro in " + (45 - second) + "...", 'news');
Timelord.setNewsCountdown("NEWS INTRO", (45 - second));
} else if (second <= 52) {
Timelord.setCurrentShowName((52 - second) + " until voice over...", 'news');
Timelord.setNewsCountdown("VOICE OVER", (52-second));
} else {
Timelord.setNewsCountdown(false, 0);
Timelord.setCurrentShowName(Timelord._config.short_name + ' News', 'news');
}
Comment on lines 73 to 80
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we have an exception where it displays in current position if breaking news here?

} else if (minute === 0) {
Timelord.setNewsCountdown(false, 0);
Timelord.setCurrentShowName(Timelord._config.short_name + ' News', 'news');
} else {
Timelord.setCurrentShowName('News ends in ' + (60 - second) + '...', 'news');
Timelord.setNewsCountdown("NEWS END", (60 - second));
Timelord.setCurrentShowName(Timelord._config.short_name + ' News', 'news');
}
}else if((t.hours() == 13) && (t.minutes() == 50)){
Timelord.setCurrentShowName("Merry 1350!", "news");
}else{
// Once news finishes, update show title to replace it.
Timelord.setNewsCountdown(false, 0);
Timelord.setCurrentShowName(Timelord.current_show_name);
}
},
Expand Down Expand Up @@ -314,6 +318,27 @@ window.Timelord = {

},

/**
* Sets the news coutdown
*
* @param {String|null|false} comment
* @param {int} count
*/
setNewsCountdown: function (comment, count) {

if (comment !== null && comment !== false) {
Timelord._$('#news-counts').removeClass('hidden')
Timelord._$("#news-counts .content .content-sm").text(comment);
Timelord._$("#news-counts .content .content-lg").text(count);
Timelord._$('.hide-when-breaking-news').addClass('hidden');
} else {
Timelord._$('#news-counts').addClass('hidden');
Timelord._$('.hide-when-breaking-news').removeClass('hidden');
}


},

/**
* Sets the Obit alert
*
Expand Down
36 changes: 34 additions & 2 deletions src/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $footer_height: 130px;
$footer-mobile-height: 35px;
$footer-mobile-breakpoint: 500px;

$widescreen-breakpoint: 1600px;
$widescreen-breakpoint: 1000px;

html {
position: relative;
Expand Down Expand Up @@ -61,6 +61,23 @@ footer.sticky {
margin-bottom: -0.35em;
}

#news-counts {
border: 3px solid #2CDFFF;
}

#news-counts .content {
font-weight: bold;
color: #2CDFFF;
}

#news-counts .content .content-sm {
font-size: 10em;
}

#news-counts .content .content-lg {
font-size: 30em;
}

.up-next {
font-size: 2.8em;
font-variant: small-caps;
Expand Down Expand Up @@ -211,7 +228,7 @@ footer.sticky {
#time {
grid-area: time;

font-size: 12em;
font-size: 20em;
line-height: 1em;

// At small sizes just make the font size
Expand Down Expand Up @@ -291,4 +308,19 @@ footer.sticky {
}
}

#news-counts {
grid-area: breaking-news;
height: 100%;
width: 30vw;

@media (max-width: $widescreen-breakpoint) {
height: 40vh;
width: 100%;
}

.content {
display: initial;
}
}

}