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

Landing Page Revamp #458

Merged
merged 7 commits into from
May 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
78 changes: 72 additions & 6 deletions src/components/pages/NotePage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
} from '../../lib/router'
import { useDb } from '../../lib/db'
import TwoPaneLayout from '../atoms/TwoPaneLayout'
import Image from '../atoms/Image'
import { NoteDoc, NoteStorage } from '../../lib/db/types'
import { useGeneralStatus, ViewModeType } from '../../lib/generalStatus'
import { useDialog, DialogIconTypes } from '../../lib/dialog'
Expand All @@ -26,7 +27,58 @@ import { dispatchNoteDetailFocusTitleInputEvent } from '../../lib/events'

export const StyledNoteDetailNoNote = styled.div`
text-align: center;
margin-top: 300px;
margin-top: 13%;
color: #a9a9a9;

img {
width: 310px;
max-width: 100%;
padding: 10px 40px;
}

section {
margin: auto;
display: flex;
width: 70%;
text-align: center;

div {
text-align: center;
margin: 0 auto;
display: block;
}
}

// Keybinds
h2 {
font-weight: normal;

// Keybind Buttons
span {
margin: 5px auto;
padding: 5px 10px;
width: max-content;
background: #333;
border-radius: 8px;
box-shadow: 0 4px #404040;
}
}
h3 {
margin: 20px auto;
font-weight: normal;
}
h4 {
margin: 0;
font-weight: normal;
}

// Media Query
@media only screen and (max-width: 970px) {
section {
width: 100%;
display: block;
}
}
`

export type BreadCrumbs = {
Expand Down Expand Up @@ -308,11 +360,25 @@ const NotePage = ({ storage }: NotePageProps) => {
right={
currentNote == null ? (
<StyledNoteDetailNoNote>
<div>
<h1>{t('note.createKeyMac')}</h1>
<h1>{t('note.createKeyWinLin')}</h1>
<h2>{t('note.createkeymessage1')}</h2>
</div>
<Image src={'/app/static/logo_index.svg'} />
<h3>{t('note.createkeymessage1')}</h3>
{/* Might need to be changed if custom keybinds is implemented */}
<section>
<div>
{/* 'note.createKey' differs in locales: N/Enter */}
<h2>
<span>Ctrl</span> + <span>{t('note.createKey')}</span>
</h2>
<h4>{t('note.createKeyWinLin')}</h4>
</div>
<h3>{t('note.createKeyOr')}</h3>
<div>
<h2>
<span>⌘</span> + <span>{t('note.createKey')}</span>
</h2>
<h4>{t('note.createKeyMac')}</h4>
</div>
</section>
</StyledNoteDetailNoNote>
) : (
<NoteDetail
Expand Down
8 changes: 5 additions & 3 deletions src/locales/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ export default {
'note.nothingMessage': 'Keine Notizen gefunden.',
'note.noTitle': 'Kein Titel',
'note.date': 'her',
'note.createKeyMac': 'Mac: Befehl(⌘) + n',
'note.createKeyWinLin': 'Windows/Linux: Ctrl + n',
'note.createkeymessage1': 'um eine neue Notiz zu erstellen',
'note.createKey': 'N',
'note.createKeyOr': 'oder',
'note.createKeyMac': 'on Mac',
'note.createKeyWinLin': 'on Windows/Linux',
'note.createkeymessage1': 'um eine neue Notiz zu erstellen, presse',
'note.createkeymessage2': 'Wähle einen Speicherort',
'note.createkeymessage3': 'um eine neue Notiz zu erstellen',
'note.restore': 'Wiederherstellen',
Expand Down
8 changes: 5 additions & 3 deletions src/locales/enUS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,11 @@ export default {
'note.nothingMessage': 'No notes could be found.',
'note.noTitle': 'No title',
'note.date': 'ago',
'note.createKeyMac': 'Mac: Command(⌘) + n',
'note.createKeyWinLin': 'Windows/Linux: Ctrl + n',
'note.createkeymessage1': 'to create a new note',
'note.createKeyOr': 'or',
'note.createKey': 'N',
'note.createKeyMac': 'on Mac',
'note.createKeyWinLin': 'on Windows/Linux',
'note.createkeymessage1': 'To create a new note, press',
'note.createkeymessage2': 'Select a storage',
'note.createkeymessage3': 'to create a new note',
'note.restore': 'Restore',
Expand Down
8 changes: 5 additions & 3 deletions src/locales/esES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ export default {
'note.nothingMessage': 'No se han encontrado notas.',
'note.noTitle': 'No hay título',
'note.date': 'Hace',
'note.createKeyMac': 'Mac: Command(⌘) + n',
'note.createKeyWinLin': 'Windows/Linux: Ctrl + n',
'note.createkeymessage1': 'Para crear una nueva nota',
'note.createKeyOr': 'o',
'note.createKey': 'N',
'note.createKeyMac': 'en Mac',
'note.createKeyWinLin': 'en Windows/Linux',
'note.createkeymessage1': 'Para crear una nueva nota, presione',
'note.createkeymessage2': 'Selecciona un lugar de almacenamiento',
'note.createkeymessage3': 'Para crear una nota',
'note.restore': 'Restaurar',
Expand Down
8 changes: 5 additions & 3 deletions src/locales/frFR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,11 @@ export default {
'note.nothingMessage': "Aucune note n'a été trouvée.",
'note.noTitle': 'Pas de titre',
'note.date': 'Il y a',
'note.createKeyMac': 'Mac: Command(⌘) + n',
'note.createKeyWinLin': 'Windows/Linux: Ctrl + n',
'note.createkeymessage1': 'pour créer une nouvelle note',
'note.createKeyOr': 'ou',
'note.createKey': 'N',
'note.createKeyMac': 'sur Mac',
'note.createKeyWinLin': 'sur Windows/Linux',
'note.createkeymessage1': 'pour créer une nouvelle note, appuyez sur',
'note.createkeymessage2': 'Sélectionner un espace de stockage',
'note.createkeymessage3': 'pour créer une nouvelle note',
'note.restore': 'Restaurer',
Expand Down