diff --git a/resources/css/common.css b/resources/css/common.css index d88247a016b..5e720357578 100644 --- a/resources/css/common.css +++ b/resources/css/common.css @@ -731,10 +731,8 @@ a.fade-link:hover { /* < > buttons */ -a[title="Go Back"], -a[title="Go Forward"] { +a.navigation { border-radius: 3px; - opacity: 1; transition: .3s; } diff --git a/src/main/frontend/components/header.cljs b/src/main/frontend/components/header.cljs index 15b1c82aa63..0e698f4e6f0 100644 --- a/src/main/frontend/components/header.cljs +++ b/src/main/frontend/components/header.cljs @@ -168,12 +168,12 @@ (logo {:white? white?}) (when (util/electron?) - [:a.mr-1.opacity-50.hover:opacity-100.it + [:a.mr-1.opacity-30.hover:opacity-100.it.navigation {:style {:margin-left -10} :title "Go Back" :on-click #(js/window.history.back)} (svg/arrow-left)]) (when (util/electron?) - [:a.opacity-50.hover:opacity-100.it + [:a.opacity-30.hover:opacity-100.it.navigation {:style {:margin-right 15} :title "Go Forward" :on-click #(js/window.history.forward)} (svg/arrow-right)]) diff --git a/src/main/frontend/config.cljs b/src/main/frontend/config.cljs index 4dd8e73f702..735f3ade34d 100644 --- a/src/main/frontend/config.cljs +++ b/src/main/frontend/config.cljs @@ -276,8 +276,7 @@ (def metadata-file "metadata.edn") (def config-default-content - " - {:journal-basis \"daily\" \n\n :project {\n ;; Selected public notes can be published to https://logseq.com/your-project-or-your-username.\n :name \"\"\n :alias \"\"\n ;; your twitter handle\n :twitter \"\"\n ;; description supports both hiccup and html\n :description \"\"}\n\n ;; Currently, we support either \"Markdown\" or \"Org\".\n ;; This can overwrite your global preference so that\n ;; maybe your personal preferred format is Org but you'd\n ;; need to use Markdown for some projects.\n ;; :preferred-format \"\"\n\n ;; Git settings\n :git-pull-secs 60\n :git-push-secs 10\n :git-auto-push true\n\n ;; The app will ignore those directories or files.\n ;; E.g. \"/archived\" \"/test.md\"\n :hidden []\n\n ;; When creating the new journal page, the app will use your template content here.\n ;; Example for Markdown users: \"## [[Work]]\\n###\\n## [[Family]]\\n###\\n\n ;; Example for Org mode users: \"** [[Work]]\\n***\\n** [[Family]]\\n***\\n\n :default-templates\n {:journals \"\"}\n\n ;; The app will show those queries in today's journal page,\n ;; the \"NOW\" query asks the tasks which need to be finished \"now\",\n ;; the \"NEXT\" query asks the future tasks.\n :default-queries\n {:journals\n [{:title \"🔨 NOW\"\n :query [:find (pull ?h [*])\n :in $ ?start ?today\n :where\n [?h :block/marker ?marker]\n [?h :block/page ?p]\n [?p :page/journal? true]\n [?p :page/journal-day ?d]\n [(>= ?d ?start)]\n [(<= ?d ?today)]\n [(contains? #{\"NOW\" \"DOING\"} ?marker)]]\n :inputs [:14d :today]\n :result-transform (fn [result]\n (sort-by (fn [h]\n (get h :block/priority \"Z\")) result))\n :collapsed? false}\n {:title \"📅 NEXT\"\n :query [:find (pull ?h [*])\n :in $ ?start ?next\n :where\n [?h :block/marker ?marker]\n [?h :block/ref-pages ?p]\n [?p :page/journal? true]\n [?p :page/journal-day ?d]\n [(> ?d ?start)]\n [(< ?d ?next)]\n [(contains? #{\"NOW\" \"LATER\" \"TODO\"} ?marker)]]\n :inputs [:today :7d-after]\n :collapsed? false}]}\n\n ;; Add your own commands to speedup.\n ;; E.g. [[\"js\" \"Javascript\"]]\n :commands\n []\n\n ;; Macros replace texts and will make you more productive.\n ;; For example:\n ;; Add this to the macros below:\n ;; {\"poem\" \"Rose is $1, violet's $2. Life's ordered: Org assists you.\"}\n ;; input \"{{{poem(red,blue)}}}\"\n ;; becomes\n ;; Rose is red, violet's blue. Life's ordered: Org assists you.\n :macros {}}\n") + "{:project {\n ;; Selected public notes can be published to https://logseq.com/your-project-or-your-username.\n :name \"\"\n :alias \"\"\n ;; your twitter handle\n :twitter \"\"\n ;; description supports both hiccup and html\n :description \"\"}\n\n ;; Currently, we support either \"Markdown\" or \"Org\".\n ;; This can overwrite your global preference so that\n ;; maybe your personal preferred format is Org but you'd\n ;; need to use Markdown for some projects.\n ;; :preferred-format \"\"\n\n ;; Git settings\n :git-pull-secs 60\n :git-push-secs 10\n :git-auto-push true\n\n ;; The app will ignore those directories or files.\n ;; E.g. \"/archived\" \"/test.md\"\n :hidden []\n\n ;; When creating the new journal page, the app will use your template content here.\n ;; Example for Markdown users: \"## [[Work]]\\n###\\n## [[Family]]\\n###\\n\n ;; Example for Org mode users: \"** [[Work]]\\n***\\n** [[Family]]\\n***\\n\n :default-templates\n {:journals \"\"}\n\n ;; The app will show those queries in today's journal page,\n ;; the \"NOW\" query asks the tasks which need to be finished \"now\",\n ;; the \"NEXT\" query asks the future tasks.\n :default-queries\n {:journals\n [{:title \"🔨 NOW\"\n :query [:find (pull ?h [*])\n :in $ ?start ?today\n :where\n [?h :block/marker ?marker]\n [?h :block/page ?p]\n [?p :page/journal? true]\n [?p :page/journal-day ?d]\n [(>= ?d ?start)]\n [(<= ?d ?today)]\n [(contains? #{\"NOW\" \"DOING\"} ?marker)]]\n :inputs [:14d :today]\n :result-transform (fn [result]\n (sort-by (fn [h]\n (get h :block/priority \"Z\")) result))\n :collapsed? false}\n {:title \"📅 NEXT\"\n :query [:find (pull ?h [*])\n :in $ ?start ?next\n :where\n [?h :block/marker ?marker]\n [?h :block/ref-pages ?p]\n [?p :page/journal? true]\n [?p :page/journal-day ?d]\n [(> ?d ?start)]\n [(< ?d ?next)]\n [(contains? #{\"NOW\" \"LATER\" \"TODO\"} ?marker)]]\n :inputs [:today :7d-after]\n :collapsed? false}]}\n\n ;; Add your own commands to speedup.\n ;; E.g. [[\"js\" \"Javascript\"]]\n :commands\n []\n\n ;; Macros replace texts and will make you more productive.\n ;; For example:\n ;; Add this to the macros below:\n ;; {\"poem\" \"Rose is $1, violet's $2. Life's ordered: Org assists you.\"}\n ;; input \"{{{poem(red,blue)}}}\"\n ;; becomes\n ;; Rose is red, violet's blue. Life's ordered: Org assists you.\n :macros {}}\n") (def markers #{"now" "later" "todo" "doing" "done" "wait" "waiting" diff --git a/src/main/frontend/handler/repo.cljs b/src/main/frontend/handler/repo.cljs index 6a9d49823b5..97519e9564f 100644 --- a/src/main/frontend/handler/repo.cljs +++ b/src/main/frontend/handler/repo.cljs @@ -59,16 +59,13 @@ app-dir config/app-name dir (str repo-dir "/" app-dir)] (p/let [_ (fs/mkdir-if-not-exists dir)] - (let [default-content config/config-default-content] + (let [default-content config/config-default-content + path (str app-dir "/" config/config-file)] (p/let [file-exists? (fs/create-if-not-exists repo-url repo-dir (str app-dir "/" config/config-file) default-content)] - (let [path (str app-dir "/" config/config-file) - old-content (when file-exists? - (db/get-file repo-url path)) - content (or old-content default-content)] - (file-handler/reset-file! repo-url path content) - (common-handler/reset-config! repo-url content) - (when-not (= content old-content) - (git-handler/git-add repo-url path)))))))) + (when-not file-exists? + (file-handler/reset-file! repo-url path default-content) + (common-handler/reset-config! repo-url default-content) + (git-handler/git-add repo-url path))))))) (defn create-contents-file [repo-url]