]> Untitled Git - monorepo.git/commitdiff
add code block in website
authorPreston Pan <preston@nullring.xyz>
Fri, 26 Jan 2024 00:46:22 +0000 (16:46 -0800)
committerPreston Pan <preston@nullring.xyz>
Fri, 26 Jan 2024 00:46:22 +0000 (16:46 -0800)
12 files changed:
blog/index.org
config/doom.org
config/index.org
config/qtile.org
index.org
journal/20240124.org
journal/20240125.org [new file with mode: 0644]
journal/index.org
mindmap/index.org
mindmap/inverse square.org
mindmap/magnetostatics.org
style.css

index e5ee82d26714503d627286fcd892f955e2d1e356..a894a6db425cb0835e76f7b7d63e85653f235b7a 100644 (file)
@@ -15,6 +15,7 @@ technical or otherwise. Think about the blog like a mix between
 the wiki format of the mindmap and the journal format.
 
 * Blog Articles
+@@html: <div class="links-page">@@
 #+begin_src shell :results output raw :exports both
 for f in *;
 do
@@ -26,3 +27,5 @@ done
 #+end_src
 
 #+RESULTS:
+
+@@html: </div>@@
index 5e77b70fca5bc0120c544b1f4096cc29b386e885..1663afc0c722b0cd7b2e14030e72bf7287d3a605 100644 (file)
@@ -18,6 +18,7 @@ Below is the old documentation.
 (setq save-interprogram-paste-before-kill t)
 (setq yank-pop-change-selection t)
 (setq org-directory "~/org/")
+(setq warning-minimum-level :emergency)
 #+end_src
 - `load!' for loading external *.el files relative to this one
 - `add-load-path!' for adding directories to the `load-path', relative to
@@ -137,7 +138,7 @@ I'm experimenting with many themes right now. One of these themes is the city-li
 is the catppuccin theme.
 #+begin_src emacs-lisp :tangle yes
 ;; (setq doom-theme 'doom-ayu-light)
-(setq doom-theme 'doom-miramare)
+(setq doom-theme 'doom-gruvbox)
 ;; (setq catppuccin-flavor 'mocha)
 ;; (load-theme 'catppuccin)
 #+end_src
@@ -288,7 +289,6 @@ And then we add the headers needed to export the journal automatically:
       (`yearly "#+TITLE: Yearly Journal\n#+STARTUP: folded"))))
 
 (setq org-journal-file-header 'org-journal-file-header-func)
-(setq org-export-with-section-numbers nil)
 (setq org-journal-file-format "%Y%m%d.org")
 #+end_src
 To add everything to the agenda search path, we toggle:
@@ -303,6 +303,7 @@ I don't use this anymore, but it's good to have.
 *** Roam
 This is the configuration for my mindmap.
 #+begin_src emacs-lisp :tangle yes
+(setq org-roam-graph-viewer "qutebrowser")
 (setq org-roam-directory (file-truename "~/org/website/mindmap"))
 (setq org-roam-capture-templates '(("d" "default" plain "%?"
                                     :target (file+head "${title}.org"
@@ -321,7 +322,8 @@ In order to publish my website, we need to configure emacs to publish it somewhe
          :recursive t
          :publishing-function org-html-publish-to-html
          :headline-levels 4
-         :auto-preamble t)
+         :html-preamble t
+         :html-preamble-format (("en" "<p class=\"preamble\"><a href=\"/index.html\">home</a> | <a href=\"./index.html\">section main page</a></p><hr>")))
         ("website-static"
          :base-directory "~/org/website"
          :base-extension "css\\|js\\|png\\|jpg\\|gif\\|pdf\\|mp3\\|ogg\\|swf\\|ico"
@@ -329,7 +331,9 @@ In order to publish my website, we need to configure emacs to publish it somewhe
          :recursive t
          :publishing-function org-publish-attachment)
         ("website" :auto-sitemap t :components ("website-org" "website-static"))))
+;; (setq org-export-html-postamble-format '(("en" "<p class=\"preamble\"><a href=\"../index.html\">previous page</a> | <a href=\"/index.html\">home</a></p>")))
 (setq org-html-postamble "Copyright (c) 2024 Preston Pan")
+(setq org-export-with-section-numbers nil)
 #+end_src
 *** Contacts
 Now we configure org-contacts, which allows me to store contacts in an org mode file:
@@ -481,7 +485,7 @@ This installs all the doom modules that we are going to be configuring:
        ;;helm              ; the *other* search engine for love and life
        ;;ido               ; the other *other* search engine...
        (ivy +icons +fuzzy)
-       vertico
+       ;; vertico
 
        :ui
        ;;deft              ; notational velocity for Emacs
index c4dbb120b682121f2dce2f9fc38a42141942e5ff..dae99570101da925937a84d2aac2be2ff2ed39af 100644 (file)
@@ -8,6 +8,7 @@
 They're configurations for extremely obscure programs I use. Yeah, I know, I'm somewhat of a hipster myself.
 ** Configurations
 Here is a list of my configurations for various programs:
+@@html: <div class="links-page">@@
 #+begin_src shell :results output raw :exports both
 for f in *;
 do
@@ -25,3 +26,5 @@ done
 - [[file:kmonad.org][kmonad.org]]
 - [[file:qtile.org][qtile.org]]
 - [[file:qutebrowser.org][qutebrowser.org]]
+
+@@html: </div>@@
index 537bab555bfca88ddc03f923b745fbaafa429671..6860043b26ec80763ff226105553ecd0aec12601 100644 (file)
@@ -149,7 +149,7 @@ keys.extend([
     Key([mod], "g", lazy.spawn("gimp"), desc="Run GIMP"),
     Key([mod], "t", lazy.spawn("torbrowser-launcher"), desc="Run Tor Browser"),
     Key([mod], "i", lazy.spawn("emacsclient --eval \"(emacs-everywhere)\""), desc="Emacs Everywhere!"),
-    Key([mod], "d", lazy.spawn("dmenu_run"), desc="dmenu"),
+    Key([mod], "d", lazy.spawn("rofi -show run"), desc="rofi command launcher"),
 ])
 #+end_src
 *** XF86
index 3d8f6b174bb44722b92ccdb78545c752d2ddd259..2b41f6e498935f4c080e105e29fd361b649d91d6 100644 (file)
--- a/index.org
+++ b/index.org
@@ -1,5 +1,6 @@
 #+title: Introducing ret2pop
 #+author: Preston Pan
+#+date: <2023-06-09 Fri>
 #+description: My personal website
 #+html_head: <link rel="stylesheet" type="text/css" href="style.css" />
 #+html_head: <link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
 #+html_head: <link rel="mask-icon" href="/safari-pinned-tab.svg" color="#5bbad5">
 #+html_head: <meta name="msapplication-TileColor" content="#da532c">
 #+html_head: <meta name="theme-color" content="#ffffff">
-#+date: <2023-06-09 Fri>
 #+language: en
 #+OPTIONS: broken-links:t
+#+OPTIONS: html-preamble:nil
 
-* Introduction
 #+caption: All Hope Abandon, Ye Who Enter Here
 [[./img/drawing-old.png]]
 
@@ -25,21 +25,21 @@ Hello! I'm a person on the internet that does things, such as:
 - Linguistics
 - Thinking
 And if you're here to do one of these things, I guarantee you're in the right place!
-** [[file:journal/index.org][Journal]]
+
+* [[file:journal/index.org][Journal]]
 If you're interested, you can read my [[file:journal/index.org][journal]]. Note that this journal is not my
 entire personal life but instead will be a focus on interesting things that I
 think of or things that are of a technical nature.
-** [[file:blog/index.org][Blog]]
+* [[file:blog/index.org][Blog]]
 My blog contains many longer writings that do not fit into the mindmap format.
-Work in progress; the journal, mindmap, and configs are my biggest focus right now.
-** [[file:mindmap/index.org][Mindmap]]
+* [[file:mindmap/index.org][Mindmap]]
 I also have a mindmap, for those of you who are interested in knowing everything.
-*** What is a mindmap?
+** What is a mindmap?
 Click the hyperlink to find out! In case you didn't see:
 - [[file:mindmap/index.org][Mindmap]]
 - [[file:mindmap/index.org][Mindmap]]
 - [[file:mindmap/index.org][Mindmap]]
-** [[file:config/index.org][Configurations]]
+* [[file:config/index.org][Configurations]]
 Most of my configurations/dotfiles for various programs are literate configurations, and I
 can therefore publish them. So I did! Configurations include:
 - doom emacs
@@ -47,8 +47,22 @@ can therefore publish them. So I did! Configurations include:
 - QuteBrowser
 - Elfeed
 …and many more!
-** [[file:about.org][About]]
+* [[https://github.com/ret2pop][Projects]]
+My programming projects can be found on my github; other projects that do not directly pertain
+to my projects on github or need a more in-depth explanation are explained further in my blog.
+* [[https://youtube.com/@ret2pop][Music and Media]]
+Most of the music that I have recorded can be found on my Youtube channel. Note that it will also
+contain other things that I filmed.
+* [[file:about.org][About]]
 Who is the man behind ret2pop? How do you contact him? So many mysteries await…
 
-* About this Website
-I wrote this website in org mode. For more information, see the [[file:README.org][README]].
+** About this Website
+I wrote this website in org mode. For more information, see the [[file:README.org][README]]. Here is how I upload my
+website:
+#+begin_src shell
+cd ~/org/website
+git add .
+git commit -m "add code block in website"
+git push origin main
+rsync ~/website_html/ root@nullring.xyz:/var/www/ret2pop/
+#+end_src
index 1b10e38830748956469a3ea860d8a9ca1bfbd6ae..d234bd7cf62aeadb8b8cd72a153221ddc4ee5518 100644 (file)
 ** 13:43
 For lunch, I ate rice and vegetables, mainly cauliflower, and two eggs. I plan to take my protein in the night, and I need to
 get more protein soon.
-*** TODO Get more protein
+*** DONE Get more protein
 Vega to be mixed with milk.
 ** 15:44
 What's weird is I think my journal might be a little broken; I wrote the thing above yesterday. Oh well. I am also looking into
 changing my website's css to make it less ugly. I also need to buy some vega protein.
+** 20:24
+I just finished my new website design. I feel as though it is more modern. However, I may still need to add a navbar
+to the website.
diff --git a/journal/20240125.org b/journal/20240125.org
new file mode 100644 (file)
index 0000000..10763b1
--- /dev/null
@@ -0,0 +1,16 @@
+#+TITLE: Daily Journal
+#+STARTUP: showeverything
+#+DESCRIPTION: My daily journal entry
+#+AUTHOR: Preston Pan
+#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="../style.css" />
+#+html_head: <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
+#+html_head: <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
+#+options: broken-links:t
+* Thursday, 25 January 2024
+** 12:01
+I did not sleep that well, but that is okay for today. I am currently testing how publishing code blocks works. Sounds
+silly because it works out of the box, but trust me, there are some weird interactions.
+** 16:40
+I feel quite sleepy, but I've done a lot of my agenda already. I'll be seeing Kaili today which is nice. I am thinking
+of blog posts that I could possibly add, but I can't think of anything right now. Maybe some excuse to use reproducible
+research in org mode.
index 290f751cffc36b066c0247f17b5aecbf94e62544..5322bb33cc125f492fe08ef3841e37b80e9b0d61 100644 (file)
@@ -19,8 +19,10 @@ there will be some). I will also be posting some TODOs that I have
 throughout time.
 
 ** Entries
-Here is a list of all my journal entries:
+@@html: <div class="links-page">@@
+If you're interested, here is a list of all my journal entries:
 #+begin_src shell :results output raw :exports both
+#printf "@@html: <div class=\"links\">@@\n"
 for f in $(ls | sort -r);
 do
     if [[ "$f" == "index.org" || "$f" == "README.org" ]]; then
@@ -28,6 +30,7 @@ do
     fi
     printf -- "- [[file:$f][$f]]\n"
 done
+#printf "@@html: </div>@@\n"
 #+end_src
 
 #+RESULTS:
@@ -58,3 +61,4 @@ done
 - [[file:20230611.org][20230611.org]]
 - [[file:20230610.org][20230610.org]]
 - [[file:20230609.org][20230609.org]]
+@@html: </div>@@
index 350a5646fd90137806347c314a05e66b1b0c8829..109ae12ec85bdb76ffa6d14dd12d4b8b69e7c887 100644 (file)
@@ -30,6 +30,7 @@ you to make a web of notes, something close to a wiki.
 
 * I want to Break the Rules
 No you don't. That being said, if you really want the list of all articles, here you go:
+@@html: <div class="links-page">@@
 #+begin_src shell :results output raw :exports both
 set -f
 IFS='
@@ -81,3 +82,4 @@ set +f
 - [[file:Legendre Transformation.org][Legendre Transformation.org]]
 - [[file:Lagrangian mechanics.org][Lagrangian mechanics.org]]
 - [[file:Fourier Transform.org][Fourier Transform.org]]
+@@html: </div>@@
index 132b32287e347d66ca4b98d5b53d3577854f92ed..3f980bfaa8d78c0aad2a84b7b8b9709f3b5ca794 100644 (file)
@@ -122,7 +122,9 @@ k\int_{space}\sigma(\vec{r'})((x^{2} + y^{2} + z^{2})^{-3/2} - 3x^{2}(x^{2} + y^
 \end{align*}
 If we factor out the \((x^{2} + y^{2} + z^{2})^{-\frac{5}{2}}\) term and collecting the like terms:
 \begin{align*}
-k\int_{space}\sigma(\vec{r'})(3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}} - 3(x^{2} + y^{2} + z^{2})(x^{2} + y^{2} + z^{2})^{-\frac{5}{2}})d\tau = k\int_{space}(3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}} - 3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}})d\tau = 0.
+k\int_{space}\sigma(\vec{r'})(3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}} - 3(x^{2} + y^{2} + z^{2})(x^{2} + y^{2} + z^{2})^{-\frac{5}{2}})d\tau \\
+= k\int_{space}(3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}} - 3(x^{2} + y^{2} + z^{2})^{-\frac{3}{2}})d\tau \\
+= 0.
 \end{align*}
 So is the divergence of this field zero? Well, not exactly. In order to understand why, we must ask: What happens to the divergence at \(\vec{0}\)?
 On first glance, it seems clearly undefined. After all, we're dividing by zero. However, after some amount of inspection, the assumption that our field's divergence
index ea763e794d0813e127d0bfe9b61d2fe481cbe4ee..dd9d1720504b41ef4e551a4f8870dab9e4ed7808 100644 (file)
@@ -56,7 +56,7 @@ Due to the [[id:2a543b79-33a0-4bc8-bd1c-e4d693666aba][inverse square]] law, we k
 \begin{align*}
 \vec{\nabla} \times (\vec{J} \times \frac{\hat{r}}{r^{2}}) = 4\pi\vec{J}(\vec{r'})\delta(\vec{r}) + (\frac{\hat{r}}{r^{2}} \cdot \vec{\nabla})\vec{J} - (\vec{J} \cdot \vec{\nabla})\frac{\hat{r}}{r^{2}}
 \end{align*}
-The first directional derivative is zero because $\vec{J}$ does not depend on the same coordinates as $\vec{\nabla}}$
+The first directional derivative is zero because $\vec{J}$ does not depend on the same coordinates as $\vec{\nabla}$
 with the same reasoning as for the divergence, so we have:
 \begin{align*}
 \vec{\nabla} \times (\vec{J} \times \frac{\hat{r}}{r^{2}}) = 4\pi\vec{J}(\vec{r'})\delta(\vec{r}) - (\vec{J} \cdot \vec{\nabla})\frac{\hat{r}}{r^{2}}
index 9d28237c05e0bd4531897aaa1e693580563e970b..1eb91751f1c4eaa40ac13f0e6358b3b6a1121c85 100644 (file)
--- a/style.css
+++ b/style.css
@@ -102,6 +102,10 @@ img {
   max-width: 100%;
   border-radius: 10px;
   text-align: center;
+  margin-left: auto;
+  margin-right: auto;
+  display: block;
+  width: 50%;
 }
 
 /* --------------------------------------------- */
@@ -135,28 +139,65 @@ pre {
   background: #ff4081;
 }
 
-#postamble {
-}
-/* #table-of-contents { */
-/*   height: 100%; /\* Full-height: remove this if you want "auto" height *\/ */
-/*   width: 160px; /\* Set the width of the sidebar *\/ */
-/*   position: fixed; /\* Fixed Sidebar (stay in place on scroll) *\/ */
-/*   z-index: 1; /\* Stay on top *\/ */
-/*   top: 0; /\* Stay at the top *\/ */
-/*   left: 0; */
-/*   overflow-x: hidden; /\* Disable horizontal scroll *\/ */
-/*   padding-top: 20px; */
-/* } */
+#table-of-contents {
+  height: 100%; /* Full-height: remove this if you want "auto" height */
+  width: 200px; /* Set the width of the sidebar */
+  position: fixed; /* Fixed Sidebar (stay in place on scroll) */
+  z-index: 1; /* Stay on top */
+  top: 0; /* Stay at the top */
+  left: 0;
+  font-size: 0px;
+  overflow-x: hidden; /* Disable horizontal scroll */
+  padding-top: 20px;
+  border-right: 1px;
+  background: #ffffeb;
+}
 
-/* #table-of-contents ul a { */
-/*   padding: 6px 8px 6px 16px; */
-/*   text-decoration: none; */
-/*   font-size: 25px; */
-/*   display: block; */
-/* } */
+#table-of-contents ul a {
+  padding: 6px 8px 6px 16px;
+  text-decoration: none;
+  font-size: 25px;
+  display: block;
+  font-size: 15px;
+}
+#table-of-contents ul {
+  list-style-type: none;
+  padding-left: 0;
+}
+.content {
+  margin-left: 160px; /* Same as the width of the sidebar */
+  padding: 0px 10px;
+}
 
 .src,
-.example {
+.example,
+code {
   color: #ebdbb2;
   background-color: #282828;
 }
+
+.preamble {
+  font-size: 20px;
+}
+
+.links-page > ul {
+  columns: 2;
+  -webkit-columns: 2;
+  -moz-columns: 2;
+}
+/* On smaller screens, where height is less than 450px, change the style of the sidebar (less padding and a smaller font size) */
+@media screen and (max-height: 450px) {
+  .sidenav {
+    padding-top: 15px;
+  }
+  .sidenav a {
+    font-size: 18px;
+  }
+}
+
+@media (max-width: 1250px) {
+  body {
+    margin: 20px auto;
+    margin-left: 200px;
+  }
+}