aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPreston Pan <preston@nullring.xyz>2024-01-25 16:46:22 -0800
committerPreston Pan <preston@nullring.xyz>2024-01-25 16:46:22 -0800
commit9d15d37bed3f2d96017ffa373b0d52df26f7903a (patch)
tree187f37027dc21e736396f6bb19b990b5d3a64bc3
parenta7da57c0736bec58d1fc4ec99d211099c31bb45f (diff)
add code block in website
-rw-r--r--blog/index.org3
-rw-r--r--config/doom.org12
-rw-r--r--config/index.org3
-rw-r--r--config/qtile.org2
-rw-r--r--index.org36
-rw-r--r--journal/20240124.org5
-rw-r--r--journal/20240125.org16
-rw-r--r--journal/index.org6
-rw-r--r--mindmap/index.org2
-rw-r--r--mindmap/inverse square.org4
-rw-r--r--mindmap/magnetostatics.org2
-rw-r--r--style.css79
12 files changed, 131 insertions, 39 deletions
diff --git a/blog/index.org b/blog/index.org
index e5ee82d..a894a6d 100644
--- a/blog/index.org
+++ b/blog/index.org
@@ -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>@@
diff --git a/config/doom.org b/config/doom.org
index 5e77b70..1663afc 100644
--- a/config/doom.org
+++ b/config/doom.org
@@ -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
diff --git a/config/index.org b/config/index.org
index c4dbb12..dae9957 100644
--- a/config/index.org
+++ b/config/index.org
@@ -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>@@
diff --git a/config/qtile.org b/config/qtile.org
index 537bab5..6860043 100644
--- a/config/qtile.org
+++ b/config/qtile.org
@@ -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
diff --git a/index.org b/index.org
index 3d8f6b1..2b41f6e 100644
--- 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">
@@ -9,11 +10,10 @@
#+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
diff --git a/journal/20240124.org b/journal/20240124.org
index 1b10e38..d234bd7 100644
--- a/journal/20240124.org
+++ b/journal/20240124.org
@@ -10,8 +10,11 @@
** 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
index 0000000..10763b1
--- /dev/null
+++ b/journal/20240125.org
@@ -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.
diff --git a/journal/index.org b/journal/index.org
index 290f751..5322bb3 100644
--- a/journal/index.org
+++ b/journal/index.org
@@ -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>@@
diff --git a/mindmap/index.org b/mindmap/index.org
index 350a564..109ae12 100644
--- a/mindmap/index.org
+++ b/mindmap/index.org
@@ -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>@@
diff --git a/mindmap/inverse square.org b/mindmap/inverse square.org
index 132b322..3f980bf 100644
--- a/mindmap/inverse square.org
+++ b/mindmap/inverse square.org
@@ -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
diff --git a/mindmap/magnetostatics.org b/mindmap/magnetostatics.org
index ea763e7..dd9d172 100644
--- a/mindmap/magnetostatics.org
+++ b/mindmap/magnetostatics.org
@@ -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}}
diff --git a/style.css b/style.css
index 9d28237..1eb9175 100644
--- 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;
+ }
+}