From 65d0dbb9b3388e03c312c1dd456feeef740289e0 Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Tue, 13 Apr 2021 12:49:14 -0500
Subject: Start styling and add initial dark mode support

---
 src/components/List.vue | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

(limited to 'src/components/List.vue')

diff --git a/src/components/List.vue b/src/components/List.vue
index 031f708..843370e 100644
--- a/src/components/List.vue
+++ b/src/components/List.vue
@@ -28,7 +28,6 @@ export default {
 }
 
 .list-item {
-  border: 1px solid grey;
   border-radius: 5px;
   margin: 5px 0;
   padding: 0.15em;
@@ -38,4 +37,11 @@ export default {
 .list-item:hover {
   background-color: rgb(182, 182, 182);
 }
+
+@media (prefers-color-scheme: dark) {
+  .list-item {
+    background-color: #303030;
+    color: white;
+  }
+}
 </style>
-- 
cgit v1.2.3


From 6df6cbbb47d8b932a790ed9ef68dc8fac42ce0f4 Mon Sep 17 00:00:00 2001
From: Furkan Sahin <furkan-dev@proton.me>
Date: Tue, 13 Apr 2021 15:24:03 -0500
Subject: Style editor lists

---
 src/components/EditorLists.vue | 67 ++++++++++++++++++++++++++++++++++++------
 src/components/List.vue        | 23 ++-------------
 src/models/EventInfo.ts        |  2 +-
 3 files changed, 62 insertions(+), 30 deletions(-)

(limited to 'src/components/List.vue')

diff --git a/src/components/EditorLists.vue b/src/components/EditorLists.vue
index 26e0ecc..e70445d 100644
--- a/src/components/EditorLists.vue
+++ b/src/components/EditorLists.vue
@@ -1,19 +1,28 @@
 <template>
   <div id="editor-lists">
     <div class="column">
-      <list :items="peerTeachers" @selection-changed="handlePtClick" #default="pt">
-        {{ pt.item.name }} <button @click.stop="deletePeerTeacher(pt.item.id)">X</button>
-      </list>
+      <h3>Peer Teachers</h3>
+      <List :items="peerTeachers" @selection-changed="handlePtClick" #default="pt">
+        <span class="list-item">
+          {{ pt.item.name }} <button @click.stop="deletePeerTeacher(pt.item.id)">x</button>
+        </span>
+      </List>
     </div>
     <div class="column">
-      <list :items="compatibleLabs" #default="lab">
-        {{ lab.item.fullInfo }} <button @click.stop="assignLab(lab.item.id)">+</button>
-      </list>
+      <h3>Labs</h3>
+      <List :items="compatibleLabs" #default="lab">
+        <span class="list-item">
+          {{ lab.item.fullInfo }} <button @click.stop="assignLab(lab.item.id)">+</button>
+        </span>
+      </List>
     </div>
     <div class="column">
-      <list :items="selectedPeerTeacherAssignments" #default="lab">
-        {{ lab.item.fullInfo }} <button @click.stop="unassignLab(lab.item.id)">X</button>
-      </list>
+      <h3>Assignments</h3>
+      <List :items="selectedPeerTeacherAssignments" #default="lab">
+        <span class="list-item">
+          {{ lab.item.fullInfo }} <button @click.stop="unassignLab(lab.item.id)">x</button>
+        </span>
+      </List>
     </div>
   </div>
 </template>
@@ -90,8 +99,48 @@ export default defineComponent({
   min-height: 0;
 }
 
+h3 {
+  color: white;
+  margin: 0;
+}
+
 .column {
   flex: 1;
   overflow: auto;
 }
+
+.list-item {
+  align-items: center;
+  display: flex;
+  justify-content: space-between;
+  margin: 0.5em;
+  padding: 0.5em;
+}
+
+.list-item:hover {
+  background-color: #c0c0c0;
+}
+
+.list-item > button {
+  background-color: #500000;
+  border: none;
+  color: white;
+  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
+  font-size: 1em;
+}
+
+@media (prefers-color-scheme: dark) {
+  .list-item {
+    background-color: #303030;
+    color: white;
+  }
+
+  .list-item:hover {
+    background-color: #707070;
+  }
+
+  .list-item > button {
+    background-color: #81302b;
+  }
+}
 </style>
diff --git a/src/components/List.vue b/src/components/List.vue
index 843370e..f1ef690 100644
--- a/src/components/List.vue
+++ b/src/components/List.vue
@@ -3,8 +3,7 @@
     <li
       v-for="item in items"
       :key="item.id"
-      @click="$emit('selectionChanged', item)"
-      class="list-item">
+      @click="$emit('selectionChanged', item)">
       <slot :item="item">{{ item }}</slot>
     </li>
   </ul>
@@ -25,23 +24,7 @@ export default {
 <style scoped>
 .list {
   list-style-type: none;
-}
-
-.list-item {
-  border-radius: 5px;
-  margin: 5px 0;
-  padding: 0.15em;
-  text-align: center;
-}
-
-.list-item:hover {
-  background-color: rgb(182, 182, 182);
-}
-
-@media (prefers-color-scheme: dark) {
-  .list-item {
-    background-color: #303030;
-    color: white;
-  }
+  margin: 0;
+  padding: 0;
 }
 </style>
diff --git a/src/models/EventInfo.ts b/src/models/EventInfo.ts
index 4493162..962ec70 100644
--- a/src/models/EventInfo.ts
+++ b/src/models/EventInfo.ts
@@ -39,7 +39,7 @@ export default class EventInfo {
 
   get info() {
     if (this.days === '') {
-      return 'ONLINE';
+      return 'WEB';
     }
     return `${this.days} ${EventInfo.timeToStr(this.start)}-${EventInfo.timeToStr(this.end)}`;
   }
-- 
cgit v1.2.3

