Skip to content

Commit 1dd318b

Browse files
committed
display course type on top left of slots
1 parent 812b605 commit 1dd318b

File tree

4 files changed

+14
-5
lines changed

4 files changed

+14
-5
lines changed

com/static/com/css/news-list.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@
8383
#links_content {
8484
overflow: auto;
8585
box-shadow: $shadow-color 1px 1px 1px;
86-
height: 20em;
86+
min-height: 20em;
87+
padding-bottom: 1em;
8788

8889
h4 {
8990
margin-left: 5px;

timetable/static/bundled/timetable/generator-index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const WEEKDAYS = [
3737
] as const;
3838

3939
const SLOT_HEIGHT = 20 as const; // Each 15min has a height of 20px in the timetable
40-
const SLOT_WIDTH = 400 as const; // Each weekday ha a width of 400px in the timetable
40+
const SLOT_WIDTH = 250 as const; // Each weekday ha a width of 400px in the timetable
4141
const MINUTES_PER_SLOT = 15 as const;
4242

4343
interface TimetableSlot {

timetable/static/timetable/css/generator.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@
2323
display: flex;
2424
flex-direction: column;
2525
justify-content: center;
26+
27+
.course-type {
28+
position: absolute;
29+
top: 0;
30+
right: 0;
31+
padding: 10px;
32+
}
2633
}
2734
}
2835
}

timetable/templates/timetable/generator.jinja

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
{%- endblock -%}
1010

1111
{% block title %}
12-
{% trans %}Timeplan generator{% endtrans %}
12+
{% trans %}Timetable generator{% endtrans %}
1313
{% endblock %}
1414

1515
{% block content %}
1616
<div x-data="timetableGenerator">
1717
<form @submit.prevent="generate()">
1818
<h1>Générateur d'emploi du temps</h1>
1919
<div class="alert alert-red" x-show="!!error" x-cloak>
20-
<p class="alert-main" x-text="error"></p>
20+
<span class="alert-main" x-text="error"></span>
2121
</div>
2222
<div class="form-group">
2323
<label for="timetable-input">Colle ton emploi du temps (sans l'entête)</label>
@@ -38,7 +38,8 @@
3838
<div class="content">
3939
<template x-for="course in courses">
4040
<div class="slot" :style="getStyle(course)">
41-
<span x-text="`${course.ueCode} (${course.courseType})`"></span>
41+
<span class="course-type" x-text="course.courseType"></span>
42+
<span x-text="course.ueCode"></span>
4243
<span x-text="`${course.startHour} - ${course.endHour}`"></span>
4344
<span x-text="(course.weekGroup ? `\nGroupe ${course.weekGroup}` : '')"></span>
4445
<span x-text="course.room"></span>

0 commit comments

Comments
 (0)