Skip to content

Commit

Permalink
[website] Add blog (#417)
Browse files Browse the repository at this point in the history
* add ghost api

* connect blog overview page

* connect and render post detail

* add processing to server

* update blog detail page

* add eslint-plugin-tailwindcss

* add @tanstack/react-query

* truncate text by numberOfLines

* use ComponentPropsWithRef to infer style prop type

* update ghost fns

* update index

* add tag page

* add author page

* update /

* update /tag

* update /author

* update detail page

* fix posts type

* disable redirect

* remove global background

- not found pages
- pages without common layout (preview)

* tmp: hide nav on smaller screens

* update app layout spacing

* remove text truncating

* update / spacing and sizing

* update .vscode/settings.json

* update .eslintrc

* update prettier-plugin-tailwindcss

* sort tailwind classes

* add packages/eslint-config-custom

* use turbo lint

* use tailwind.config.cjs

see francoismassart/eslint-plugin-tailwindcss#212

* reset global line-height

* fix lint-staged

* update color tokens

* update spacing and sizes

* Update apps/website/src/lib/ghost.ts

Co-authored-by: Pavel <14926950+prichodko@users.noreply.github.com>

* update layout max width

* update card min width

* set line-height

* set overflow on pre

* use flex for markdown content to prevent overflow

* collect follow-ups

* add visibility filter

* update page count

* rename var

* remove filter

* use prod ghost api key

* update ghost api

* revert line-height

* add limit to getPosts params

* update visible posts

* add related articles

* add env vars to gh

* rename eslint config package

* update gh vars

* rename envs

* set emtpy array to related posts

* fix lint-staged

* prevent importing server envs on client

* set limit

---------

Co-authored-by: Felicio Mununga <felicio@users.noreply.github.com>
  • Loading branch information
prichodko and felicio committed Jun 21, 2023
1 parent 820eafa commit 45e36b2
Show file tree
Hide file tree
Showing 55 changed files with 1,782 additions and 360 deletions.
119 changes: 0 additions & 119 deletions .eslintrc

This file was deleted.

5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ on:
pull_request:
types: [opened, synchronize]

env:
NEXT_PUBLIC_GHOST_API_KEY: ''
INFURA_API_KEY: ''
TAMAGUI_TARGET: 'web'

jobs:
build:
name: Build and Test
Expand Down
8 changes: 7 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
{
"typescript.tsdk": "node_modules/typescript/lib",
"eslint.packageManager": "yarn",
"npm.packageManager": "yarn"
"npm.packageManager": "yarn",
"eslint.workingDirectories": [
{
"mode": "auto",
"#comment": "See https://github.com/microsoft/vscode-eslint/issues/1161 for reason (i.e. multiple .eslintrc config files)"
}
]
}
4 changes: 4 additions & 0 deletions apps/mobile/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"root": true,
"extends": ["@status-im/eslint-config"]
}
1 change: 1 addition & 0 deletions apps/mobile/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
"@types/react-native": "~0.70.6",
"babel-plugin-module-resolver": "^4.1.0",
"babel-plugin-transform-inline-environment-variables": "^0.4.4",
"@status-im/eslint-config": "*",
"typescript": "^5.0.3"
}
}
9 changes: 9 additions & 0 deletions apps/web/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"root": true,
"extends": [
"@status-im/eslint-config",
"plugin:tailwindcss/recommended",
"next",
"next/core-web-vitals"
]
}
1 change: 1 addition & 0 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"@vitejs/plugin-react-swc": "^3.2.0",
"@status-im/eslint-config": "*",
"typescript": "^5.0.3",
"vite": "^4.2.1"
}
Expand Down
1 change: 0 additions & 1 deletion apps/website/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
IGNORE_TS_CONFIG_PATHS=true
TAMAGUI_TARGET=web
TAMAGUI_DISABLE_WARN_DYNAMIC_LOAD=1

9 changes: 9 additions & 0 deletions apps/website/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"root": true,
"extends": [
"@status-im/eslint-config",
"plugin:tailwindcss/recommended",
"next",
"next/core-web-vitals"
]
}
6 changes: 6 additions & 0 deletions apps/website/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"semi": false,
"singleQuote": true,
"arrowParens": "avoid",
"tailwindConfig": "./tailwind.config.cjs"
}
5 changes: 3 additions & 2 deletions apps/website/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import type { env } from './src/config/env.mjs'
import type { clientEnv } from './src/config/env.client.mjs'
import type { serverEnv } from './src/config/env.server.mjs'

type Env = typeof env
type Env = typeof clientEnv & typeof serverEnv

declare global {
namespace NodeJS {
Expand Down
3 changes: 2 additions & 1 deletion apps/website/next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable import/default */

import './src/config/env.mjs'
import './src/config/env.server.mjs'
import './src/config/env.client.mjs'

import tamagui_next_plugin from '@tamagui/next-plugin'
import { join } from 'node:path'
Expand Down
12 changes: 10 additions & 2 deletions apps/website/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"start": "next start",
"lint": "next lint",
"typecheck": "tsc",
"clean": "rimraf .next .tamagui .vercel/output node_modules .turbo",
"clean": "rimraf .next .tamagui .turbo .vercel/output node_modules",
"preview": "next start --port 8151"
},
"dependencies": {
Expand All @@ -23,6 +23,7 @@
"@tamagui/next-theme": "1.11.1",
"@tanstack/react-query": "^4.29.7",
"@vercel/og": "^0.5.4",
"@tryghost/content-api": "^1.11.13",
"@visx/visx": "^2.18.0",
"class-variance-authority": "^0.6.0",
"d3-array": "^3.2.3",
Expand All @@ -37,17 +38,24 @@
},
"devDependencies": {
"@achingbrain/ssdp": "^4.0.1",
"@tailwindcss/typography": "^0.5.9",
"@tamagui/next-plugin": "1.11.1",
"@types/d3-array": "^3.0.4",
"@types/d3-time-format": "^4.0.0",
"@types/node": "^18.11.11",
"@types/react": "^18.0.33",
"@types/react-dom": "^18.0.11",
"@types/tryghost__content-api": "^1.3.11",
"autoprefixer": "^10.4.14",
"@status-im/eslint-config": "*",
"postcss": "^8.4.21",
"rehype-parse": "^8.0.4",
"rehype-react": "^7.2.0",
"rehype-stringify": "^9.0.3",
"tailwindcss": "^3.3.1",
"tailwindcss-animate": "^1.0.5",
"typescript": "^5.0.3"
"typescript": "^5.0.3",
"unified": "^10.1.2"
},
"engines": {
"node": "^18.x"
Expand Down
22 changes: 22 additions & 0 deletions apps/website/public/images/social/facebook.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions apps/website/public/images/social/reddit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

3 comments on commit 45e36b2

@vercel
Copy link

@vercel vercel bot commented on 45e36b2 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

status-components – ./packages/components

status-components-status-im-web.vercel.app
status-components.vercel.app
status-components-git-main-status-im-web.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 45e36b2 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

status-website – ./apps/website

status-web-website.vercel.app
status-website-git-main-status-im-web.vercel.app
status-website-status-im-web.vercel.app

@vercel
Copy link

@vercel vercel bot commented on 45e36b2 Jun 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

status-web – ./apps/web

status-web.vercel.app
status-web-status-im-web.vercel.app
status-web-git-main-status-im-web.vercel.app

Please sign in to comment.