Pens

Minimalist Swiss Editorial Mono Header

UI Component bởi acmatvjrus
Mở Studio
<div class="editorial-container">
  <div class="top-ticker-bar">
    <span>VOL. 26 / ISSUE 04</span>
    <span>• ARCHITECTURE, DESIGN & TECHNOLOGY •</span>
    <span>TOKYO — NEW YORK — ZURICH</span>
  </div>
  <header class="editorial-header">
    <div class="header-left">
      <button class="menu-btn" aria-label="Menu">
        <span class="line"></span>
        <span class="line"></span>
      </button>
      <span class="location-stamp">EST. 1988</span>
    </div>
    <a href="#" class="brand-title">ZEITGEIST</a>
    <div class="header-right">
      <a href="#" class="sub-link">Index</a>
      <a href="#" class="sub-link">Archive</a>
      <a href="#" class="btn-subscribe">Subscribe</a>
    </div>
  </header>
  <nav class="category-strip">
    <a href="#" class="cat-link active">Featured</a>
    <a href="#" class="cat-link">Modernism</a>
    <a href="#" class="cat-link">Typography</a>
    <a href="#" class="cat-link">Interface</a>
    <a href="#" class="cat-link">Essays</a>
  </nav>
</div>
body {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  background: #fbfbfb;
  color: #111;
}
.editorial-container {
  width: 100%;
  box-sizing: border-box;
}
.top-ticker-bar {
  display: flex;
  justify-content: space-between;
  padding: 6px 24px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: #111;
  color: #eee;
}
.editorial-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-bottom: 2px solid #111;
  background: #fff;
}
.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
}
.header-right {
  justify-content: flex-end;
}
.menu-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}
.menu-btn .line {
  display: block;
  width: 24px;
  height: 2px;
  background: #111;
  transition: 0.2s;
}
.location-stamp {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #777;
}
.brand-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 2.4rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: #111;
  text-align: center;
}
.sub-link {
  color: #111;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.sub-link:hover { text-decoration: underline; }
.btn-subscribe {
  background: #111;
  color: #fff;
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  transition: all 0.2s;
}
.btn-subscribe:hover {
  background: #10a37a;
  color: #fff;
}
.category-strip {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 14px 20px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
}
.cat-link {
  color: #666;
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  padding-bottom: 4px;
}
.cat-link:hover, .cat-link.active {
  color: #111;
}
.cat-link.active::after {
  content: "";
  position: absolute;
  bottom: -15px;
  left: 0;
  right: 0;
  height: 2px;
  background: #111;
}
@media (max-width: 768px) {
  .location-stamp, .sub-link, .top-ticker-bar { display: none; }
  .brand-title { font-size: 1.6rem; }
  .category-strip { overflow-x: auto; justify-content: flex-start; }
}
// Category Click Switcher
document.querySelectorAll(".cat-link").forEach(link => {
  link.addEventListener("click", (e) => {
    e.preventDefault();
    document.querySelectorAll(".cat-link").forEach(l => l.classList.remove("active"));
    link.classList.add("active");
  });
});
Đã sao chép vào bộ nhớ tạm!