Skip to content

Commit

Permalink
News Posts (#39)
Browse files Browse the repository at this point in the history
* List of news posts, new post form

* Post links

* Add error state

This prevents a 500 error if anything fails when fetching news, such as
an inaccessible database

* Change default font to Poppins

* CSS cleanup

Remove all of the unused CSS variables that existed in the sample NextJS
landing page

* Add horizontal dividers

* Get session server-side for posting

The declaration of custom types are actually recommended by the
next-auth documentation, even though it might seem hacky to seemingly
just override existing types.

* Define dimensions for most font sizes

Not applied to all parts of the site yet...

* Start layouting in line with design

This version does not fully look like what exists in the current design,
but it is a definite improvement from what it used to look like.
Tested and working with both light and dark theme.

* Resolve nicks from Gamma, formatting

We should *definitely* cache this later on

* Better "New post" layout

* Render post markdown

* Don't mark divider as async

* Mark button as inline-flex, expose event properly

* Redirect on successful news post

* Hide post button when not active in division

Start creating an auth service to abstract specific permissions from
other services

* Show group written for correctly

* Separate form for new post into components

Also add ability to post for certain groups

* Remove unnecessary news item from header

* Styled dropdown list

* Show news preview

* Add buttons to edit and delete posts

* Better post action button layout

* Edit and remove posts, display edited date

* Disallow non-owning users from editing news posts

* Show post previews better

* Update all packages to latest, ignore .env file

* Run Prettier, remove unnecessary error expects

---------

Co-authored-by: Oscar Eriksson <[email protected]>
  • Loading branch information
GAsplund and Oscariremma authored Feb 6, 2024
1 parent e8057ca commit facf01a
Show file tree
Hide file tree
Showing 40 changed files with 1,468 additions and 1,082 deletions.
1 change: 0 additions & 1 deletion .env

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts
package-lock.json
.env
28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,30 @@
"test": "jest"
},
"dependencies": {
"@prisma/client": "^5.4.2",
"@prisma/client": "^5.9.1",
"ansis": "^1.5.6",
"jest": "^29.7.0",
"marked": "^11.2.0",
"next": "14.0.3",
"next-auth": "^4.24.5",
"next-logger": "^3.0.2",
"next-themes": "^0.2.1",
"pino": "^8.16.0",
"pino-pretty": "^10.2.3",
"react": "^18",
"react-dom": "^18",
"react-icons": "^4.12.0"
"pino": "^8.18.0",
"pino-pretty": "^10.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^4.12.0",
"reactjs-popup": "^2.0.6"
},
"devDependencies": {
"@types/node": "^20",
"@types/react": "^18",
"@types/react-dom": "^18",
"eslint": "^8",
"@types/node": "^20.11.16",
"@types/react": "^18.2.55",
"@types/react-dom": "^18.2.18",
"eslint": "^8.56.0",
"eslint-config-next": "14.0.3",
"eslint-plugin-unused-imports": "^3.0.0",
"prisma": "^5.4.2",
"sass": "^1.69.1",
"typescript": "^5"
"prisma": "^5.9.1",
"sass": "^1.70.0",
"typescript": "^5.3.3"
}
}
Loading

0 comments on commit facf01a

Please sign in to comment.