Skip to content

Commit

Permalink
385 redesign layout of homepage (#398)
Browse files Browse the repository at this point in the history
* delete coloredSection component

* feat(frontend): add strapi single types for homepage, redesign homepage

* styling

* test design

* styling changes

* featured project carousel test

* final styling tourches

* fullscreen button for globe

* final touches, move globe section to bottom

* responsiveness

* lint and prettier

* fix graphql types

* fix types for fetchMissionStatement

* prettier

* fix(frontend): 🐛 fix typo in tada typegen

* convert d.ts to .ts for runtime typing. remove unnesescary types. add pakcage command to force generate types.

* move back to tada .d.ts as they recommend it

* generate turbo type cache

* remove type cache as I don't want to add CI/CD and run turbo command every commit.

* fix project card inputs

* change explicit undefined to optional type

* fix window not defined

* fix: serializable parameters

* WIP: refactoring

* remove any typecast

* more refactoring

* add strapi as dependency to use it's date type.

* fix pagination

* fix project card double link

* fix regression, add default tag back

* create common grid component

* change name of zustand initialization component

* refactor(frontend): 🔥 Remove unused code, sort and organize files

* fix imports

* fix remaining import errors

* remove legacy next image props

* update sitemap with root directories for blog, projects and satellites

* fix sitemap env var

* wip homepage redesign, add desc to featured image

* add google metadata verification

* add robots txt

* feat(frontend): restyle home page

* fix image width

* change description

* fix(frontend): 🐛 Fix component test import paths

* add wrong slug errors

* add bouncing scroll indicator on home page

* chnge hero margin

* Update image paths in README.md and tech-stack.md files. Also add a new environemnt view (#397)

* fix(frontend): ✅ Fix blog component test enum tag

* 91 docs update readmemd (#399)

* Update deployment.md with Apache configuration and GitHub secrets

* Update deployment.md with Apache configuration link

* build(deps): bump vite and @strapi/strapi in /backend (#393)

Bumps [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) to 5.0.13 and updates ancestor dependency [@strapi/strapi](https://github.com/strapi/strapi). These dependencies need to be updated together.


Updates `vite` from 5.0.11 to 5.0.13
- [Release notes](https://github.com/vitejs/vite/releases)
- [Changelog](https://github.com/vitejs/vite/blob/v5.0.13/packages/vite/CHANGELOG.md)
- [Commits](https://github.com/vitejs/vite/commits/v5.0.13/packages/vite)

Updates `@strapi/strapi` from 4.20.5 to 4.24.0
- [Release notes](https://github.com/strapi/strapi/releases)
- [Commits](https://github.com/strapi/strapi/compare/v4.20.5...v4.24.0)

---
updated-dependencies:
- dependency-name: vite
  dependency-type: indirect
- dependency-name: "@strapi/strapi"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump webpack-dev-middleware and @strapi/strapi in /backend (#394)

Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) to 6.1.2 and updates ancestor dependency [@strapi/strapi](https://github.com/strapi/strapi). These dependencies need to be updated together.


Updates `webpack-dev-middleware` from 6.1.1 to 6.1.2
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/v6.1.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v6.1.1...v6.1.2)

Updates `@strapi/strapi` from 4.20.5 to 4.24.0
- [Release notes](https://github.com/strapi/strapi/releases)
- [Commits](https://github.com/strapi/strapi/compare/v4.20.5...v4.24.0)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
- dependency-name: "@strapi/strapi"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix(frontend): 🐛 remove first article definition and fix page size (#401)

* fix(frontend): 🐛 remove first article definition and fix page size

* style(frontend): 🎨 prettier

* style(frontend): 💄 change bg for project card

* refactor(frontend): 🔥 remove unecessary <span> in project page

* style(frontend): 🎨 prettier

---------

Co-authored-by: Lucas Tran <lucastra@stud.ntnu.no>

* remove unecessary interfaces

* move ci/cd back to github, because of memory capacity on semi managed server

* remove strapi package from frontend, tyring to resolve memory issues

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Magnus Alexander Strømseng <magnus.stromseng@gmail.com>
Co-authored-by: Jakob Grøtan Gregusson <jakobgg@stud.ntnu.no>
Co-authored-by: Mads Hermansen <119772939+madshermansen@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mats <64415243+mnyflot@users.noreply.github.com>
Co-authored-by: Lucas Tran <lucastra@stud.ntnu.no>
  • Loading branch information
7 people authored and GitHub committed May 9, 2024
1 parent dcf988c commit 34b916c
Show file tree
Hide file tree
Showing 93 changed files with 5,905 additions and 1,256 deletions.
1 change: 1 addition & 0 deletions .github/workflows/autoredeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
# Create .env.production for the frontend nextjs
echo "BACKEND_INTERNAL_URL=${{ vars.BACKEND_INTERNAL_URL }}" >> .env.production
echo "STRAPI_URL=${{ vars.STRAPI_URL }}" >> .env.production
echo "OUTWARD_FACING_URL=${{ vars.OUTWARD_FACING_URL }}" >> .env.production
- name: Docker build
run: docker-compose build
- name: Docker up
Expand Down
102 changes: 51 additions & 51 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,66 +5,66 @@
name: Node.js CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
push:
branches: ["main"]
pull_request:
branches: ["main"]

defaults:
run:
working-directory: ./frontend
run:
working-directory: ./frontend

jobs:
build:
runs-on: self-hosted
build:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
strategy:
matrix:
node-version: [18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npm run build # Build the frontend
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npm run build # Build the frontend

lint:
runs-on: self-hosted
lint:
runs-on: self-hosted

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npm run lint # Run linter
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npm run lint # Run linter

prettier:
runs-on: self-hosted
prettier:
runs-on: self-hosted

strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npx prettier . --check # Run prettier
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- run: npm ci # Clean install packages
- run: npx prettier . --check # Run prettier
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,35 @@
"info": {
"singularName": "featured-image",
"pluralName": "featured-images",
"displayName": "featuredImage"
"displayName": "featuredImage",
"description": ""
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"featuredImage": {
"type": "media",
"multiple": false,
"required": true,
"allowedTypes": [
"images",
"files",
"videos",
"audios"
],
"type": "media",
"multiple": false,
"required": true
]
},
"satellite": {
"type": "relation",
"relation": "oneToOne",
"target": "api::satellite.satellite"
},
"description": {
"type": "string"
},
"title": {
"type": "string"
}
}
}
2 changes: 1 addition & 1 deletion backend/src/api/hero/content-types/hero/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"info": {
"singularName": "hero",
"pluralName": "heroes",
"displayName": "Hero",
"displayName": "HomeTeamSection",
"description": ""
},
"options": {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"kind": "singleType",
"collectionName": "home_featured_projects_plural",
"info": {
"singularName": "home-featured-projects",
"pluralName": "home-featured-projects-plural",
"displayName": "HomeFeaturedProjects"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"textContent": {
"type": "text"
},
"featuredProject1": {
"type": "relation",
"relation": "oneToOne",
"target": "api::project.project"
},
"featuredProject2": {
"type": "relation",
"relation": "oneToOne",
"target": "api::project.project"
},
"featuredProject3": {
"type": "relation",
"relation": "oneToOne",
"target": "api::project.project"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-featured-projects controller
*/

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::home-featured-projects.home-featured-projects');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-featured-projects router
*/

const { createCoreRouter } = require('@strapi/strapi').factories;

module.exports = createCoreRouter('api::home-featured-projects.home-featured-projects');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-featured-projects service
*/

const { createCoreService } = require('@strapi/strapi').factories;

module.exports = createCoreService('api::home-featured-projects.home-featured-projects');
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"kind": "singleType",
"collectionName": "home_mission_statements",
"info": {
"singularName": "home-mission-statement",
"pluralName": "home-mission-statements",
"displayName": "HomeMissionStatement"
},
"options": {
"draftAndPublish": true
},
"pluginOptions": {},
"attributes": {
"title": {
"type": "string"
},
"textContent": {
"type": "text"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-mission-statement controller
*/

const { createCoreController } = require('@strapi/strapi').factories;

module.exports = createCoreController('api::home-mission-statement.home-mission-statement');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-mission-statement router
*/

const { createCoreRouter } = require('@strapi/strapi').factories;

module.exports = createCoreRouter('api::home-mission-statement.home-mission-statement');
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

/**
* home-mission-statement service
*/

const { createCoreService } = require('@strapi/strapi').factories;

module.exports = createCoreService('api::home-mission-statement.home-mission-statement');
Loading

0 comments on commit 34b916c

Please sign in to comment.