Skip to content

Commit

Permalink
Merge pull request #21 from HackCU/upcomingfix
Browse files Browse the repository at this point in the history
Fix overnight events, fix moving timer
  • Loading branch information
peasant98 authored Mar 4, 2019
2 parents 254b4b9 + bd8be31 commit e2eafcb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions _layouts/reverse.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@
<div class="countdown center">
{% raw %}
<h1>
<div class="header">
<img src="/assets/img/logo_white.png"> |
<span class="margin-needed">{{hours|twodigits}} : {{minutes|twodigits}} : {{seconds|twodigits}}</span>
</div>
</h1>
{% endraw %}
</div>
Expand Down
9 changes: 7 additions & 2 deletions assets/css/upcoming.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ body {
@include box-shadow( 0px 20px 40px 0px rgba($accent-color, 1.0));
top:0px;
z-index: 1000;

min-width: 305px;
text-align: center;

h1 {
img {
Expand All @@ -42,6 +41,12 @@ body {

}

.header {
min-width: 680px;
display: inline-block;
text-align: left;
}

/* The actual timeline (the vertical ruler) */
.timeline {
position: relative;
Expand Down
8 changes: 7 additions & 1 deletion upcoming.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,13 @@ <h4>{{ event.Description }} <small v-if="event.Location != ''">at {{event.Locati
day2_date = "2019-02-24";
for (x in schedule.day1){
schedule.day1[x].StartXML = formatDate(schedule.day1[x].Start, day1_date);
schedule.day1[x].EndXML = formatDate(schedule.day1[x].End, day1_date);
// If event overlaps into next day, end time needs to be given day2_date
if (schedule.day1[x].Start.includes("PM") && schedule.day1[x].End.includes("AM")) {
schedule.day1[x].EndXML = formatDate(schedule.day1[x].End, day2_date);
}
else {
schedule.day1[x].EndXML = formatDate(schedule.day1[x].End, day1_date);
}
}
schedule.day2 = data.day2;
for (x in schedule.day2){
Expand Down

0 comments on commit e2eafcb

Please sign in to comment.