Front-end education for the real world. Since 2018.





A new article layout and better options for advertisers

Andy Bell

Topic: Announcements

The big pull requests keep on landing here at Piccalilli. This time, it’s our article view that has had a thorough re-work.

The old piccalilli article view with a massive hero unit that has a bright yellow background. There's an easy to miss banner at the bottom. The article layout is two column: article on the left and a sidebar on the right.

Our old layout

The old article view was nice, sure, but it let us down in the following ways:

  1. All the author info was at the top at larger viewports
  2. Advertising was easy to miss (as reported by our readers in the survey)
  3. Content pushed out to the left was slightly awkward to read

We feel like we’ve fixed all of that with our new layout.

The hero is much simpler: just a headline and because of that, the now yellow advertising banner is much easier to see. The article is now in a reasonably narrow, center-aligned container.

Our fancy new layout

This re-work is something that’s been on our radar almost immediately after we launched the redesign last year. It became even more prescient after we redesigned The Index this year, featuring a central content column for issue posts.

We just wanted to give ourselves time to do it right because this article view covers articles, links and courses. That’s most of the content on the site!

Leveraging CSS grid and named areaspermalink

We’ve got a new five column grid layout now that allows a nice narrow(ish) column for prose and four columns for to enable content like code samples and images bleed out.

The article view with Chrome dev tools open. The grid view is enabled, showing the five column grid

Code language
css

.master-grid > p:has(img) {
  grid-column: popout;
}

Named areas make it so much easier to scan the CSS in the long-term. The semantic names make the code really descriptive.

A video is full bleed demonstrated by prose content following it, in a much narrower context

This system allows us to give elements that need as much space as possible the space they need, such as mid-article videos like this one from Complete CSS.

Code language
css

.master-grid .video-player {
  grid-column: full-width;
}

Syntax highlighting and a new mono fontpermalink

One of the most common pieces of feedback we got was about our overly-subtle syntax highlighting in code blocks. We’ve rolled out a custom theme to fix that along with Moderat Mono as our new mono font.

CSS looks better.

Code language
css

footer {
  position: sticky;
  bottom: 0;
  left: 0;
  z-index: 0;
}

As does JavaScript.

Code language
js

// Finds all buttons and attaches a click event to our handler
assignEvents() {
  const buttons = this.querySelectorAll('button');

  if (buttons.length) {
    buttons.forEach((button) =>
      button.addEventListener('click', (event) => this.handleClick(event)),
    );
  }
}

And of course, HTML.

Code language
html

<share-actions>
  <p>Copy this link to share with your friends.</p>
  <p>
    <code><https://example.com></code>
  </p>
</share-actions>

We have much better options for advertisers nowpermalink

As I’ve written on my blog, we’re pushing to run Piccalilli full time. To help make that happen, we’ve taken very careful steps to give advertisers better options and maintain a priority with the reading experience for our treasured readers.

Better banner ads

The top of the "A (more) modern reset article" showing a bright yellow banner that features text, a black button and rotated "advert" text

Banner ads got lost in the hero unit before, but now, they stand out a heck of a lot more. Companies can book exclusive coverage across all articles and links on a monthly basis.

More info and bookings

Closing graphic ads

A closing graphical ad, advertising Complete CSS

One of our most requested features from advertisers was being able to communicate their brand, visually. They can now with closing graphic ads! Again, companies can book exclusive coverage across all articles and links on a monthly basis.

More info and bookings

Optional graphics on newsletter sponsor slots

A newsletter sponsor slot which is a grey box, a pink themed graphical ad and prose content, plugging Mindful Design

Lastly, newsletter sponsors can supply a graphic for their exclusive sponsor slots. For both closing graphic ads and newsletter slots, our studio can be commissioned to create assets that work really well too.

More info and bookings

Wrapping uppermalink

We hope you like the changes! This has been a heck of a lot of work 😅

Articles are much better looking and easier to read, so we’re really happy with how it’s turned out. If you’re a company looking to advertise, our new advertising page has all the info and booking links for you.

Enjoyed this article? You can support us by leaving a tip via Open Collective


Newsletter