Journal javascript: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
:: | [[File:2017-05-17 8-13-16.png|thumb|300px]] | ||
[[File:2017-05-17 8-16-28.png|thumb|300px]] | |||
I have been keeping an occasional journal on my private wiki since the summer of 2013. | |||
Each year is one page. | |||
Each day is a secondary heading ("== day of the week, day of month, month =="). | |||
I got tired of doing the secondary headings by hand. | |||
So I cobbled together a little javascript. | |||
It puts today's date in the first heading of the page, as above. | |||
Today's date in the heading is a link. If I have made a journal entry today, the link will take me to the beginning of the entry. | |||
If I haven't made an entry today, then I click on the link marked by three asterisks: [[#*|***]] | |||
That link takes me to the bottom of the page, where my javascript has set up the markup I need to start an entry for the day. | |||
I mark and copy the markup. | |||
Then I click on the "[Edit]" link next to the asterisk. | |||
Then I go to the top of the edit window and paste the marked-up text to start the new section of the journal. | |||
As you can see from the second thumbnail, I like to keep some favorite prayers at the top of the page. If I scroll down to pray them, I don't want to have to scroll back up to find the link to the day's entry or the asterisk link. So I have those two links after the prayers. | |||
---- | ---- | ||
Line 7: | Line 33: | ||
== * == | == * == | ||
__NOTOC__ | |||
<html> | <html> | ||
<div id="skeleton"></div> | <div id="skeleton"></div> |
Revision as of 14:26, 17 May 2017


I have been keeping an occasional journal on my private wiki since the summer of 2013.
Each year is one page.
Each day is a secondary heading ("== day of the week, day of month, month ==").
I got tired of doing the secondary headings by hand.
So I cobbled together a little javascript.
It puts today's date in the first heading of the page, as above.
Today's date in the heading is a link. If I have made a journal entry today, the link will take me to the beginning of the entry.
If I haven't made an entry today, then I click on the link marked by three asterisks: ***
That link takes me to the bottom of the page, where my javascript has set up the markup I need to start an entry for the day.
I mark and copy the markup.
Then I click on the "[Edit]" link next to the asterisk.
Then I go to the top of the edit window and paste the marked-up text to start the new section of the journal.
As you can see from the second thumbnail, I like to keep some favorite prayers at the top of the page. If I scroll down to pray them, I don't want to have to scroll back up to find the link to the day's entry or the asterisk link. So I have those two links after the prayers.
*