Added new website

This commit is contained in:
didier.amyot committed 2024-07-02 18:36:05 -04:00
1 parent 293b7727e2
commit df26a3fe96
34 files changed
+10488

No files matched your search

+26
View File
@@ -0,0 +1,26 @@
import * as util from "./util.js";
import m from "https://esm.sh/mithril@2.2.2"
import _ from "https://esm.sh/lodash-es@4.17.21"
import {statsView, tabView, schedulView } from './schedule.js'
const calendarPage = {
view: function(){
const availableYears = util.getAvailableYears();
const year = _.get(m.route.param(), 'year', util.getDefaultYear());
return m('div.uk-grid.uk-margin-top.uk-margin-bottom',
m('div.uk-width-large-3-5.uk-width-medium-4-5.uk-width-small-1-1.uk-container-center',
[
m(statsView, {year}),
m(tabView, {year, availableYears}),
m(schedulView, {year}),
]),
)
}
}
m.route.mode = "hash";
m.route(document.getElementById('mithril-content'), "/", {
"/": calendarPage,
"/:year": calendarPage,
});