middleman: passing local data variables between layout and template

Middleman is a great tool for creating static websites. Recently I've been using it to redesign my own website and a scenario I encountered was wanting to pass variables between my layout and my template file. Specifically, I wanted to pass information local data (a yaml file) to my layout file. Here's how I went about doing this: # in your layout file (inside layout/ folder): <% myvar = yield_content :myvar %> # in your template file (e.g., mypage.html.erb): <% content_for :myvar, data.somefile %> # this examples assumes there's a somefile.yml in your data/…Read more …

django + less, updated

In a previous post, I described how I configured the hyperkitty django project to use LESS. Briefly, my steps were: - install django-compressor, django-less, nodejs, npm, and lessc - update settings.py with configuration settings for django-compressor and django-less - restart webserver However, it turns out some of those steps are a bit outdated. First, PyPI says that django-less is not maintained and suggests using django-static-precompiler instead. Second, while LESS suggests that the easiest way to install the compiler is via npm, it is just as easy to install the LESS compiler via nodejs-less.…Read more …

list overview: other potential features?

I'm wondering if there are other worthwhile personalization features that could be added to the list overview page? For example, I've added personalized groups of discussions (bookmarked discussions, discussion you've posted to), which contrasts with the general groups of discussions (most recent discussions, most active discussions, etc.). Could we do something similar with the section for list stats? Right now, there's only general list stats - overall posting frequencies and a leader board of the top posters. Would it be meaningful to add personalized stats? Some ideas I had for this might be:…Read more …

list overview: user scenarios

As described in my previous post, I've added a "personalized" section to the list overview page. This hasn't been implemented on the backend yet, but the intention is to provide extra details for users who have logged in. The difference is just an extra group of discussion threads at the top of the page: when you're not logged in: when you're logged in: I added this section based on typical day-to-day scenarios of interacting with a mailing list. Typical scenarios for sending messages include: 1) starting a new thread, 2) replying to a…Read more …

responsive design: list overview

Clicking on a list on the hyperkitty's landing page will lead to the list overview page. On this page you'll see list details, such as recent discussions, popular discussions, and list statistics. The original design for the page looks like this: However, two features that aren't captured in this design is the ability to reply to a recent discussion you've posted to, or bookmarking discussions so that you can easily refer back to them. Of course, it's certainly possible for you to use the search box to find the appropriate threads, but that's…Read more …