diff --git a/app/config/site-templates.php b/app/config/site-templates.php index b22b559a15..2fb27950ef 100644 --- a/app/config/site-templates.php +++ b/app/config/site-templates.php @@ -121,7 +121,8 @@ return [ 'key' => 'template-for-onelink', 'name' => 'Onelink template', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/template-for-onelink.png', + 'screenshotDark' => $url . '/images/sites/templates/template-for-onelink-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/template-for-onelink-light.png', 'frameworks' => [ getFramework('NUXT', [ 'providerRootDirectory' => './onelink', @@ -140,7 +141,8 @@ return [ 'key' => 'starter-for-svelte', 'name' => 'Svelte starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-svelte.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-svelte-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-svelte-light.png', 'frameworks' => [ getFramework('SVELTEKIT', [ 'providerRootDirectory' => './', @@ -181,7 +183,8 @@ return [ 'key' => 'starter-for-react', 'name' => 'React starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-react.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-react-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-react-light.png', 'frameworks' => [ getFramework('REACT', [ 'providerRootDirectory' => './', @@ -222,7 +225,8 @@ return [ 'key' => 'starter-for-vue', 'name' => 'Vue starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-vue.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-vue-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-vue-light.png', 'frameworks' => [ getFramework('VUE', [ 'providerRootDirectory' => './', @@ -263,7 +267,8 @@ return [ 'key' => 'starter-for-react-native', 'name' => 'React Native starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-react-native.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-react-native-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-react-native-light.png', 'frameworks' => [ getFramework('REACT', [ 'providerRootDirectory' => './', @@ -305,7 +310,8 @@ return [ 'key' => 'starter-for-nextjs', 'name' => 'Next.js starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-nextjs.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-nextjs-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-nextjs-light.png', 'frameworks' => [ getFramework('NEXTJS', [ 'providerRootDirectory' => './', @@ -346,7 +352,8 @@ return [ 'key' => 'starter-for-nuxt', 'name' => 'Nuxt starter', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/starter-for-nuxt.png', + 'screenshotDark' => $url . '/images/sites/templates/starter-for-nuxt-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/starter-for-nuxt-light.png', 'frameworks' => [ getFramework('NUXT', [ 'providerRootDirectory' => './', @@ -387,7 +394,8 @@ return [ 'key' => 'template-for-event', 'name' => 'Event template', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/template-for-event.png', + 'screenshotDark' => $url . '/images/sites/templates/template-for-event-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/template-for-event-light.png', 'frameworks' => [ getFramework('NEXTJS', [ 'providerRootDirectory' => './', @@ -422,7 +430,8 @@ return [ 'key' => 'template-for-portfolio', 'name' => 'Portfolio template', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/template-for-portfolio.png', + 'screenshotDark' => $url . '/images/sites/templates/template-for-portfolio-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/template-for-portfolio-light.png', 'frameworks' => [ getFramework('NEXTJS', [ 'providerRootDirectory' => './', @@ -438,7 +447,8 @@ return [ 'key' => 'template-for-store', 'name' => 'Store template', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/template-for-store.png', + 'screenshotDark' => $url . '/images/sites/templates/template-for-store-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/template-for-store-light.png', 'frameworks' => [ getFramework('SVELTEKIT', [ 'providerRootDirectory' => './', @@ -479,7 +489,8 @@ return [ 'key' => 'template-for-blog', 'name' => 'Blog template', 'useCases' => ['starter'], - 'demoImage' => $url . '/console/images/sites/templates/template-for-blog.png', + 'screenshotDark' => $url . '/images/sites/templates/template-for-blog-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/template-for-blog-light.png', 'frameworks' => [ getFramework('SVELTEKIT', [ 'providerRootDirectory' => './', @@ -495,6 +506,8 @@ return [ 'key' => 'astro-starter', 'name' => 'Astro starter', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/astro-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/astro-starter-light.png', 'demoImage' => '', 'frameworks' => [ getFramework('ASTRO', [ @@ -511,6 +524,8 @@ return [ 'key' => 'remix-starter', 'name' => 'Remix starter', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/remix-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/remix-starter-light.png', 'demoImage' => '', 'frameworks' => [ getFramework('REMIX', [ @@ -527,6 +542,8 @@ return [ 'key' => 'flutter-starter', 'name' => 'Flutter starter', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/flutter-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/flutter-starter-light.png', 'demoImage' => '', 'frameworks' => [ getFramework('FLUTTER', [ @@ -543,6 +560,8 @@ return [ 'key' => 'nextjs-starter', 'name' => 'Next.js starter website', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/nextjs-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/nextjs-starter-light.png', 'frameworks' => [ getFramework('NEXTJS', [ 'providerRootDirectory' => './nextjs/starter', @@ -558,6 +577,8 @@ return [ 'key' => 'nuxt-starter', 'name' => 'Nuxt starter website', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/nuxt-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/nuxt-starter-light.png', 'frameworks' => [ getFramework('NUXT', [ 'providerRootDirectory' => './nuxt/starter', @@ -573,6 +594,8 @@ return [ 'key' => 'sveltekit-starter', 'name' => 'SvelteKit starter website', 'useCases' => ['starter'], + 'screenshotDark' => $url . '/images/sites/templates/sveltekit-starter-dark.png', + 'screenshotLight' => $url . '/images/sites/templates/sveltekit-starter-light.png', 'frameworks' => [ getFramework('SVELTEKIT', [ 'providerRootDirectory' => './sveltekit/starter', diff --git a/app/http.php b/app/http.php index 83f56aeb94..4712d4ebf9 100644 --- a/app/http.php +++ b/app/http.php @@ -29,6 +29,8 @@ use Utopia\Pools\Group; use Utopia\Swoole\Files; use Utopia\System\System; +Files::load(__DIR__.'/../public'); + const DOMAIN_SYNC_TIMER = 30; // 30 seconds $domains = new Table(1_000_000); // 1 million rows diff --git a/bin/ssl b/bin/ssl index 4d8ceb998f..83dcf6a026 100755 --- a/bin/ssl +++ b/bin/ssl @@ -1,3 +1,3 @@ #!/bin/sh -php /usr/src/code/app/cli.php screenshot $@ \ No newline at end of file +php /usr/src/code/app/cli.php ssl $@ \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 26d23254ed..2ea341fe98 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -953,9 +953,7 @@ services: appwrite-browser: container_name: appwrite-browser - ports: - - 5555:3000 - image: appwrite/browser:0.2.2 + image: appwrite/browser:0.2.1 networks: - appwrite diff --git a/public/images/sites/templates/.gitkeep b/public/images/sites/templates/.gitkeep deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/public/images/sites/templates/astro-starter-dark.png b/public/images/sites/templates/astro-starter-dark.png index cf7c35f637..3d064c5cdd 100644 Binary files a/public/images/sites/templates/astro-starter-dark.png and b/public/images/sites/templates/astro-starter-dark.png differ diff --git a/public/images/sites/templates/astro-starter-light.png b/public/images/sites/templates/astro-starter-light.png index cf7c35f637..3d064c5cdd 100644 Binary files a/public/images/sites/templates/astro-starter-light.png and b/public/images/sites/templates/astro-starter-light.png differ diff --git a/src/Appwrite/Utopia/Response/Model/TemplateSite.php b/src/Appwrite/Utopia/Response/Model/TemplateSite.php index b9fe4704c7..fe123bde53 100644 --- a/src/Appwrite/Utopia/Response/Model/TemplateSite.php +++ b/src/Appwrite/Utopia/Response/Model/TemplateSite.php @@ -28,11 +28,17 @@ class TemplateSite extends Model 'default' => '', 'example' => 'https://nextjs-starter.appwrite.network/', ]) - ->addRule('demoImage', [ + ->addRule('screenshotDark', [ 'type' => self::TYPE_STRING, - 'description' => 'File URL with preview screenshot.', + 'description' => 'File URL with preview screenshot in dark theme preference.', 'default' => '', - 'example' => 'https://cloud.appwrite.io/console/images/sites/templates/nextjs-starter.png', + 'example' => 'https://cloud.appwrite.io/images/sites/templates/template-for-blog-dark.png', + ]) + ->addRule('screenshotLight', [ + 'type' => self::TYPE_STRING, + 'description' => 'File URL with preview screenshot in light theme preference.', + 'default' => '', + 'example' => 'https://cloud.appwrite.io/images/sites/templates/template-for-blog-light.png', ]) ->addRule('useCases', [ 'type' => self::TYPE_STRING,