Commit 56a4415b by PLN (Algolia)

feat: Links, controls

parent 1fd386d1
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
- IMG! - IMG!
- Hydra[id]: Render own source - Hydra[id]: Render own source
- ParVagues: Generic landing with master player, a code sample, and subpages - Details page per item: fetch source-code, fetch song
- Details page per item: fetch source-code, fetch song
# Customization # Customization
- Image de profil: neural or bust! - Image de profil: neural or bust!
......
--- ---
title: Ariane13 title: Ariane13
source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/Ariane13.js source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/Ariane13.js
link: https://nech.pl/ariane13
--- ---
--- ---
title: Dusty Halley title: Dusty Halley
source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/DustyHalley.js source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/DustyHalley.js
link: https://nech.pl/halley
--- ---
--- ---
title: GaLactic title: GaLactic
source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/GaLactic.js source: https://git.plnech.fr/pln/Hydra/raw/master/StarryNights/GaLactic.js
link: https://nech.pl/nights-galactic
--- ---
...@@ -41,6 +41,7 @@ export default function Hydra({ hydraData, sourceCode }) { ...@@ -41,6 +41,7 @@ export default function Hydra({ hydraData, sourceCode }) {
</Head> </Head>
<article> <article>
<h1 className={utilStyles.headingXl}>{hydraData.title}</h1> <h1 className={utilStyles.headingXl}>{hydraData.title}</h1>
<a href={hydraData.link}>See it live</a>
<SyntaxHighlighter <SyntaxHighlighter
width="64em" width="64em"
language="javascript" language="javascript"
......
...@@ -46,37 +46,45 @@ export default function Home({ posts, talks }) { ...@@ -46,37 +46,45 @@ export default function Home({ posts, talks }) {
</a> </a>
. .
</p> </p>
</section>
<h3> <section className={`${utilStyles.headingMd} ${utilStyles.padding1px}`}>
code into <em>music</em> <Link href="/parvagues/">
</h3> <h3>
code into <em>music</em>
</h3>
</Link>
<p className="description"> <p className="description">
As <Link href="/parvagues/">ParVagues</Link>, I write patterns that As <Link href="/parvagues/">ParVagues</Link>, I write patterns that
shape soundwaves. shape soundwaves.
</p> </p>
</section>
<h3> <section className={`${utilStyles.headingMd} ${utilStyles.padding1px}`}>
code into <em>animated pixelscapes</em> <Link href="/hydra/">
</h3> <h3>
code into <em>animated pixelscapes</em>
</h3>
</Link>
<p className="description"> <p className="description">
Using <Link href="/hydra/">Hydra</Link>, I create animations that Using <Link href="/hydra/">Hydra</Link>, I create animations that
offer windows into other words. offer windows into other words.
</p> </p>
</section> </section>
<section className={`${utilStyles.headingMd} ${utilStyles.padding1px}`}> <section className={`${utilStyles.headingMd} ${utilStyles.padding1px}`}>
<h3> <Link href="/talks/">
ideas into <em>talks</em> <h3>
</h3> ideas into <em>talks</em>
</h3>
</Link>
<p className="description"> <p className="description">
I <Link href="/talks/">speak</Link> about topics I care about: from I <Link href="/talks/">speak</Link> about topics I care about: from
sharing my passions and teaching useful patterns, to questioning our sharing my passions and teaching useful patterns, to questioning our
current mental models. current mental models.
</p> </p>
<h2 className={utilStyles.headingLg}>Most recent talks</h2> <h5 className={utilStyles.headingLg}>Most recent talks</h5>
<ul className={utilStyles.list}> <ul className={utilStyles.list}>
{talks.map(({ id, title, description }) => ( {talks.map(({ id, title, description }) => (
<li className={utilStyles.listItem} key={id}> <li className={utilStyles.listItem} key={id}>
<Link href={`/talk/${id}`} key={id}> <Link href={`/talks#${id}`}>
<h4>{title}</h4> <h4>{title}</h4>
</Link> </Link>
{description && ( {description && (
......
...@@ -10,11 +10,12 @@ import React from "react"; ...@@ -10,11 +10,12 @@ import React from "react";
import ReactPlayer from "react-player"; import ReactPlayer from "react-player";
export async function getStaticProps(context) { export async function getStaticProps(context) {
const tidalSampleUrl = "https://git.plnech.fr/pln/Tidal/raw/f5bfbc74e68dcaac0f6afa93f2b47d35321274c8/live/dnb/automne_electrique.tidal" const tidalSampleUrl =
"https://git.plnech.fr/pln/Tidal/raw/f5bfbc74e68dcaac0f6afa93f2b47d35321274c8/live/dnb/automne_electrique.tidal";
const response = await fetch(tidalSampleUrl); const response = await fetch(tidalSampleUrl);
const source = await response.text(); const source = await response.text();
// Remove working title // Remove working title
const sourceClean = source.split("\n").slice(1).join("\n") const sourceClean = source.split("\n").slice(1).join("\n");
return { return {
props: { props: {
...@@ -22,7 +23,7 @@ export async function getStaticProps(context) { ...@@ -22,7 +23,7 @@ export async function getStaticProps(context) {
urlTwitch: "https://twitch.tv/parvagues/", urlTwitch: "https://twitch.tv/parvagues/",
urlTwitchExample: "https://www.twitch.tv/videos/965233250", urlTwitchExample: "https://www.twitch.tv/videos/965233250",
urlAutomne: "https://soundcloud.com/parvagues/automne-electrique", urlAutomne: "https://soundcloud.com/parvagues/automne-electrique",
tidalSample: sourceClean tidalSample: sourceClean,
}, },
}; };
} }
...@@ -68,7 +69,6 @@ export default function ParVagues({ ...@@ -68,7 +69,6 @@ export default function ParVagues({
> >
{tidalSample} {tidalSample}
</SyntaxHighlighter> </SyntaxHighlighter>
</section> </section>
<section className={utilStyles.headingMd}> <section className={utilStyles.headingMd}>
<h4> <h4>
...@@ -80,6 +80,14 @@ export default function ParVagues({ ...@@ -80,6 +80,14 @@ export default function ParVagues({
url={urlSC} url={urlSC}
width="100%" width="100%"
height="32em" height="32em"
controls={true}
config={{
soundcloud: {
options: {
auto_play: false,
},
},
}}
/> />
</div> </div>
</section> </section>
...@@ -93,6 +101,7 @@ export default function ParVagues({ ...@@ -93,6 +101,7 @@ export default function ParVagues({
url={urlTwitchExample} url={urlTwitchExample}
width="100%" width="100%"
height="32em" height="32em"
controls={true}
/> />
</div> </div>
</section> </section>
......
...@@ -52,44 +52,46 @@ export default function Talks({ talks, selection }) { ...@@ -52,44 +52,46 @@ export default function Talks({ talks, selection }) {
slides, slides,
event, event,
}) => ( }) => (
<li className={utilStyles.listItem} key={id}> <Link href={`/talks#${id}`} key={id}>
<h3>{title}</h3> <li className={utilStyles.listItem}>
{description && ( <h3 id={id}>{title}</h3>
<> {description && (
<small>{description}</small> <>
<br /> <small>{description}</small>
</> <br />
)} </>
<small className={utilStyles.lightText}>
<Date dateString={date} />
{context && (
<p>
{" "}
<i>
at <a href={event}>{context}</a>{" "}
{org && <>organised by {org}</>}
</i>
</p>
)} )}
</small>{" "} <small className={utilStyles.lightText}>
<ul class="links"> <Date dateString={date} />
{video && ( {context && (
<li> <p>
<a href={video}>Video</a> {" "}
</li> <i>
)} at <a href={event}>{context}</a>{" "}
{slides && ( {org && <>organised by {org}</>}
<li> </i>
<a href={slides}>Slides</a> </p>
</li> )}
)} </small>{" "}
{event && ( <ul className="links">
<li> {video && (
<a href={event}>Event</a> <li>
</li> <a href={video}>Video</a>
)} </li>
</ul> )}
</li> {slides && (
<li>
<a href={slides}>Slides</a>
</li>
)}
{event && (
<li>
<a href={event}>Event</a>
</li>
)}
</ul>
</li>
</Link>
) )
)} )}
</ul> </ul>
......
...@@ -51,7 +51,7 @@ p.code { ...@@ -51,7 +51,7 @@ p.code {
} }
section { section {
margin-bottom: 4em; margin-bottom: 3em;
} }
small { small {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment