<div class="event-card event-card--white">
        <div class="event-card__content">
            <div class="event-card__eyebrow">
                Event
            </div>

            <div class="event-card__header">

                <div class="event-card__type__icon">
                    <svg role="img" width="52" height="52" viewBox="0 0 52 52" fill="none" xmlns="http://www.w3.org/2000/svg">
                        <title>calendar</title>
                        <path d="M13 32.5H19.5V39H13V32.5Z" />
                        <path d="M29.25 32.5H22.75V39H29.25V32.5Z" />
                        <path d="M32.5 32.5H39V39H32.5V32.5Z" />
                        <path d="M19.5 22.75H13V29.25H19.5V22.75Z" />
                        <path d="M22.75 22.75H29.25V29.25H22.75V22.75Z" />
                        <path d="M39 22.75H32.5V29.25H39V22.75Z" />
                        <path d="M0 0H52V52H0V0ZM45.5 16.25H6.5V45.5H45.5V16.25Z" />
                    </svg>
                </div>
                <div class="event-card__date">
                    January 1, 2028
                </div>
            </div>

            <div class="event-card__text-content">
                <h2 class="event-card__title">
                    <a href="#" class="event-card__link">
                        Mauris nibh felis adipiscing varius in lacinia vel tellus
                    </a>
                </h2>

                <div class="event-card__time-and-location">
                    <div class="event-card__time">
                        <div class="event-card__time-value">
                            10:00 AM
                            <span class="event-card__time-separator"></span>
                            2:00 PM
                        </div>
                    </div>
                    <div class="event-card__location">
                        <div class="event-card__location-name">
                            The City Venue
                        </div>
                        <div class="event-card__location-address">
                            123 Main St, City, State, ZIP
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% if event.isComplete %}
    <div class="event-card event-card--{{ cardBackground|default('white')}}">
        <div class="event-card__content">
            {% if event.type %}
                <div class="event-card__eyebrow">
                    {{ event.type }}
                </div>
            {% endif %}

            <div class="event-card__header">

                {% if event.typeIcon %}
                    <div class="event-card__type__icon">
                        {% include 'bits/icons/' ~ event.typeIcon ~ '.twig' %}
                    </div>
                {% endif %}
                {% if event.date %}
                    <div class="event-card__date">
                        {{ event.date }}
                    </div>
                {% endif %}
            </div>

            <div class="event-card__text-content">
                <h2 class="event-card__title">
                    <a href="{{ event.permalink }}" class="event-card__link">
                        {{ event.title }}
                    </a>
                </h2>

                {% if event.startTime or event.eventLocationName or event.eventLocationAddress1 or event.eventLocationAddress2 %}
                    <div class="event-card__time-and-location">
                        {% if event.startTime %}
                            <div class="event-card__time">
                                <div class="event-card__time-value">
                                    {% if event.startTime %}
                                        {{ event.startTime | date('g:i A') }}
                                    {% endif %}
                                    {% if event.endTime %}
                                        <span class="event-card__time-separator"></span>
                                        {{ event.endTime | date('g:i A') }}
                                    {% endif %}
                                </div>
                            </div>
                        {% endif %}
                        {% if event.eventLocationName or event.eventLocationAddress1 or event.eventLocationAddress2 %}
                            <div class="event-card__location">
                                <div class="event-card__location-name">
                                    {{ event.eventLocationName }}
                                </div>
                                <div class="event-card__location-address">
                                    {% if event.eventLocationAddress1 %}
                                        {{ event.eventLocationAddress1 }}
                                    {% endif %}
                                    {% if event.eventLocationAddress2 %}
                                        <br>{{ event.eventLocationAddress2 }}
                                    {% endif %}
                                </div>
                            </div>
                        {% endif %}
                    </div>
                {% endif %}
            </div>
        </div>
    </div>
{% endif %}
{
  "site": {
    "title": "National Network of Public Health Institutes"
  },
  "background": "white",
  "breadcrumbs": [
    {
      "title": "Home",
      "url": "#"
    },
    {
      "title": "Primary Page One",
      "url": "#"
    },
    {
      "title": "Interior Page One",
      "url": "#"
    }
  ],
  "footerLinks": {
    "items": [
      {
        "title": "Subscribe to our newsletter",
        "url": "#"
      },
      {
        "title": "Explore membership benefits",
        "url": "#"
      },
      {
        "title": "See career opportunities",
        "url": "#"
      }
    ]
  },
  "contactInfo": {
    "copyright": "© National Network of Public Health Institutes. All Rights Reserved",
    "facebookLink": "https://facebook.com",
    "linkedInLink": "https://linkedin.com",
    "youtubeLink": "https://youtube.com",
    "flickrLink": "https://flickr.com",
    "twitterLink": "https://twitter.com",
    "instagramLink": "https://instagram.com",
    "youTubeLink": "https://youtube.com"
  },
  "utilityNavigation": {
    "items": [
      {
        "title": "Member directory",
        "url": "#"
      },
      {
        "title": "Events",
        "url": "#",
        "isActive": true
      },
      {
        "title": "Blog",
        "url": "#"
      }
    ]
  },
  "primaryNavigation": {
    "items": [
      {
        "title": "Workforce resources",
        "url": "#",
        "children": [
          {
            "title": "Resource Directory",
            "url": "#",
            "children": []
          },
          {
            "title": "Trainings",
            "url": "#",
            "children": [
              {
                "title": "Training Level 3 example",
                "url": "#"
              }
            ]
          }
        ]
      },
      {
        "title": "Programs & Projects",
        "url": "#",
        "isDescendantActive": true,
        "children": [
          {
            "title": "Data Modernization",
            "url": "#",
            "children": []
          },
          {
            "title": "Environmental Health and Emergency Preparedness",
            "url": "#",
            "children": []
          },
          {
            "title": "Evaluation and Impact",
            "url": "#",
            "isDescendantActive": true,
            "children": [
              {
                "title": "Third level example",
                "url": "#",
                "isActive": true,
                "children": [
                  {
                    "title": "Fourth level example",
                    "url": "#",
                    "isActive": true,
                    "children": [
                      {
                        "title": "Fifth level example",
                        "url": "#",
                        "isActive": true
                      }
                    ]
                  },
                  {
                    "title": "Fourth level example 2",
                    "url": "#"
                  },
                  {
                    "title": "Fourth level example 3",
                    "url": "#"
                  }
                ]
              }
            ]
          },
          {
            "title": "Multisector Strategies and Population Health",
            "url": "#",
            "children": []
          },
          {
            "title": "Public Health Events and Convenings Management",
            "url": "#",
            "children": []
          },
          {
            "title": "Public Health Infrastructure Grant",
            "url": "#",
            "children": []
          },
          {
            "title": "Public health training",
            "url": "#",
            "children": []
          }
        ]
      },
      {
        "title": "Explore the Network",
        "url": "#",
        "children": [
          {
            "title": "Member Directory",
            "url": "#",
            "children": []
          },
          {
            "title": "Membership paths",
            "url": "#",
            "children": []
          }
        ]
      },
      {
        "title": "Partner with us",
        "url": "#"
      },
      {
        "title": "About",
        "url": "#",
        "children": [
          {
            "title": "Blog",
            "url": "#",
            "children": []
          },
          {
            "title": "Events",
            "url": "#",
            "children": []
          },
          {
            "title": "Newsletters",
            "url": "#",
            "children": []
          },
          {
            "title": "Signature programs",
            "url": "#",
            "children": []
          },
          {
            "title": "Contact us",
            "url": "#",
            "children": []
          },
          {
            "title": "Meet the team",
            "url": "#",
            "children": []
          }
        ]
      }
    ]
  },
  "event": {
    "type": "Event",
    "typeIcon": "calendar",
    "title": "Mauris nibh felis adipiscing varius in lacinia vel tellus",
    "permalink": "#",
    "date": "January 1, 2028",
    "startTime": "10:00 AM",
    "endTime": "2:00 PM",
    "eventLocationName": "The City Venue",
    "eventLocationAddress1": "123 Main St, City, State, ZIP",
    "isComplete": true
  }
}
  • Content:
    $breakpoint: 40rem; // 640px
    
    .event-card {
        height: 100%;
        --cardBackgroundColor: var(--white);
    
        &--blueTint {
            --cardBackgroundColor: var(--blueTint);
        }
    
        &__content {
            display: flex;
            flex-direction: column;
            gap: 1rem;
            height: inherit;
            padding: 0.75rem;
            background-color: var(--cardBackgroundColor);
    
            @media (min-width: $breakpoint) {
                padding: 1.1rem;
            }
        }
    
        &__header {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 1rem;
        }
    
        &__type__icon {
            aspect-ratio: 1;
            flex: 0 0 1.5rem;
            display: flex;
            justify-content: center;
            align-items: center;
    
            & > svg {
                fill: var(--brightPurple);
                width: 100%;
                max-width: 1.5rem;
            }
        }
    
        &__eyebrow {
            @include labelSmall;
            color: var(--navy);
            line-height: 1;
        }
    
        &__text-content {
            display: flex;
            flex-direction: column;
            flex: 1 1 auto;
            gap: 0.25rem;
    
            @media (min-width: $breakpoint) {
                gap: 1rem;
            }
        }
    
        &__date {
            @include headline6;
            color: var(--navy);
            line-height: 1.5;
        }
    
        &__title {
            @include body;
        }
    
        &__time {
            @include bodySmall;
        }
    
        &__location {
            @include bodySmall;
        }
    
        &__link {
            text-decoration: none;
    
            &:hover {
                text-decoration: underline;
            }
        }
    }
    
  • URL: /components/raw/event-card/event-card.scss
  • Filesystem Path: patterns/partials/event-card/event-card.scss
  • Size: 1.6 KB

No notes defined.