diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d8f10b4 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# EditorConfig is awesome: https://EditorConfig.org + +# top-most EditorConfig file +root = true + +# Unix-style newlines with a newline ending every file +[*] +end_of_line = lf +insert_final_newline = true + +# Matches multiple files with brace expansion notation +# Set default charset +[*.js] +charset = utf-8 +indent_style = space +indent_size = 4 + +[*.{css,scss,html,md}] +indent_style = space +indent_size = 4 \ No newline at end of file diff --git a/assets/css/_calendar.scss b/assets/css/_calendar.scss index 74ddff1..8e8db10 100644 --- a/assets/css/_calendar.scss +++ b/assets/css/_calendar.scss @@ -4,6 +4,10 @@ border-bottom: 2px solid rgba(89, 89, 89, 0.44); .month_wrapper { + margin-bottom: 1rem; + } + + .month_header { display: block; height: 100%; padding: 1.5rem 0; @@ -35,6 +39,10 @@ } } + &[data-empty]:not(.current) { + display: none; + } + .day_title { padding: 0.2rem 1rem; @@ -59,6 +67,8 @@ border-radius: 0.3rem; font-size: 0.9rem; margin-top: 0.5em; + word-break: break-word; + hyphens: auto; .time { font-family: $font-family-brand; @@ -116,6 +126,26 @@ } } + // start the days of the week in same day column every month + .day-Tue:first-child { + grid-column: 2; + } + .day-Wed:first-child { + grid-column: 3; + } + .day-Thu:first-child { + grid-column: 4; + } + .day-Fri:first-child { + grid-column: 5; + } + .day-Sat:first-child { + grid-column: 6; + } + .day-Sun:first-child { + grid-column: 7; + } + .modal { display: none; position: fixed; @@ -128,7 +158,6 @@ background-color: rgba(0, 0, 0, 0.4); padding-top: 80px; - .close { color: #000; float: right; @@ -178,4 +207,18 @@ } } } + + @media (min-width: 950px) { + .days_wrapper { + display: grid; + grid-template-columns: repeat(7, 1fr); + grid-gap: 0.5rem; + } + + .day { + &[data-empty]:not(.current) { + display: block; + } + } + } } diff --git a/calendar_parse/template.html b/calendar_parse/template.html index 4706b5f..ea85a09 100644 --- a/calendar_parse/template.html +++ b/calendar_parse/template.html @@ -9,32 +9,36 @@ {{range $year, $months := .Events}} {{range $month, $daysData := $months}}