aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--docs/index.html17
-rw-r--r--docs/style.css6
-rwxr-xr-xgenerate.sh4
-rw-r--r--script/gotoId.js6
-rw-r--r--script/showPost.js1
5 files changed, 22 insertions, 12 deletions
diff --git a/docs/index.html b/docs/index.html
index c087a9b..e1cf5ca 100644
--- a/docs/index.html
+++ b/docs/index.html
@@ -14,6 +14,12 @@
14<title>n</title> 14<title>n</title>
15 15
16<script> 16<script>
17function gotoId() {
18 if ( window.location.hash ) {
19 let hash = window.location.hash.substring(1);
20 showPost(hash);
21 }
22}
17function showPost(id) { 23function showPost(id) {
18 let post = document.getElementById(id); 24 let post = document.getElementById(id);
19 if (post.style.display == "none") { 25 if (post.style.display == "none") {
@@ -22,10 +28,9 @@ function showPost(id) {
22 post.style.display = "none"; 28 post.style.display = "none";
23 } 29 }
24} 30}
25
26</script> </head> 31</script> </head>
27 32
28<body> 33<body onload="gotoId()">
29<h1 class="heading">n</h1> 34<h1 class="heading">n</h1>
30 35
31 36
@@ -34,7 +39,7 @@ function showPost(id) {
34 39
35 <div class="post"> 40 <div class="post">
36 <div class="date">02/08 2019</div> 41 <div class="date">02/08 2019</div>
37 <a id="post-onivim_sucks.md" href="#post-onivim_sucks.md" class="post-link" onClick="showPost('onivim_sucks.md')">Onivim Sucks</a> 42 <a id="post-onivim_sucks.md" href="#onivim_sucks.md" class="post-link" onClick="showPost('onivim_sucks.md')" >Onivim Sucks</a>
38 <div id="onivim_sucks.md" class="post-text" style="display: none"> 43 <div id="onivim_sucks.md" class="post-text" style="display: none">
39 <p><a href="https://v2.onivim.io">Onivim</a> is a &#8216;modern modal editor&#8217;, combining fancy 44 <p><a href="https://v2.onivim.io">Onivim</a> is a &#8216;modern modal editor&#8217;, combining fancy
40interface and language features with vim-style modal editing. What&#8217;s wrong you 45interface and language features with vim-style modal editing. What&#8217;s wrong you
@@ -64,7 +69,7 @@ final price! If you are on the lookout for an editor, I would suggest using
64 69
65 <div class="post"> 70 <div class="post">
66 <div class="date">31/07 2019</div> 71 <div class="date">31/07 2019</div>
67 <a id="post-bash_harder_with_vim.md" href="#post-bash_harder_with_vim.md" class="post-link" onClick="showPost('bash_harder_with_vim.md')">Bash Harder With Vim</a> 72 <a id="post-bash_harder_with_vim.md" href="#bash_harder_with_vim.md" class="post-link" onClick="showPost('bash_harder_with_vim.md')" >Bash Harder With Vim</a>
68 <div id="bash_harder_with_vim.md" class="post-text" style="display: none"> 73 <div id="bash_harder_with_vim.md" class="post-text" style="display: none">
69 <p>Bash is tricky, don&#8217;t let your editor get in your way. Here&#8217;s a couple of neat 74 <p>Bash is tricky, don&#8217;t let your editor get in your way. Here&#8217;s a couple of neat
70additions you could make to your <code>vimrc</code> for a better shell programming 75additions you could make to your <code>vimrc</code> for a better shell programming
@@ -131,7 +136,7 @@ Press ENTER or type command to continue
131 136
132 <div class="post"> 137 <div class="post">
133 <div class="date">30/07 2019</div> 138 <div class="date">30/07 2019</div>
134 <a id="post-hold_position!.md" href="#post-hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')">Hold Position!</a> 139 <a id="post-hold_position!.md" href="#hold_position!.md" class="post-link" onClick="showPost('hold_position!.md')" >Hold Position!</a>
135 <div id="hold_position!.md" class="post-text" style="display: none"> 140 <div id="hold_position!.md" class="post-text" style="display: none">
136 <p>Often times, when I run a vim command that makes &#8220;big&#8221; changes to a file (a 141 <p>Often times, when I run a vim command that makes &#8220;big&#8221; changes to a file (a
137macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p> 142macro or a <code>:vimgrep</code> command) I lose my original position and feel disoriented.</p>
@@ -161,7 +166,7 @@ heavier filtering.</p>
161 166
162 <div class="post"> 167 <div class="post">
163 <div class="date">30/07 2019</div> 168 <div class="date">30/07 2019</div>
164 <a id="post-get_better_at_yanking_and_putting_in_vim.md" href="#post-get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')">Get Better At Yanking And Putting In Vim</a> 169 <a id="post-get_better_at_yanking_and_putting_in_vim.md" href="#get_better_at_yanking_and_putting_in_vim.md" class="post-link" onClick="showPost('get_better_at_yanking_and_putting_in_vim.md')" >Get Better At Yanking And Putting In Vim</a>
165 <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none"> 170 <div id="get_better_at_yanking_and_putting_in_vim.md" class="post-text" style="display: none">
166 <ol> 171 <ol>
167<li><p>reselecting previously selected text (i use this to fix botched selections):</p> 172<li><p>reselecting previously selected text (i use this to fix botched selections):</p>
diff --git a/docs/style.css b/docs/style.css
index 2198b75..2b4815d 100644
--- a/docs/style.css
+++ b/docs/style.css
@@ -25,7 +25,7 @@ body {
25} 25}
26 26
27html { 27html {
28 font-size: 18px; 28 font-size: 22px;
29} 29}
30 30
31.posts { 31.posts {
@@ -35,7 +35,7 @@ html {
35/* mobile devices */ 35/* mobile devices */
36@media only screen and (max-width: 70em) { 36@media only screen and (max-width: 70em) {
37 .posts { 37 .posts {
38 width: 92%; 38 width: 96%;
39 } 39 }
40} 40}
41 41
@@ -111,7 +111,7 @@ a:hover, a:active {
111} 111}
112 112
113.post-text { 113.post-text {
114 font-size: 0.8rem; 114 font-size: 0.9rem;
115} 115}
116 116
117pre, code { 117pre, code {
diff --git a/generate.sh b/generate.sh
index 94b4928..765accf 100755
--- a/generate.sh
+++ b/generate.sh
@@ -14,7 +14,7 @@ post_wrapper() {
14 echo -ne " 14 echo -ne "
15 <div class=\"post\"> 15 <div class=\"post\">
16 <div class=\"date\">$3</div> 16 <div class=\"date\">$3</div>
17 <a id=\"post-$1\" href=\"#post-$1\" class=\"post-link\" onClick=\"showPost('$1')\">$title</a> 17 <a id=\"post-$1\" href=\"#$1\" class=\"post-link\" onClick=\"showPost('$1')\" >$title</a>
18 <div id=\"$1\" class=\"post-text\" style=\"display: none\"> 18 <div id=\"$1\" class=\"post-text\" style=\"display: none\">
19 $2 19 $2
20 <a href=\"#$1\" class=\"post-end-link\" onClick=\"showPost('$1')\">↑ Collapse</a> 20 <a href=\"#$1\" class=\"post-end-link\" onClick=\"showPost('$1')\">↑ Collapse</a>
@@ -49,7 +49,7 @@ echo '</script> </head>' >> docs/index.html
49 49
50# body 50# body
51echo " 51echo "
52<body> 52<body onload=\"gotoId()\">
53<h1 class=\"heading\">n</h1> 53<h1 class=\"heading\">n</h1>
54" >> docs/index.html 54" >> docs/index.html
55 55
diff --git a/script/gotoId.js b/script/gotoId.js
new file mode 100644
index 0000000..991bf1d
--- /dev/null
+++ b/script/gotoId.js
@@ -0,0 +1,6 @@
1function gotoId() {
2 if ( window.location.hash ) {
3 let hash = window.location.hash.substring(1);
4 showPost(hash);
5 }
6}
diff --git a/script/showPost.js b/script/showPost.js
index 07a9719..75ffa1c 100644
--- a/script/showPost.js
+++ b/script/showPost.js
@@ -6,4 +6,3 @@ function showPost(id) {
6 post.style.display = "none"; 6 post.style.display = "none";
7 } 7 }
8} 8}
9