diff --git a/.env b/.env new file mode 100644 index 0000000..6d2fd99 --- /dev/null +++ b/.env @@ -0,0 +1,10 @@ +# Website +PROD_URL=https://housesof.world + +# API +API_TOKEN=NJk0urljsdSvApUDzWxGgoO6 +API_URL_DEV=http://api.housesof.localhost/how +API_URL_PROD=https://api.housesof.world/_ + +# Tracking +GA_TRACKER_ID=UA-4060922-27 diff --git a/package.json b/package.json index c4c93a2..0d01fab 100644 --- a/package.json +++ b/package.json @@ -37,6 +37,7 @@ "@rollup/plugin-replace": "^2.3.1", "autoprefixer": "^9.7.5", "babel-plugin-module-resolver": "^4.0.0", + "dotenv": "^8.2.0", "eslint-config-standard": "^14.1.1", "eslint-plugin-import": "^2.20.1", "eslint-plugin-node": "^11.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3b6208a..12e497c 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -19,6 +19,7 @@ devDependencies: '@rollup/plugin-replace': 2.3.1_rollup@2.2.0 autoprefixer: 9.7.5 babel-plugin-module-resolver: 4.0.0 + dotenv: 8.2.0 eslint-config-standard: 14.1.1_13a54f81caffeb9134dc06c172bdde71 eslint-plugin-import: 2.20.1 eslint-plugin-node: 11.0.0 @@ -1649,6 +1650,12 @@ packages: node: '>=6.0.0' resolution: integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w== + /dotenv/8.2.0: + dev: true + engines: + node: '>=8' + resolution: + integrity: sha512-8sJ78ElpbDJBHNeBzUbUVLsqKdccaa/BXF1uPTw3GrvQTBgrQrtObr2mUrE38vzYd8cEv+m/JBfDLioYcfXoaw== /ecc-jsbn/0.1.2: dependencies: jsbn: 0.1.1 @@ -4574,6 +4581,7 @@ specifiers: autoprefixer: ^9.7.5 babel-plugin-module-resolver: ^4.0.0 compression: ^1.7.4 + dotenv: ^8.2.0 eslint-config-standard: ^14.1.1 eslint-plugin-import: ^2.20.1 eslint-plugin-node: ^11.0.0 diff --git a/rollup.config.js b/rollup.config.js index 431b899..3d21ca6 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,121 +7,121 @@ import babel from 'rollup-plugin-babel' // import browsersync from 'rollup-plugin-browsersync' import autoPreprocess from 'svelte-preprocess' import { terser } from 'rollup-plugin-terser' -import config from 'sapper/config/rollup' +import sapperConfig from 'sapper/config/rollup' +import { config } from 'dotenv' import pkg from './package.json' // Define environment and things const mode = process.env.NODE_ENV const dev = mode === 'development' const legacy = !!process.env.SAPPER_LEGACY_BUILD +const replaceOptions = { + 'process.env.NODE_ENV': JSON.stringify(mode), + 'process.env.CONFIG': JSON.stringify(config().parsed) +} // Svelte const onwarn = (warning, onwarn) => (warning.code === 'CIRCULAR_DEPENDENCY' && /[/\\]@sapper[/\\]/.test(warning.message)) || onwarn(warning) // Preprocessors const preprocess = autoPreprocess({ - scss: { - includePaths: ['src', 'node_modules'], - renderSync: true - }, - postcss: true + scss: { + includePaths: ['src', 'node_modules'], + renderSync: true + }, + postcss: true }) export default { - /* - ** Client - */ - client: { - input: config.client.input(), - output: { - ...config.client.output(), - // ...dev && { exports: 'named' } - }, - // experimentalCodeSplitting: true, - plugins: [ - // Javascript - replace({ - 'process.browser': true, - 'process.env.NODE_ENV': JSON.stringify(mode) - }), - svelte({ - dev, - hydratable: true, - emitCss: true, - // css: css => css.write('static/bundle.css'), - preprocess - }), - resolve({ - browser: true, - extensions: ['.mjs', '.js', '.svelte', '.scss', '.json', '.html'], - dedupe: ['svelte'] - }), - commonjs(), - // dev && eslint(), - legacy && babel({ - extensions: ['.js', '.mjs', '.html', '.svelte'], - exclude: ['*.scss', '*.css', 'node_modules/@babel/**'], - runtimeHelpers: true - }), + /* + ** Client + */ + client: { + input: sapperConfig.client.input(), + output: sapperConfig.client.output(), + plugins: [ + // Javascript + replace({ + 'process.browser': true, + ...replaceOptions + }), + svelte({ + dev, + preprocess, + hydratable: true, + emitCss: true, + // css: css => css.write('static/bundle.css') + }), + resolve({ + browser: true, + extensions: ['.mjs', '.js', '.svelte', '.scss', '.json', '.html'], + dedupe: ['svelte'] + }), + commonjs(), + // dev && eslint(), + legacy && babel({ + extensions: ['.js', '.mjs', '.html', '.svelte'], + exclude: ['*.scss', '*.css', 'node_modules/@babel/**'], + runtimeHelpers: true + }), - // Compress Javascript - !dev && terser({ - module: true - }), - ], + // Compress Javascript + !dev && terser({ + module: true + }), + ], - onwarn, - }, + onwarn, + }, - /* - ** Server - */ - server: { - input: config.server.input(), - output: config.server.output(), - plugins: [ - replace({ - 'process.browser': false, - 'process.env.NODE_ENV': JSON.stringify(mode) - }), - svelte({ - dev, - generate: 'ssr', - preprocess - }), - resolve({ - browser: true, - extensions: ['.mjs', '.js', '.json', '.html', '.svelte', '.scss'], - dedupe: ['svelte'] - }), - commonjs(), - ], - external: Object.keys(pkg.dependencies).concat( - require('module').builtinModules || Object.keys(process.binding('natives')) - ), - - onwarn, - }, + /* + ** Server + */ + server: { + input: sapperConfig.server.input(), + output: sapperConfig.server.output(), + plugins: [ + replace({ + 'process.browser': false, + ...replaceOptions + }), + svelte({ + dev, + preprocess, + generate: 'ssr' + }), + resolve({ + browser: true, + extensions: ['.mjs', '.js', '.json', '.html', '.svelte', '.scss'], + dedupe: ['svelte'] + }), + commonjs(), + ], + external: Object.keys(pkg.dependencies).concat( + require('module').builtinModules || Object.keys(process.binding('natives')) + ), + onwarn, + }, - /* - ** Service worker - */ - // serviceworker: { - // input: config.serviceworker.input(), - // output: config.serviceworker.output(), - // plugins: [ - // resolve(), - // replace({ - // 'process.browser': true, - // 'process.env.NODE_ENV': JSON.stringify(mode) - // }), - // commonjs(), - // !dev && terser() - // ], + /* + ** Service worker + */ + // serviceworker: { + // input: sapperConfig.serviceworker.input(), + // output: sapperConfig.serviceworker.output(), + // plugins: [ + // resolve(), + // replace({ + // 'process.browser': true, + // ...replaceOptions + // }), + // commonjs(), + // !dev && terser() + // ], - // onwarn, - // } + // onwarn, + // } } diff --git a/src/atoms/IconZoomOut.svelte b/src/atoms/IconZoomOut.svelte new file mode 100644 index 0000000..a8dce0b --- /dev/null +++ b/src/atoms/IconZoomOut.svelte @@ -0,0 +1,9 @@ + + + diff --git a/src/organisms/Carousel.svelte b/src/organisms/Carousel.svelte index aa40d42..d2082fd 100644 --- a/src/organisms/Carousel.svelte +++ b/src/organisms/Carousel.svelte @@ -1,7 +1,7 @@ + +
Tap for fullscreen
-