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

Create landing page #475

Merged
merged 30 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
38845ba
feat: add landing page
vitonsky Jun 22, 2024
d8d0729
chore: ignore unresolved imports for docusaurus aliases
vitonsky Jun 22, 2024
b5fa5fd
chore: ignore static files imports
vitonsky Jun 22, 2024
083a28b
refactor: prefix urls with base path
vitonsky Jun 22, 2024
22ad6d3
refactor: remove react-elegant-ui from site package
vitonsky Jun 22, 2024
582adf8
chore: improve links style
vitonsky Jun 23, 2024
aa3e1ef
chore: increase text size
vitonsky Jun 23, 2024
56b038e
chore: consistent link color
vitonsky Jun 23, 2024
7fe39d6
chore: add favicon
vitonsky Jun 23, 2024
0b2d17f
chore: add anchor to features
vitonsky Jun 23, 2024
4b90659
chore: remove unused DOM
vitonsky Jun 23, 2024
e8642e1
chore: align the layout
vitonsky Jun 23, 2024
276ab22
chore: add border for images
vitonsky Jun 23, 2024
1d45b05
chore: mobile view
vitonsky Jun 23, 2024
e80529b
chore: fix viewport for mobile
vitonsky Jun 23, 2024
6809938
Revert "chore: fix viewport for mobile"
vitonsky Jun 23, 2024
8ce2562
chore: use image elements
vitonsky Jun 23, 2024
4a654f8
refactor: move code to component
vitonsky Jun 23, 2024
4a8ec96
refactor: split the code
vitonsky Jun 23, 2024
f7ae20d
refactor: clean css
vitonsky Jun 23, 2024
ebf9460
refactor: improve indents
vitonsky Jun 23, 2024
0b11b5c
chore: add support section
vitonsky Jun 23, 2024
6da6485
chore: add banner
vitonsky Jun 23, 2024
a746c53
chore: fix padding
vitonsky Jun 23, 2024
5651d5e
chore: add analytics
vitonsky Jun 23, 2024
d341748
chore: add link to github issues
vitonsky Jun 24, 2024
762fd54
chore: remove unused files
vitonsky Jun 24, 2024
79e6a2a
chore: update readme.md
vitonsky Jun 24, 2024
c57ee06
ci: build and deploy
vitonsky Jun 24, 2024
be9446b
ci: remove deploy site for builds
vitonsky Jun 24, 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
78 changes: 63 additions & 15 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,16 @@
"plugin:import/typescript"
],
"rules": {
"import/no-unresolved": [
"error",
{
"ignore": [
"^@theme",
"^@docusaurus",
"^@site"
]
}
],
"import/no-useless-path-segments": [
"error",
{
Expand All @@ -33,34 +43,61 @@
],
"import/export": "off",
"import/namespace": "warn",
"import/no-duplicates": ["error", { "prefer-inline": true }],
"import/newline-after-import": ["error", { "count": 1 }],
"import/no-duplicates": [
"error",
{
"prefer-inline": true
}
],
"import/newline-after-import": [
"error",
{
"count": 1
}
],
"unused-imports/no-unused-imports": "error",
"simple-import-sort/imports": [
"error",
{
// docs: https://github.com/lydell/eslint-plugin-simple-import-sort#custom-grouping
"groups": [
// Side effect imports.
["^\\u0000"],
[
"^\\u0000"
],
// Node.js builtins prefixed with `node:`.
["^node:"],
[
"^node:"
],
// Packages.
// Things that start with a letter (or digit or underscore), or `@` followed by a letter.
["^react", "^\\w", "^@\\w"],
[
"^react",
"^\\w",
"^@\\w"
],
// Absolute imports and other imports such as Vue-style `@/foo`.
// Anything not matched in another group.
["^"],
[
"^"
],
// Relative imports.
["^../../"],
[
"^../../"
],
// Anything that starts with a dot.
["^../", "^./", "^\\."],
[
"^../",
"^./",
"^\\."
],
// Global CSS files at bottom
["\\.css$"]
[
"\\.css$"
]
]
}
],

// TODO: find option for specify immutable objects for improve consistency
// for example in `src/hooks/useLiveRef.ts` required as deps a `forceUpdate`
// but setter from `useState` is never required
Expand All @@ -71,7 +108,10 @@
"additionalHooks": "(useEqualMemo|useImmutableCallback|useIsomorphicLayoutEffect)"
}
],
"function-call-argument-newline": ["error", "consistent"],
"function-call-argument-newline": [
"error",
"consistent"
],
"no-var": "error",
"no-bitwise": "error",
"no-multi-spaces": "error",
Expand All @@ -81,7 +121,9 @@
"prefer-const": "error",
// off cuz eslint is dumb: https://stackoverflow.com/questions/63818415/react-was-used-before-it-was-defined
"no-use-before-define": "off",
"@typescript-eslint/no-use-before-define": ["error"],
"@typescript-eslint/no-use-before-define": [
"error"
],
"valid-jsdoc": 0,
// Codestyle
"indent": [
Expand All @@ -94,10 +136,16 @@
"camelcase": [
"error",
{
"allow": ["^UNSAFE_", "^UNSTABLE_"]
"allow": [
"^UNSAFE_",
"^UNSTABLE_"
]
}
],
"arrow-parens": ["error", "always"],
"arrow-parens": [
"error",
"always"
],
"operator-linebreak": [
"error",
"after",
Expand All @@ -117,4 +165,4 @@
}
]
}
}
}
9 changes: 0 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,3 @@ jobs:
mkdir ./site
node ../scripts/genCrxUpdateManifest.js > ./site/chromium_updates.xml
# TODO: build index.html with landing page

- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: [email protected]
build_dir: "./build/site"
branch: gh-pages
30 changes: 30 additions & 0 deletions .github/workflows/site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Site

on:
push:
workflow_dispatch:

# TODO: run only for changes in `site` directory
jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/prepare-build

- name: Build site
working-directory: "./site"
run: |
npm install
npm run build

- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/master'
uses: Cecilapp/GitHub-Pages-deploy@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
email: [email protected]
build_dir: "./build"
branch: gh-pages
20 changes: 20 additions & 0 deletions site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
1 change: 1 addition & 0 deletions site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Web site code for [linguist.io](https://linguist.io)
3 changes: 3 additions & 0 deletions site/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
29 changes: 29 additions & 0 deletions site/docusaurus.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import type { Config } from '@docusaurus/types';

const config: Config = {
title: 'Linguist Translate',
tagline: 'Privacy focused translation',
favicon: 'favicon.svg',

// Set the production url of your site here
url: 'https://linguister.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',

presets: [
[
'@docusaurus/preset-classic',
{
docs: false,
// docs: {
// path: '../docs',
// include: ['*.md', '*.mdx'],
// },
blog: false,
},
],
],
} satisfies Config;

export default config;
Loading
Loading