T45a Site · Stack: comments one short line
This commit is contained in:
1 parent
3ae04f4ead
commit
49d5c8161d
2 files changed
+3
-3
No files matched your search
@@ -7,14 +7,14 @@ const GIVE_UP = 20000;
|
||||
|
||||
type State = "starting" | "slow" | "ready" | "failed";
|
||||
|
||||
/** One story live from the gallery, themed with the site, no frame around it. */
|
||||
/** One story live from the gallery, in the site's mode. */
|
||||
export function Live({ page, story, title }: { page: string; story: string; title: string }) {
|
||||
const theme = useMode();
|
||||
const frame = useRef<HTMLIFrameElement>(null);
|
||||
const [state, setState] = useState<State>("starting");
|
||||
const [full, setFull] = useState(false);
|
||||
const [run, setRun] = useState(0);
|
||||
// Each new frame opens in the mode the site has then.
|
||||
// Each new frame opens in the current mode.
|
||||
const start = useMemo(() => mode(), [run]);
|
||||
const src = (t: string) => `/gallery/?page=${page}&story=${story}&theme=${t}`;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ const windows: Record<string, string[]> = shots.windows;
|
||||
/** Whether the site shows this story as a native capture. */
|
||||
export const isCaptured = (page: string, story: string) => captured.has(`${page}/${story}`);
|
||||
|
||||
/** Captures are at twice the pixels, drawn at their size, in the site's mode. */
|
||||
/** A capture at twice its pixels, in the site's mode. */
|
||||
function Shot({ name, alt }: { name: string; alt: string }) {
|
||||
const theme = useMode();
|
||||
return <img className="shot" srcSet={`/shots/${name}-${theme}.jpg 2x`} alt={alt} loading="lazy" />;
|
||||
|
||||
Reference in new issue
Block a user