Skip to content
Snippets Groups Projects
Commit 90073eaa authored by scmoritz's avatar scmoritz
Browse files

Pages are now in a container with a simple navbar

parent 32468d9d
No related branches found
No related tags found
1 merge request!2Put pages in a container with a simple navbar
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AMIV website</title>
</head>
<body>
<script src="/dist/bundle.js"></script>
</body>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AMIV website</title>
</head>
<body>
<script src="/dist/bundle.js"></script>
</body>
</html>
\ No newline at end of file
const m = require('mithril');
module.exports = {
view() {
return m('div', 'example AMIV content');
},
};
// src/index.js
const m = require('mithril');
const Layout = require('./layout');
const amiv = require('./amiv');
m.route(document.body, '/', {
'/': {
render() {
return m(Layout);
return m(Layout, m(amiv));
},
},
});
const m = require('mithril');
module.exports = {
view() {
return m('div', { class: 'container' }, [
m('p', 'hallo5'),
view(vnode) {
return m('div', [
m('nav', [
m('a', { href: '/' }, 'AMIV'),
m('a', { href: '/events' }, 'Events'),
m('a', { href: '/studydocuments' }, 'Studienunterlagen'),
m('a', { href: '/jobs' }, 'Jobs'),
m('a', { href: '/profile' }, 'Profil'),
]),
m('main', vnode.children),
]);
},
};
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment