2018-10-25 04:07:10 +02:00
|
|
|
const html = require('choo/html');
|
2018-11-12 20:13:31 +01:00
|
|
|
const Component = require('choo/component');
|
|
|
|
const Account = require('./account');
|
2019-12-20 04:35:15 +01:00
|
|
|
/*const assets = require('../../common/assets');*/
|
|
|
|
/*const { platform } = require('../utils');*/
|
2018-10-25 04:07:10 +02:00
|
|
|
|
2018-11-12 20:13:31 +01:00
|
|
|
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
|
2019-12-20 04:35:15 +01:00
|
|
|
class="main-header relative flex-none flex flex-row items-center justify-between px-6 md:px-8 z-20 bg-transparent"
|
2018-11-12 20:13:31 +01:00
|
|
|
>
|
2019-12-20 04:35:15 +01:00
|
|
|
<!-- 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. -->
|
2018-11-12 20:13:31 +01:00
|
|
|
</header>
|
|
|
|
`;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = Header;
|