75 lines
2.3 KiB
JavaScript
75 lines
2.3 KiB
JavaScript
const html = require('choo/html');
|
|
const Component = require('choo/component');
|
|
const Account = require('./account');
|
|
/*const assets = require('../../common/assets');*/
|
|
/*const { platform } = require('../utils');*/
|
|
|
|
class Header extends Component {
|
|
constructor(name, state, emit) {
|
|
super(name);
|
|
this.state = state;
|
|
this.emit = emit;
|
|
this.account = state.cache(Account, 'account');
|
|
}
|
|
|
|
update() {
|
|
this.account.render();
|
|
return false;
|
|
}
|
|
createElement() {
|
|
return html`
|
|
<header
|
|
class="main-header relative flex-none flex flex-row items-center justify-between px-6 md:px-8 z-20 bg-transparent"
|
|
>
|
|
<!-- Chapril banner code: starting… -->
|
|
<div id="chapril-banner">
|
|
<div id="chapril-banner-zone">
|
|
<div id="chapril-banner-logo">
|
|
<a href="https://www.chapril.org/"
|
|
><img
|
|
src="/Chapril-banner/v1/chapril-logo-small.png"
|
|
alt="Logo Chapril"
|
|
/></a>
|
|
</div>
|
|
<div id="chapril-banner-menu">
|
|
<ul>
|
|
<li><a href="https://www.chapril.org/">Accueil Chapril</a></li>
|
|
<li>
|
|
<a href="https://www.chapril.org/services.html"
|
|
>Services libres</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://pouet.april.org/@aprilorg">Nous suivre</a>
|
|
</li>
|
|
<li><a href="https://www.chapril.org/cgu.html">CGU</a></li>
|
|
<li>
|
|
<a href="https://www.chapril.org/a-propos.html"
|
|
>Mentions légales</a
|
|
>
|
|
</li>
|
|
<li>
|
|
<a href="https://www.chapril.org/contact.html"
|
|
>Nous contacter</a
|
|
>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="chapril-banner-aprillogo">
|
|
<a href="https://www.april.org/"
|
|
><img
|
|
src="/Chapril-banner/v1/april-logo-small.png"
|
|
class="chapril-banner-logo"
|
|
alt="Logo April"
|
|
/></a>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Chapril banner code: done. -->
|
|
</header>
|
|
`;
|
|
}
|
|
}
|
|
|
|
module.exports = Header;
|