• Back to building some base infrastructure again. This time for adding / deleting syndication urls. Deleting is simple enough – it's just a (hidden) checkbox with a small stimulus controller setup to toggle its label text between "Remove" and "Undo".

    Adding a secondary form also works. I output an empty formset form into my template then use a small action to copy it, replace the id and update the management form, 5 lines of code, half of which is variable definitions.

    My goal is to be able to reuse this whenever I need to add multiple related records to a post without any modifications.
  • Response to Colin Walker - Mar 17, 2021

    in Yokohama, Kanagawa Prefecture, Japan
    It's a little bittersweet β€” on the one hand it feels good as I know that I have a new solution but, on the other, it feels a little sad that the fruits of so much time and effort are now redundant.
    I feel this when I improve implementations all the time. Code reflects our best understanding of a given problem to a given solution at a given time. Requirements changing naturally means that the problem has also changed.

    When writing code I try to remind myself that all is temporary and will be deleted or rewritten at some point, so I best not grow too fond of it.
  • Creating a slick checkin experience is out of the scope of a personal website, so you'll need to use Swarm (or such) to checkin and backfeed them into Tanzawa. However, I often find myself wanting to expand that check into a proper blog post – to tell a story about what happened. So you should be able to edit a checkin on your blog.

    The edit checkin page is the same all other edit pages, except it has two fields at the top: Where did you go? and What's its url?

    Extra fields on checkin posts


    I also started working on being able to add syndication urls to posts. I've already added support via micropub to save syndication urls. This lets you add / remove them for non-micropub posts.

    Syndication urls

    When you can eventually set your identities on other sites in Tanzawa, it might be fun to customize the placeholder text. For example you could get it to use your username or randomly use different sites e.g. twitter on the first load, flickr on the second load etc...
  • Response to jlelse's Blog

    I just took a quick look at my server logs. And I see that there are some bots that are constantly crawling my site. If that would be search engines, feed readers etc. that wouldn’t be a problem. But this are crawlers by companies whose websites try to se
    I wonder if there isn't a list of these cralwers out there that you could then automatically block at the nginx/apache level. Even handling it at the app server level would discourage them from crawling your site too much.
  • Just a small update today – posts made with micropub respect the published datetime and I'm saving /showing syndication urls. I still need a proper interface for both of these in the admin. This is what syndication links will look like in a post.

    Syndication links now appear in the post meta
  • With support for locations finished, I was able to add support for checkins in a couple of hours this morning. You can only post a checkin via micropub, but you can edit them like any other post locally.

    There's three remaining "tidbits" to be completed before I can mark location/checkin support is complete:Β  use the sent published date time in the micropub request as the posts' published datetime, store/display the syndication urls in the post meta, and confirm microformat my location data. This is what they look like – checkin is from January 2nd :-)

    An example checkin post with a photo
  • Weekly Roundup #1

    in Yokohama, Kanagawa Prefecture, Japan
    Along with my regular status posts, I'm going to try to make a weekly roundup post for Tanzawa. As this is more of an experiment at this time,Β  I'm putting them in the "Articles",Β  but I may add a weekly stream just for these posts.

    Locations


    I build and launched the ability to associate a location with an entry. Initially I had planned on limiting locations to check ins and statuses, but decided against building in an artificial limitation.

    Location support is baked into the Tanzawa micropub endpoint as well as the RSS feeds. Posts that have a location associated with them will display the location after the author's name in the posts' byline. RSS feeds will append the location name ( or coordinates where there isn't an address) to the end of the post.

    A status post in Tanzawa


    Layout Cleanup


    While adding the map to the public post views, I also I did some cleanup. I had originally planned on having a 3 column layout for Tanzawa: left navigation, middle content, right meta. But having it split into 3 columns felt unnatural. I removed the meta-data from the third column, though it still exists.

    I also cleaned up the footer so it's stuck of the page without extending the view port beyond the natural max. Practically speaking it means that you'd always get a scrollbar even if the content length didn't warrant it. Ironic given that the footer text reads "Made with care". This text is also now styled to reduce emphasis.

    Posts that belong to multiple streams will have their streams highlighted on the left. There's also a new "Home" link that takes you to the top of the site.

    Misc Issues


    The CSS and Javascript required to run Tanzawa is now getting sufficiently complex where I should look into a proper deploy solution. My main server is the smallest droplet available at Digital Ocean, and 1GB of memory just isn't enough to run postcss when I made a lot of template changes without causing the server to swap and basically bring it down until the build completes.

    The CSS and Javascript build processes are currently separate commands run with npm. CSS (tailwind) is controlled by postcss, while Javascript is controlled with webpack. I need to integrate the css build into webpack. Doing so would allow me to reduce the number of commands run on each deploy and create unique filenames for each build. Saving each filename as a hash would allow me to never worry about caching old assets.
  • Working a bit on how to integrate location information into a post. Right now I've got the location name appearing in the byline. Some day, I imagine this will be a link to search page that'll show you all posts within a given radius of that area.

    Initially I had planned to have the map display on the right hand side of the post, in the "meta" column. But that felt like it's separate from the post. Moving down into the footer and increasing it's size a bit has helped it feel a bit more "at home".

    Integrating location into detail page
  • Sorted how locations will display on a post publicly today. I really like the automatic zoom as your mouse gets closer to the center.

    Zoom animation
  • I've settled in on the final mapping UI for Tanzawa and I'm super pleased with how it's turned out.

    I realized that because addresses vary so much by country displaying ta full street address as you'd expect to see them on a letter is a) a huge problem all unto itself and b)Β  far too much information to display.

    Instead I opted to show the information that you really care about: city / state (prefecture), and country. It updates whenever your marker moves. The reset button lets your location to the initial value, allowing you to undo miss-clicks. The remove button lets you remove a location from a post entirely.

    I also no longer set an initial marker in the map and zoomed out by about half. It's still centered on the Tanzawa mountains by default.

    Selecting a location for a post in Tanzawa
Previous 3 of 30 Next