2026-04-21-current-reads-columns

https://x.com/mtsmnds/status/2046535793968054647
https://www.threads.com/@mtsmnds/post/DXY-l9SDjWf?xmt=AQF0Dm--MGoG7kE4YW_PYatJxpz7EhP6aEYVv-wuTb9U4g

type: post-planning
id: 2026-04-21-current-reads-columns

final

1
after building the responsive header, i tried a bunch of ways to make the “current reads” column below it behave nicely -- nothing felt right. the best solution was to lean into a tiny bit of javascript. 🧶

2
i tried grid and flex, but they pushed me toward media queries, hard‑coding widths, or nesting extra divs and classes to get something similar. in the end a small js helper felt like the best trade‑off.

3
since i’m writing the site by hand (or verifying ai’s attempts), i want the code to be easy to read and easy to test. compartmentalizing this in a small, isolated js script feels right for now -- grid or flex here added constraints and code size i wasn’t interested in.

4
now the header literally dictates the width of the column below it on load + resize. this better represents the feeling of laying things out on paper.

For v2, I want the left column text to reflow and occupy the full width when the layout collapses from two columns to a single column.

draft

i wnat to continue posting from here, but i'm not satisfied with my plans yet.

for my next post i want to mention that no css method was satisfying me for responsiveness so i went with a small js code that sizes the next column based on the title size.

grid and flex had their limitations and i didn't want to use media queries, i guess in this project i expect the code to be simple and self explanatory in a way, like writting on paper, so the header title dictates the column width and the css is clear and linear from the first lines. does that make sense?

here is the js script just fiy:
``js
// set left column width based on title width
function setWidthFromSource() {
const sourceElement = document.getElementById('title');
const targetElement = document.getElementById('left-column');

    if (sourceElement && targetElement) {
        // Get the rendered width of the source element
        const width = sourceElement.offsetWidth;

        // Set the width of the target element
        targetElement.style.width = width + 'px';

        console.log('Width set to:', width + 'px');
    } else {
        console.error('Source or target element not found');
    }
}

// Call the function when the page loads
window.addEventListener('load', setWidthFromSource);

// Optional: Call again on window resize to handle responsive changes
window.addEventListener('resize', setWidthFromSource);

another thing since i'm writing by hand (and verifying ai work) is that i want the css to be easily testable, so i placed paddings in each section instead of on the body. a lot of the css ai attempts disrespected the tokens so using the most of the tokens i've set earlier led to very clean css classes here. 

here is the css for the section and left column:
```css
/* [!] section - at glance */

  .at-glance-box-padding {
    padding: 6ch var(--space-md) 0;
  }

  .at-glance-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 6ch;
    /* align-items: flex-start; */
  }

  .at-glance-list {
    padding-left: 3ch;
    list-style-position: outside;
    word-break:break-all;
    hyphens:auto;
  }
  .at-glance-list li::marker {
    content: "❁ ";
    font-size: 1.5rem;
    line-height: 0.75rem;
  }

  .at-glance-metrics {
    flex: 1 1 52ch;     /* grow yes, shrink yes, size defined */
    max-width: 91ch;
  }

something i had to do by hand was the padding for the column, since working with display letters starts to show an evident white space in the box of the type (you can replace my words for the correct typography words here) so i added a padding to visualy align the text on the column (.at-glance-list) with the start of the first letter in ther header. this feels like adding iron spaces when building a page for the printing press.

this column starts the most important part of this page, that is showing my db is up to date with me, listing the books i'm currently reading and plan to read.

code of the column, with jinja2 placeholders:

<section class="at-glance-box-padding at-glance-flex"> 

  <!-- planned reads -->
  <div id="left-column" style="padding-left: 1ch;">
  <!-- id for js to set width -->
  <!-- padding for visual correction offset of title lettering -->
  <p>currently:</p>

  <ul class="at-glance-list">
        {% for book in data.currentReads %}
        <li>
          <a href="{{ book.path }}">{{ book.title }}</a> &mdash; 
          {% if book.author_path %}
          <a href="{{ book.author_path }}">{{ book.author }}</a>
          {% else %}
          <span>{{ book.author }}</span>
          {% endif %}
        </li>
        {% else %}
        <li style="list-style: none; margin-left: -1rem;">Nothing right now.</li>
        {% endfor %}

  </ul>

  <p><br>next:</p>

  <ul class="at-glance-list">
  {% for book in data.upNext %}
  <li>
    <a href="{{ book.path }}">{{ book.title }}</a> &mdash; 
    {% if book.author_path %}
    <a href="{{ book.author_path }}">{{ book.author }}</a>
    {% else %}
    <span>{{ book.author }}</span>
    {% endif %}
  </li>
  {% else %}
  <li style="list-style: none; margin-left: -1rem;">Nothing lined up.</li>
  {% endfor %}
  </ul>
  </div>

Outgoing Links / Edges

Backlinks


← Back to Index