add basic landing page
This commit is contained in:
parent
b30bc655b4
commit
e82ba6145a
|
@ -0,0 +1,89 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<title>Blowfish</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://use.typekit.net/meh5rjc.css" />
|
||||||
|
<link rel="stylesheet" href="styles.css" />
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="layout">
|
||||||
|
<header class="header">
|
||||||
|
<h1>Blowfish</h1>
|
||||||
|
<h2>
|
||||||
|
Desktop app to retrieve and display your total Ocean Token balances.
|
||||||
|
</h2>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<figure class="screen">
|
||||||
|
<img src="screens.png" />
|
||||||
|
</figure>
|
||||||
|
|
||||||
|
<main>
|
||||||
|
<ul class="downloads">
|
||||||
|
<li>
|
||||||
|
<a
|
||||||
|
class="button"
|
||||||
|
href="https://github.com/kremalicious/blowfish/releases"
|
||||||
|
>
|
||||||
|
Download
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<p class="release">
|
||||||
|
Latest release:
|
||||||
|
<a href="https://github.com/kremalicious/blowfish/releases">
|
||||||
|
<span class="release__tag">...</span>
|
||||||
|
</a>
|
||||||
|
<span class="release__date">...</span>
|
||||||
|
</p>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="footer">
|
||||||
|
<p class="credit">
|
||||||
|
Made with ♥ by
|
||||||
|
<a href="https://matthiaskretschmann.com">Matthias Kretschmann</a>
|
||||||
|
</p>
|
||||||
|
|
||||||
|
<p class="thanks">
|
||||||
|
<span>Say thanks with OCEAN or ETH</span>
|
||||||
|
<code>0xf50F267b5689b005FE107cfdb34619f24c014457</code>
|
||||||
|
</p>
|
||||||
|
<p class="thanks">
|
||||||
|
<span>Say thanks with BTC</span>
|
||||||
|
<code>3DiHNMt875UWa2j73qFpr3cVB9foFhYArc</code>
|
||||||
|
</p>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
<script src="scripts.js"></script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
var _paq = window._paq || []
|
||||||
|
_paq.push(['trackPageView'])
|
||||||
|
_paq.push(['enableLinkTracking'])
|
||||||
|
;(function() {
|
||||||
|
var u = 'https://analytics.kremalicious.com/'
|
||||||
|
_paq.push(['setTrackerUrl', u + 'matomo.php'])
|
||||||
|
_paq.push(['setSiteId', '7'])
|
||||||
|
var d = document,
|
||||||
|
g = d.createElement('script'),
|
||||||
|
s = d.getElementsByTagName('script')[0]
|
||||||
|
g.type = 'text/javascript'
|
||||||
|
g.async = true
|
||||||
|
g.defer = true
|
||||||
|
g.src = u + 'matomo.js'
|
||||||
|
s.parentNode.insertBefore(g, s)
|
||||||
|
})()
|
||||||
|
</script>
|
||||||
|
<noscript
|
||||||
|
><p>
|
||||||
|
<img
|
||||||
|
src="https://analytics.kremalicious.com/matomo.php?idsite=7&rec=1"
|
||||||
|
style="border:0;"
|
||||||
|
alt=""
|
||||||
|
/></p
|
||||||
|
></noscript>
|
||||||
|
</body>
|
||||||
|
</html>
|
Binary file not shown.
After Width: | Height: | Size: 164 KiB |
|
@ -0,0 +1,65 @@
|
||||||
|
async function getLatestRelease() {
|
||||||
|
const response = await fetch(
|
||||||
|
'https://api.github.com/repos/kremalicious/blowfish/releases/latest'
|
||||||
|
)
|
||||||
|
|
||||||
|
if (response.status !== 200) {
|
||||||
|
console.error(`Non-200 response code from GitHub: ${response.status}`)
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
const json = await response.json()
|
||||||
|
return json
|
||||||
|
}
|
||||||
|
|
||||||
|
function getDownloads(release) {
|
||||||
|
const downloads = release.assets
|
||||||
|
.filter(
|
||||||
|
asset =>
|
||||||
|
asset.name.includes('mac.zip') |
|
||||||
|
(asset.name.includes('.exe') && !asset.name.includes('.exe.blockmap')) |
|
||||||
|
asset.name.includes('.deb')
|
||||||
|
)
|
||||||
|
.map(asset => {
|
||||||
|
const isMac = asset.name.includes('mac.zip')
|
||||||
|
const isWin = asset.name.includes('.exe')
|
||||||
|
|
||||||
|
return {
|
||||||
|
name: `Download (${isMac ? 'macOS' : isWin ? 'Windows' : 'Linux'})`,
|
||||||
|
url: asset.browser_download_url
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
return downloads
|
||||||
|
}
|
||||||
|
|
||||||
|
function replaceDom(release) {
|
||||||
|
if (!release) return
|
||||||
|
|
||||||
|
const releaseTagElement = document.querySelector('.release__tag')
|
||||||
|
const releaseDateElement = document.querySelector('.release__date')
|
||||||
|
const downloadsElement = document.querySelector('.downloads')
|
||||||
|
const dateFormatted = new Date(release.published_at).toLocaleDateString()
|
||||||
|
|
||||||
|
releaseTagElement.innerHTML = release.tag_name
|
||||||
|
releaseDateElement.innerHTML = dateFormatted
|
||||||
|
|
||||||
|
const downloads = getDownloads(release)
|
||||||
|
downloadsElement.innerHTML = ''
|
||||||
|
|
||||||
|
downloads.map(download => {
|
||||||
|
const li = document.createElement('li')
|
||||||
|
const a = document.createElement('a')
|
||||||
|
a.href = download.url
|
||||||
|
a.className = 'button'
|
||||||
|
a.appendChild(document.createTextNode(download.name))
|
||||||
|
downloadsElement.appendChild(li).appendChild(a)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async function init() {
|
||||||
|
const release = await getLatestRelease()
|
||||||
|
replaceDom(release)
|
||||||
|
}
|
||||||
|
|
||||||
|
init()
|
|
@ -0,0 +1,130 @@
|
||||||
|
:root {
|
||||||
|
--color-primary: #f7b737;
|
||||||
|
--color-secondary: #725418;
|
||||||
|
--color-signal: #049985;
|
||||||
|
--border-radius: 0.2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
*,
|
||||||
|
*::before,
|
||||||
|
*::after {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
text-rendering: optimizeLegibility;
|
||||||
|
font-feature-settings: 'liga', 'kern';
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
min-height: 100vh;
|
||||||
|
background: var(--color-primary);
|
||||||
|
color: var(--color-secondary);
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
|
||||||
|
Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 400;
|
||||||
|
font-style: normal;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,
|
||||||
|
h2,
|
||||||
|
h3,
|
||||||
|
.button {
|
||||||
|
font-family: josefin-sans, sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
img,
|
||||||
|
video,
|
||||||
|
svg {
|
||||||
|
max-width: 100%;
|
||||||
|
height: auto;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: var(--color-signal);
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.layout {
|
||||||
|
max-width: 35rem;
|
||||||
|
margin: auto;
|
||||||
|
padding: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.header {
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.screen {
|
||||||
|
margin-left: calc(50% - 50vw);
|
||||||
|
margin-right: calc(50% - 50vw);
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button {
|
||||||
|
display: inline-block;
|
||||||
|
background: var(--color-signal);
|
||||||
|
color: var(--color-primary);
|
||||||
|
padding: 0.5rem 1rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
transition: 0.2s ease-out;
|
||||||
|
min-width: 15rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button:hover {
|
||||||
|
background: var(--color-secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads {
|
||||||
|
margin-top: 2rem;
|
||||||
|
padding: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.downloads li {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.release {
|
||||||
|
text-align: center;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.footer {
|
||||||
|
margin-top: 4rem;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
background: rgba(255, 255, 255, 0.15);
|
||||||
|
padding: 0.1rem 0.3rem;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.credit {
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.thanks span {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 40rem) {
|
||||||
|
.thanks {
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue