This improves the design of the session view a lot. However, several things still need to be done: 1. The rules section is not styled. 2. The session list is not styled. 3. The design is not responsive yet. This will take longer, as the base view will need to be overhauled substantially to take advantage of wider screens. 4. A light mode needs to be added.
22 lines
506 B
JavaScript
22 lines
506 B
JavaScript
"use strict";
|
|
|
|
import Layout from "/ui/layout.js";
|
|
import BaseView from "/ui/base_view.js";
|
|
|
|
m.route.prefix = "";
|
|
m.route(document.body, "/", {
|
|
"/": {
|
|
render: function(vnode) {
|
|
let newSession = vnode.attrs.newSession ?? false;
|
|
let session = newSession ? null : parseInt(vnode.attrs.session);
|
|
session = isNaN(session) ? null : session;
|
|
|
|
return m(
|
|
Layout,
|
|
{ backHref: session ? "/" : null },
|
|
m(BaseView, { newSession, session })
|
|
);
|
|
},
|
|
},
|
|
});
|