Skip to content

Commit

Permalink
Add bow for advent calendar
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Altmann committed Nov 23, 2015
1 parent 4ba68b2 commit d5527f2
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 15 deletions.
Binary file added app/assets/images/welcome/bow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 24 additions & 6 deletions app/assets/stylesheets/controller/welcome/_advent_calendar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
height: 410px;
min-height: 410px;
position: relative;
overflow: hidden;
color: $white;
}

Expand All @@ -18,13 +17,32 @@
background-position: center top;
border-radius: 0.5em; // Circumvent bug in Webkit browsers that would hide the rounded border
height: 410px;

h2, p {
margin: 0;
text-indent: -1000em;
}

a {
display: block;
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
}

// .advent-calendar article div {
// position: relative;
// margin: 0 auto;
// height: 410px;
// }
.advent-calendar-bow-div {
position: absolute;
left: -10px;
right: -10px;
top: -10px;
bottom: -10px;
background-image: image-url('welcome/bow.png');
background-position: right top;
background-repeat: no-repeat;
}

/******************************** Breakpoints *********************************/

Expand Down
20 changes: 11 additions & 9 deletions app/helpers/welcome_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,19 @@ def featured_library_path library
end

def calendar_time?
current_date = Date.today
if (current_date >= Date.parse('2015-12-01')) && (current_date <= Date.parse('2015-12-24'))
true
else
false
end
true
# current_date = Date.today
# if (current_date >= Date.parse('2015-12-01')) && (current_date <= Date.parse('2015-12-24'))
# true
# else
# false
# end
end

def get_calendar_partial_name
day = Date.today.day
day_str = day.to_s.rjust(2, '0')
"welcome/advent_calendar/window_#{day_str}"
"welcome/advent_calendar/window_01"
# day = Date.today.day
# day_str = day.to_s.rjust(2, '0')
# "welcome/advent_calendar/window_#{day_str}"
end
end
5 changes: 5 additions & 0 deletions app/views/welcome/advent_calendar/_window_01.html.slim
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
article.advent-calendar-01
div.advent-calendar-bow-div
h2 1. Advent
p Spielzeug von Spiel & Klang
p= link_to 'Jetzt gewinnen',
'/advent01_spiel_und_klang'

0 comments on commit d5527f2

Please sign in to comment.