commit: c498b635036e5a6f27b80e3d4efcf80c2dc8d31d
parent: 5730dd47654e119398da0df5fa852504bd3f8d18
author: Chris Noxz <chris@noxz.tech>
date: Tue, 5 Dec 2023 20:02:37 +0100
fix styling for tasks
1 file changed, 20 insertions(+), 10 deletions(-)
diff --git a/serve.py b/serve.py
@@ -47,12 +47,14 @@ html_default = """
"""
html_default_task = """
<div class="task">
- <div class="task-head">
+ <a href="{link}">
+ <span class="task-head">
<h1>{course}: {semester}</h1>
<h2>{tags}</h2>
- </div>
- <a href="{link}">
+ </span>
+ <span class="image">
<img src="{image}"/>
+ </span>
</a>
</div>
"""
@@ -63,10 +65,10 @@ html_image = """
"""
html_task = """
<div id="head" class="task">
- <div class="task-head">
+ <span class="task-head">
<h1>{course}: {semester}</h1>
<h2>{tags}</h2>
- </div>
+ </span>
</div>
<div id="main">
{images}
@@ -104,28 +106,36 @@ body {
margin : 0 auto;
padding : 20px;
}
-#main .task, #main .image {
+#main .image {
+ display : block;
background-color : #ffffff;
padding : 10px;
margin-bottom : 20px;
}
-#main .task .task-head {
+.task .task-head {
+ display : block;
background-color : #2e3440;
color : #ffffff;
padding : 1px 20px;
}
-#main .task .task-head h1 {
+.task .task-head h1 {
font-size : 1.5em;
}
-#main .task .task-head h2 {
+.task .task-head h2 {
font-size : 1em;
}
+.task a {
+ text-decoration : none;
+}
+.task a:hover .task-head {
+ background-color : #3b4252;
+}
.tag {
display : inline;
white-space : nowrap;
}
img {
- max-width : 100%
+ max-width : 100%;
}
"""