mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 10:39:53 +00:00
Clean up app to remove old prerendering bits
This commit is contained in:
@@ -26,9 +26,14 @@ export default class Home extends Component<Props, State> {
|
||||
|
||||
render({ files }: Props, { active }: State) {
|
||||
return (
|
||||
<div class={style.home + ' ' + (active ? style.active : '')}>
|
||||
<div class={style.home}>
|
||||
{ files && files[0] && (
|
||||
<img src={files[0].uri} style="width:100%;" />
|
||||
<img src={files[0].uri} class={style.image} />
|
||||
) || (
|
||||
<div class={style.content}>
|
||||
<h1>Squoosh</h1>
|
||||
<p>Test home content</p>
|
||||
</div>
|
||||
) }
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -7,14 +7,15 @@
|
||||
|
||||
.home {
|
||||
padding: 20px;
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.active {
|
||||
animation: fadeIn 2s forwards ease 1;
|
||||
.image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@keyframes fadeIn {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
.content {
|
||||
max-width: 600px;
|
||||
margin: 50px auto 0;
|
||||
font-size: 120%;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
4
src/components/home/style.scss.d.ts
vendored
4
src/components/home/style.scss.d.ts
vendored
@@ -1,3 +1,3 @@
|
||||
export const home: string;
|
||||
export const active: string;
|
||||
export const fadeIn: string;
|
||||
export const image: string;
|
||||
export const content: string;
|
||||
|
||||
Reference in New Issue
Block a user