Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/styling #139

Merged
merged 29 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
d6fdcef
Update color palette.
tannguyen04 Nov 6, 2024
6d9147e
Init some base style: Heading, container, footer, header banner.
tannguyen04 Nov 8, 2024
eb6c309
Render dyamic page tite in header.
tannguyen04 Nov 8, 2024
bd5e59c
Re-config Vite with Reactjs & Typescript
tannguyen04 Nov 14, 2024
cba9c93
Update more styling
tannguyen04 Nov 15, 2024
723e499
Update gennerate static site command.
tannguyen04 Nov 15, 2024
81cde8f
Update style
tannguyen04 Nov 15, 2024
41b8ad1
Update generate static command
tannguyen04 Nov 15, 2024
c611482
Update frontend command
tannguyen04 Nov 15, 2024
ae4a596
Re-generate static site
tannguyen04 Nov 15, 2024
66fa923
Re-generate static site
tannguyen04 Nov 15, 2024
b70776d
Re-generate static site
tannguyen04 Nov 15, 2024
ce1c2cb
Capture the DMP content.
simesy Nov 16, 2024
267f5ac
Merge branch 'feature/styling'
simesy Nov 16, 2024
f3d8972
Update static site
tannguyen04 Nov 16, 2024
5db794f
Export local DB
tannguyen04 Nov 16, 2024
8cfd74f
Merge remote-tracking branch 'origin/feature/styling'
simesy Nov 16, 2024
949f9e3
Re-structure Vite-Theme, create article views.
tannguyen04 Nov 18, 2024
94f1d45
Remove vite config ts
tannguyen04 Nov 18, 2024
33936a4
emove the boilerplate comments from twig files.
tannguyen04 Nov 18, 2024
d9d8fff
Update db
tannguyen04 Nov 18, 2024
64d5c45
Remove.
simesy Nov 21, 2024
32b7a24
Merge branch 'main' into feature/styling
simesy Nov 21, 2024
6d08246
Composer update.
simesy Nov 21, 2024
1162ac8
Minimalism of the admin toolbar.
simesy Nov 21, 2024
4b9964c
Remove some modules.
simesy Nov 21, 2024
830b7d9
Added 6 articles.
simesy Nov 21, 2024
2631e28
Footer.
simesy Nov 21, 2024
d6bf784
Fix up aliases.
simesy Nov 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .ddev/commands/host/frontend
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash

ddev npm --prefix web/themes/custom/fstheme ci
ddev npm --prefix web/themes/custom/fstheme run build
ddev npm --prefix web/themes/custom/fstheme run build
5 changes: 5 additions & 0 deletions .ddev/commands/host/save
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
#!/bin/bash

# Any site building changes should be captured.
ddev drush cex -y

# Trim unneeded table data.
echo "Removing cache data."
ddev drush sqlq " \
TRUNCATE cache_access_policy; \
Expand All @@ -17,6 +21,7 @@ ddev drush sqlq " \
TRUNCATE sessions; \
"

# Store the database on disc while it is small.
ddev export-db --file=_db_main.sql.gz

# So we can keep working.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 10 additions & 2 deletions .ddev/commands/web/generate-static-site
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
#!/bin/bash

#drush search-api:clear article
#drush search-api:index article

rm -rf /var/www/html/static-site

GENERATE_STATIC_SITE=1 drush tome:static -vv --uri=https://frees.au
if [ "$1" == "--production" ]; then
GENERATE_STATIC_SITE=1 drush tome:static -vv --uri=https://frees.au
else
GENERATE_STATIC_SITE=1 drush tome:static -vv --uri=fs-web-static-site.ddev.site:8080
fi

# Need this one to make search api lunr works.
# Make sure Drupal site is fully index first.
cp -R "/var/www/html/web/sites/default/files/search-api-js" "/var/www/html/static-site/sites/default/files"
#cp -R "/var/www/html/web/sites/default/files/search-api-js" "/var/www/html/static-site/sites/default/files"
cp -R "/var/www/html/web/themes/custom/fstheme/stockart" "/var/www/html/static-site/themes/custom/fstheme"
88 changes: 88 additions & 0 deletions .ddev/nginx_full/fs-web-static-site.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# Example configuration for a second docroot

#ddev-generated
# If you want to take over this file and customize it, rename it to <yourname>.conf,
# and remove the ddev-generated line above

server {
# Set the docroot to where it belongs in the codebase
root /var/www/html/static-site;
# Set the server_name so this config can be selected
# You'll need additional_hostnames["seconddocroot"] in config.yaml for this to work
server_name fs-web-static-site.ddev.site;

listen 80;
listen 443 ssl;

ssl_certificate /etc/ssl/certs/master.crt;
ssl_certificate_key /etc/ssl/certs/master.key;

include /etc/nginx/monitoring.conf;

index index.php index.htm index.html;

# Disable sendfile as per https://docs.vagrantup.com/v2/synced-folders/virtualbox.html
sendfile off;
error_log /dev/stdout info;
access_log /var/log/nginx/access.log;

location / {
absolute_redirect off;
try_files $uri $uri/ /index.php?$query_string;
}

location @rewrite {
# For D7 and above:
# Clean URLs are handled in drupal_environment_initialize().
rewrite ^ /index.php;
}

# pass the PHP scripts to FastCGI server listening on socket
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_intercept_errors off;
# fastcgi_read_timeout should match max_execution_time in php.ini
fastcgi_read_timeout 10m;
fastcgi_param SERVER_NAME $host;
fastcgi_param HTTPS $fcgi_https;
# Pass the X-Accel-* headers to facilitate testing.
fastcgi_pass_header "X-Accel-Buffering";
fastcgi_pass_header "X-Accel-Charset";
fastcgi_pass_header "X-Accel-Expires";
fastcgi_pass_header "X-Accel-Limit-Rate";
fastcgi_pass_header "X-Accel-Redirect";
}

# Expire rules for static content
# Media: images, icons, video, audio, HTC
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm|webp|htc)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}

# Prevent clients from accessing hidden files (starting with a dot)
# This is particularly important if you store .htpasswd files in the site hierarchy
# Access to `/.well-known/` is allowed.
# https://www.mnot.net/blog/2010/04/07/well-known
# https://tools.ietf.org/html/rfc5785
location ~* /\.(?!well-known\/) {
deny all;
}

# Prevent clients from accessing to backup/config/source files
location ~* (?:\.(?:bak|conf|dist|fla|in[ci]|log|psd|sh|sql|sw[op])|~)$ {
deny all;
}

include /etc/nginx/common.d/*.conf;
include /mnt/ddev_config/nginx/*.conf;
}
9 changes: 6 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
"version": "0.2.0",
"configurations": [
{
"name": "DDEV Xdebug",
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"hostname": "0.0.0.0",
"port": 9003,
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}
"/var/www/html": "${workspaceFolder}"
},
"preLaunchTask": "DDEV: Enable Xdebug",
"postDebugTask": "DDEV: Disable Xdebug"
},
{
"name": "Lando Xdebug",
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ ddev frontend
Static tests run easily in the container.

```
ddev static # PHPStan and PHPCS.
ddev cypress # Currently hangs locally, working in Github Actions.
ddev test-static # PHPStan and PHPCS.
ddev test-cypress # Currently hangs locally, working in Github Actions.
```

Note that for Cypress E2E testing, the `ddev cypress` command works for us on
Expand Down
Binary file modified _db_main.sql.gz
Binary file not shown.
7 changes: 1 addition & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"require": {
"composer/installers": "^2.0",
"cweagans/composer-patches": "~2.0",
"drupal/admin_toolbar": "^3.4",
"drupal/better_exposed_filters": "^7.0",
"drupal/ckeditor5_template": "^1.0",
"drupal/config_ignore": "^3.2",
Expand All @@ -36,6 +35,7 @@
"drupal/redirect": "^1.9",
"drupal/search_api_lunr": "^3.0",
"drupal/simple_sitemap": "^4.1",
"drupal/twig_tweak": "^3.4",
"drupal/upgrade_status": "*",
"drush/drush": "^13",
"oomphinc/composer-installers-extender": "^2"
Expand Down Expand Up @@ -119,11 +119,6 @@
"composer-exit-on-patch-failure": true,
"patchLevel": {
"drupal/core": "-p2"
},
"patches": {
"drupal/webform": {
"[#3345590] Drush 12 moved the namespace": "./config/patches/webform_3345590_3.patch"
}
}
}
}
Loading
Loading