Skip to content

Commit

Permalink
movies updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ryansolid committed Jul 12, 2023
1 parent 9c0181f commit 8f7bc6b
Show file tree
Hide file tree
Showing 13 changed files with 2,277 additions and 2,173 deletions.
13 changes: 2 additions & 11 deletions examples/movies/src/components/GlobalLoader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
width: 200%;
transform: translateX(0);
opacity: 0;
transition: transform 2s ease, opacity 1s ease;
transition: transform 1s ease, opacity .5s ease;
background: #2196f3;
}

Expand All @@ -33,20 +33,11 @@
background: rgba(0, 0, 0, 0.2);
}

&.is-initing {
.global-loader-fill {
transition: none;
opacity: 1;
animation: Indeterminate 5s ease-out;
animation-fill-mode: forwards;
}
}

&.is-loading {
.global-loader-fill {
transition: none;
opacity: 1;
animation: Indeterminate 10s ease-out;
animation: Indeterminate 5s ease-out;
animation-fill-mode: forwards;
}
}
Expand Down
14 changes: 5 additions & 9 deletions examples/movies/src/components/GlobalLoader.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,22 @@
"use client";
import { createSignal, createEffect } from "solid-js";
import { createSignal, Show } from "solid-js";
import { isServer } from "solid-js/web";

import "./GlobalLoader.scss";

export default (props) => {
export default () => {
const [isVisible, setVisible] = createSignal();
if (!isServer) {
window.router.router.addEventListener("navigation-start", e => {
setVisible(true);
});

window.router.router.addEventListener("navigation-end", e => {
setTimeout(() => {
setVisible(false);
}, 300)
setVisible(false);
});

window.router.router.addEventListener("navigation-error", e => {
setTimeout(() => {
setVisible(false);
}, 300)
setVisible(false);
});
}
return (
Expand All @@ -30,4 +26,4 @@ export default (props) => {
</div>
</Show>
);
};
};
4 changes: 2 additions & 2 deletions examples/movies/src/components/Nav.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { A, Outlet } from "solid-start";
import { A } from "solid-start";
import HomeIcon from "~icons/ant-design/home-outlined";
import MagnifierIcon from "~icons/ant-design/search-outlined";
import MoviesIcon from "~icons/pepicons/clapperboard";
Expand All @@ -10,7 +10,7 @@ export default function Nav() {
<nav class={styles.nav}>
<ul class="nolist">
<li class={styles.logo}>
<img src="/solidjs.svg" width={48} height={48} alt="solid logo" />
<img src="data:image/svg+xml;charset=utf-8;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCAxNjYgMTU1LjMiPjxwYXRoIGQ9Ik0xNjMgMzVTMTEwLTQgNjkgNWwtMyAxYy02IDItMTEgNS0xNCA5bC0yIDMtMTUgMjYgMjYgNWMxMSA3IDI1IDEwIDM4IDdsNDYgOSAxOC0zMHoiIGZpbGw9IiM3NmIzZTEiLz48bGluZWFyR3JhZGllbnQgaWQ9ImEiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iMjcuNSIgeTE9IjMiIHgyPSIxNTIiIHkyPSI2My41Ij48c3RvcCBvZmZzZXQ9Ii4xIiBzdG9wLWNvbG9yPSIjNzZiM2UxIi8+PHN0b3Agb2Zmc2V0PSIuMyIgc3RvcC1jb2xvcj0iI2RjZjJmZCIvPjxzdG9wIG9mZnNldD0iMSIgc3RvcC1jb2xvcj0iIzc2YjNlMSIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZD0iTTE2MyAzNVMxMTAtNCA2OSA1bC0zIDFjLTYgMi0xMSA1LTE0IDlsLTIgMy0xNSAyNiAyNiA1YzExIDcgMjUgMTAgMzggN2w0NiA5IDE4LTMweiIgb3BhY2l0eT0iLjMiIGZpbGw9InVybCgjYSkiLz48cGF0aCBkPSJNNTIgMzVsLTQgMWMtMTcgNS0yMiAyMS0xMyAzNSAxMCAxMyAzMSAyMCA0OCAxNWw2Mi0yMVM5MiAyNiA1MiAzNXoiIGZpbGw9IiM1MThhYzgiLz48bGluZWFyR3JhZGllbnQgaWQ9ImIiIGdyYWRpZW50VW5pdHM9InVzZXJTcGFjZU9uVXNlIiB4MT0iOTUuOCIgeTE9IjMyLjY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MSIgc3RvcC1jb2xvcj0iIzFhMzM2YiIvPjwvbGluZWFyR3JhZGllbnQ+PHBhdGggZD0iTTExNCAxMTVhNDUgNDUgMCAwMC00OC0xNUw0IDEyMHM1MyA0MCA5NCAzMGwzLTFjMTctNSAyMy0yMSAxMy0zNHoiIGZpbGw9InVybCgjZCkiLz48L3N2Zz4=" width={48} height={48} alt="solid logo" />
</li>
<li>
<A href="/" end aria-label="Home">
Expand Down
59 changes: 0 additions & 59 deletions examples/movies/src/root.css

This file was deleted.

2 changes: 1 addition & 1 deletion examples/movies/src/routes/(home).tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export function routeData() {
export default function Page() {
const data = useRouteData<typeof routeData>();
return (
<main class="main">
<main class="main" $ServerOnly>
<Show when={data()}>
<Hero item={data()?.featured} />
<ListingCarousel
Expand Down
2 changes: 1 addition & 1 deletion examples/movies/src/routes/[...404].tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export default function NotFound() {
return (
<main class="w-full p-4 space-y-2">
<main class="w-full p-4 space-y-2" $ServerOnly>
<h1 class="font-bold text-xl">Page Not Found</h1>
</main>
);
Expand Down
2 changes: 1 addition & 1 deletion examples/movies/src/routes/movie/(all)/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export function routeData() {
export default function Page() {
const data = useRouteData<typeof routeData>();
return (
<main class="main">
<main class="main" $ServerOnly>
<Show when={data()}>
<Hero item={data()?.featured} />
<ListingCarousel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { CreditsItem } from "./CreditsItem";

export function Credits(props) {
return (
<div class="listing listing--carousel">
<div class="listing listing--carousel" $ServerOnly>
<div class="listing__head">
<h2 class="listing__title">Cast</h2>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default function Photos() {
const params = useParams();
const data = useMovie(params);
return (
<main>
<main $ServerOnly>
<ImagesSection title={"Backdrops"} images={data()?.item.images.backdrops} />
<ImagesSection title={"Posters"} images={data()?.item.images.posters} />
</main>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { Videos } from "./Videos";

export default function VideosPage() {
return (
<main>
<main $ServerOnly>
<h1>Videos</h1>
<Videos />
</main>
Expand Down
4 changes: 3 additions & 1 deletion examples/movies/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ export default defineConfig({
compiler: "solid"
}),
solid({
experimental: { islands: true, islandsRouter: true }
experimental: { islands: true, islandsRouter: true },
// adapter: netlify({ edge: true }),
ssr: "streaming"
})
]
});
2 changes: 1 addition & 1 deletion packages/start/root/assets.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function flattenIslands(match: ManifestEntry[], manifest: StartManifest, islands
if (m.type !== "island") return;
const islandManifest = manifest[m.href];

if (islandManifest && (!islands || islands.has(m.href))) {
if (islandManifest) { //&& (!islands || islands.has(m.href))
const res = flattenIslands(islandManifest.assets, manifest, islands);
result.push(...res);
}
Expand Down
Loading

0 comments on commit 8f7bc6b

Please sign in to comment.