mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 18:19:47 +00:00
New homepage (#861)
* Paste button * Logo and animated blobs * Predictable initial blob position * Initial blob shape * Update canvas on resize if not updating every frame * lol * Get styles from CSS * Background blobs * Fade into the center * Get initial focus * Pause time while page is hidden * Footer * Optimise amount of initial CSS * More CSS optimisation * Install button * Home page with demo loading * Tweak size * Replace thumbnails * Responsive demo section * Responsive main section * Remove debug stuff * Fix prerender SVG size * Changes from feedback * Blob nudges (#872) * more smaller blobs * less blobs that are practically invisible * more dynamic speed range and stronger gravity * Reverting resize observer change The content rect is different to getBoundingClientRect Co-authored-by: Adam Argyle <atom@argyleink.com>
This commit is contained in:
@@ -3,7 +3,7 @@ import * as style from './style.css';
|
||||
import 'add-css:./style.css';
|
||||
import RangeInputElement from './custom-els/RangeInput';
|
||||
import './custom-els/RangeInput';
|
||||
import { linkRef } from 'shared/initial-app/util';
|
||||
import { linkRef } from 'shared/prerendered-app/util';
|
||||
|
||||
interface Props extends preact.JSX.HTMLAttributes {}
|
||||
interface State {}
|
||||
|
||||
@@ -18,7 +18,7 @@ import { twoUpHandle } from './custom-els/TwoUp/styles.css';
|
||||
import type { PreprocessorState } from '../../feature-meta';
|
||||
import { cleanSet } from '../../util/clean-modify';
|
||||
import type { SourceImage } from '../../Compress';
|
||||
import { linkRef } from 'shared/initial-app/util';
|
||||
import { linkRef } from 'shared/prerendered-app/util';
|
||||
|
||||
interface Props {
|
||||
source?: SourceImage;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.output {
|
||||
composes: abs-fill from '../../../../shared/initial-app/util.css';
|
||||
composes: abs-fill from global;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
@@ -19,12 +19,12 @@
|
||||
}
|
||||
|
||||
.two-up {
|
||||
composes: abs-fill from '../../../../shared/initial-app/util.css';
|
||||
composes: abs-fill from global;
|
||||
--accent-color: var(--button-fg);
|
||||
}
|
||||
|
||||
.pinch-zoom {
|
||||
composes: abs-fill from '../../../../shared/initial-app/util.css';
|
||||
composes: abs-fill from global;
|
||||
outline: none;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
@@ -8,7 +8,7 @@ import {
|
||||
CopyAcrossIcon,
|
||||
CopyAcrossIconProps,
|
||||
} from 'client/lazy-app/icons';
|
||||
import 'shared/initial-app/custom-els/loading-spinner';
|
||||
import 'shared/custom-els/loading-spinner';
|
||||
import { SourceImage } from '../';
|
||||
|
||||
interface Props {
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
.copy-to-other {
|
||||
grid-row: 1;
|
||||
grid-column: copy-button;
|
||||
composes: unbutton from '../../../../shared/initial-app/util.css';
|
||||
composes: unbutton from global;
|
||||
composes: download;
|
||||
|
||||
background: #656565;
|
||||
|
||||
@@ -30,7 +30,7 @@ import './custom-els/MultiPanel';
|
||||
import Results from './Results';
|
||||
import WorkerBridge from '../worker-bridge';
|
||||
import { resize } from 'features/processors/resize/client';
|
||||
import type SnackBarElement from 'shared/initial-app/custom-els/snack-bar';
|
||||
import type SnackBarElement from 'shared/custom-els/snack-bar';
|
||||
import { CopyAcrossIconProps, ExpandIcon } from '../icons';
|
||||
|
||||
export type OutputType = EncoderType | 'identity';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type SnackBarElement from 'shared/initial-app/custom-els/snack-bar';
|
||||
import type SnackBarElement from 'shared/custom-els/snack-bar';
|
||||
|
||||
import { get, set } from 'idb-keyval';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user