Journal javascript: Difference between revisions
Line 37: | Line 37: | ||
It's hidden because it is in the next section of the wiki. | It's hidden because it is in the next section of the wiki. | ||
[http://moleski.net/mxm/journal-tutorial.mp4 Here is a video tutorial] showing how the system works. | |||
== * == | == * == |
Revision as of 14:11, 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.
Wednesday, 17 May
And now I have a new entry in my journal.
It's hidden because it is in the next section of the wiki.
Here is a video tutorial showing how the system works.
*