Readlebee/app/views/home/loggedOut.js

83 lines
2.6 KiB
JavaScript
Raw Normal View History

2019-09-14 06:43:07 +02:00
import html from 'choo/html';
export const loggedOutView = (homeController, emit) => {
const { __ } = homeController.i18n;
2019-09-14 06:43:07 +02:00
return [
html`<section>
<h2>${__('home.logged_out.subtitle')}</h2>
2019-09-14 06:43:07 +02:00
<article class="flex one three-500">
<div>
<div class="card">
<header class="center-align">
<span style="font-size:32pt;color:green;">
<i class="icon-check"></i>
</span>
</header>
<footer>
${__('home.logged_out.track_books')}
2019-09-14 06:43:07 +02:00
</footer>
</div>
</div>
<div>
<div class="card">
<header class="center-align">
<span style="font-size:32pt;color:red;">
<i class="icon-heart-filled"></i>
</span>
</header>
<footer>
${__('home.logged_out.share_friends')}
2019-09-14 06:43:07 +02:00
</footer>
</div>
</div>
<div>
<div class="card">
<header class="center-align">
<span style="font-size:32pt;color:yellow;">
<i class="icon-star"></i>
</span>
</header>
<footer>
${__('home.logged_out.read_rate')}
2019-09-14 06:43:07 +02:00
</footer>
</div>
</div>
</article>
</section>`,
html`<section>
<h2>${__('home.logged_out.community_header')}</h2>
2019-09-14 06:43:07 +02:00
<div class="flex one two-700">
<div>
<div class="card">
<header>
<h3>${__('home.logged_out.recent_reviews')}</h3>
<button class="small pseudo pull-right tooltip-left" data-tooltip=${__('interaction.reload')}>
2019-09-25 22:25:36 +02:00
<i class="icon-reload"></i>
2019-09-14 06:43:07 +02:00
</button>
</header>
<footer>
2019-10-18 04:56:57 +02:00
${homeController.state.loggedOut.recentReviews.map(review => reviewCard(homeController, review))}
2019-09-14 06:43:07 +02:00
</footer>
</div>
</div>
<div>
<div class="card">
<header>
<h3>${__('home.logged_out.recent_updates')}</h3>
<button class="small pseudo pull-right tooltip-left" data-tooltip=${__('interaction.reload')}>
2019-09-25 22:25:36 +02:00
<i class="icon-reload"></i>
2019-09-14 06:43:07 +02:00
</button>
</header>
<footer>
2019-10-18 04:56:57 +02:00
${homeController.state.loggedOut.recentUpdates.map(update => reviewCard(homeController, update))}
2019-09-14 06:43:07 +02:00
</footer>
</div>
</div>
</div>
</section>`,
html`<section class="center-align">
<a href="/login" class="large success button">${__('home.logged_out.join_now')}</a>
2019-09-14 06:43:07 +02:00
</section>`,
];
}