Site: REPL, use the gist or example title in the page title

Closes #2592
pull/2610/head
Luca Bonavita 6 years ago committed by Conduitry
parent 55efa0e0b1
commit 8839951185

@ -5,7 +5,7 @@
- advantage of css-styling
- https://github.com/jacobmischka/svelte-feather-icon
- https://feathericons.com/
- if requred we can split out app-controls to REPL only
- if required we can split out app-controls to REPL only
-----------------------------------------------
-->
@ -112,4 +112,4 @@
<symbol id="chevron" class="icon" viewBox="0 0 24 24">
<path d="M2,7 L12,17 L20,7"/>
</symbol>
</svg>
</svg>

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

@ -6,6 +6,7 @@
import downloadBlob from '../../_utils/downloadBlob.js';
import { user } from '../../../../user.js';
import { enter } from '../../../../utils/events.js';
import { isMac } from '../../../../utils/compat.js';
const dispatch = createEventDispatcher();
@ -20,8 +21,6 @@
let justSaved = false;
let justForked = false;
const isMac = typeof navigator !== 'undefined' && navigator.platform === 'MacIntel';
function wait(ms) {
return new Promise(f => setTimeout(f, ms));
}

@ -27,7 +27,7 @@
let repl;
let gist;
let name = 'loading...';
let name = 'Loading...';
let zen_mode = false;
let relaxed = false;
let width = process.browser ? window.innerWidth : 1000;
@ -58,7 +58,9 @@
if (gist_id) {
relaxed = false;
fetch(`gist/${gist_id}`).then(r => r.json()).then(data => {
fetch(`gist/${gist_id}`)
.then(r => r.json())
.then(data => {
gist = data;
const { description, files } = data;
@ -201,7 +203,7 @@
</style>
<svelte:head>
<title>REPL • Svelte</title>
<title>{name} • REPL • Svelte</title>
<meta name="twitter:title" content="Svelte REPL">
<meta name="twitter:description" content="Cybernetically enhanced web apps">
@ -212,9 +214,9 @@
<div class="repl-outer {zen_mode ? 'zen-mode' : ''}" class:mobile>
<AppControls
{name}
{gist}
{repl}
bind:name
bind:zen_mode
on:forked={handle_fork}
/>

@ -0,0 +1 @@
export const isMac = typeof navigator !== 'undefined' && navigator.platform === 'MacIntel';
Loading…
Cancel
Save