|
1 | 1 | const html = require('choo/html') |
2 | | -const header = require('../../components/header') |
| 2 | +const css = require('sheetify') |
3 | 3 | const footer = require('../../elements/footer') |
| 4 | +const datIcon = require('../../elements/icon') |
| 5 | +const homeSection = require('../../elements/home-section') |
4 | 6 |
|
5 | 7 | module.exports = function (state, emit) { |
| 8 | + const splash = css` |
| 9 | + :host { |
| 10 | + background-repeat: repeat-y; |
| 11 | + background-position: center -75px; |
| 12 | +
|
| 13 | + @media screen and (min-width: 30em) { |
| 14 | + /* ns - not small breakpoint from tachyons */ |
| 15 | + background-position: center -175px; |
| 16 | + } |
| 17 | + } |
| 18 | + ` |
| 19 | + const backgroundImageUrl = '/public/img/bg-landing-page.svg' |
| 20 | + const star = datIcon('star-dat', {class: 'color-green'}) |
| 21 | + |
6 | 22 | return html` |
7 | | - <div> |
8 | | - ${header(state, emit)} |
9 | | - <section> |
10 | | - helloooo world |
| 23 | + <div class="min-vh-100 pb7"> |
| 24 | + <div class="${splash} pb6-ns pb4 w-100 center" style="background-image: url(${backgroundImageUrl})"> |
| 25 | + <section class="tc pa3 pt5-ns"> |
| 26 | + <h1 class="f3 f2-m f1-l fw2 black-90 mv3 tracked"> |
| 27 | + Dat<span class="v-mid dib grow w2 h2"> |
| 28 | + ${star} |
| 29 | + </span>Base |
| 30 | + </h1> |
| 31 | + <h2 class="f5 fw2 color-neutral-60 mb4 lh-copy"> |
| 32 | + Search for data preprints on DatBase! |
| 33 | + </h2> |
| 34 | + <div class="w-90 w-50-l center"> |
| 35 | + ${search()} |
| 36 | + </div> |
| 37 | + </section> |
| 38 | + <section class="bg-white mt4 mt3-ns mw7-ns center pa3 ph5-ns"> |
| 39 | + <p class="f4 lh-copy measure-wide"> |
| 40 | + Research papers are becoming increasingly accessible through open access and preprint servers. |
| 41 | + Research data is still behind locked custom APIs, confusing interfaces, or slow HTTP servers. |
| 42 | + We dream of world when all this data can be accessed as easy as the web. |
| 43 | + <a href="#">Imagine with us</a>. |
| 44 | + </p> |
| 45 | + <p class="f3 lh-copy measure-wide"> |
| 46 | + DatBase is distributed preprints for data! |
| 47 | + Built by <a href="http://datproject.org">Dat Project</a>. |
| 48 | + </p> |
| 49 | + </section> |
| 50 | + </div> |
| 51 | + <section class="pa3 w-100 bg-neutral-04"> |
| 52 | + <div class="mw7 center"> |
| 53 | + <div class="pa4-l"> |
| 54 | + <form class="mb0 pa4 br2-ns ba b--green"> |
| 55 | + <fieldset class="cf bn ma0 pa0"> |
| 56 | + <legend class="pa0 f5 f4-ns mb3 black-80">Get updates! We promise to only send the very exciting stuff.</legend> |
| 57 | + <div class="cf"> |
| 58 | + <label class="clip" for="email-address">Email Address</label> |
| 59 | + <input class="f6 f5-l input-reset bn fl black-80 bg-white pa3 lh-solid w-100 w-75-m w-80-l br2-ns br--left-ns" placeholder="Your Email Address" type="text" name="email-address" value="" id="email-address"> |
| 60 | + <input class="f6 f5-l button-reset fl pv3 tc bn bg-animate bg-black-70 hover-bg-black white pointer w-100 w-25-m w-20-l br2-ns br--right-ns" type="submit" value="Subscribe"> |
| 61 | + </div> |
| 62 | + </fieldset> |
| 63 | + </form> |
| 64 | + </div> |
| 65 | + </div> |
11 | 66 | </section> |
12 | | - ${footer(state, emit)} |
| 67 | + ${homeSection({ |
| 68 | + 'title': 'What are Data Preprints?', |
| 69 | + 'subtitle': 'With data preprints you can make data public & shareable before you are ready to publish.', |
| 70 | + 'sections': [ |
| 71 | + { |
| 72 | + 'title': 'User Friendly', |
| 73 | + 'text': ` |
| 74 | + Dat's simple to use command line tool works alognside apps like Dropbox or Google Drive. |
| 75 | + Keep data private until you are ready to prepublish without changing your data management software. |
| 76 | + ` |
| 77 | + }, |
| 78 | + { |
| 79 | + 'title': 'Reproducible History', |
| 80 | + 'text': ` |
| 81 | + Dat uses cryptographic registers to certify data ownership and track changes over time. |
| 82 | + A history of changes improves data reproducibility and transparency. |
| 83 | + ` |
| 84 | + }, |
| 85 | + { |
| 86 | + 'title': 'One-Click Publish', |
| 87 | + 'text': ` |
| 88 | + In the future, DatBase will have one-click publishing to data repositories such as Zenodo or Dataverse. |
| 89 | + Dat's innovative storage makes it the perfect intermediate between files on your computer and data publishing sites. |
| 90 | + ` |
| 91 | + } |
| 92 | + ], |
| 93 | + 'cta': { |
| 94 | + 'link': 'http://datproject.org', |
| 95 | + 'text': 'Learn more about Dat Project' |
| 96 | + } |
| 97 | + })} |
| 98 | + ${footer()} |
13 | 99 | </div> |
14 | 100 | ` |
| 101 | + |
| 102 | + function search () { |
| 103 | + const keydown = (e) => { |
| 104 | + if (e.keyCode === 13) { |
| 105 | + var link = e.target.value |
| 106 | + e.target.value = '' |
| 107 | + emit('archive:view', link) |
| 108 | + } |
| 109 | + } |
| 110 | + |
| 111 | + const searchIcon = datIcon('search', {class: 'absolute top-1 ml1 left-0 h2 w2 color-green'}) |
| 112 | + return html` |
| 113 | + <div class="relative dat-input db"> |
| 114 | + ${searchIcon} |
| 115 | + <input class="f3 pv3 pr4 pl3 indent w-100 dat-input__input h3" name="import-dat" type="text" placeholder="preview dat://" onkeydown=${keydown} /> |
| 116 | + </div> |
| 117 | + ` |
| 118 | + } |
15 | 119 | } |
0 commit comments