How we built the Imagine 2015 site

Domenic Santangelo
10 min readFeb 26, 2015

Disclaimer: I am a Magento/eBay employee, but the thoughts below are my own. Logos and company names are incidental and do not imply sponsorship, endorsement of, or agreement with this article, the Imagine conference, Magento, or any other eBay business unit. For a current list of Imagine sponsors, visit the official Imagine 2015 site.

Imagine is Magento and eBay Enterprise’s premier eCommerce event held every year in Las Vegas. It’s an incredible event that many eCommerce merchants, consultants and developers look forward to year after year. At Imagine, people network with merchants, partners, developers, digital industry experts, and open source enthusiasts. We put a great deal of time and effort into making Imagine a spectacular and useful event, and an event of this magnitude needs a website to match.

The Imagine site is where attendees and prospective attendees go to get excited. It’s where we show off who’s speaking this year (last year Malcolm Gladwell was the Keynote speaker), who the sponsors are, and what companies were represented last year. Naturally you can sign up for email updates and buy your tickets from the site as well.

Business needs

Obviously we begun by determining the business needs for the Imagine site. I’m not going to go too deep into this part except to say that adding content ad-hoc had been a major pain point in years past. Since Imagine is an event, site content changes at a moment’s notice — new speakers are confirmed, new sponsors sign contracts, agenda items are finalized. Our solution has to support the fast-moving nature of an event of this nature. Our previous sites (<= Imagine 2014) had been built on WordPress, which is a fine selection, but it happened to be that it was built so quickly that not a lot of effort had been put into future-proofing content management.

“The ability for the non-technical Imagine team to make changes to the content of the live site was the primary goal.”

On a practical level, that meant that some content changes were simple for the Imagine team to do in the WordPress backend, while others required a developer to write HTML, or worse, make a code change and push it live. More than any other requirement, the ability for the non-technical Imagine team to make changes to the content of the live site was the primary goal.

Tech stack

We decided on Drupal as the CMS pretty early on. We had recently finished replatforming Magento’s main website to Drupal with great success and were eager to build on that momentum. Of course the CMS is only a part of the larger landscape; in the process of building the site, we used all the following tools:

Design review

During the site redesign, the engineering and design teams discovered something wonderful: if these two teams work together rather than in silos, we all build faster and the final product is 1,000x more awesome. So we continued our methodology of having regular design review checkins, where engineering could ask questions, provide “doability” estimates, and give feedback.

An early design for the Imagine 2015 site.

For engineering, that meant we could strategize as a team as to how we thought we’d build the site out. The design above, for example, made us realize early on in the process that we’d want to use SVGs and other retina-ready graphics as much as possible. It also revealed some obvious mobile-friendly responsive moves we could make.

Final design comp for the home page

It was also interesting to see where engineering and design agreed without prior knowledge — pretty much everyone who saw the transparent fins around the circular cutout in the final design had the same thought of, “dude, those HAVE to rotate like a targeting reticle in Halo!”

Our design team took it a step further and actually created working mockups for how they envisioned the site working on mobile devices. This gave engineering crucial context around how to best build the templates from the ground up, keeping mobile in mind.

Once the design was finalized and approved, it was up to us to do the fun part (well, what engineers think is the fun part, at least): taking a bunch of Photoshop files and turning them into a real website.

Drupal methodology

Building a new site is fun, but Imagine 2015 was a little more than a new site. We had to take the following conditions into account:

  • The pre-existing “Save the Date” site was being used for content entry (sponsors in particular). We can’t start from scratch and blow out that content.
  • A team of 3 engineers will be doing major construction, including database schema changes. They need to integrate their changes with each other.
  • We’ll be doing massive rebuilds of the theme layer (including an upgrade from Bootstrap 2 → Bootstrap 3), while preserving all content.

The best way to satisfy these conditions in Drupal is what I call the “Update hook + Features + CI” method. It’s a method I’ve used since the early days of Drupal 5 and it goes like this:

  1. Give yourself a baseline of the current Prod DB and code.
  2. Create a module that contains utility functions (a function to revert features, to install modules, to modify values in database tables, etc).
  3. (optional) Create a Feature for a related set of changes.
  4. Codify your changes (or enable your Feature) in update hooks that live in that utility module from step 2.
An example of step 4 in the “update hook + Features + CI” method. This code is enabling a Feature that modifies the site’s main menu.

As a simple example, let’s say you’re adding a new content type. You can export that content type as a Feature, and then add an update hook that enables that Feature. So when you deploy your code and run update.php, that new content type is automatically installed.

Practically speaking, this means that all your changes, no matter how simple or complex, will automatically take shape when your code is deployed. We continually run these hooks against a snapshot of production in our CI environment, so we know exactly what to expect when our code is deployed.

Update hooks + CI + Slack == winning

Slack integration means we know what’s up with development 24/7

The best part about our CI setup is all the integrations. Github Enterprise tells Jenkins when there’s code to build, Jenkins talks to the servers and pulls down code, and then we get notified in Slack when there’s something new to look at, complete with a link to the dev environment. It is absolutely worth its own blog post, and if you’re not doing it yet I encourage you to explore it.

Building an incredible front page in Drupal

For our initial launch, the front page was by far the most complex single page on the site. One of the key business needs however was that it be super simple to manage the content. We did this by creating the Front Page as its own content type, and using a variety of Drupal modules to make the sections very clear and easy to manage:

Mapping content type fields to front page sections

Some of the sections of that page are built with fields right in the content type, and others (like Sponsors and Speakers) are built by embedding Views into the node.

Some of the more interesting modules we used on the front page are:

  • field_group — to create the vertically tabbed interface you see there on the edit page
  • field_collection (and its brother field_collection_deploy) — to create “add more”-able groups of fields. This is really useful for carousels which may have several fields (background image, copy, call to action…) per slide, and an arbitrary number of slides per carousel.
Field groups + Field collections for ultimate content control
  • viewfield—to drop Views directly in the node with no special embedding code needed
Drop a view in your node with viewfield

Responsive design

Using Bootstrap 3 gave us a huge leg-up in implementing responsive design. Since our design team provided mockups, we were able to theme the front page fields with mobile in mind. Go ahead, open the site on your phone or tablet!

SVG stands for “Something Very Good”

Ok, it actually means Scalable Vector Graphics. On a high-dpi screen, non-photo graphic assets tend to look chunky and not-so-great, so we knew right away that we wanted to use SVGs for elements where it makes sense.

Wynn Las Vegas logo in SVG (left) and PNG (right) as displayed on a hi-dpi screen

We use a slightly customized version of SVGeezy on the site to detect browser support. The cool thing about SVGeezy is that it will automatically swap in your fallback images if the browser lacks SVG support, and we hacked SVGeezy to add a `no-svg` class to the body in that case. You can see what the site looks like on a non-SVG browser by adding `?nosvg` to any URL on the site like this: (that was our other hack).

The other way-cool thing we did was animate some portions of the header.

Trust me, this looks way better on the actual site.

Pretty much everyone agreed that the “fins” in the design needed to animate, because what looks cooler than that? But there were some major hurdles to getting this working correctly. Aside from just getting the elements animated in the first place, we had to worry about what it looked like on all kinds of devices on different platforms, what happens on mobile, and so forth. The simple answer would be to render a video, but there are a couple problems with that: 1) the fins actually overlap the following “Agenda” section, 2) a video that looks good with that much detail and motion will be HUGE, and 3) the team wanted the option to swap out background pictures ad-hoc. The answer in my mind was to build an animated SVG and overlay it on top of the slideshow behind.

Drawing things out helps sometimes.

To further complicate matters, the slideshow images needed to be full cover, which is impossible with <img> tags — they have to be background images. Of course you can’t fade background images in and out, so there had to be multiple divs, absolutely positioned, that held only background images, and a little javascript magic to swap between them smoothly.

Next the fun part, the SVG overlay. The SVG on the front page actually embeds the orange PNG, then draws the fins. The animation itself is pretty straightforward once you calculate the rotation point (the center of the circle cutout). Our designers generated the SVG for me, then I grouped the fins and gave each group a different transform value (clockwise, counterclockwise, slower, faster) to add visual interest.

I put the SVG in an absolutely positioned div to take it out of the document flow, then sized it correctly so it would fill up the hero section and still overlap the Agenda section. I messed with Z-index so that it was behind the hero text, but above the Agenda section. So far so good.

And then I opened the page in Safari and Firefox.

Firefox was spinning my CPU off the charts and Safari didn’t show the PNG that was linked in the SVG at all. I’m going to get right to the solution and give you the benefit of my hours of debugging — if you want an animated SVG to work everywhere:

  1. Remove all the header junk that Illustrator adds to the top of the SVG file (Safari and FF choke on it),
  2. Get the SVG as close to your final on-screen size as possible (FF takes a huge performance hit while scaling), and
  3. Embed the SVG directly in the page. Don’t use <img> or make it a background in your CSS, just dump all the code right there in the page. It solves all sorts of problems.

Ultimately Firefox is just slow with SVG animations, it’s a known issue; see here and here. I think we squeezed out as much as we could using native tools (vs. a toolkit like Greensock).

Internet Explorer of course was another issue, but thankfully someone else did the work for us with the wonderful FakeSmile library. We dropped that in and boom, animations in IE, too!

There’s always more

Soon, I’ll write up how we built the Agenda section. It hasn’t launched yet, but we’ve got some great tips and tricks to share with you once it goes live! Thanks for reading, and I hope you come back for part 2.