1
Fork 0
href-plus/source/ts/pages/home.ts

67 lines
1.9 KiB
TypeScript
Raw Normal View History

2021-12-30 22:40:57 +00:00
import {Component, html} from 'htm/preact';
2022-01-05 20:45:26 +00:00
import ExternalAnchor from '../components/external-anchor.js';
2022-01-03 17:21:21 +00:00
import SearchBar from '../components/search-bar.js';
2021-12-30 22:40:57 +00:00
import SharedFooter from '../components/shared-footer.js';
export default class HomePage extends Component {
render() {
document.title = 'Blink';
2022-01-05 20:27:30 +00:00
const links = {
contribute: html`
<${ExternalAnchor}
text="anyone can do"
url="https://musicbrainz.org/doc/How_to_Contribute"
/>
`,
musicbrainz: html`
<${ExternalAnchor}
text="MusicBrainz database"
url="https://musicbrainz.org"
/>
`,
mbid: html`
<${ExternalAnchor}
text="MusicBrainz Identifier (mbid)"
url="https://musicbrainz.org/doc/MusicBrainz_Identifier"
/>
`,
};
2021-12-30 22:40:57 +00:00
return html`
<div class="home-page">
<header>
<h1>Blink</h1>
</header>
2022-01-03 17:21:21 +00:00
<main>
<${SearchBar} />
2022-01-05 20:27:30 +00:00
<div class="explainer">
<h2>What is this all about?</h2>
<p>
Blink is a website that hopes to make sharing links to music
easier. By using the data from the ${links.musicbrainz} (an open
encyclopedia for music metadata) we can provide an easy way to
share a single link to all the platforms a song or album is
available on, as long as someone has added those platforms to
MusicBrainz, which ${links.contribute}.
</p>
<p>
To share a link you can either use the search bar above and find
what you're looking for, or if you have a ${links.mbid} from
somewhere else already, head to${' '}
<code>${location.host}/release/${'<mbid>'}</code> directly.
</p>
</div>
2022-01-03 17:21:21 +00:00
</main>
2021-12-30 22:40:57 +00:00
<${SharedFooter} />
</div>
`;
}
}