<header class="c-preface">
    <h1 class="c-preface__title">Preface title
    </h1>
    <div class="c-preface__main">
        <div class="s-prose">
            <p>Preface content</p>

        </div>
    </div>
</header>
<header class="c-preface{{ "  h-card" if microformats }}">
  <h1 class="c-preface__title{{ "  p-name" if microformats }}">
    {%- if titleIcon -%}
      {% include titleIcon + ".svg" %}
    {%- endif -%}
    {{ title }}
  </h1>
  {%- if content -%}
  <div class="c-preface__main{{ "  p-note" if microformats }}">
    <div class="s-prose">
      {%- if avatar -%}
        {% render "@avatar", avatar %}
      {%- endif -%}
      {{ content | markdown | safe }}
    </div>
  </div>
  {%- endif -%}
</header>
{
  "site": {
    "title": "24 ways",
    "handle": "24ways",
    "description": "24 ways is the advent calendar for web geeks. Each day throughout December we publish a daily dose of web design and development goodness to bring you all a little Christmas cheer.",
    "url": "https://24ways.org",
    "feed": "https://feeds.feedburner.com/24ways",
    "theme_color": "#f04"
  },
  "theme": {
    "year": [
      348,
      344,
      340,
      336,
      332,
      328,
      324,
      320,
      316,
      312,
      308,
      304,
      300,
      296,
      292,
      288
    ],
    "day": [
      360,
      353,
      346,
      339,
      332,
      325,
      318,
      311,
      304,
      297,
      290,
      283,
      276,
      269,
      262,
      255,
      248,
      241,
      234,
      227,
      220,
      213,
      206,
      199
    ]
  },
  "title": "Preface title",
  "content": "Preface content"
}
  • Content:
    .c-preface {
      overflow: hidden;
      display: flex;
      flex-direction: column;
      padding: map(spaces, medium) map(spaces, large) calc(map(spaces, large) / 2);
      background-color: $color-year;
      background-color: var(--color-year, $color-year);
      background-image: inline('diamond.svg');
      background-repeat: repeat;
    
      @media (--from-medium-screen) {
        min-height: 9rem;
      }
    
      @media (--from-large-screen) {
        padding-top: map(spaces, xxlarge);
        padding-left: 25%;
      }
    }
    
    .c-preface__title {
      @apply --typeset-title;
    
      display: flex;
      align-items: flex-start;
      position: relative;
      margin-top: auto;
      color: map(colors, primary, light);
    
      svg {
        width: 1em;
        height: 1em;
        margin-right: map(spaces, small);
      }
    }
    
    .c-preface__main {
      position: relative;
      margin-top: map(spaces, small);
      color: color(white a(75%));
    
      .s-prose p:first-of-type {
        @apply --typeset-lede;
      }
    
      .s-prose p:last-of-type {
        margin-bottom: 0;
      }
    
      .c-avatar {
        width: 50%;
        float: right;
        margin-top: -7.5%;
        margin-right: -7.5%;
    
        @media (--from-large-screen) {
          width: auto;
          float: left;
          margin-left: -33%;
          margin-right: map(spaces, medium);
        }
      }
    
      a {
        border-bottom: 1px solid color(white a(25%));
        color: white;
    
        &:hover {
          border-bottom-color: color(white a(25%));
        }
      }
    }
    
  • URL: /components/raw/preface/preface.css
  • Filesystem Path: src/components/common/preface/preface.css
  • Size: 1.4 KB

There are no notes for this item.