fix: add link to page

This commit is contained in:
Weihua Lu
2021-05-14 04:27:50 +08:00
parent 40aaac89a1
commit cc34248fd3
2 changed files with 9 additions and 56 deletions

View File

@@ -1,9 +1,11 @@
(ns frontend.components.onboarding
(:require [rum.core :as rum]
[frontend.components.svg :as svg]
[frontend.components.shortcut :as shortcut]
[frontend.extensions.latex :as latex]
[frontend.extensions.highlight :as highlight]
[frontend.context.i18n :as i18n]
[reitit.frontend.easy :as rfe]
[frontend.util :as util]))
(rum/defc intro
@@ -215,7 +217,9 @@
[:span.mr-1 (t :help/community)]
svg/discord]]]
[:li
(t :help/shortcuts)
[:a {:href (rfe/href :shortcut)
:target "_blank"}
(t :help/shortcuts)]
[:table
[:thead
[:tr
@@ -226,60 +230,9 @@
[:tr [:td (t :help/block-content-autocomplete)] [:td "<"]]
[:tr [:td (t :help/reference-autocomplete)] [:td "[[]]"]]
[:tr [:td (t :help/block-reference)] [:td "(())"]]]]
[:table
[:thead
[:tr
[:th [:span [:b (t :help/key-commands)]
(t :help/working-with-lists)]]
[:th (t :help/shortcut)]]]
[:tbody
[:tr [:td (t :shortcut.editor/indent)] [:td "Tab"]]
[:tr [:td (t :shortcut.editor/outdent)] [:td "Shift-Tab"]]
[:tr [:td (t :shortcut.editor/move-block-up)] [:td (util/->platform-shortcut "Alt-Shift-Up")]]
[:tr [:td (t :shortcut.editor/move-block-down)] [:td (util/->platform-shortcut "Alt-Shift-Down")]]
[:tr [:td (t :help/create-new-block)] [:td "Enter"]]
[:tr [:td (t :shortcut.editor/new-line)] [:td "Shift-Enter"]]
[:tr [:td (t :undo)] [:td (util/->platform-shortcut "Ctrl-z")]]
[:tr [:td (t :redo)] [:td (util/->platform-shortcut "Ctrl-y")]]
[:tr [:td (t :help/zoom-in)] [:td (util/->platform-shortcut (if util/mac? "Cmd-." "Alt-Right"))]]
[:tr [:td (t :shortcut.editor/zoom-out)] [:td (util/->platform-shortcut (if util/mac? "Cmd-," "Alt-left"))]]
[:tr [:td (t :shortcut.editor/follow-link)] [:td (util/->platform-shortcut "Ctrl-o")]]
[:tr [:td (t :shortcut.editor/open-link-in-sidebar)] [:td (util/->platform-shortcut "Ctrl-shift-o")]]
[:tr [:td (t :shortcut.editor/expand-block-children)] [:td (util/->platform-shortcut "Ctrl-Down")]]
[:tr [:td (t :collapse)] [:td (util/->platform-shortcut "Ctrl-Up")]]
[:tr [:td (t :shortcut.editor/select-block-up)] [:td "Shift-Up"]]
[:tr [:td (t :shortcut.editor/select-block-down)] [:td "Shift-Down"]]
[:tr [:td (t :shortcut.editor/select-all-blocks)] [:td (util/->platform-shortcut "Ctrl-Shift-a")]]]]
[:table
[:thead
[:tr
[:th [:b (t :general)]]
[:th (t :help/shortcut)]]]
[:tbody
[:tr [:td (t :help/toggle)] [:td "?"]]
[:tr [:td (t :shortcut.git/commit)] [:td "c"]]
[:tr [:td (t :shortcut.go/search)] [:td (util/->platform-shortcut "Ctrl-u")]]
[:tr [:td (t :shortcut.go/search-in-page)] [:td (util/->platform-shortcut "Ctrl-Shift-u")]]
[:tr [:td (t :shortcut.editor/open-link-in-sidebar)] [:td "Shift-Click"]]
[:tr [:td (t :help/context-menu)] [:td "Right Click"]]
[:tr [:td (t :help/fold-unfold)] [:td "Tab"]]
[:tr [:td (t :shortcut.ui/toggle-contents)] [:td "t c"]]
[:tr [:td (t :shortcut.ui/toggle-document-mode)] [:td "t d"]]
[:tr [:td (t :shortcut.ui/toggle-theme)] [:td "t t"]]
[:tr [:td (t :shortcut.ui/toggle-right-sidebar)] [:td "t r"]]
[:tr [:td (t :shortcut.ui/toggle-settings)] [:td "t s"]]
[:tr [:td (t :shortcut.ui/toggle-new-block)] [:td "t e"]]
[:tr [:td (t :shortcut.go/journals)] [:td (if util/mac? "Cmd-j" "Alt-j")]]]]
[:table
[:thead
[:tr
[:th [:b (t :formatting)]]
[:th (t :help/shortcut)]]]
[:tbody
[:tr [:td (t :bold)] [:td (util/->platform-shortcut "Ctrl-b")]]
[:tr [:td (t :italics)] [:td (util/->platform-shortcut "Ctrl-i")]]
[:tr [:td (t :html-link)] [:td (util/->platform-shortcut "Ctrl-k")]]
[:tr [:td (t :highlight)] [:td (util/->platform-shortcut "Ctrl-Shift-h")]]]]]
(shortcut/shortcut-table :shortcut.category/basics)
(shortcut/shortcut-table :shortcut.category/block-editing)
(shortcut/shortcut-table :shortcut.category/formatting)]
[:li
(t :help/markdown-syntax)