Skip to content

Instantly share code, notes, and snippets.

@stenehall
Created August 14, 2016 13:54
Show Gist options
  • Save stenehall/2a55f6e76b2d70f681876672f5582425 to your computer and use it in GitHub Desktop.
Save stenehall/2a55f6e76b2d70f681876672f5582425 to your computer and use it in GitHub Desktop.
jAdYzV
.month
- (0..3).each do |i|
.week
- (1..7).each do |j|
.day{:class => (j%7 == 0 || j%6 == 0) && "day--is-weekend"}
%p
%span #{(i*7)+j}
.week
.day
%p
%span 29
.day
%p
%span 30
.day
%p
%span 31
- (1..4).each do |i|
.day.day--outside
.month {
margin: 0 auto;
max-width: 500px;
border-bottom: 1px solid #ddd;
}
.week {
display: flex;
flex-direction: row;
border: 1px solid #ddd;
border-width: 1px 0px 0 1px
}
.day {
flex-grow:1;
flex-basis: 0;
border-right: 1px solid #ddd;
position: relative;
&:before {
display: block;
content: "";
padding-top: 100%;
}
}
p {
margin: 0;
position: absolute;
top: 0;
width: 100%;
height: 100%;
display: flex;
justfify-content: center;
align-items: center;
}
span {
width: 100%;
text-align: center;
&:before {
position: absolute;
bottom: 20%;
left: 30%;
width: 40%;
border: 2px solid #ddd;
content: "";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment