AdaptiveThemes Blog

Adaptivetheme Responsive Layouts - Quickfire Video Intro

Adaptivetheme 7.x-2.x includes a new layout engine that drives both responsive and adaptive layouts using media queries. We've made it super easy to configure layouts for standard desktops and laptops, and tablet and smartphone size screens. This video features Pixture Reloaded, an Adaptivetheme subtheme available for free download on Drupal.org and shows off the layout settings and a brief run down on how it all works.

Responsive & Adaptive Layouts in Adaptivetheme 7.x-2.x - the new cool

In short I have re-written the way layouts work in Adaptivetheme to support mobile, tablet and standard screens.

Adaptivetheme 7.x-2.x uses media queries combined with a more flexible approach to setting values for the sidebars, page width, max width (for responsive layouts), and you can customize the media query - all in the theme settings.

Drupal 8 Design Initiative

Way back in September 2010 I launched the Design 4 Drupal Core (D4DC) project - the initial goal was to define a better process for adding new themes to Drupal core. This grew out of the Drupal 7 process which was essentially a code race between Bartik and Corolla. It was clear to me this process could be improved. In the commercial world we always select the design first (as opposed to an entire theme), so I started making the argument that any new core theme would have to be selected based on the design - then coded into theme.

HTML5 Placeholder text for your Drupal 7 Search Field

HTML5 has a bunch of new form attributes and one of these can neatly add placeholder text to text inputs, such as your search input field. This text will be removed when the search field is focused, so in effect acts like ye ole JS solutions we've all been using for eons.

Browser support for placeholder looks pretty good, I have it working in Opera 11 and FF4. It should be widely supported in all the next generation browsers.

Are blocks section or div, an HTML5 conumdrum

This debate is going to rear its head in the Drupal community sooner rather than later because right now we're seriously thinking about HTML5 for Drupal 8, and because many new HTML5 themes are springing up.

The issue is that <section> elements must have a heading, that is an <h*> element. If they don't have a heading then technically they're not a section. This is problematic for Drupal blocks because headings are optional, even end users can toggle the display of the block heading.

Using HTML5 figure & figcaption elements to markup Image fields in Drupal 7

I've been reading up about the figure and figcaption elements for HTML5 over at the HTML5 Doctor and other places and thought I'd use these new elements to create captioned images in Drupal 7.

This is actually so easy its not funny, in fact you only need to make one configuration change to your image field and add one template override and you're done.

First - edit your image field settings and check the option to Enable Title field. We're going to re-use the title field to add our captions.

Typography Rough Guildelines

  1. Either serif or sans-serif fonts are fine for body copy and headings, but sans-serif fonts are still more popular for both.
  2. Common choices for headlines are Georgia, Arial and Helvetica.
  3. Common choices for body copy are Georgia, Arial, Verdana and Lucida Grande.
  4. The most popular font size for headings is a range between 18 and 29 pixels.
  5. The most popular font size for body copy is a range between 12 and 14 pixels.
  6. Header font size ÷ Body copy font size = 1.96.

Twitter style Login box for Drupal

In this tutorial I'll show just how easy it is to do a Twitter style drop-down login form in Drupal 6 (probably just as easy if not identical in Drupal 5 and 7). If you don't know what this looks like these days you better get over to http://twitter.com/ and scope it out so you know that I'm on about - see the link in the top right corner...

Requirements

* We're gonna cheat and use the LoginToboggan module
* Moderate CSS skills

Login Toboggan

* Download and install the module

How to theme the User Login page in Maintenance Mode

A recent client wanted to remove everything from the user login page when the site was in maintenance (or Site off-line as its referred to in most system messages and documentation). Just showing the user login form when the site is off-line actually makes a lot of sense because whats the point of showing things like primary links, search block or whatever else might show on your normal user login page.

Using CSS clip as an Accessible Method of Hiding Content

Its relatively easy to hide content in Drupal using CSS, however its a whole different ball game to hide content and keep it accessible to all site visitors. Disabled web users may be using a screen reader or other Assistive Technology. For Drupal 7 we wanted a way to hide content that worked in all browsers and avoided many of the issues associated with current techniques.

100 Percent width Header and Footer Backgrounds in Adaptivetheme

I've been asked a few times by Drupal themers and designers how to do 100% header and footer backgrounds in Adaptivetheme—and retain the theme settings so end users can still adjust the overall page width. Actually this is pretty easy - its just a matter of adding a couple of wrapper DIV's in the right places and overriding the layout variables that Adaptivetheme uses to set the width.

First we wrap the various page elements in a set of wrapper DIV's. The new .container DIV will be full width and the .container-width wrapper will set the width - see the PHP snippet below.

Pages