Skip to content

Commit

Permalink
Merge pull request #5 from hft-app/ljans
Browse files Browse the repository at this point in the history
Rename tips to links, always show timetable
  • Loading branch information
ljans committed Sep 16, 2023
2 parents 9ddae9d + 67afaab commit fd9cec1
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 26 deletions.
4 changes: 2 additions & 2 deletions expressions/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"title": "Vorlesungsverzeichnis"
},
"tips": {
"title": "Tipps und Links",
"tab": "Tipps"
"title": "Links und Tipps",
"tab": "Links"
},
"error": {
"title": "Oh nein!"
Expand Down
2 changes: 1 addition & 1 deletion scripts/handler/core.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class CoreHandler {
'events': new Frame('https://www.hft-stuttgart.de/veranstaltungen#c142', 'calendar-days'),
'lectures': new Lectures(this),
'meals': new Frame('https://sws2.maxmanager.xyz/', 'utensils'),
'tips': new List(this, 'tips', 'lightbulb'),
'tips': new List(this, 'tips', 'link'),
'courses': new Courses(this),
'error': new Error(this),
};
Expand Down
4 changes: 2 additions & 2 deletions scripts/module/lectures.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class Lectures {
if(request.GET.has('repaint')) await this.handler.controller.idb.state.put(Math.floor(Math.random() * 101), 'seed');
var seed = await this.handler.controller.idb.state.get('seed') || 36;

// Create timetable for the next 3 weeks
for(let i=0; i<21; i++) {
// Create timetable for the next 14 days (because the server sends data for 3 whole weeks)
for(let i=0; i<14; i++) {
const start = new Date();
start.setDate(start.getDate() + i);
start.setHours(0,0,0);
Expand Down
40 changes: 19 additions & 21 deletions templates/_lectures.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{^hasLectures}}
<!--
<div class="wrapper">
<div class="screen">
<div class="container">
Expand All @@ -12,25 +12,23 @@
</div>
</div>
</div>
{{/hasLectures}}
{{#hasLectures}}
<div class="wrapper">
<div class="timetable">
{{#days}}
<div class="col">
<div class="head" onclick="if(confirm('Farben neu mischen?')) document.location='/lectures/?repaint'">
{{#date}}
<div class="day">[[date.l.{{w}}]]</div>
<div class="date">{{j}}. [[date.F.{{n}}]]</div>
{{/date}}
</div>
<table>
<tbody>
{{table}}
</tbody>
</table>
-->
<div class="wrapper">
<div class="timetable">
{{#days}}
<div class="col">
<div class="head" onclick="if(confirm('Farben neu mischen?')) document.location='/lectures/?repaint'">
{{#date}}
<div class="day">[[date.l.{{w}}]]</div>
<div class="date">{{j}}. [[date.F.{{n}}]]</div>
{{/date}}
</div>
{{/days}}
</div>
<table>
<tbody>
{{table}}
</tbody>
</table>
</div>
{{/days}}
</div>
{{/hasLectures}}
</div>

0 comments on commit fd9cec1

Please sign in to comment.