Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
remy committed Jun 21, 2023
1 parent e969be2 commit 9552351
Show file tree
Hide file tree
Showing 4 changed files with 433 additions and 56 deletions.
116 changes: 60 additions & 56 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,74 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ffconf 2023 - UK web and JavaScript conference</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter+Tight:wght@500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
<script type="module" src="./rem-details.js" async defer></script>
</head>

<style>
* {
margin: 0;
padding: 0;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
text-align: center;
font-size: 24px;
font-size: 3vw;
color: black;
line-height: 2;
}
<body>
<h1>
<svg viewbox="0 0 696 174" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M282.638 44.331c0-1.625.464-2.785 1.624-3.946l8.357-8.356c1.16-1.161 2.553-1.625 4.178-1.625h26.694c1.625 0 3.018.464 4.178 1.625l8.821 8.82c.696.929.928 1.857.928 2.786 0 .928-.232 1.857-.928 2.785l-75.208 74.743c-2.553 2.322-3.714 5.107-3.714 8.357v25.069c0 7.196 5.339 12.767 12.535 12.767h80.082c7.196 0 12.302-5.571 12.302-12.767s-5.106-12.767-12.302-12.767H290.53c-3.482 0-7.428-2.321-7.428-5.803 0-1.161.464-2.089 1.16-2.785l74.744-74.047c2.553-2.553 3.481-5.803 3.481-8.589V36.671c0-3.018-1.16-6.035-3.481-8.82L339.972 8.815c-2.322-2.553-5.339-3.946-8.821-3.946h-42.014c-3.482 0-6.732 1.393-8.821 3.946L261.282 27.85c-2.553 2.554-3.714 6.036-3.714 8.821v10.213c0 7.196 5.339 12.303 12.535 12.303s12.535-5.107 12.535-12.303v-2.553ZM396.594 8.816l-24.141 23.909c-2.553 2.553-3.714 5.339-3.714 8.82v89.135c0 3.482 1.161 6.268 3.714 8.821l24.141 23.908c2.321 2.554 5.107 3.947 8.588 3.947h32.265c3.25 0 6.036-1.161 8.589-3.714l23.908-23.909c2.554-2.553 3.714-5.339 3.714-9.053V41.546c0-3.482-1.16-6.268-3.714-8.821l-23.908-24.14c-2.553-2.554-5.339-3.715-8.589-3.715h-32.265c-3.481 0-6.499 1.393-8.82 3.946h.232Zm48.513 35.05c0 .233-.232.697-.464.93l-47.817 47.816c-.696.697-1.161.929-1.625.929-.696 0-.928-.697-.928-1.857v-42.71c0-1.625.464-3.018 1.625-4.179l12.766-12.766c1.161-1.161 2.554-1.625 4.178-1.625h16.945c1.625 0 2.786.464 3.946 1.625l10.91 10.677c.232.232.464.697.464.929v.232Zm-47.12 85.654c-.232-.232-.465-.697-.465-.929 0-.464.233-.928.465-1.16l47.585-47.585c.696-.697 1.16-.929 1.624-.929.697 0 .929.697.929 1.857v42.478c0 1.625-.464 3.018-1.393 4.179l-12.999 12.766c-1.16 1.161-2.321 1.625-3.946 1.625h-16.945c-1.624 0-3.017-.464-4.178-1.625l-10.677-10.677ZM504.98 44.331c0-1.625.464-2.785 1.624-3.946l8.357-8.356c1.16-1.161 2.553-1.625 4.178-1.625h26.694c1.625 0 3.018.464 4.178 1.625l8.821 8.82c.696.929.928 1.857.928 2.786 0 .928-.232 1.857-.928 2.785l-75.208 74.743c-2.553 2.322-3.714 5.107-3.714 8.357v25.069c0 7.196 5.339 12.767 12.535 12.767h80.082c7.196 0 12.302-5.571 12.302-12.767s-5.106-12.767-12.302-12.767h-59.655c-3.482 0-7.428-2.321-7.428-5.803 0-1.161.464-2.089 1.16-2.785l74.744-74.047c2.553-2.553 3.481-5.803 3.481-8.589V36.671c0-3.018-1.16-6.035-3.481-8.82L562.314 8.815c-2.322-2.553-5.339-3.946-8.821-3.946h-42.014c-3.482 0-6.732 1.393-8.821 3.946L483.624 27.85c-2.553 2.554-3.714 6.036-3.714 8.821v10.213c0 7.196 5.339 12.303 12.535 12.303s12.535-5.107 12.535-12.303v-2.553ZM616.151 44.099c0-1.393.464-2.553 1.624-3.714l8.357-8.356c1.16-1.161 2.553-1.625 4.178-1.625h26.23c1.625 0 3.017.464 4.178 1.625l8.356 8.356c.929 1.16 1.393 2.553 1.393 3.714V59.65a6.3 6.3 0 0 1-1.393 3.946l-8.356 8.589c-1.393 1.16-2.786 1.624-4.178 1.624h-25.302c-7.195 0-12.534 5.107-12.534 12.303 0 7.196 5.339 12.534 12.534 12.534h25.302c1.392 0 2.785.465 4.178 1.625l8.356 8.589a6.299 6.299 0 0 1 1.393 3.946v15.32c0 1.161-.464 2.553-1.393 3.714l-8.356 8.356c-1.161 1.161-2.553 1.625-4.178 1.625h-26.23c-1.625 0-3.018-.464-4.178-1.625l-8.357-8.356c-1.16-1.161-1.624-2.321-1.624-3.714v-2.785c0-7.196-5.339-12.071-12.535-12.071s-12.535 4.875-12.535 12.071v10.213c0 2.785 1.161 6.267 3.714 8.821l19.034 19.033c2.089 2.554 5.339 3.947 8.821 3.947h41.55c3.482 0 6.499-1.393 8.82-3.947l19.499-19.033c2.553-2.554 3.481-6.036 3.481-8.821v-30.176c0-3.482-1.16-6.5-3.481-8.82l-4.875-4.643c-1.393-1.393-2.089-3.25-2.089-5.803 0-2.321.696-4.178 2.089-5.571l4.875-4.642c2.321-2.322 3.481-5.34 3.481-8.821V36.671c0-2.785-.928-6.267-3.481-8.82L673.02 8.815c-2.321-2.553-5.338-3.946-8.82-3.946h-41.55c-3.482 0-6.732 1.393-8.821 3.946L594.795 27.85c-2.553 2.554-3.714 6.036-3.714 8.821v10.213c0 7.196 5.339 12.303 12.535 12.303s12.535-5.107 12.535-12.303V44.1Z" fill="#D4AF37"/><path fill-rule="evenodd" clip-rule="evenodd" d="M0 80.137v26.438l37.177-13.219v40.482l33.047-13.219V80.137L107.4 66.92l37.177 13.219v40.481l33.046 13.219V93.356l37.177 13.219V80.137L177.624 66.92V52.874l37.177 13.219V39.656l-70.223-26.437V53.7l-37.177-13.218L70.224 53.7V39.656L107.4 26.437V0L37.177 26.437V66.92L0 80.137Z" fill="#403700"/><path fill-rule="evenodd" clip-rule="evenodd" d="m107.401 119.793-37.177-13.218V92.53l37.177 13.218V79.311L37.177 52.874v40.482L0 80.138v26.437l37.177 13.218v40.482l33.047 13.218v-40.481L107.4 146.23l37.177-13.219v40.482l33.046-13.218v-40.482l37.177-13.219V80.137l-37.177 13.219V79.31l37.177-13.218V39.655l-70.223 26.438v40.481l-37.177 13.219Z" fill="#D4AF37"/><path d="M107.4 120.753v24.383" stroke="#D4AF37" stroke-width="4"/></svg>
</h1>
<h2>
<time datetime="2023-11-10T10:00:00">Fri 10 NOV 2023</time>
</h2>

svg {
max-width: 40vh;
}
<hr>

html {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
<main>

body {
margin: 0 auto;
}
<section id="intro">
<p>A full day of eight carefully curated sessions for an audience that cares about the future of the web, and who want their ideas challenged.</p>

a {
background: black;
color: white;
text-decoration: none;
padding: 4px 24px;
border: 2px solid white;
display: inline-block;
}
<ul>
<li>Held at the <a href="https://www.picturehouses.com/cinema/duke-of-york-s-picturehouse/information">Duke of Yorks cinema</a>
<li>In sunny* Brighton, UK
<li>Eight amazing and inspiring talks
<li><a href="https://ffconf.org/scholarship/">Inclusion scholarship programme</a>
<li>After party to socialise, network or play
<li><small>* Sunshine 100% (not) guaranteed</small>
</ul>
</section>

a:hover {
background: white;
border: 2px solid black;
color: black;
}
<section id="schedule">
<h2>Schedule</h2>

h2 span {
font-weight: 400;
}
</style>
</head>
<ol>
<li class="break">
<div class="time">
<time class="start">09:00</time>
<time class="end">09:40</time>
</div>
<p class="title">Registration
<li class="break">
<div class="time">
<time class="start">09:40</time>
<time class="end">09:50</time>
</div>
<p class="title">Opening Remarks
<li class="talk">
<div class="time">
<time class="start">09:50</time>
<time class="end">10:30</time>
</div>
<p class="title">Designing as we want, to create the experiences that we need / <span class="speaker-name">florence ohoye</span></p>
<rem-details>
<dl slot="details">
<dt class="icon talk">The talk</dt>
<dd>Delight. Inclusion. Awareness. Justice. Reparation. That's a lot to embed into every workflow. Are there ways that we can combine data and research to empower the people who use our products? Is there anything from critical design that can help us work differently? Let's do some design discourse and design better for the web and beyond.</dd>
<dt class="icon pronouns">She/her</dt>
<dd>I always wanted to do interesting things and making them at least vaguely useful!</dd>
</dl>
</rem-details>

</ol>
</section>

</main>

<body>
<h1>
<svg alt="ffconf" title="ffconf" viewBox="0 0 496 495" xmlns="http://www.w3.org/2000/svg">
<g fill="none" fill-rule="evenodd">
<path
d="M218.3 491.5c33.6-8 78.6-31.8 139.7-73.5 38-26 48.1-34.1 72-57.1 43.4-42 62.3-82.8 65.7-142.6 3.3-61.8-18.2-116.1-59-149.2C384.7 26.9 279.9-.3 170.4 0c0 0-51.5.8-70.9 5.7-66.2 16.5-94.4 52.5-99 126-5 80.7 33.6 216.8 82.2 291 6.2 9.3 19.4 25.1 29.2 35.2 33.4 33.4 64.7 43.2 106.4 33.6z"
fill="#000" />
<path
d="M160.3 283.4V229H124v-33.7h36.3v-9.6c0-33.6 24.9-57.7 59.6-57.7 19.5 0 18.2 1.3 19.1 2.6 0 9.9-4.5 31.8-4.5 31.8h-13.3c-15.5 1.6-22 8.3-22 22.8v10.1h54.4v-13.7c0-28.2 27-52.3 57.3-52.3 11 0 20.5.5 21.3 1.3.8.8.2 8-1.3 16.3l-2.6 14.8h-11.2c-15.2 0-24.3 7.7-26.4 22.7l-1.6 11H334V229h-44V337.7h-36.4V229h-54.4l-.5 53.8-.8 53.6-18.7.8-18.9.8v-54.6z"
fill="#FFF" />
</g>
</svg>
</h1>
<h2><span>Back at it: </span>Friday 10 November 2023</h2>
<p><a href="https://ffconf.org/news">Get the latest news here</a></p>
<!-- nope, no tracking here today. -->
</body>

Expand Down
1 change: 1 addition & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
127 changes: 127 additions & 0 deletions rem-details.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
// // ES6 class

const css = /* css */`
button {
appearance: none;
border: none;
background: none;
all: inherit;
padding-top: 16px;
border-top: 1px solid #333;
margin-top: 24px;
}
button:focus [name="summary"] {
outline: 1px solid blue;
}
[name="summary"] {
background: none;
display: block;
cursor: pointer;
user-select: none;
display: block;
font-family: 'Inter Tight', sans-serif;
font-size: 16px;
line-height: 24px;
position: relative;
}
[name="summary"]:after {
content: "";
display: block;
position: absolute;
right: 0;
top: 0px;
width: 16px;
height: 24px;
background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 2 6 6 2 2' stroke='%23D4AF37' stroke-width='2' stroke-miterlimit='10' stroke-linecap='square'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: center;
transition: transform 100ms ease-out;
}
/* kept because it's nice to know
::slotted([slot="details"]) {
text-decoration: underline;
}
*/
:host([open]) [name="summary"]:after {
transform: rotate(180deg);
}
:host([open]) button {
margin-top: 0px;
}
.details {
display: flex;
flex-direction: column-reverse;
}
@media screen and (min-width: 420px) {
[name="summary"], button {
display: none;
}
[name="details"] {
display: block !important;
}
}
`;

const template = document.createElement('template');
template.innerHTML = /*html*/ `
<style>
${css}
</style>
<div class="details">
<button><slot name="summary">More details</slot></button>
<slot name="details"></slot>
</div>`;


class RemDetails extends HTMLElement {

_open = false;

constructor() {
super();
console.log('construct');

const children = template.content.cloneNode(true);

// parent node gets us the button it's wrapped in
const summary = children.querySelector('slot[name="summary"]').parentNode;
summary.onclick = (e) => this.open = !this.open;

this.details = children.querySelector('slot[name="details"]');

// mode: open - means accessed in user code
const shadow = this.attachShadow({ mode: 'open', delegatesFocus: true }).appendChild(children);

const title = this.shadowRoot.host.getAttribute('title');

const open = !!this.shadowRoot.host.getAttribute('open');
this.open = open;
}

get open() {
return this._open;
}

set open(value) {
const open = value;
this.details.hidden = !open;
if (open) {
this.shadowRoot.host.setAttribute('open', '');
} else {
this.shadowRoot.host.removeAttribute('open');
}

this._open = open;
}
}
window.customElements.define('rem-details', RemDetails);
Loading

0 comments on commit 9552351

Please sign in to comment.