Style Guide & Component Library

When we redesigned the W&&T website, we refreshed the overall look and feel and also recreated the website architecture to make it easy to maintain and add new content. The goal was to keep the codebase as straightforward as possible, so all team members could add content without specialized or extensive development experience. We decided to follow a component based approach to be able to mix and match page elements to create different yet consistent page layouts.

Templates

Refer to the sections below for specific content module examples and code snippets.

Themes

Select a button to view the theme colors.

Theme changes include:

  • page background
  • link, :hover and :focus colors

Theme color classes are added to the <body> tag using one of five theme color codes.

<body class="theme-coral">

In the live website files, themes are added using PHP variables. Refer to the static site documentation for more info.

Headers & Footers

These modules can be used at the beginning or end of a page or interview template.

The global header and footer content are included in the base template and does not need to be added when creating a new page. Refer to the static site documentation for more info about using templates and adding content.

Secondary Header

The secondary header is used for pages that require introductory information before the main content.

<header class="no-border header-secondary">
  <h2>We’re not endorsing the obvious. We’re commending the awesome.</h2>
  <p>Our industry is filled with <a href="#">smart, interesting women</a> including developers, designers, entrepreneurs, and tech leaders. These women are a big deal, and we think you should know about them. We highlight them not for their gender, but because they are awesome by any kind of measure.</p>
</header>

We're not endorsing the obvious. We're commending the awesome.

Our industry is filled with smart, interesting women including developers, designers, entrepreneurs, and tech leaders. These women are a big deal, and we think you should know about them. We highlight them not for their gender, but because they are awesome by any kind of measure.

Interview Header

This header is used at the beginning of all interviews. This code snippet is for reference only and is already included in the interview/template.php file in the static-site repo.

PHP variables are used to customize the template to update the author name and social media information. Use this template when adding new interviews and follow the customization instructions included in the file.

If you need to add additional information in the header, use the "italic" class, shown in the example, after the intro paragraph.

<header class="border header-interview">
  <div class="wrapper-sm">
    <h2>Interviewee Name</h2>
    <p class="intro">Intro paragraph.</p>
    <p class="italic">Optional footnote to add extra info.</p>

    <?php // Don't update. Using the same info as in Interview Credits. ?>
    <p class="author">An interview with <a href="<?php echo $interviewer_url; ?>"><?php echo $interviewer; ?></a></p>

    <?php // Don't update. Using the info from PHP variables at the top of the page. ?>
    <ul class="social-share">
      <li>
        <a href="http://www.facebook.com/sharer.php?u=http://womenandtech.com/interview/<?php echo $interviewee_url;?>/" title="Share on Facebook">
          <i class="fa fa-facebook" aria-hidden="true"></i>
          <span class="screen-readers">Post the interview on Facebook</span>
        </a>
      </li>
      <li>
        <a href="http://twitter.com/share?text=Women and Tech Interviews <?php echo $interviewee_name; ?>&url=http://womenandtech.com/interview/<?php echo $interviewee_url; ?>/" title="Share on Twitter">
          <i class="fa fa-twitter" aria-hidden="true"></i>
          <span class="screen-readers">Tweet the interview</span>
        </a>
      </li>
      <li>
        <a href="mailto:?subject=Women and Tech Interviews <?php echo $interviewee_name; ?>&body=Women and Tech Interviews <?php echo $interviewee_name; ?> http://womenandtech.com/interview/<?php echo $interviewee_url; ?>/" title="Email the interview">
          <i class="fa fa-envelope" aria-hidden="true"></i>
          <span class="screen-readers">Email interview</span>
        </a>
      </li>
    </ul>
  </div>
</header>

Biying Miao

Biying Miao is the co-founder of Hot Pop Factory, a 3D Printing and Digital Fabrication Design Studio. The self- proclaimed art-geek has worked on projects exhibited at the Royal Ontario Museum, the Textile Museum of Canada and the Art Gallery of Ontario.

Optional note to add extra info, e.g. whether the interviewee has changed jobs since the time of the interview and the publish date.

An interview with Ruby Watson

Secondary Footer

This module may be be used for page content footers. Any kind of content can be added such as headings, paragraphs, links or images.

Refer to the Helpers section for additional content styles such as spacing and text styles.

<footer class="no-border footer-secondary">
  <div class="wrapper-sm">
    <!-- ADD CONTENT HERE -->
    <h2>Heading 2</h2>
    <p>Paragraph text with a <a href="#">link</a>.</p>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Illum corrupti eius labore cumque expedita dicta tenetur ut, accusantium, eaque eum, veritatis quam quae officiis assumenda? Voluptatum placeat eaque.</p>
  </div>
</footer>

Interview Footer with Credits

This code snippet is for reference only and is already included in the interview/template.php file in the static-site repo.

Update the PHP variables to customize the credits. If you don't need a specific credit, delete the whole list item (<li>).

<footer class="border credits">
  <ul>
    <li>
      Interview by <a href="<?php echo $interviewer_url; ?>"><?php echo $interviewer; ?></a>
      <?php if ($interviewer2): echo 'and <a href="'.$interviewer_url2 .'">'.$interviewer2.'</a>';endif; ?>
    </li>
    <li>
      Photography by <a href="<?php echo $photos_url; ?>"><?php echo $photos; ?></a>
      <?php if ($photos2): echo 'and <a href="'.$photos_url2 .'">'.$photos2.'</a>';endif; ?>
    </li>
    <li>
      Editing by <a href="<?php echo $editor_url; ?>"><?php echo $editor; ?></a>
      <?php if ($editor2): echo 'and <a href="'.$editor_url2 .'">'.$editor2.'</a>';endif; ?>
    </li>
    <li>
      Art Direction by <a href="<?php echo $ad_url; ?>"><?php echo $ad; ?></a>
      <?php if ($ad2): echo 'and <a href="'.$ad_url2 .'">'.$ad2.'</a>';endif; ?>
    </li>
    <li>
      Design by <a href="<?php echo $design_url; ?>"><?php echo $design; ?></a>
      <?php if ($design2): echo 'and <a href="'.$design_url2 .'">'.$design2.'</a>';endif; ?>
    </li>
    <li>
      Development by <a href="<?php echo $dev_url; ?>"><?php echo $dev; ?></a>
      <?php if ($dev2): echo 'and <a href="'.$dev_url2 .'">'.$dev2.'</a>';endif; ?>
    </li>
    <li>
      Transcriptions by <a href="<?php echo $transcribe_url; ?>"><?php echo $transcribe; ?></a>
      <?php if ($transcribe2): echo 'and <a href="'.$transcribe_url2 .'">'.$transcribe2.'</a>';endif; ?>
    </li>
  </ul>
  <?php // Global site credits
  include($path_inc."site-credits.php");
  ?>
</footer>

Images

The static site uses PHP to customize the templates so be sure to include the PHP snippet for image paths, shown in the example code below. View the documentation in the website repo for more information about directory structures and file naming.

Feature Image

This image is used at the beginning of each interview.

<div class="border img-feature">
  <figure>
    <img src="<?php echo $path_img; ?>featured-biying-miao.jpg" alt="Biying Miao">
  </figure>
</div>
Biying Miao

Side by Side Images

This image style can be used throughout the interview to highlight the content and to visually break up the text.

Delete the <figcaption></figcaption> if you don't need to include a caption.

<div class="border img-side-by-side">
  <figure>
    <img src="<?php echo $path_img; ?>left-biying-miao.jpg" alt="Biying Miao">
  </figure>
  <figure>
    <img src="<?php echo $path_img; ?>right-biying-miao.jpg" alt="Biying Miao">
    <figcaption>
      Optional caption goes here. <a href="#">Links</a> can also be included.
    </figcaption>
  </figure>
</div>
Biying Miao
Biying Miao
Optional caption goes here. Links can also be included.

Single Image: Portrait or Landscape

If using a single image, you have the option to use a portait image or landscape image.

Delete the <figcaption></figcaption> if you don't need to include a caption.

<!-- // Single Image - Portrait -->
<div class="border img-portrait">
  <figure>
    <img src="<?php echo $path_img; ?>portrait-biying-miao.jpg" alt="Biying Miao">
    <figcaption>
      Optional caption goes here.
    </figcaption>
  </figure>
</div>

<!-- Single Image - Landscape -->
<div class="border img-landscape">
  <figure>
    <img src="<?php echo $path_img; ?>landscape-biying-miao.jpg" alt="Biying Miao">
    <figcaption>
      Optional caption goes here.
    </figcaption>
  </figure>
</div>
Biying Miao
Optional caption goes here.
Biying Miao
Optional caption goes here.

Video

To include a video, copy the video embed code from the platform (YouTube, Vimeo, etc.) and include it within the <div class="embed-container"> element, shown in the example code snippet.

The platform's embed code may include some markup that is not required such as autoplay, width or height. These extra attributes can be removed to match the example shown here.

Captions are addedin a paragraph tag below the embed container. Add the "widescreen" class if the aspect ratio of the video is wide enough to stretch to the same width as the landscape image.

<div class="border video">
    <div class="embed-container">
      <!-- // Add video embed here -->
      <iframe src="https://player.vimeo.com/video/25608606" frameborder="0" allowfullscreen></iframe>
    </div>
    <p class="caption">
      Optional caption for video embed.
    </p>
  </div>

<div class="border video widescreen">
    <div class="embed-container">
      <iframe src="https://www.youtube.com/embed/Xoz2EERmZZ8?rel=0" frameborder="0" allowfullscreen></iframe>
    </div>
    <p class="caption">
      Optional caption for widescreen video.
    </p>
  </div>

Example of a video embed.

Example of a widescreen video embed.

Content Modules

Use the following modules for your text-based content.

Default Text Styles

Example of default text styles. See below for more content modules.

This is used mainly for non-interview pages such as an About page. Any type of content (headings, paragraphs, links, etc.) can be added between the .wrapper-sm container.

<section class="border page-content">
  <div class="wrapper-sm">
    <!-- // ADD CONTENT BELOW -->
    <h2>h2 Heading</h2>
    <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim.</p>
    <h3>h3 Subheading</h3>
    <p>Cupcake ipsum dolor. Sit amet biscuit dragée cotton candy icing croissant toffee bonbon. Tootsie roll <a href="#">chocolate cake</a> lollipop topping cake cake fruitcake. Halvah jelly beans pie muffin. Sweet roll cookie liquorice danish lemon drops pie apple pie donut lemon drops. Gingerbread gummies caramels. Oat cake sweet roll pie ice cream chocolate.</p>
  </div><!-- // close .wrapper-sm -->
</section>

Letter to our Readers

This little project launched in 2012; a time when gender equality conversations were just gaining momentum. We founded Women && Tech to challenge the idea of tech as a male-dominated field. Our goal was to invite and interview 50 women we admire out for a coffee, talk to them about their work, their experiences and their awesomeness, and share these conversations with the world. By sharing these stories, we wanted to recognize the efforts of women in this industry and contribute to a community that elevates one another.

H3 Subheading

Cupcake ipsum dolor. Sit amet biscuit dragée cotton candy icing croissant toffee bonbon. Tootsie roll link example lollipop topping cake cake fruitcake. Halvah jelly beans pie muffin. Sweet roll cookie liquorice danish lemon drops pie apple pie donut lemon drops. Gingerbread gummies caramels. Oat cake sweet roll pie ice cream chocolate.

H2 Heading

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim.

Q & A

Use this snippet for each Q & A block. You can add as many paragraphs as required for the answer portion. Just be sure to keep the paragraphs enclosed within the <dd class="interview-a"></dd> tags.

More about the <dl> element here.

<dl class="border">
  <dt class="interview-q">Question?</dt>
  <dd class="interview-a">
    <p>Answer</p>
    <p>Break up long answers with additional paragraphs.</p>
  </dd>
</dl>

<dl class="border">
  <dt class="interview-q">Another question?</dt>
  <dd class="interview-a">
    <p>Answer</p>
  </dd>
</dl>
Where did you grow up and what were you like as a child?

My family moved to Canada from Shanghai when I was in fourth grade, and I grew up in Toronto. I was a very creative child who loved drawing and making things with my hands. Coming from a Chinese family, I was encouraged to play music but gravitated toward freeform arts, so learning an instrument in the classical sense never became something that I honed. I actually wish that I had done that. My 3D printers sound like singing robots, so that’s the music I make now. I’m sure if I put the time in, I could remix it into a pretty sweet song.

I was always a bit of an art and music geek so when it came time to choose a career path I leaned toward architecture because it was a mix of art, science, and technology; all things that are very much a part of who I am.

[Optional note] For adding additional info within the interview. Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Another question?

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Pull Quote

Highlight key points in the interview with pull quotes. Stick to one or two short sentences.

<aside class="border pull-quote">
  <p>Digital fabrication allows for a physical reality that’s much more transient, dynamic, and customized by the individual.</p>
</aside>

Team Signature

<div class="border signature">
<p>
  with <i class="fa fa-heart-o theme-color" aria-hidden="true" title="love"></i><span class="screen-readers">love</span>
  from <span class="team theme-color">the Women&&Tech team</span>
</p>
</div>

with love from the Women&&Tech team

Team Listing

<!-- // Team Listing -->
<aside class="border team-listing">
  <ul>
    <li>
      <p class="name"><a href="#">Cassie Kaiser</a></p>
      <p class="role">Managing Coordinator</p>
    </li>
    <li>
      <p class="name"><a href="#">Ivonne Karamoy</a></p>
      <p class="role">Managing Director</p>
    </li>
    <li>
      <p class="name"><a href="#">Christina Truong</a></p>
      <p class="role">Lead Developer</p>
    </li>
    <li>
      <p class="name"><a href="#">Ray Kao</a></p>
      <p class="role">Tech Lead</p>
    </li>
  </ul>
  <p class="thanks">Special thanks to our founder Cassie McDaniel, past team members and supporters.</p>
</aside>

Past Interview Cards

This code snippet is for reference and is already included in the includes/latest-interviews.php file.

To update, revise the URL to the interviews, thumbnail image file and interview details. Only the latest three interviews are featured at a time.

<aside class="interview-cards wrapper">
  <h2>Latest Interviews</h2>
  <a class="view-all" href="/archive/">view all</a>
  <div class="grid-wrapper">
    <article class="grid-3-1">
      <a href="/interview/aashni-shah/" class="no-underline">
        <img src="<?php echo $path_img; ?>thumbnail-aashni-shah.jpg" alt="Aashni Shah">
        <h3>Aashni Shah</h3>
        <p>with Cassie Kaiser</p>
        <p>Computer Science student, organizer, leader and speaker within the tech community.</p>
      </a>
    </article>
    <article class="grid-3-1">
      <a href="/interview/sara-hicks/" class="no-underline">
        <img src="<?php echo $path_img; ?>thumbnail-sara-hicks.jpg" alt="Sara Hicks">
        <h3>Sara Hicks</h3>
        <p>with Sophie He</p>
        <p>Co-founder and CEO of Reaction Commerce, an open-source ecommerce platform.
          </p>
      </a>
    </article>
    <article class="grid-3-1">
      <a href="/interview/mitchell-baker/" class="no-underline">
        <img src="<?php echo $path_img; ?>thumbnail-mitchell-baker.jpg" alt="Mitchell Baker">
        <h3>Mitchell Baker</h3>
        <p>with Cassie McDaniel</p>
        <p>Founder of the non-profit tech company Mozilla, creator of Firefox and champion of the open web.</p>
      </a>
    </article>
  </div>
</aside>

Helper Classes [in progress]

To make customizations and isolated style additions outside of the default and module styles, see below options.

Links

Add a "no-underline" class to remove the underline style of links.

This class can be used for text or image links. (Example 1 and 2)

If you want to remove the underline for multiple elements, add the class to the parent element. (Example 3)

<a href="#" class="no-underline">link</a>

<a href="#" class="no-underline">
  <img src="image.png" alt="image description">
</a>

<div class="no-underline">
  <a href="#">link 1</a>
  <a href="#">link 2</a>
  <a href="#">link 3</a>
</div>