From 4b1f306c8b8ed5ce13c11709158789288b32958b Mon Sep 17 00:00:00 2001
From: Kevin Lin <kevinl@cs.uw.edu>
Date: Thu, 14 May 2020 10:13:57 -0700
Subject: [PATCH] Remove .main css class to simplify module rendering

---
 _layouts/module.html     |  4 ++--
 _sass/custom/module.scss | 23 +++++------------------
 2 files changed, 7 insertions(+), 20 deletions(-)

diff --git a/_layouts/module.html b/_layouts/module.html
index c463276..dd612ed 100644
--- a/_layouts/module.html
+++ b/_layouts/module.html
@@ -3,9 +3,9 @@
   {% if page.days %}
   <dl class="module-days">
     {% for day in page.days %}
-    <dt class="module-day main">{{ day.date | date: '%b %e' }}</dt>
+    <dt class="module-day">{{ day.date | date: '%b %e' }}</dt>
     {% for event in day.events %}
-    <dd class="module-event{% if forloop.first %} main{% endif %}">{{ event | first | markdownify }} {{ event | last | markdownify }}</dd>
+    <dd class="module-event">{{ event | first | markdownify }} {{ event | last | markdownify }}</dd>
     {% endfor %}
     {% endfor %}
   </dl>
diff --git a/_sass/custom/module.scss b/_sass/custom/module.scss
index fccac49..e6d8f26 100644
--- a/_sass/custom/module.scss
+++ b/_sass/custom/module.scss
@@ -45,18 +45,8 @@
 }
 
 .module-days {
-  border-bottom: $border $border-color;
-  border-top: $border $border-color;
   margin-bottom: 0;
 
-  &:first-child {
-    border-top: none;
-  }
-
-  &:last-child {
-    border-bottom: none;
-  }
-
   .module-day,
   .module-event {
     margin: 0;
@@ -66,14 +56,6 @@
       padding: $sp-2 $sp-4;
     }
 
-    &.main {
-      border-top: $border $border-color;
-
-      &:first-of-type {
-        border-top: none;
-      }
-    }
-
     p {
       display: inline-block;
       margin: 0;
@@ -91,6 +73,11 @@
 
   .module-day {
     grid-column-start: 1;
+    border-top: $border $border-color;
+
+    +.module-event {
+      border-top: $border $border-color;
+    }
   }
 
   .module-event {
-- 
GitLab