mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-10 04:22:27 +10:00
Compare commits
87 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 716a05032d | |||
| 43e43e7d76 | |||
| c91af3668d | |||
| 52f41f0b3b | |||
| 3b709d606b | |||
| 2e5fafac62 | |||
| ea2aee2d25 | |||
| e36fbb5f64 | |||
| 5221ef707b | |||
| f0df806f01 | |||
| 9d01d6a833 | |||
| 1914ebb9ae | |||
| 686dba90c9 | |||
| 95dc3bf571 | |||
| 1c8fdbf848 | |||
| d8357c9959 | |||
| 90e994377b | |||
| 82c6ee6d5d | |||
| 7b615e73c3 | |||
| 268e4a87fe | |||
| 73f8eb84c9 | |||
| a31ef89996 | |||
| d6bca7ebab | |||
| e0a42fd928 | |||
| deb4e0a0de | |||
| a687062866 | |||
| 700439c8a8 | |||
| fb09283e53 | |||
| 88ac365e03 | |||
| aec78cf875 | |||
| 77c587681b | |||
| 7ac8b906d9 | |||
| e9a5f86a6a | |||
| 7238a3b50e | |||
| ebe13fa82e | |||
| 6ee290a625 | |||
| 69f2b7070f | |||
| 11bea1c7c4 | |||
| 68a1dc65c1 | |||
| 4b1ce539d5 | |||
| a6fbb8191d | |||
| 552ff281b8 | |||
| 54fad2f6d8 | |||
| 78edcd7d0e | |||
| a8034b21d5 | |||
| f0e95905d2 | |||
| 69a5276614 | |||
| 2e62eea351 | |||
| 13d972b8f3 | |||
| 03cb198e95 | |||
| 67ee55b502 | |||
| b5998d7f3a | |||
| f71cf99b77 | |||
| a2092a6a39 | |||
| 43c09666a0 | |||
| 0da23f95fd | |||
| e8f44e2142 | |||
| fbb237e982 | |||
| 7f7c1d7b87 | |||
| be0b7f20f9 | |||
| 0672988fff | |||
| 75dad60cb5 | |||
| 0140e3fce0 | |||
| 42d0e14b98 | |||
| 9a42d684fb | |||
| ab6ad65445 | |||
| b613764ccc | |||
| ac44d0489f | |||
| c57e6fbbb8 | |||
| 6c6da215c8 | |||
| be700c7629 | |||
| b697f73492 | |||
| 3106f94989 | |||
| 50f41f73d5 | |||
| 83e3f59e68 | |||
| 056c61e985 | |||
| d1a1b68302 | |||
| 6bd7b9a50f | |||
| e6967aab88 | |||
| 47e96803e3 | |||
| f9ef4d0a64 | |||
| c4b4e6013f | |||
| 24bbc46c32 | |||
| 85bc9ef124 | |||
| 33755a8573 | |||
| ab45321889 | |||
| 940b310f64 |
@ -2,9 +2,9 @@
|
||||
/app
|
||||
|
||||
# Build Artifacts
|
||||
dist
|
||||
.next
|
||||
.turbo
|
||||
**/.turbo
|
||||
/server/dist
|
||||
/client/.next
|
||||
|
||||
# IDEs
|
||||
.vscode
|
||||
@ -19,7 +19,7 @@ CHANGELOG.md
|
||||
CODE_OF_CONDUCT.md
|
||||
|
||||
# Project Dependencies
|
||||
node_modules
|
||||
**/node_modules
|
||||
|
||||
# Docker
|
||||
Dockerfile
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
TURBO_TEAM=
|
||||
TURBO_TOKEN=
|
||||
|
||||
# Sentry Error Logging (Optional)
|
||||
SENTRY_AUTH_TOKEN=
|
||||
SERVER_SENTRY_DSN=
|
||||
PUBLIC_CLIENT_SENTRY_DSN=
|
||||
|
||||
# Server + Client
|
||||
TZ=UTC
|
||||
PUBLIC_URL=http://localhost:3000
|
||||
@ -34,7 +39,7 @@ STORAGE_ENDPOINT=
|
||||
STORAGE_URL_PREFIX=
|
||||
STORAGE_ACCESS_KEY=
|
||||
STORAGE_SECRET_KEY=
|
||||
PDF_DELETION_TIME=
|
||||
PDF_DELETION_TIME=345600000
|
||||
|
||||
# Flags (Client)
|
||||
PUBLIC_FLAG_DISABLE_SIGNUPS=false
|
||||
PUBLIC_FLAG_DISABLE_SIGNUPS=false
|
||||
|
||||
11
.github/workflows/digitalocean-deploy.yml
vendored
11
.github/workflows/digitalocean-deploy.yml
vendored
@ -8,9 +8,9 @@ on:
|
||||
- completed
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
on-success:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
steps:
|
||||
- name: Install DigitalOcean CLI
|
||||
uses: digitalocean/action-doctl@v2.2.0
|
||||
@ -19,3 +19,10 @@ jobs:
|
||||
|
||||
- name: Create Deployment with Latest Version
|
||||
run: doctl apps create-deployment ${{ secrets.DIGITALOCEAN_APP_ID }} --wait --force-rebuild
|
||||
|
||||
on-failure:
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
|
||||
steps:
|
||||
- name: Abruptly end the worklfow
|
||||
run: exit 1
|
||||
|
||||
97
.github/workflows/docker-build-push.yml
vendored
97
.github/workflows/docker-build-push.yml
vendored
@ -1,36 +1,40 @@
|
||||
name: Build and Push Docker Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
jobs:
|
||||
client:
|
||||
name: Client
|
||||
build_matrix:
|
||||
name: Build and Push Docker Image
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
image: [client, server]
|
||||
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- id: version
|
||||
name: Get Version
|
||||
run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
name: App Version
|
||||
uses: martinbeentjes/npm-get-version-action@v1.2.3
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
with:
|
||||
platforms: amd64
|
||||
|
||||
- id: buildx
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2.1.0
|
||||
@ -45,68 +49,29 @@ jobs:
|
||||
username: $GITHUB_REPOSITORY_OWNER
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Build and Push Client Image
|
||||
- name: Build and Push Docker Image
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
file: client/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
platforms: linux/amd64
|
||||
file: ${{ matrix.image }}/Dockerfile
|
||||
build-args: |
|
||||
TURBO_TEAM=${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN=${{ secrets.TURBO_TOKEN }}
|
||||
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
tags: |
|
||||
amruthpillai/reactive-resume:client-latest
|
||||
amruthpillai/reactive-resume:client-${{ env.version }}
|
||||
ghcr.io/amruthpillai/reactive-resume:client-latest
|
||||
ghcr.io/amruthpillai/reactive-resume:client-${{ env.version }}
|
||||
amruthpillai/reactive-resume:${{ matrix.image }}-latest
|
||||
amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
|
||||
ghcr.io/amruthpillai/reactive-resume:${{ matrix.image }}-latest
|
||||
ghcr.io/amruthpillai/reactive-resume:${{ matrix.image }}-${{ steps.version.outputs.current-version }}
|
||||
|
||||
server:
|
||||
name: Server
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
|
||||
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
|
||||
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v3.1.0
|
||||
- name: Create Sentry Release
|
||||
uses: getsentry/action-release@v1.2.1
|
||||
env:
|
||||
SENTRY_ORG: reactive-resume
|
||||
SENTRY_PROJECT: ${{ matrix.image }}
|
||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- id: version
|
||||
name: Get Version
|
||||
run: echo "version=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v2.1.0
|
||||
|
||||
- id: buildx
|
||||
name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v2.2.1
|
||||
with:
|
||||
install: true
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v2.1.0
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: $GITHUB_REPOSITORY_OWNER
|
||||
password: ${{ secrets.GH_TOKEN }}
|
||||
|
||||
- name: Build and Push Server Image
|
||||
uses: docker/build-push-action@v3.2.0
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
file: server/Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: |
|
||||
amruthpillai/reactive-resume:server-latest
|
||||
amruthpillai/reactive-resume:server-${{ env.version }}
|
||||
ghcr.io/amruthpillai/reactive-resume:server-latest
|
||||
ghcr.io/amruthpillai/reactive-resume:server-${{ env.version }}
|
||||
environment: production
|
||||
version: ${{ steps.version.outputs.current-version }}
|
||||
|
||||
@ -18,7 +18,7 @@ You have complete control over what goes into your resume, how it looks, what co
|
||||
## Table of Contents
|
||||
|
||||
- [Reactive Resume](#reactive-resume)
|
||||
- [Go to App | [Docs](https://docs.rxresu.me)](#go-to-app--docs)
|
||||
- [Go to App Docs](https://docs.rxresu.me)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Features](#features)
|
||||
- [Languages](#languages)
|
||||
@ -93,7 +93,7 @@ You have complete control over what goes into your resume, how it looks, what co
|
||||
- Swedish (Svenska)
|
||||
- Tamil (தமிழ்)
|
||||
- Turkish (Türkçe)
|
||||
- Ukranian (Українська мова)
|
||||
- Ukrainian (Українська мова)
|
||||
- Vietnamese (Tiếng Việt)
|
||||
|
||||
Help by [translating Reactive Resume](https://translate.rxresu.me) to your language!
|
||||
@ -104,7 +104,7 @@ The docs include an extensive [Tutorial](https://docs.rxresu.me/tutorial) sectio
|
||||
|
||||
## Build from Source
|
||||
|
||||
For extensive information on how to build the app on your local machine, head over to the docs's [Source Code](https://docs.rxresu.me/source-code) section.
|
||||
For extensive information on how to build the app on your local machine, head over to the docs [Source Code](https://docs.rxresu.me/source-code) section.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
plugins {
|
||||
id 'com.android.application' version '7.1.2' apply false
|
||||
id 'com.android.library' version '7.1.2' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.20' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.7.21' apply false
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
|
||||
5
client/.gitignore
vendored
5
client/.gitignore
vendored
@ -39,4 +39,7 @@ yarn-error.log*
|
||||
__ENV.js
|
||||
|
||||
# next-sitemap
|
||||
sitemap*.xml
|
||||
sitemap*.xml
|
||||
|
||||
# sentry
|
||||
.sentryclirc
|
||||
@ -23,9 +23,11 @@ COPY --from=dependencies /app/client/node_modules ./client/node_modules
|
||||
|
||||
ARG TURBO_TEAM
|
||||
ARG TURBO_TOKEN
|
||||
ARG SENTRY_AUTH_TOKEN
|
||||
|
||||
ENV TURBO_TEAM $TURBO_TEAM
|
||||
ENV TURBO_TOKEN $TURBO_TOKEN
|
||||
ENV SENTRY_AUTH_TOKEN $SENTRY_AUTH_TOKEN
|
||||
|
||||
RUN pnpm run build --filter client
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
}
|
||||
|
||||
.wrapper {
|
||||
@apply h-full w-full #{!important};
|
||||
@apply h-full w-full overflow-visible #{!important};
|
||||
}
|
||||
|
||||
.artboard {
|
||||
|
||||
@ -36,13 +36,6 @@
|
||||
top: calc(279mm - 19px);
|
||||
}
|
||||
}
|
||||
|
||||
.markdown {
|
||||
ul {
|
||||
padding-left: 1.5em;
|
||||
text-indent: -1.5em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pageNumber {
|
||||
|
||||
@ -62,7 +62,7 @@ const LeftSidebar = () => {
|
||||
for (const item of left) {
|
||||
const id = (item as any).id;
|
||||
const component = (item as any).component;
|
||||
const type = component.props.type || 'basic';
|
||||
const type = component.props.type;
|
||||
const addMore = !!component.props.addMore;
|
||||
|
||||
sectionsComponents.push(
|
||||
@ -142,9 +142,10 @@ const LeftSidebar = () => {
|
||||
|
||||
<main>
|
||||
{sectionsList()}
|
||||
|
||||
{customSections.map(({ id }) => (
|
||||
<section key={id} id={`section-${id}`}>
|
||||
<Section path={`sections.${id}`} isEditable isHideable isDeletable />
|
||||
<Section path={`sections.${id}`} type="custom" isEditable isHideable isDeletable />
|
||||
</section>
|
||||
))}
|
||||
|
||||
|
||||
@ -47,12 +47,8 @@ const Section: React.FC<Props> = ({
|
||||
const visibility = useAppSelector<boolean>((state) => get(state.resume.present, `${path}.visible`, true));
|
||||
|
||||
const handleAdd = () => {
|
||||
const id = path.split('.')[1];
|
||||
let modal: ModalName = validate(id) ? 'builder.sections.custom' : `builder.${path}`;
|
||||
const modal: ModalName = `builder.sections.${type}`;
|
||||
|
||||
if (type) {
|
||||
modal = `builder.sections.${type}`;
|
||||
}
|
||||
dispatch(setModalState({ modal, state: { open: true, payload: { path } } }));
|
||||
};
|
||||
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
import clsx from 'clsx';
|
||||
import { isEmpty } from 'lodash';
|
||||
import ReactMarkdown from 'react-markdown';
|
||||
import remarkGfm from 'remark-gfm';
|
||||
|
||||
type Props = {
|
||||
children?: string;
|
||||
@ -12,7 +11,7 @@ const Markdown: React.FC<Props> = ({ className, children }) => {
|
||||
if (!children || isEmpty(children)) return null;
|
||||
|
||||
return (
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]} className={clsx('markdown', className)}>
|
||||
<ReactMarkdown remarkPlugins={[]} className={clsx('markdown', className)}>
|
||||
{children}
|
||||
</ReactMarkdown>
|
||||
);
|
||||
|
||||
@ -22,6 +22,7 @@ const ResumeInput: React.FC<Props> = ({ type = 'text', label, path, className, m
|
||||
const dispatch = useAppDispatch();
|
||||
|
||||
const stateValue = useAppSelector((state) => get(state.resume.present, path, ''));
|
||||
const dateFormat = useAppSelector((state) => state.resume.present.metadata.date.format);
|
||||
|
||||
useEffect(() => {
|
||||
setValue(stateValue);
|
||||
@ -56,14 +57,16 @@ const ResumeInput: React.FC<Props> = ({ type = 'text', label, path, className, m
|
||||
if (type === 'date') {
|
||||
return (
|
||||
<DatePicker
|
||||
showToolbar
|
||||
openTo="year"
|
||||
label={label}
|
||||
value={value}
|
||||
toolbarFormat={dateFormat}
|
||||
views={['year', 'month', 'day']}
|
||||
renderInput={(params) => <TextField {...params} error={false} className={className} />}
|
||||
onChange={(date: Date | null, keyboardInputValue: string | undefined) => {
|
||||
isEmpty(keyboardInputValue) && onChangeValue('');
|
||||
date && dayjs(date).utc().isValid() && onChangeValue(dayjs(date).utc().toISOString());
|
||||
date && dayjs(date).isValid() && onChangeValue(dayjs(date).format('YYYY-MM-DD'));
|
||||
}}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -13,7 +13,7 @@ export const languages: Language[] = [
|
||||
{ code: 'ca', name: 'Catalan', localName: 'Valencian' },
|
||||
{ code: 'cs', name: 'Czech', localName: 'čeština' },
|
||||
{ code: 'da', name: 'Danish', localName: 'Dansk' },
|
||||
{ code: 'de', name: 'German', localName: 'Deutsch' },
|
||||
{ code: 'de', name: 'German', localName: 'Deutsch Formell / Sie' },
|
||||
{ code: 'el', name: 'Greek', localName: 'Ελληνικά' },
|
||||
{ code: 'en', name: 'English' },
|
||||
{ code: 'es', name: 'Spanish', localName: 'Español' },
|
||||
|
||||
@ -169,7 +169,7 @@ const LoginModal: React.FC = () => {
|
||||
|
||||
<p className="text-xs">
|
||||
<Trans t={t} i18nKey="modals.auth.login.recover-text">
|
||||
In case you have forgotten your password, you can{' '}
|
||||
In case you have forgotten your password, you can
|
||||
<a onClick={handleRecoverAccount}>recover your account here.</a>
|
||||
</Trans>
|
||||
</p>
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
const { version } = require('../package.json');
|
||||
const { i18n } = require('./next-i18next.config');
|
||||
const { withSentryConfig } = require('@sentry/nextjs');
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {
|
||||
@ -15,6 +16,11 @@ const nextConfig = {
|
||||
domains: ['cdn.rxresu.me', 'www.gravatar.com'],
|
||||
},
|
||||
|
||||
sentry: {
|
||||
hideSourceMaps: true,
|
||||
widenClientFileUpload: true,
|
||||
},
|
||||
|
||||
// Hack to make Tailwind darkMode 'class' strategy with CSS Modules
|
||||
// Ref: https://github.com/tailwindlabs/tailwindcss/issues/3258#issuecomment-968368156
|
||||
webpack: (config) => {
|
||||
@ -47,4 +53,11 @@ const nextConfig = {
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = nextConfig;
|
||||
/** @type {import('@sentry/nextjs').SentryWebpackPluginOptions} */
|
||||
const sentryConfig = {
|
||||
silent: true,
|
||||
project: 'client',
|
||||
dryRun: process.env.NODE_ENV !== 'production',
|
||||
};
|
||||
|
||||
module.exports = withSentryConfig(nextConfig, sentryConfig);
|
||||
|
||||
@ -16,15 +16,16 @@
|
||||
"@hello-pangea/dnd": "^16.0.1",
|
||||
"@hookform/resolvers": "2.9.10",
|
||||
"@monaco-editor/react": "^4.4.6",
|
||||
"@mui/icons-material": "^5.10.9",
|
||||
"@mui/lab": "^5.0.0-alpha.107",
|
||||
"@mui/material": "^5.10.13",
|
||||
"@mui/system": "^5.10.13",
|
||||
"@mui/icons-material": "^5.10.15",
|
||||
"@mui/lab": "^5.0.0-alpha.109",
|
||||
"@mui/material": "^5.10.15",
|
||||
"@mui/system": "^5.10.15",
|
||||
"@mui/x-date-pickers": "5.0.8",
|
||||
"@next/env": "^13.0.3",
|
||||
"@react-oauth/google": "^0.4.0",
|
||||
"@next/env": "^13.0.5",
|
||||
"@react-oauth/google": "^0.5.0",
|
||||
"@reduxjs/toolkit": "^1.9.0",
|
||||
"axios": "^1.1.3",
|
||||
"@sentry/nextjs": "^7.21.1",
|
||||
"axios": "^1.2.0",
|
||||
"clsx": "^1.2.1",
|
||||
"dayjs": "^1.11.6",
|
||||
"downloadjs": "^1.4.7",
|
||||
@ -33,14 +34,14 @@
|
||||
"md5-hex": "^4.0.0",
|
||||
"monaco-editor": "^0.34.1",
|
||||
"nanoid": "^3.3.4",
|
||||
"next": "13.0.3",
|
||||
"next-i18next": "^12.1.0",
|
||||
"next": "13.0.5",
|
||||
"next-i18next": "^13.0.0",
|
||||
"react": "^18.2.0",
|
||||
"react-colorful": "^5.6.1",
|
||||
"react-dnd": "16.0.1",
|
||||
"react-dnd-html5-backend": "16.0.1",
|
||||
"react-dom": "^18.2.0",
|
||||
"react-hook-form": "^7.39.3",
|
||||
"react-hook-form": "^7.39.5",
|
||||
"react-hot-toast": "2.4.0",
|
||||
"react-icons": "^4.6.0",
|
||||
"react-markdown": "^8.0.3",
|
||||
@ -59,25 +60,25 @@
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.20.2",
|
||||
"@reactive-resume/schema": "workspace:*",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"@tailwindcss/typography": "^0.5.8",
|
||||
"@types/downloadjs": "^1.4.3",
|
||||
"@types/lodash": "^4.14.188",
|
||||
"@types/lodash": "^4.14.190",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/react": "^18.0.25",
|
||||
"@types/react-dom": "^18.0.8",
|
||||
"@types/react-dom": "^18.0.9",
|
||||
"@types/react-redux": "^7.1.24",
|
||||
"@types/tailwindcss": "^3.0.11",
|
||||
"@types/uuid": "^8.3.4",
|
||||
"@types/webfontloader": "^1.6.35",
|
||||
"autoprefixer": "^10.4.13",
|
||||
"csstype": "^3.1.1",
|
||||
"eslint-config-next": "^13.0.3",
|
||||
"eslint-plugin-tailwindcss": "^3.6.2",
|
||||
"next-sitemap": "^3.1.31",
|
||||
"eslint-config-next": "^13.0.5",
|
||||
"eslint-plugin-tailwindcss": "^3.7.0",
|
||||
"eslint-plugin-unused-imports": "^2.0.0",
|
||||
"next-sitemap": "^3.1.32",
|
||||
"postcss": "^8.4.19",
|
||||
"sass": "^1.56.1",
|
||||
"tailwindcss": "^3.2.4",
|
||||
"typescript": "^4.8.4"
|
||||
"typescript": "^4.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -61,10 +61,12 @@ const Preview: NextPage<Props> = ({ username, slug, resume: initialData }) => {
|
||||
}, [dispatch, initialData]);
|
||||
|
||||
useEffect(() => {
|
||||
if (!isEmpty(resume) && router.locale !== resume.metadata.locale) {
|
||||
const locale = get(resume, 'metadata.locale', 'en');
|
||||
|
||||
if (!isEmpty(resume) && router.locale !== locale) {
|
||||
const { pathname, asPath, query } = router;
|
||||
|
||||
router.push({ pathname, query }, asPath, { locale: resume.metadata.locale });
|
||||
router.push({ pathname, query }, asPath, { locale });
|
||||
}
|
||||
}, [resume, router]);
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@ type Props = {
|
||||
|
||||
export const getServerSideProps: GetServerSideProps<Props | Promise<Props>, QueryParams> = async ({
|
||||
query,
|
||||
locale,
|
||||
locale = 'en',
|
||||
}) => {
|
||||
const { username, slug, secretKey } = query as QueryParams;
|
||||
|
||||
@ -35,7 +35,7 @@ export const getServerSideProps: GetServerSideProps<Props | Promise<Props>, Quer
|
||||
if (isEmpty(secretKey)) throw new Error('There is no secret key!');
|
||||
|
||||
const resume = await fetchResumeByIdentifier({ username, slug, options: { secretKey } });
|
||||
const displayLocale = resume.metadata.locale || locale || 'en';
|
||||
const displayLocale = get(resume, 'metadata.locale') ?? locale;
|
||||
|
||||
return {
|
||||
props: {
|
||||
|
||||
@ -21,7 +21,7 @@ import WrapperRegistry from '@/wrappers/index';
|
||||
const App = ({ Component, pageProps }: AppProps): JSX.Element => (
|
||||
<>
|
||||
<Head>
|
||||
<title>Reactive Resume</title>
|
||||
<title>Reactive Resume | A free and open source resume builder</title>
|
||||
|
||||
<meta
|
||||
name="description"
|
||||
|
||||
@ -2,7 +2,7 @@ import { NextPage } from 'next';
|
||||
import NextDocument, { DocumentContext, Head, Html, Main, NextScript } from 'next/document';
|
||||
|
||||
const Document: NextPage = () => (
|
||||
<Html>
|
||||
<Html lang="en">
|
||||
<Head />
|
||||
|
||||
<body>
|
||||
|
||||
14
client/pages/_error.tsx
Normal file
14
client/pages/_error.tsx
Normal file
@ -0,0 +1,14 @@
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
import type { NextPage } from 'next';
|
||||
import type { ErrorProps } from 'next/error';
|
||||
import NextErrorComponent from 'next/error';
|
||||
|
||||
const CustomErrorComponent: NextPage<ErrorProps> = (props) => <NextErrorComponent statusCode={props.statusCode} />;
|
||||
|
||||
CustomErrorComponent.getInitialProps = async (contextData) => {
|
||||
await Sentry.captureUnderscoreErrorException(contextData);
|
||||
|
||||
return NextErrorComponent.getInitialProps(contextData);
|
||||
};
|
||||
|
||||
export default CustomErrorComponent;
|
||||
@ -1,9 +1,10 @@
|
||||
{
|
||||
"common": {
|
||||
"actions": {
|
||||
"add": "Neue {{token}} hinzufügen",
|
||||
"delete": "Löschen {{token}}",
|
||||
"edit": "Bearbeiten {{token}}"
|
||||
"add": "{{token}} hinzufügen",
|
||||
"delete": "{{token}} löschen",
|
||||
"edit": "{{token}} bearbeiten",
|
||||
"duplicate": "Abschnitt duplizieren"
|
||||
},
|
||||
"columns": {
|
||||
"heading": "Spalten",
|
||||
@ -17,10 +18,10 @@
|
||||
"label": "Beschreibung"
|
||||
},
|
||||
"email": {
|
||||
"label": "E-Mail Adresse"
|
||||
"label": "E-Mail-Adresse"
|
||||
},
|
||||
"end-date": {
|
||||
"help-text": "Dieses Feld leer lassen, wenn noch vorhanden",
|
||||
"help-text": "Dieses Feld leer lassen, wenn dieser Eintrag noch kein Enddatum hat.",
|
||||
"label": "Enddatum"
|
||||
},
|
||||
"keywords": {
|
||||
@ -69,7 +70,7 @@
|
||||
"empty-text": "Diese Liste ist leer."
|
||||
},
|
||||
"tooltip": {
|
||||
"delete-item": "Sind Sie sicher, dass Sie dieses Element löschen möchten? Dies ist eine unumkehrbare Aktion.",
|
||||
"delete-item": "Sind Sie sicher, dass Sie dieses Element löschen möchten? Dies lässt sich nicht rückgängig machen.",
|
||||
"delete-section": "Abschnitt löschen",
|
||||
"rename-section": "Abschnitt umbenennen",
|
||||
"toggle-visibility": "Sichtbarkeit umschalten"
|
||||
@ -86,7 +87,7 @@
|
||||
"zoom-in": "Vergrößern",
|
||||
"zoom-out": "Verkleinern",
|
||||
"undo": "Rückgängig machen",
|
||||
"redo": "Redo"
|
||||
"redo": "Wiederholen"
|
||||
}
|
||||
},
|
||||
"header": {
|
||||
@ -96,8 +97,8 @@
|
||||
"rename": "Umbenennen",
|
||||
"share-link": "Link teilen",
|
||||
"tooltips": {
|
||||
"delete": "Sind Sie sicher, dass Sie diesen Lebenslauf löschen möchten? Dies ist eine unumkehrbare Aktion.",
|
||||
"share-link": "Du musst die Sichtbarkeit deines Lebenslaufs in die Öffentlichkeit ändern, um ihn für andere sichtbar zu machen."
|
||||
"delete": "Sind Sie sicher, dass Sie diesen Lebenslauf löschen möchten? Dies lässt sich nicht rückgängig machen.",
|
||||
"share-link": "Sie müssen die Sichtbarkeit Ihres Lebenslaufs in Öffentlich ändern, um ihn für andere sichtbar zu machen."
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -106,7 +107,7 @@
|
||||
"awards": {
|
||||
"form": {
|
||||
"awarder": {
|
||||
"label": "Auszeichnung"
|
||||
"label": "Auszeichner"
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -119,7 +120,7 @@
|
||||
"label": "Überschrift"
|
||||
},
|
||||
"name": {
|
||||
"label": "Voller Name"
|
||||
"label": "Vollständiger Name"
|
||||
},
|
||||
"birthdate": {
|
||||
"label": "Geburtsdatum"
|
||||
@ -127,7 +128,7 @@
|
||||
"photo-filters": {
|
||||
"effects": {
|
||||
"border": {
|
||||
"label": "Grenze"
|
||||
"label": "Rahmen"
|
||||
},
|
||||
"grayscale": {
|
||||
"label": "Graustufen"
|
||||
@ -158,13 +159,13 @@
|
||||
"education": {
|
||||
"form": {
|
||||
"area-study": {
|
||||
"label": "Studienbereich"
|
||||
"label": "Studienfach"
|
||||
},
|
||||
"courses": {
|
||||
"label": "Kurse"
|
||||
},
|
||||
"degree": {
|
||||
"label": "Grad"
|
||||
"label": "Abschluss"
|
||||
},
|
||||
"grade": {
|
||||
"label": "Note"
|
||||
@ -176,7 +177,7 @@
|
||||
},
|
||||
"location": {
|
||||
"address": {
|
||||
"label": "Adresse"
|
||||
"label": "Straße"
|
||||
},
|
||||
"city": {
|
||||
"label": "Stadt"
|
||||
@ -184,12 +185,12 @@
|
||||
"country": {
|
||||
"label": "Land"
|
||||
},
|
||||
"heading": "Standort",
|
||||
"heading": "Anschrift",
|
||||
"postal-code": {
|
||||
"label": "Postleitzahl"
|
||||
},
|
||||
"region": {
|
||||
"label": "Region"
|
||||
"label": "Bundesland"
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
@ -201,7 +202,7 @@
|
||||
"label": "Benutzername"
|
||||
}
|
||||
},
|
||||
"heading": "Profiles",
|
||||
"heading": "Soziale Netzwerke",
|
||||
"heading_one": "Profil"
|
||||
},
|
||||
"publications": {
|
||||
@ -239,16 +240,16 @@
|
||||
"heading": "Exportieren",
|
||||
"json": {
|
||||
"primary": "JSON",
|
||||
"secondary": "Laden Sie eine JSON-Version Ihres Lebenslaufs herunter, die Sie wieder in Reaktives Lebenslauf importieren können."
|
||||
"secondary": "Laden Sie eine JSON-Version Ihres Lebenslaufs herunter, die Sie wieder in Reactive Resume importieren können."
|
||||
},
|
||||
"pdf": {
|
||||
"loading": {
|
||||
"primary": "PDF wird erstellt",
|
||||
"secondary": "Bitte warten Sie, wenn Ihr PDF generiert wird, dies kann bis zu 15 Sekunden dauern."
|
||||
"secondary": "Bitte warten Sie, während Ihr PDF generiert wird. Dies kann bis zu 15 Sekunden dauern."
|
||||
},
|
||||
"normal": {
|
||||
"primary": "PDF",
|
||||
"secondary": "Laden Sie sich ein PDF Ihres Lebenslaufs herunter, das Sie ausdrucken und an Ihren Traumjob senden können. Diese Datei kann nicht zur weiteren Bearbeitung importiert werden."
|
||||
"secondary": "Laden Sie sich ein PDF Ihres Lebenslaufs herunter, dass Sie ausdrucken oder an Ihren Traumarbeitgeber senden können. Diese Datei kann nicht zur weiteren Bearbeitung importiert werden."
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -256,18 +257,20 @@
|
||||
"heading": "Layout",
|
||||
"tooltip": {
|
||||
"reset-layout": "Layout zurücksetzen"
|
||||
}
|
||||
},
|
||||
"main": "Hauptteil",
|
||||
"sidebar": "Seitenleiste"
|
||||
},
|
||||
"links": {
|
||||
"bugs-features": {
|
||||
"body": "Hält Sie etwas davon ab, einen Lebenslauf zu erstellen? Oder haben Sie eine tolle Idee, die Sie hinzufügen möchten? Erhöhen Sie einen Eintrag auf GitHub, um loszulegen.",
|
||||
"button": "GitHub Themen",
|
||||
"heading": "Fehler? Feature-Anfragen?"
|
||||
"body": "Sind Sie bei der Erstellung Ihres Lebenslaufs auf ein Problem gestoßen? Oder haben Sie eine tolle Idee, die Sie hinzufügen möchten? Erstellen Sie ein Ticket auf GitHub.",
|
||||
"button": "GitHub Issues",
|
||||
"heading": "Fehler? Verbesserungsvorschläge?"
|
||||
},
|
||||
"donate": {
|
||||
"body": "Wenn Ihnen Reactive Resume gefallen hat, denken Sie bitte darüber nach, so viel wie möglich zu spenden, damit die App für immer kostenlos und werbefrei bleibt.",
|
||||
"body": "Sollte Ihnen Reactive Resume gefallen, möchte ich Sie bitten, etwas zu spenden, damit die App für immer kostenlos und werbefrei bleibt.",
|
||||
"button": "Kaufe mir einen Kaffee",
|
||||
"heading": "Spenden an Reaktives Lebenslauf"
|
||||
"heading": "Spenden Sie an Reactive Resume."
|
||||
},
|
||||
"github": "Quellcode",
|
||||
"docs": "Dokumentation",
|
||||
@ -277,43 +280,44 @@
|
||||
"global": {
|
||||
"date": {
|
||||
"primary": "Datum",
|
||||
"secondary": "Datumsformat für die gesamte App"
|
||||
"secondary": "Datumsformat für die gesamte App.",
|
||||
"prefix": "Z.B."
|
||||
},
|
||||
"heading": "Globale",
|
||||
"heading": "Global",
|
||||
"language": {
|
||||
"primary": "Sprache",
|
||||
"secondary": "Sprache anzeigen, die in der gesamten App verwendet wird"
|
||||
"secondary": "Anzeigesprache, die in der gesamten App verwendet wird."
|
||||
},
|
||||
"theme": {
|
||||
"primary": "Thema"
|
||||
"primary": "App Design"
|
||||
}
|
||||
},
|
||||
"heading": "Einstellungen",
|
||||
"page": {
|
||||
"format": {
|
||||
"primary": "Papier größe",
|
||||
"secondary": "Legt die Abmessungen Ihrer Lebenslaufseiten fest"
|
||||
"primary": "Papiergröße",
|
||||
"secondary": "Legt die Seitenabmessungen Ihres Lebenslaufs fest."
|
||||
},
|
||||
"break-line": {
|
||||
"primary": "Linie anhalten",
|
||||
"secondary": "Zeile auf allen Seiten anzeigen, um die Höhe einer A4-Seite zu markieren"
|
||||
"primary": "Seitenumbruch anzeigen",
|
||||
"secondary": "Zeigt den Seitenumbruch als Linie auf allen Seiten an."
|
||||
},
|
||||
"heading": "Seite",
|
||||
"orientation": {
|
||||
"disabled": "Hat keine Auswirkung, wenn nur eine Seite vorhanden ist",
|
||||
"disabled": "Hat keine Auswirkung, wenn nur eine Seite vorhanden ist.",
|
||||
"primary": "Ausrichtung",
|
||||
"secondary": "Ob Seiten horizontal oder vertikal angezeigt werden sollen"
|
||||
"secondary": "Legt fest, ob Seiten horizontal oder vertikal angezeigt werden sollen."
|
||||
}
|
||||
},
|
||||
"resume": {
|
||||
"heading": "Lebenslauf",
|
||||
"reset": {
|
||||
"primary": "Alles zurücksetzen",
|
||||
"secondary": "Zu viele Fehler gemacht? Klicken Sie hier, um alle Änderungen zurückzusetzen und bei Null zu beginnen. Sei vorsichtig, diese Aktion kann nicht rückgängig gemacht werden."
|
||||
"secondary": "Zu viele Fehler gemacht? Klicken Sie hier, um alle Änderungen zurückzusetzen und von vorne zu beginnen. Vorsicht! Diese Aktion kann nicht rückgängig gemacht werden."
|
||||
},
|
||||
"sample": {
|
||||
"primary": "Beispieldaten laden",
|
||||
"secondary": "Nicht sicher, wo man anfangen soll? Klicken Sie hier, um ein paar Beispieldaten zu laden, um zu sehen, wie ein vollständiger Lebenslauf aussieht."
|
||||
"secondary": "Sie sind nicht sicher, wo Sie anfangen sollen? Klicken Sie hier, um Beispieldaten zu laden. So können Sie sich ansehen, wie ein vollständiger Lebenslauf aussieht."
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -323,8 +327,8 @@
|
||||
"label": "Kurze URL bevorzugen"
|
||||
},
|
||||
"visibility": {
|
||||
"subtitle": "Erlaube jemandem mit einem Link deinen Lebenslauf anzusehen",
|
||||
"title": "Öffentlich"
|
||||
"subtitle": "Erlaubt jedem, dem Sie diesen Link schicken, Ihren Lebenslauf anzusehen.",
|
||||
"title": "Öffentlich zugänglich"
|
||||
}
|
||||
},
|
||||
"templates": {
|
||||
@ -333,16 +337,16 @@
|
||||
"theme": {
|
||||
"form": {
|
||||
"background": {
|
||||
"label": "Hintergrund"
|
||||
"label": "Hintergrundfarbe"
|
||||
},
|
||||
"primary": {
|
||||
"label": "Primär"
|
||||
"label": "Primärfarbe"
|
||||
},
|
||||
"text": {
|
||||
"label": "Text"
|
||||
"label": "Textfarbe"
|
||||
}
|
||||
},
|
||||
"heading": "Thema"
|
||||
"heading": "Lebenslauf Design"
|
||||
},
|
||||
"typography": {
|
||||
"form": {
|
||||
|
||||
@ -13,14 +13,14 @@
|
||||
"help-text": "Dieser Abschnitt unterstützt <1>Markdown</1> Formatierung."
|
||||
},
|
||||
"date": {
|
||||
"present": "Gegenwärtig"
|
||||
"present": "Heute"
|
||||
},
|
||||
"subtitle": "Ein freier und Open-Source-Lebenslauf-Builder.",
|
||||
"title": "Reaktives Lebenslauf",
|
||||
"subtitle": "Ein kostenloser Open Source Lebenslauf-Baukasten.",
|
||||
"title": "Reactive Resume",
|
||||
"toast": {
|
||||
"error": {
|
||||
"upload-file-size": "Bitte laden Sie nur Dateien unter 2 Megabytes hoch.",
|
||||
"upload-photo-size": "Bitte laden Sie nur Fotos unter 2 Megabytes hoch, vorzugsweise quadratisch."
|
||||
"upload-photo-size": "Bitte laden Sie nur Fotos unter 2 Megabytes hoch, am besten in einem quadratischen Format."
|
||||
},
|
||||
"success": {
|
||||
"resume-link-copied": "Ein Link zu deinem Lebenslauf wurde in deine Zwischenablage kopiert."
|
||||
|
||||
@ -1,25 +1,25 @@
|
||||
{
|
||||
"create-resume": {
|
||||
"subtitle": "Bei Null anfangen",
|
||||
"subtitle": "Mit einem leeren Lebenslauf starten",
|
||||
"title": "Neuen Lebenslauf erstellen"
|
||||
},
|
||||
"import-external": {
|
||||
"subtitle": "LinkedIn, JSON Resume, Reaktives Lebenslauf",
|
||||
"title": "Aus externen Quellen importieren"
|
||||
"subtitle": "LinkedIn, JSON Lebenslauf, Reactive Resume",
|
||||
"title": "Aus externer Quelle importieren"
|
||||
},
|
||||
"resume": {
|
||||
"menu": {
|
||||
"delete": "Löschen",
|
||||
"duplicate": "Duplikat",
|
||||
"duplicate": "Duplizieren",
|
||||
"open": "Öffnen",
|
||||
"rename": "Umbenennen",
|
||||
"share-link": "Einen Link teilen",
|
||||
"share-link": "Link teilen",
|
||||
"tooltips": {
|
||||
"delete": "Möchten Sie diesen Lebenslauf wirklich löschen? Dies ist eine irreversible Aktion.",
|
||||
"delete": "Möchten Sie diesen Lebenslauf wirklich löschen? Dies lässt sich nicht rückgängig machen.",
|
||||
"share-link": "Sie müssen die Sichtbarkeit Ihres Lebenslaufs auf öffentlich ändern, um ihn für andere sichtbar zu machen."
|
||||
}
|
||||
},
|
||||
"timestamp": "Zuletzt vor {{timestamp}} aktualisiert"
|
||||
"timestamp": "Zuletzt vor {{timestamp}} geändert."
|
||||
},
|
||||
"title": "Dashboard"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"actions": {
|
||||
"app": "Gehe zu App",
|
||||
"app": "Gehe zur App",
|
||||
"login": "Anmelden",
|
||||
"logout": "Ausloggen",
|
||||
"register": "Registrieren"
|
||||
@ -9,16 +9,16 @@
|
||||
"heading": "Eigenschaften",
|
||||
"list": {
|
||||
"ads": "Keine Werbung",
|
||||
"export": "Exportieren Sie Ihren Lebenslauf in JSON oder PDF Format",
|
||||
"free": "Frei, für immer",
|
||||
"import": "Importiere Daten von LinkedIn, JSON Lebenslauf",
|
||||
"languages": "In mehreren Sprachen zugänglich",
|
||||
"more": "Und viel mehr aufregende Features, <1>lesen Sie alles hier</1>",
|
||||
"tracking": "Keine Benutzerverfolgung"
|
||||
"export": "Exportieren Sie Ihren Lebenslauf als JSON oder PDF Format",
|
||||
"free": "Kostenlos, für immer",
|
||||
"import": "Importieren Sie Ihre Daten von LinkedIn oder als JSON Lebenslauf",
|
||||
"languages": "In mehreren Sprachen verfügbar",
|
||||
"more": "Und viele weitere aufregende Features. <1>Hier gibt es mehr informationen (in englischer Sprache)</1>",
|
||||
"tracking": "Kein Benutzertracking"
|
||||
}
|
||||
},
|
||||
"links": {
|
||||
"heading": "Verknüpfungen",
|
||||
"heading": "Links",
|
||||
"links": {
|
||||
"donate": "Spenden",
|
||||
"github": "Quellcode",
|
||||
@ -32,11 +32,11 @@
|
||||
},
|
||||
"testimonials": {
|
||||
"heading": "Referenzen",
|
||||
"body": "Gut oder schlecht, ich würde gerne Ihre Meinung über Reactive Resume und wie die Erfahrung war für Sie.<br/>Hier sind einige der Nachrichten, die von Benutzern auf der ganzen Welt gesendet werden.",
|
||||
"contact": "Du kannst mich über <1>meine E-Mail</1> oder über das Kontaktformular auf <3>meiner Website</3>erreichen."
|
||||
"body": "Egal ob gut oder schlecht - ich würde gerne Ihre Meinung über Reactive Resume hören und welche Erfahrungen Sie gemacht haben.<br/>Hier sind einige der Nachrichten, die mir von Benutzern auf der ganzen Welt zugesandt wurden.",
|
||||
"contact": "Sie können mich über <1>meine E-Mail</1> oder über das Kontaktformular auf <3>meiner Website</3> erreichen."
|
||||
},
|
||||
"summary": {
|
||||
"body": "Reaktives Lebenslauf ist ein freier und Open-Source-Lebenslauf-Builder, der gebaut wurde, um die weltlichen Aufgaben zu machen, zu erstellen, Aktualisieren und teilen Sie Ihren Lebenslauf so einfach wie 1, 2, 3. Mit dieser App kannst du mehrere Bewerbungen erstellen, sie mit Recruitern oder Freunden über einen einzigartigen Link teilen und sie als PDF ausdrucken. alle kostenlos, keine Werbung, keine Verfolgung, ohne die Integrität und Privatsphäre Ihrer Daten zu verlieren.",
|
||||
"body": "Reactive Resume ist ein kostenloser Open Source Lebenslauf-Builder, der gebaut wurde, um die langweilige Aufgabe einen Lebenslauf zu erstellen, aktuell zu halten und zu teilen so einfach wie möglich zu machen. Mit dieser App können Sie mehrere Lebensläufe erstellen, sie mit Recruitern oder Freunden über einen einzigartigen Link teilen und als PDF exportieren. Kostenlos, ohne Werbung, kein Tracking, ohne die Integrität und Privatsphäre Ihrer Daten zu verlieren.",
|
||||
"heading": "Zusammenfassung"
|
||||
}
|
||||
}
|
||||
|
||||
@ -2,16 +2,16 @@
|
||||
"auth": {
|
||||
"forgot-password": {
|
||||
"actions": {
|
||||
"send-email": "Passwort zurücksetzen E-Mail senden"
|
||||
"send-email": "Passwort zurücksetzen E-Mail senden."
|
||||
},
|
||||
"body": "Geben Sie einfach die E-Mail-Adresse ein, die mit dem Konto verknüpft ist, das Sie wiederherstellen möchten.",
|
||||
"body": "Geben Sie die E-Mail-Adresse des Benutzerkontos ein, dass Sie wiederherstellen möchten.",
|
||||
"form": {
|
||||
"email": {
|
||||
"label": "E-Mail-Addresse"
|
||||
}
|
||||
},
|
||||
"heading": "Passwort vergessen?",
|
||||
"help-text": "Wenn das Konto existiert, erhalten Sie eine E-Mail mit einem Link zum Zurücksetzen Ihres Passworts."
|
||||
"help-text": "Sollte das Konto existieren, erhalten Sie eine E-Mail mit einem Link zum Zurücksetzen des Passworts."
|
||||
},
|
||||
"login": {
|
||||
"actions": {
|
||||
@ -24,12 +24,12 @@
|
||||
},
|
||||
"username": {
|
||||
"help-text": "Sie können auch Ihre E-Mail-Adresse eingeben",
|
||||
"label": "Nutzername"
|
||||
"label": "Benutzername"
|
||||
}
|
||||
},
|
||||
"heading": "Bei Ihrem Konto anmelden",
|
||||
"recover-text": "Falls Sie Ihr Passwort vergessen haben, können Sie <1>Ihr Konto wiederherstellen</1> hier einrichten.",
|
||||
"register-text": "Wenn Sie keinen haben, können Sie hier <1>ein Konto erstellen</1> anlegen."
|
||||
"recover-text": "Falls Sie Ihr Passwort vergessen haben, können Sie es <1>hier zurücksetzen</1>.",
|
||||
"register-text": "Sollten Sie kein Benutzerkonto haben, können Sie <1>hier ein Konto anlegen</1>."
|
||||
},
|
||||
"register": {
|
||||
"actions": {
|
||||
|
||||
@ -245,7 +245,7 @@
|
||||
"pdf": {
|
||||
"loading": {
|
||||
"primary": "Generating PDF",
|
||||
"secondary": "Please wait as your PDF gets generated, this may take upto 15 seconds."
|
||||
"secondary": "Please wait as your PDF gets generated, this may take up to 15 seconds."
|
||||
},
|
||||
"normal": {
|
||||
"primary": "PDF",
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
"toast": {
|
||||
"error": {
|
||||
"upload-file-size": "Please upload only files under 2 megabytes.",
|
||||
"upload-photo-size": "Please upload only photos under 2 megabytes, preferrably square."
|
||||
"upload-photo-size": "Please upload only photos under 2 megabytes, preferably square."
|
||||
},
|
||||
"success": {
|
||||
"resume-link-copied": "A link to your resume has been copied to your clipboard."
|
||||
|
||||
@ -267,7 +267,7 @@
|
||||
"donate": {
|
||||
"body": "Als Je Reactive Resume graag gebruikt, kun je overwegen zoveel mogelijk te doneren om de app in de lucht te houden, zonder advertenties en voor altijd gratis.",
|
||||
"button": "Betaal me een koffie",
|
||||
"heading": "Doneer aan Reactiv Resume"
|
||||
"heading": "Doneer aan Reactive Resume"
|
||||
},
|
||||
"github": "Broncode",
|
||||
"docs": "Documentatie",
|
||||
|
||||
@ -10,7 +10,7 @@
|
||||
"license": "Door de gemeenschap, voor de gemeenschap."
|
||||
},
|
||||
"markdown": {
|
||||
"help-text": "Deze sectie ondersteunt <1>html</1> opmaak."
|
||||
"help-text": "Deze sectie ondersteunt <1>markdown</1> opmaak."
|
||||
},
|
||||
"date": {
|
||||
"present": "Heden"
|
||||
@ -20,7 +20,7 @@
|
||||
"toast": {
|
||||
"error": {
|
||||
"upload-file-size": "Upload alleen bestanden onder de 2 megabytes.",
|
||||
"upload-photo-size": "Upload alleen foto's onder de 2 megabytes, bij voorkeur vierkante."
|
||||
"upload-photo-size": "Upload alleen foto's onder de 2 megabytes, bij voorkeur vierkant."
|
||||
},
|
||||
"success": {
|
||||
"resume-link-copied": "Een link naar jouw CV is naar het klembord gekopieerd."
|
||||
|
||||
15
client/sentry.client.config.ts
Normal file
15
client/sentry.client.config.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import env from '@beam-australia/react-env';
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
|
||||
import packageJSON from '../package.json';
|
||||
|
||||
const SENTRY_DSN = env('CLIENT_SENTRY_DSN');
|
||||
|
||||
if (SENTRY_DSN) {
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1.0,
|
||||
release: packageJSON.version,
|
||||
enabled: process.env.NODE_ENV === 'production',
|
||||
});
|
||||
}
|
||||
3
client/sentry.properties
Normal file
3
client/sentry.properties
Normal file
@ -0,0 +1,3 @@
|
||||
defaults.url=https://sentry.io/
|
||||
defaults.org=reactive-resume
|
||||
defaults.project=client
|
||||
15
client/sentry.server.config.ts
Normal file
15
client/sentry.server.config.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import env from '@beam-australia/react-env';
|
||||
import * as Sentry from '@sentry/nextjs';
|
||||
|
||||
import packageJSON from '../package.json';
|
||||
|
||||
const SENTRY_DSN = env('CLIENT_SENTRY_DSN');
|
||||
|
||||
if (SENTRY_DSN) {
|
||||
Sentry.init({
|
||||
dsn: SENTRY_DSN,
|
||||
tracesSampleRate: 1.0,
|
||||
release: packageJSON.version,
|
||||
enabled: process.env.NODE_ENV === 'production',
|
||||
});
|
||||
}
|
||||
@ -19,7 +19,6 @@ const axios = _axios.create({ baseURL });
|
||||
axios.interceptors.request.use((config) => {
|
||||
const { accessToken } = store.getState().auth;
|
||||
|
||||
// @ts-ignore
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
Authorization: `Bearer ${accessToken}`,
|
||||
|
||||
@ -1,3 +1,4 @@
|
||||
import env from '@beam-australia/react-env';
|
||||
import { Resume } from '@reactive-resume/schema';
|
||||
import { AxiosResponse } from 'axios';
|
||||
|
||||
@ -62,9 +63,10 @@ export const fetchResumeByIdentifier = async ({
|
||||
options = { secretKey: '' },
|
||||
}: FetchResumeByIdentifierParams) => {
|
||||
if (!isBrowser) {
|
||||
const serverUrl = env('SERVER_URL');
|
||||
const secretKey = options.secretKey;
|
||||
|
||||
return axios.get<Resume>(`/resume/${username}/${slug}`, { params: { secretKey } }).then((res) => res.data);
|
||||
return fetch(`${serverUrl}/resume/${username}/${slug}?secretKey=${secretKey}`).then((response) => response.json());
|
||||
}
|
||||
|
||||
return axios.get<Resume>(`/resume/${username}/${slug}`).then((res) => res.data);
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
}
|
||||
|
||||
p {
|
||||
@apply leading-relaxed;
|
||||
@apply leading-normal;
|
||||
}
|
||||
|
||||
a {
|
||||
@ -30,7 +30,11 @@
|
||||
}
|
||||
|
||||
.markdown {
|
||||
@apply prose prose-sm leading-relaxed prose-ul:p-0 prose-ul:my-0 prose-p:my-0;
|
||||
@apply prose prose-sm leading-normal max-w-none prose-ul:p-0 prose-ul:my-0 prose-p:my-0;
|
||||
|
||||
ul li {
|
||||
@apply ml-4 list-outside;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -35,34 +35,55 @@ export const MastheadSidebar: React.FC = () => {
|
||||
/>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<div className={clsx({ invert: contrast === 'light' })}>
|
||||
<h1 className="mb-1">{name}</h1>
|
||||
<p className="opacity-75">{headline}</p>
|
||||
</div>
|
||||
|
||||
<div className={clsx('flex flex-col gap-2.5', css(`svg { color: ${color} }`))}>
|
||||
<DataDisplay icon={<Room />} className="!gap-2 text-xs">
|
||||
<DataDisplay icon={<Room />} className="!gap-2 text-xs" textClassName={clsx({ invert: contrast === 'light' })}>
|
||||
{formatLocation(location)}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Cake />} className="!gap-2 text-xs">
|
||||
<DataDisplay icon={<Cake />} className="!gap-2 text-xs" textClassName={clsx({ invert: contrast === 'light' })}>
|
||||
{formatDateString(birthdate, dateFormat)}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Email />} className="!gap-2 text-xs" link={`mailto:${email}`}>
|
||||
<DataDisplay
|
||||
icon={<Email />}
|
||||
className="!gap-2 text-xs"
|
||||
link={`mailto:${email}`}
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{email}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Phone />} className="!gap-2 text-xs" link={`tel:${phone}`}>
|
||||
<DataDisplay
|
||||
icon={<Phone />}
|
||||
className="!gap-2 text-xs"
|
||||
link={`tel:${phone}`}
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{phone}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Public />} link={website && addHttp(website)} className="!gap-2 text-xs">
|
||||
<DataDisplay
|
||||
icon={<Public />}
|
||||
link={website && addHttp(website)}
|
||||
className="!gap-2 text-xs"
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{website}
|
||||
</DataDisplay>
|
||||
|
||||
{profiles.map(({ id, username, network, url }) => (
|
||||
<DataDisplay key={id} icon={getProfileIcon(network)} link={url && addHttp(url)} className="!gap-2 text-xs">
|
||||
<DataDisplay
|
||||
key={id}
|
||||
icon={getProfileIcon(network)}
|
||||
link={url && addHttp(url)}
|
||||
className="!gap-2 text-xs"
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{username}
|
||||
</DataDisplay>
|
||||
))}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Email, Link, Phone } from '@mui/icons-material';
|
||||
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
|
||||
import clsx from 'clsx';
|
||||
import get from 'lodash/get';
|
||||
import isArray from 'lodash/isArray';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
@ -23,8 +24,10 @@ const Section: React.FC<SectionProps> = ({
|
||||
}) => {
|
||||
const section: SectionType = useAppSelector((state) => get(state.resume.present, path, {} as SectionType));
|
||||
const dateFormat: string = useAppSelector((state) => get(state.resume.present, 'metadata.date.format'));
|
||||
const layout: string[][][] = useAppSelector((state) => get(state.resume.present, 'metadata.layout'));
|
||||
|
||||
const sectionId = useMemo(() => section.id || path.replace('sections.', ''), [path, section]);
|
||||
const isSidebarSection = useMemo(() => layout.some((row) => row[1].includes(sectionId)), [layout, sectionId]);
|
||||
|
||||
if (!section.visible) return null;
|
||||
|
||||
@ -35,7 +38,7 @@ const Section: React.FC<SectionProps> = ({
|
||||
<Heading>{section.name}</Heading>
|
||||
|
||||
<div
|
||||
className="grid items-start gap-4"
|
||||
className={clsx('grid items-start gap-4', { invert: isSidebarSection })}
|
||||
style={{ gridTemplateColumns: `repeat(${section.columns}, minmax(0, 1fr))` }}
|
||||
>
|
||||
{section.items.map((item: ListItem) => {
|
||||
@ -76,8 +79,13 @@ const Section: React.FC<SectionProps> = ({
|
||||
key={index}
|
||||
className="mr-2 h-3 w-3 rounded-full border"
|
||||
style={{
|
||||
borderColor: 'var(--primary-color)',
|
||||
backgroundColor: levelNum / (10 / 5) > index ? 'var(--primary-color)' : '',
|
||||
borderColor: isSidebarSection ? 'var(--text-color)' : 'var(--primary-color)',
|
||||
backgroundColor:
|
||||
levelNum / (10 / 5) > index
|
||||
? isSidebarSection
|
||||
? 'var(--text-color)'
|
||||
: 'var(--primary-color)'
|
||||
: '',
|
||||
}}
|
||||
/>
|
||||
))}
|
||||
@ -94,7 +102,7 @@ const Section: React.FC<SectionProps> = ({
|
||||
</DataDisplay>
|
||||
)}
|
||||
|
||||
{keywords && <div>{keywords.join(', ')}</div>}
|
||||
{keywords && <span>{keywords.join(', ')}</span>}
|
||||
|
||||
{(phone || email) && (
|
||||
<div className="grid gap-1">
|
||||
|
||||
@ -36,34 +36,55 @@ export const MastheadSidebar: React.FC = () => {
|
||||
/>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<div className={clsx({ invert: contrast === 'light' })}>
|
||||
<h1 className="mb-1">{name}</h1>
|
||||
<p className="opacity-75">{headline}</p>
|
||||
</div>
|
||||
|
||||
<div className={clsx('flex flex-col gap-2.5', css(`svg { color: ${iconColor} }`))}>
|
||||
<DataDisplay icon={<Room />} className="!gap-2 text-xs">
|
||||
<DataDisplay icon={<Room />} className="!gap-2 text-xs" textClassName={clsx({ invert: contrast === 'light' })}>
|
||||
{formatLocation(location)}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Cake />} className="!gap-2 text-xs">
|
||||
<DataDisplay icon={<Cake />} className="!gap-2 text-xs" textClassName={clsx({ invert: contrast === 'light' })}>
|
||||
{formatDateString(birthdate, dateFormat)}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Email />} className="!gap-2 text-xs" link={`mailto:${email}`}>
|
||||
<DataDisplay
|
||||
icon={<Email />}
|
||||
className="!gap-2 text-xs"
|
||||
link={`mailto:${email}`}
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{email}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Phone />} className="!gap-2 text-xs" link={`tel:${phone}`}>
|
||||
<DataDisplay
|
||||
icon={<Phone />}
|
||||
className="!gap-2 text-xs"
|
||||
link={`tel:${phone}`}
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{phone}
|
||||
</DataDisplay>
|
||||
|
||||
<DataDisplay icon={<Public />} link={website && addHttp(website)} className="!gap-2 text-xs">
|
||||
<DataDisplay
|
||||
icon={<Public />}
|
||||
link={website && addHttp(website)}
|
||||
className="!gap-2 text-xs"
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{website}
|
||||
</DataDisplay>
|
||||
|
||||
{profiles.map(({ id, username, network, url }) => (
|
||||
<DataDisplay key={id} icon={getProfileIcon(network)} link={url && addHttp(url)} className="!gap-2 text-xs">
|
||||
<DataDisplay
|
||||
key={id}
|
||||
icon={getProfileIcon(network)}
|
||||
link={url && addHttp(url)}
|
||||
className="!gap-2 text-xs"
|
||||
textClassName={clsx({ invert: contrast === 'light' })}
|
||||
>
|
||||
{username}
|
||||
</DataDisplay>
|
||||
))}
|
||||
|
||||
@ -10,7 +10,7 @@ import { useAppSelector } from '@/store/hooks';
|
||||
import { SectionProps } from '@/templates/sectionMap';
|
||||
import DataDisplay from '@/templates/shared/DataDisplay';
|
||||
import { formatDateString } from '@/utils/date';
|
||||
import { addHttp, parseListItemPath } from '@/utils/template';
|
||||
import { parseListItemPath } from '@/utils/template';
|
||||
|
||||
import Heading from './Heading';
|
||||
|
||||
@ -90,7 +90,7 @@ const Section: React.FC<SectionProps> = ({
|
||||
{summary && <Markdown>{summary}</Markdown>}
|
||||
|
||||
{url && (
|
||||
<DataDisplay icon={<Link />} link={addHttp(url)}>
|
||||
<DataDisplay icon={<Link />} link={url}>
|
||||
{url}
|
||||
</DataDisplay>
|
||||
)}
|
||||
|
||||
@ -21,15 +21,8 @@ const BadgeDisplay: React.FC<Props> = ({ items }) => {
|
||||
return (
|
||||
<ul className="mt-1 flex flex-wrap gap-2 text-xs">
|
||||
{items.map((item) => (
|
||||
<li
|
||||
key={item}
|
||||
className="rounded-sm px-2 py-0.5"
|
||||
style={{
|
||||
color: contrast === 'dark' ? theme.text : theme.background,
|
||||
backgroundColor: alpha(theme.primary, 0.75),
|
||||
}}
|
||||
>
|
||||
{item}
|
||||
<li key={item} className="rounded-sm px-2 py-0.5" style={{ backgroundColor: alpha(theme.primary, 0.75) }}>
|
||||
<span style={{ color: contrast === 'dark' ? theme.text : theme.background }}>{item}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@ -20,15 +20,8 @@ const BadgeDisplay: React.FC<Props> = ({ items }) => {
|
||||
return (
|
||||
<ul className="my-1 flex flex-wrap items-start justify-center gap-1.5">
|
||||
{items.map((item) => (
|
||||
<li
|
||||
key={item}
|
||||
className="rounded-lg px-2 py-0.5 text-xs"
|
||||
style={{
|
||||
color: contrast === 'dark' ? theme.text : theme.background,
|
||||
backgroundColor: theme.primary,
|
||||
}}
|
||||
>
|
||||
{item}
|
||||
<li key={item} className="rounded-lg px-2 py-0.5 text-xs" style={{ backgroundColor: theme.primary }}>
|
||||
<span style={{ color: contrast === 'dark' ? theme.text : theme.background }}>{item}</span>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Email, Phone } from '@mui/icons-material';
|
||||
import { Email, Link, Phone } from '@mui/icons-material';
|
||||
import { ListItem, Section as SectionType } from '@reactive-resume/schema';
|
||||
import get from 'lodash/get';
|
||||
import isArray from 'lodash/isArray';
|
||||
@ -8,8 +8,9 @@ import { useMemo } from 'react';
|
||||
import Markdown from '@/components/shared/Markdown';
|
||||
import { useAppSelector } from '@/store/hooks';
|
||||
import { SectionProps } from '@/templates/sectionMap';
|
||||
import DataDisplay from '@/templates/shared/DataDisplay';
|
||||
import { formatDateString } from '@/utils/date';
|
||||
import { addHttp, parseListItemPath } from '@/utils/template';
|
||||
import { parseListItemPath } from '@/utils/template';
|
||||
|
||||
import BadgeDisplay from './BadgeDisplay';
|
||||
import Heading from './Heading';
|
||||
@ -87,9 +88,9 @@ const Section: React.FC<SectionProps> = ({
|
||||
|
||||
{url && (
|
||||
<div className="inline-flex justify-center">
|
||||
<a href={addHttp(url)} target="_blank" rel="noreferrer">
|
||||
<DataDisplay link={url} icon={<Link />}>
|
||||
{url}
|
||||
</a>
|
||||
</DataDisplay>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
.container {
|
||||
@apply grid grid-cols-2 gap-4 px-6 py-4;
|
||||
@apply grid grid-cols-2 gap-4 px-6 py-4 items-start;
|
||||
|
||||
.main {
|
||||
@apply grid gap-4;
|
||||
|
||||
@ -10,7 +10,7 @@ import { useAppSelector } from '@/store/hooks';
|
||||
import { SectionProps } from '@/templates/sectionMap';
|
||||
import DataDisplay from '@/templates/shared/DataDisplay';
|
||||
import { formatDateString } from '@/utils/date';
|
||||
import { addHttp, parseListItemPath } from '@/utils/template';
|
||||
import { parseListItemPath } from '@/utils/template';
|
||||
|
||||
import Heading from './Heading';
|
||||
|
||||
@ -90,7 +90,7 @@ const Section: React.FC<SectionProps> = ({
|
||||
{summary && <Markdown>{summary}</Markdown>}
|
||||
|
||||
{url && (
|
||||
<DataDisplay icon={<Link />} link={addHttp(url)} className="text-xs">
|
||||
<DataDisplay icon={<Link />} link={url} className="text-xs">
|
||||
{url}
|
||||
</DataDisplay>
|
||||
)}
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
import { Cake, Email, Phone, Public, Room } from '@mui/icons-material';
|
||||
import { ThemeConfig } from '@reactive-resume/schema';
|
||||
import clsx from 'clsx';
|
||||
import get from 'lodash/get';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
import { useMemo } from 'react';
|
||||
@ -72,14 +73,14 @@ export const MastheadMain: React.FC = () => {
|
||||
className="grid gap-2 p-4"
|
||||
style={{ color: contrast === 'dark' ? theme.text : theme.background, backgroundColor: theme.primary }}
|
||||
>
|
||||
<div>
|
||||
<div className={clsx({ invert: contrast === 'light' })}>
|
||||
<h1>{name}</h1>
|
||||
<p className="opacity-75">{headline}</p>
|
||||
</div>
|
||||
|
||||
<hr className="opacity-25" />
|
||||
|
||||
<Markdown>{summary}</Markdown>
|
||||
<Markdown className={clsx({ invert: contrast === 'light' })}>{summary}</Markdown>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@ -1,20 +1,23 @@
|
||||
import clsx from 'clsx';
|
||||
import isEmpty from 'lodash/isEmpty';
|
||||
|
||||
import { addHttp } from '@/utils/template';
|
||||
|
||||
type Props = {
|
||||
icon?: JSX.Element;
|
||||
link?: string;
|
||||
className?: string;
|
||||
textClassName?: string;
|
||||
};
|
||||
|
||||
const DataDisplay: React.FC<React.PropsWithChildren<Props>> = ({ icon, link, className, children }) => {
|
||||
const DataDisplay: React.FC<React.PropsWithChildren<Props>> = ({ icon, link, className, textClassName, children }) => {
|
||||
if (isEmpty(children)) return null;
|
||||
|
||||
if (!isEmpty(link)) {
|
||||
if (link && !isEmpty(link)) {
|
||||
return (
|
||||
<div className={clsx('inline-flex items-center gap-1', className)}>
|
||||
{icon}
|
||||
<a href={link} target="_blank" rel="noreferrer">
|
||||
<a target="_blank" rel="noreferrer" href={addHttp(link)} className={textClassName}>
|
||||
{children}
|
||||
</a>
|
||||
</div>
|
||||
@ -24,7 +27,7 @@ const DataDisplay: React.FC<React.PropsWithChildren<Props>> = ({ icon, link, cla
|
||||
return (
|
||||
<div className={clsx('inline-flex items-center gap-1', className)}>
|
||||
{icon}
|
||||
<span>{children}</span>
|
||||
<span className={textClassName}>{children}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@ -10,6 +10,7 @@ export const dateFormatOptions: string[] = [
|
||||
'DD.MM.YYYY',
|
||||
'DD/MM/YYYY',
|
||||
'MM.DD.YYYY',
|
||||
'M.D.YYYY',
|
||||
'MM/DD/YYYY',
|
||||
'YYYY.MM.DD',
|
||||
'YYYY/MM/DD',
|
||||
@ -30,7 +31,7 @@ export const formatDateString = (date: string | DateRange, formatStr: string): s
|
||||
if (isString(date)) {
|
||||
if (!dayjs(date).isValid()) return null;
|
||||
|
||||
return dayjs(date).utc(true).format(formatStr);
|
||||
return dayjs(date).format(formatStr);
|
||||
}
|
||||
|
||||
// If `date` is a DateRange
|
||||
@ -38,9 +39,13 @@ export const formatDateString = (date: string | DateRange, formatStr: string): s
|
||||
|
||||
if (!dayjs(date.start).isValid()) return null;
|
||||
|
||||
if (!isEmpty(date.end) && dayjs(date.end).isValid()) {
|
||||
return `${dayjs(date.start).utc(true).format(formatStr)} - ${dayjs(date.end).utc(true).format(formatStr)}`;
|
||||
if (dayjs(date.start).isSame(date.end)) {
|
||||
return dayjs(date.start).format(formatStr);
|
||||
}
|
||||
|
||||
return `${dayjs(date.start).utc(true).format(formatStr)} - ${presentString}`;
|
||||
if (!isEmpty(date.end) && dayjs(date.end).isValid()) {
|
||||
return `${dayjs(date.start).format(formatStr)} - ${dayjs(date.end).format(formatStr)}`;
|
||||
}
|
||||
|
||||
return `${dayjs(date.start).format(formatStr)} - ${presentString}`;
|
||||
};
|
||||
|
||||
@ -4,10 +4,10 @@ import { RgbColor } from 'react-colorful';
|
||||
import { hexColorPattern } from '@/config/colors';
|
||||
|
||||
export const generateTypographyStyles = ({ family, size }: Typography): string => `
|
||||
font-size: ${size.body}px;
|
||||
font-family: ${family.body};
|
||||
font-size: ${size.body}px !important;
|
||||
font-family: ${family.body} !important;
|
||||
|
||||
svg { font-size: ${size.body}px; }
|
||||
p, li, svg { font-size: ${size.body}px !important; line-height: ${size.body * 1.5}px !important; }
|
||||
|
||||
h1,
|
||||
h2,
|
||||
@ -15,22 +15,38 @@ export const generateTypographyStyles = ({ family, size }: Typography): string =
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: bold;
|
||||
font-family: ${family.heading};
|
||||
font-weight: bold !important;
|
||||
font-family: ${family.heading} !important;
|
||||
}
|
||||
|
||||
h1 { font-size: ${size.heading}px; line-height: ${size.heading}px; }
|
||||
h2 { font-size: ${size.heading / 1.5}px; line-height: ${size.heading / 1.5}px; }
|
||||
h3 { font-size: ${size.heading / 2}px; line-height: ${size.heading / 2}px; }
|
||||
h4 { font-size: ${size.heading / 2.5}px; line-height: ${size.heading / 2.5}px; }
|
||||
h5 { font-size: ${size.heading / 3}px; line-height: ${size.heading / 3}px; }
|
||||
h6 { font-size: ${size.heading / 3.5}px; line-height: ${size.heading / 3.5}px; }
|
||||
h1 { font-size: ${size.heading}px !important; line-height: ${size.heading}px !important; }
|
||||
h2 { font-size: ${size.heading / 1.5}px !important; line-height: ${size.heading / 1.5}px !important; }
|
||||
h3 { font-size: ${size.heading / 2}px !important; line-height: ${size.heading / 2}px !important; }
|
||||
h4 { font-size: ${size.heading / 2.5}px !important; line-height: ${size.heading / 2.5}px !important; }
|
||||
h5 { font-size: ${size.heading / 3}px !important; line-height: ${size.heading / 3}px !important; }
|
||||
h6 { font-size: ${size.heading / 3.5}px !important; line-height: ${size.heading / 3.5}px !important; }
|
||||
`;
|
||||
|
||||
export const generateThemeStyles = ({ text, background, primary }: ThemeConfig): string => `
|
||||
color: ${text};
|
||||
background-color: ${background};
|
||||
--primary-color: ${primary};
|
||||
--text-color: ${text} !important;
|
||||
--primary-color: ${primary} !important;
|
||||
--background-color: ${background} !important;
|
||||
|
||||
color: var(--text-color);
|
||||
background-color: var(--background-color);
|
||||
|
||||
span,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6,
|
||||
li,
|
||||
p,
|
||||
a {
|
||||
color: var(--text-color);
|
||||
}
|
||||
|
||||
svg {
|
||||
color: var(--primary-color);
|
||||
|
||||
24
package.json
24
package.json
@ -1,14 +1,13 @@
|
||||
{
|
||||
"name": "reactive-resume",
|
||||
"version": "3.6.9",
|
||||
"version": "3.6.15",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "env-cmd --silent turbo run dev",
|
||||
"dev": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run dev",
|
||||
"lint": "turbo run lint",
|
||||
"build": "env-cmd --silent turbo run build",
|
||||
"start": "env-cmd --silent turbo run start",
|
||||
"format": "prettier --write .",
|
||||
"release": "standard-version --release-as patch"
|
||||
"build": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run build",
|
||||
"start": "env-cmd --silent cross-var cross-env VERSION=$npm_package_version turbo run start",
|
||||
"format": "prettier --write ."
|
||||
},
|
||||
"workspaces": [
|
||||
"schema",
|
||||
@ -16,18 +15,19 @@
|
||||
"server"
|
||||
],
|
||||
"dependencies": {
|
||||
"cross-env": "^7.0.3",
|
||||
"cross-var": "^1.1.0",
|
||||
"env-cmd": "^10.1.0",
|
||||
"turbo": "^1.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@typescript-eslint/eslint-plugin": "^5.42.1",
|
||||
"@typescript-eslint/parser": "^5.42.1",
|
||||
"eslint": "^8.27.0",
|
||||
"@typescript-eslint/eslint-plugin": "^5.44.0",
|
||||
"@typescript-eslint/parser": "^5.44.0",
|
||||
"eslint": "^8.28.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-simple-import-sort": "^8.0.0",
|
||||
"prettier": "^2.7.1",
|
||||
"standard-version": "^9.5.0",
|
||||
"typescript": "^4.8.4"
|
||||
"prettier": "^2.8.0",
|
||||
"typescript": "^4.9.3"
|
||||
},
|
||||
"resolutions": {
|
||||
"@types/react": "17.0.2",
|
||||
|
||||
3596
pnpm-lock.yaml
generated
3596
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@
|
||||
"build": "tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^8.27.0",
|
||||
"typescript": "^4.8.4"
|
||||
"eslint": "^8.28.0",
|
||||
"typescript": "^4.9.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,13 +23,15 @@ COPY --from=dependencies /app/server/node_modules ./server/node_modules
|
||||
|
||||
ARG TURBO_TEAM
|
||||
ARG TURBO_TOKEN
|
||||
ARG SENTRY_AUTH_TOKEN
|
||||
|
||||
ENV TURBO_TEAM $TURBO_TEAM
|
||||
ENV TURBO_TOKEN $TURBO_TOKEN
|
||||
ENV SENTRY_AUTH_TOKEN $SENTRY_AUTH_TOKEN
|
||||
|
||||
RUN pnpm run build --filter server
|
||||
|
||||
FROM mcr.microsoft.com/playwright:next-jammy as production
|
||||
FROM mcr.microsoft.com/playwright:v1.28.0-focal as production
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
"start": "node dist/main"
|
||||
},
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.209.0",
|
||||
"@aws-sdk/client-s3": "^3.216.0",
|
||||
"@nestjs/axios": "^1.0.0",
|
||||
"@nestjs/common": "^9.2.0",
|
||||
"@nestjs/config": "^2.2.0",
|
||||
@ -19,8 +19,10 @@
|
||||
"@nestjs/platform-express": "^9.2.0",
|
||||
"@nestjs/schedule": "^2.1.0",
|
||||
"@nestjs/serve-static": "^3.0.0",
|
||||
"@nestjs/terminus": "^9.1.2",
|
||||
"@nestjs/terminus": "^9.1.3",
|
||||
"@nestjs/typeorm": "^9.0.1",
|
||||
"@sentry/node": "^7.21.1",
|
||||
"@sentry/tracing": "^7.21.1",
|
||||
"@types/passport": "^1.0.11",
|
||||
"bcryptjs": "^2.4.3",
|
||||
"cache-manager": "^5.1.3",
|
||||
@ -41,7 +43,7 @@
|
||||
"passport-local": "^1.0.0",
|
||||
"pdf-lib": "^1.17.1",
|
||||
"pg": "^8.8.0",
|
||||
"playwright-chromium": "^1.27.1",
|
||||
"playwright-chromium": "^1.28.1",
|
||||
"reflect-metadata": "^0.1.13",
|
||||
"rimraf": "^3.0.2",
|
||||
"rxjs": "^7.5.7",
|
||||
@ -55,18 +57,18 @@
|
||||
"@types/bcryptjs": "^2.4.2",
|
||||
"@types/cookie-parser": "^1.4.3",
|
||||
"@types/express": "^4.17.14",
|
||||
"@types/lodash": "^4.14.188",
|
||||
"@types/lodash": "^4.14.190",
|
||||
"@types/multer": "^1.4.7",
|
||||
"@types/node": "^18.11.9",
|
||||
"@types/nodemailer": "^6.4.6",
|
||||
"@types/passport-jwt": "^3.0.7",
|
||||
"@types/passport-local": "^1.0.34",
|
||||
"prettier": "^2.7.1",
|
||||
"prettier": "^2.8.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
"ts-loader": "^9.4.1",
|
||||
"ts-node": "^10.9.1",
|
||||
"tsconfig-paths": "^4.1.0",
|
||||
"typescript": "^4.8.4",
|
||||
"typescript": "^4.9.3",
|
||||
"webpack": "^5.75.0"
|
||||
}
|
||||
}
|
||||
|
||||
3
server/sentry.properties
Normal file
3
server/sentry.properties
Normal file
@ -0,0 +1,3 @@
|
||||
defaults.url=https://sentry.io/
|
||||
defaults.org=reactive-resume
|
||||
defaults.project=server
|
||||
@ -11,6 +11,7 @@ import { HttpExceptionFilter } from './filters/http-exception.filter';
|
||||
import { FontsModule } from './fonts/fonts.module';
|
||||
import { HealthModule } from './health/health.module';
|
||||
import { IntegrationsModule } from './integrations/integrations.module';
|
||||
import { SentryInterceptor } from './interceptors/sentry.interceptor';
|
||||
import { MailModule } from './mail/mail.module';
|
||||
import { PrinterModule } from './printer/printer.module';
|
||||
import { ResumeModule } from './resume/resume.module';
|
||||
@ -40,6 +41,10 @@ import { UsersModule } from './users/users.module';
|
||||
provide: APP_INTERCEPTOR,
|
||||
useClass: ClassSerializerInterceptor,
|
||||
},
|
||||
{
|
||||
provide: APP_INTERCEPTOR,
|
||||
useClass: SentryInterceptor,
|
||||
},
|
||||
{
|
||||
provide: APP_FILTER,
|
||||
useClass: HttpExceptionFilter,
|
||||
|
||||
@ -2,6 +2,7 @@ import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('app', () => ({
|
||||
timezone: process.env.TZ,
|
||||
version: process.env.VERSION,
|
||||
environment: process.env.NODE_ENV,
|
||||
secretKey: process.env.SECRET_KEY,
|
||||
port: parseInt(process.env.PORT, 10) || 3100,
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('cache', () => ({
|
||||
pdfDeletionTime: parseInt(process.env.PDF_DELETION_TIME, 10),
|
||||
pdfDeletionTime: parseInt(process.env.PDF_DELETION_TIME, 10) || 4 * 24 * 60 * 60 * 1000, // 4 days
|
||||
}));
|
||||
|
||||
@ -7,6 +7,7 @@ import authConfig from './auth.config';
|
||||
import cacheConfig from './cache.config';
|
||||
import databaseConfig from './database.config';
|
||||
import googleConfig from './google.config';
|
||||
import loggingConfig from './logging.config';
|
||||
import mailConfig from './mail.config';
|
||||
import storageConfig from './storage.config';
|
||||
|
||||
@ -14,6 +15,7 @@ const validationSchema = Joi.object({
|
||||
// App
|
||||
TZ: Joi.string().default('UTC'),
|
||||
PORT: Joi.number().default(3100),
|
||||
VERSION: Joi.string().required(),
|
||||
SECRET_KEY: Joi.string().required(),
|
||||
NODE_ENV: Joi.string().valid('development', 'production').default('development'),
|
||||
|
||||
@ -55,13 +57,27 @@ const validationSchema = Joi.object({
|
||||
STORAGE_SECRET_KEY: Joi.string().allow(''),
|
||||
|
||||
// Cache
|
||||
PDF_DELETION_TIME: Joi.number().default(4 * 24 * 60 * 60 * 1000), // 4 days
|
||||
PDF_DELETION_TIME: Joi.number()
|
||||
.default(4 * 24 * 60 * 60 * 1000) // 4 days
|
||||
.allow(''),
|
||||
|
||||
// Logging
|
||||
SERVER_SENTRY_DSN: Joi.string().allow(''),
|
||||
});
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
NestConfigModule.forRoot({
|
||||
load: [appConfig, authConfig, cacheConfig, databaseConfig, googleConfig, mailConfig, storageConfig],
|
||||
load: [
|
||||
appConfig,
|
||||
authConfig,
|
||||
cacheConfig,
|
||||
databaseConfig,
|
||||
googleConfig,
|
||||
loggingConfig,
|
||||
mailConfig,
|
||||
storageConfig,
|
||||
],
|
||||
validationSchema: validationSchema,
|
||||
}),
|
||||
],
|
||||
|
||||
5
server/src/config/logging.config.ts
Normal file
5
server/src/config/logging.config.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import { registerAs } from '@nestjs/config';
|
||||
|
||||
export default registerAs('logging', () => ({
|
||||
sentryDSN: process.env.SERVER_SENTRY_DSN,
|
||||
}));
|
||||
15
server/src/interceptors/sentry.interceptor.ts
Normal file
15
server/src/interceptors/sentry.interceptor.ts
Normal file
@ -0,0 +1,15 @@
|
||||
import { CallHandler, ExecutionContext, Injectable, NestInterceptor } from '@nestjs/common';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import { Observable } from 'rxjs';
|
||||
import { tap } from 'rxjs/operators';
|
||||
|
||||
@Injectable()
|
||||
export class SentryInterceptor implements NestInterceptor {
|
||||
intercept(_context: ExecutionContext, next: CallHandler): Observable<any> {
|
||||
return next.handle().pipe(
|
||||
tap(null, (exception) => {
|
||||
Sentry.captureException(exception);
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -1,13 +1,17 @@
|
||||
import '@sentry/tracing';
|
||||
|
||||
import { Logger, ValidationPipe } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { NestFactory } from '@nestjs/core';
|
||||
import { NestExpressApplication } from '@nestjs/platform-express';
|
||||
import * as Sentry from '@sentry/node';
|
||||
import cookieParser from 'cookie-parser';
|
||||
|
||||
import { AppModule } from './app.module';
|
||||
|
||||
const bootstrap = async () => {
|
||||
const app = await NestFactory.create<NestExpressApplication>(AppModule);
|
||||
const configService = app.get(ConfigService);
|
||||
|
||||
// Middleware
|
||||
app.enableCors({ credentials: true });
|
||||
@ -17,9 +21,21 @@ const bootstrap = async () => {
|
||||
// Pipes
|
||||
app.useGlobalPipes(new ValidationPipe({ transform: true }));
|
||||
|
||||
const configService = app.get(ConfigService);
|
||||
const port = configService.get<number>('app.port');
|
||||
// Sentry Error Logging
|
||||
const sentryDSN = configService.get<string>('logging.sentryDSN');
|
||||
const version = configService.get<string>('app.version');
|
||||
|
||||
if (sentryDSN) {
|
||||
Sentry.init({
|
||||
dsn: sentryDSN,
|
||||
release: version,
|
||||
tracesSampleRate: 1.0,
|
||||
enabled: process.env.NODE_ENV === 'production',
|
||||
});
|
||||
}
|
||||
|
||||
// Server Port
|
||||
const port = configService.get<number>('app.port');
|
||||
await app.listen(port);
|
||||
|
||||
Logger.log(`🚀 Server is up and running!`);
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { Controller, Get, Param, Query } from '@nestjs/common';
|
||||
import { Controller, Get, InternalServerErrorException, Param, Query } from '@nestjs/common';
|
||||
|
||||
import { PrinterService } from './printer.service';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user