-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Tim Kelty
committed
Jul 22, 2021
0 parents
commit 6ff9f7d
Showing
613 changed files
with
674,899 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Browsers we support via Babel, Autoprefixer etc. | ||
# https://github.com/ai/browserslist | ||
|
||
last 2 versions | ||
> 1% | ||
Firefox ESR | ||
not ie <= 10 | ||
not ie_mob <= 10 | ||
not bb <= 10 | ||
not op_mob <= 12.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
server { | ||
listen 8080 default_server; | ||
listen [::]:8080 default_server; | ||
server_name _; | ||
set $base /app; | ||
root $base/web; | ||
|
||
# security | ||
include craftcms/security.conf; | ||
|
||
# index.php | ||
index index.php; | ||
|
||
# index.php fallback | ||
location / { | ||
try_files $uri $uri/ /index.php?$query_string; | ||
} | ||
|
||
# additional config | ||
include craftcms/general.conf; | ||
|
||
# handle .php | ||
location ~ \.php$ { | ||
include craftcms/php_fastcgi.conf; | ||
} | ||
|
||
location /nginx-health { | ||
access_log off; | ||
add_header Content-Type text/plain; | ||
return 200 "healthy\n"; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
/vendor | ||
/node_modules | ||
*.env | ||
/*.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[{package.json,tailwind.js}] | ||
indent_size = 2 | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
ENVIRONMENT=dev | ||
|
||
SECURITY_KEY= | ||
|
||
DB_DRIVER=pgsql | ||
DB_SERVER=localhost | ||
DB_PORT=5432 | ||
DB_USER=postgres | ||
DB_PASSWORD= | ||
DB_DATABASE= | ||
DB_SCHEMA=public | ||
DB_TABLE_PREFIX= | ||
|
||
DEFAULT_SITE_URL=https://europa.nitro | ||
|
||
SMTP_HOST=mailhog.service.nitro | ||
SMTP_PORT=1025 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"env": { | ||
"browser": true, | ||
"node": true, | ||
"es6": true | ||
}, | ||
"parserOptions": { | ||
"sourceType": "module" | ||
}, | ||
"extends": [ | ||
"eslint:recommended", | ||
"prettier" | ||
], | ||
"rules": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Build and Push Docker Images | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
name: Build and push to Docker Hub | ||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
with: | ||
install: true | ||
|
||
- name: Login to Docker Hub | ||
uses: docker/login-action@v1 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Build craftcms/demo-europa:latest | ||
uses: docker/build-push-action@v2 | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
with: | ||
push: true | ||
platforms: linux/amd64,linux/arm64 | ||
tags: craftcms/demo-europa:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# CRAFT ENVIRONMENT | ||
.env | ||
|
||
# COMPOSER | ||
/vendor | ||
|
||
# CRAFT STORAGE | ||
!/storage/ | ||
/storage/* | ||
!/storage/rebrand/ | ||
|
||
# WEB | ||
/web/cpresources | ||
/web/assets | ||
/web/css | ||
/web/images | ||
/web/js | ||
/web/fonts | ||
/web/mix-manifest.json | ||
/web/favicon.ico | ||
/web/manifest.json | ||
/web/browserconfig.xml | ||
|
||
# BUILD FILES | ||
/node_modules | ||
/yarn-error.log | ||
/npm-debug.log | ||
|
||
# MISC FILES | ||
.cache | ||
.DS_Store | ||
.vscode | ||
.idea | ||
/web/css/site.css.map | ||
/web/js/site.js.map | ||
|
||
# For demo infrastucture only | ||
!seed.sql | ||
!/web/assets | ||
!/web/css | ||
!/web/images | ||
!/web/js | ||
!/web/fonts | ||
!/web/mix-manifest.json | ||
!/web/favicon.ico | ||
!/web/manifest.json | ||
!/web/browserconfig.xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
v14.15.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
web/ | ||
vendor/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 100, | ||
"singleQuote": true, | ||
"tabWidth": 4, | ||
"trailingComma": "es5" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities. | ||
version: v1.19.0 | ||
ignore: {} | ||
# patches apply the minimum changes required to fix a vulnerability | ||
patch: | ||
SNYK-JS-LODASH-567746: | ||
- browser-sync-webpack-plugin > lodash: | ||
patched: '2020-08-12T03:58:50.248Z' | ||
- browser-sync > easy-extender > lodash: | ||
patched: '2020-08-12T03:58:50.248Z' | ||
- laravel-mix-bundle-analyzer > webpack-bundle-analyzer > lodash: | ||
patched: '2020-08-12T03:58:50.248Z' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# use a multi-stage build for dependencies | ||
FROM composer as vendor | ||
COPY composer.json composer.json | ||
COPY composer.lock composer.lock | ||
RUN composer install --ignore-platform-reqs --no-interaction --prefer-dist | ||
|
||
FROM craftcms/nginx:8.0 | ||
|
||
# switch to the root user to install postgres tools | ||
USER root | ||
RUN apk add --no-cache postgresql-client libpng libpng-dev libjpeg libjpeg-turbo freetype freetype-dev libjpeg-turbo-dev libzip-dev gd && docker-php-ext-configure gd --with-freetype --with-jpeg && apk del --no-cache libpng-dev freetype-dev libjpeg-turbo-dev | ||
# replace the nginx config | ||
COPY .docker/default.conf /etc/nginx/conf.d/default.conf | ||
USER www-data | ||
|
||
# the user is `www-data`, so we copy the files using the user and group | ||
COPY --chown=www-data:www-data --from=vendor /app/vendor/ /app/vendor/ | ||
COPY --chown=www-data:www-data . . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
Copyright (c) Pixel & Tonic, Inc. | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<h1 align="center">Europa Museum Craft CMS Demo</h1> | ||
|
||
 | ||
|
||
## Overview | ||
|
||
The Europa Museum is a custom [Craft CMS](https://craftcms.com) marketing website for a stylishly-fictitious art museum. This repository houses the source code for our demo, which you can spin up for yourself by visiting [craftcms.com/demo](https://craftcms.com/demo). | ||
|
||
We’ve also included instructions below for setting up the demo in a local development environment with [Craft Nitro](https://getnitro.sh). | ||
|
||
Europa shows off many of Craft’s core features and includes a guided tour courtesy of the [Guide](https://plugins.craftcms.com/guide) plugin. | ||
|
||
### Development Technologies | ||
|
||
- [Craft CMS 3](https://craftcms.com/docs/3.x/) | ||
- PostgreSQL (11.5+) / MySQL (5.7+) | ||
- PHP (7.2.5+), built on the [Yii 2 framework](https://www.yiiframework.com/) | ||
- Native Twig templates | ||
|
||
### Front End Dependencies | ||
|
||
- [Babel](https://babeljs.io/) with ES6 | ||
- [Sass](https://sass-lang.com/) | ||
- [Laravel Mix](https://github.com/JeffreyWay/laravel-mix#readme) with [PurgeCSS](https://github.com/spatie/laravel-mix-purgecss#readme) and [Critical CSS](https://github.com/riasvdv/laravel-mix-critical#readme) | ||
- [Highway.js](https://highway.js.org/) | ||
- [GSAP](https://greensock.com/gsap) | ||
- [Lazysizes](https://github.com/aFarkas/lazysizes#readme) | ||
- [LocomotiveScroll](https://github.com/locomotivemtl/locomotive-scroll) | ||
|
||
## Local Development Setup | ||
|
||
### Environment | ||
|
||
If you’d like to get Europa running in a local environment, we recommend using [Craft Nitro](https://getnitro.sh): | ||
|
||
1. Follow Nitro’s [installation instructions](https://craftcms.com/docs/nitro/2.x/installation.html) for your OS. | ||
2. Make sure you’ve used `nitro db new` to create a PostgreSQL 13 database engine. | ||
3. Run `nitro create` with the URL to this repository: | ||
```zsh | ||
nitro create craftcms/demo-europa-museum europa | ||
``` | ||
- hostname: `europa.nitro` | ||
- web root: `web` | ||
- PHP version: `8.0` | ||
- database? `Y` | ||
- database engine: `postgres-13-*.database.nitro` | ||
- database name: `europa` | ||
- update env file? `Y` | ||
4. Move to the project directory and add a Craft account for yourself by following the prompts: | ||
```zsh | ||
cd europa | ||
nitro craft users/create --admin | ||
``` | ||
|
||
> 💡 If you’re using a different local environment, see Craft’s [Server Requirements](https://craftcms.com/docs/3.x/requirements.html) and [Installation Instructions](https://craftcms.com/docs/3.x/installation.html). | ||
|
||
### Front End | ||
|
||
Run `npm install` with node 14.15.0 or later. | ||
|
||
If you use a different site URL, update `DEFAULT_SITE_URL` in `.env` or the production build process will fail: | ||
|
||
``` | ||
DEFAULT_SITE_URL=https://europa.nitro | ||
``` | ||
You can then run any of the development scripts found in `package.json`: | ||
- `npm run watch` to watch and automatically recompile assets for local development | ||
- `npm run sync` to watch files and reload with BrowserSync for local development | ||
- `npm run dev` to compile assets for local development | ||
- `npm run prod` to compile optimized assets for production | ||
## License | ||
The source code of this project is licensed under the [BSD Zero Clause License](LICENSE.MD) unless stated otherwise. | ||
The imagery used by this project is the property of each respective license holder. You are not free to use it for your own projects. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
{ | ||
"name": "craftcms/demo-europa-museum", | ||
"description": "Europa Museum Demo", | ||
"keywords": [ | ||
"craft", | ||
"cms", | ||
"craftcms", | ||
"project", | ||
"demo", | ||
"starter" | ||
], | ||
"license": "0BSD", | ||
"homepage": "https://craftcms.com/demo", | ||
"type": "project", | ||
"support": { | ||
"email": "[email protected]", | ||
"issues": "https://github.com/craftcms/demo-europa-museum/issues", | ||
"forum": "https://craftcms.stackexchange.com/", | ||
"source": "https://github.com/craftcms/demo-europa-museum", | ||
"docs": "https://github.com/craftcms/demo-europa-museum" | ||
}, | ||
"require": { | ||
"carlcs/craft-redactorcustomstyles": "^3.0.2", | ||
"craftcms/cms": "^3.7", | ||
"craftcms/redactor": "^2.5.0", | ||
"fakerphp/faker": "^1.14", | ||
"misterbk/mix": "^1.5.2", | ||
"nystudio107/craft-minify": "^1.2.9", | ||
"nystudio107/craft-seomatic": "^3.3.44", | ||
"nystudio107/craft-typogrify": "^1.1.18", | ||
"sebastianlenz/linkfield": "^1.0.19", | ||
"solspace/craft-freeform": "3.11.9", | ||
"spacecatninja/imager-x": "^3.3", | ||
"verbb/default-dashboard": "^1.0", | ||
"vlucas/phpdotenv": "^3.4.0", | ||
"wbrowar/guide": "^2.2", | ||
"wrav/oembed": "^1.3.9" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"modules\\demos\\": "modules/demos/src/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"optimize-autoloader": true, | ||
"platform": { | ||
"php": "8.0" | ||
} | ||
}, | ||
"scripts": { | ||
"post-create-project-cmd": [ | ||
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\"", | ||
"@php craft db/restore seed.sql > /dev/null 2>&1", | ||
"@php craft demos/seed > /dev/null 2>&1" | ||
] | ||
} | ||
} |
Oops, something went wrong.