123

Pen Settings

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

You're using npm packages, so we've auto-selected Babel for you here, which we require to process imports and make it all work. If you need to use a different JavaScript preprocessor, remove the packages in the npm tab.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Use npm Packages

We can make npm packages available for you to use in your JavaScript. We use webpack to prepare them and make them available to import. We'll also process your JavaScript with Babel.

⚠️ This feature can only be used by logged in users.

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

            
              <div class="o-page-grid o-container">
  <header class="c-page-header c-page-header--event o-grid__item--full">
  <div class="c-page-header__image">
    <img src="https://images.pexels.com/photos/358010/pexels-photo-358010.jpeg?auto=compress&cs=tinysrgb&dpr=2&h=750&w=1260" alt="A stock image of ballet dancers" />
  </div>
  <div class="c-page-header__container o-container">
    <h1 class="c-page-header__title h-text--h1"><span class="c-page-header__title-text">
        The event title with ten fields, five are free text
      </span></h1>
    <span class="c-page-header__producer h-text--pretitle h-text--bold"> Producer or Company<span class="h-accessibility">.</span></span>
    <span class="c-page-header__credit h-text--extra-large">
        Credit for Writer<span class="h-accessibility">.</span> 
      </span>
    
    <div class="c-page-header__quote h-only-desktop">
      <blockquote class="c-quote c-quote--featured">
        <p class="c-quote__rating c-quote__rating--five">
    <span class="c-quote__rating--text">Five Stars</span>
  </p>
  
        <p class="c-quote__text h-text--extra-large">Example quote that might go on a while. It could be 140ch</p>
        <footer class="c-quote__footer"><cite class="c-quote__cite h-text--pretitle">Example Blurber</cite></footer>
      </blockquote>
    </div>
  </div>
    <section class="c-page-header__infobar">
    <span class="o-container o-page-grid">
      <span class="c-page-header__date h-text--h4 h-text--black h-text--uppercase o-page-grid__item--sidebar">
        <time datetime="2019-03-30T20:30:00+00:00" itemprop="startDate">Sat 30 Mar 2019</time> – <time datetime="2021-01-01T20:15:00+00:00" itemprop="endDate">Fri 1 Jan 2021</time></span>
    <a href="#datesandtimes" class="o-page-grid__sidebar c-page-header__action o-button">Choose dates &amp; Book</a></span>
  </section>
    
</header>
</div>
            
          
!
            
              .c-page-header {
  //list elements
  @include template(title, producer, credit, quote);
  &__container {
    display: grid;
    grid-template-columns: 7fr 1fr 4fr;
    grid-template-areas:
      "producer .     . "
      "title    .  quote "
      "credit   .  quote   "
      ".        .  quote";

    @include media(tablet) {
      grid-template-columns: 10fr 2fr;
      grid-template-areas:
        "producer ."
        "title ."
        "credit ."; //The  quote has disappeared! We have turned off quote on phone right in the html with a helper class. If the element is none to the DOM it is ignored by grid, so we can ignore it too.
    }
    @include media(phone) {
      grid-template-columns: 1fr;
      grid-template-areas:
        "producer"
        "title"
        "credit";
    }
  }
  &__title {
    margin-bottom: $b*0.75; //this designer sets bottom margins individually on elements, not as regular proportions of text size (em) or regular spacing (grid gap) so we set margins per element too to honour the spec
  }
  &__credit {
    margin-bottom: $b*1.25;
  }
  &__quote {
     @include monotheme;
  }

  //we're just gonna let infobar full width without having to break it out of container
  &__infobar {
    //this is sticky with vue sticky directive in RL
    @include theme;
    padding: $b 0;
    margin-bottom: $b;

    > .o-page-grid { // here we look at  adding a page grid as an interior grid -- on balance not my preference but good to examine
      align-items: center;
      margin-bottom: 0;
    }
    .c-page-header__date {
      @include media(phone) {
        text-align: center;
        grid-area: 1 /1 / 1 / 13;
      }
    }
    .c-page-header__action {
      padding: 17px 30px;
    @include var(border-color, currentColor);
      @include on-event {
        @include fliptheme;       
      }
    }
  }

  .c-page-header__image {
    max-height: 430px; // in RL this is done with Imager but I've just grabbed a stock imqge from Pexels
    overflow: hidden;
    margin-bottom: $b;
    img {
      max-width:100%;
      height: auto;
    }
  }
}


//see library for external resources: https://codepen.io/Sally_McGrath/pen/zbzQMB
            
          
!
999px
🕑 One or more of the npm packages you are using needs to be built. You're the first person to ever need it! We're building it right now and your preview will start updating again when it's ready.

Console