From 4d828814da89db1e949072bc57eb3fc6bed8a7c1 Mon Sep 17 00:00:00 2001 From: z0rayy Date: Thu, 4 Jun 2026 20:25:03 +0700 Subject: [PATCH] style: penyempurnaan gaya komponen dan penyesuaian tata letak responsif --- groups/RODA/style.css | 333 +++++++++++++++++++++++++++++++++++++----- 1 file changed, 295 insertions(+), 38 deletions(-) diff --git a/groups/RODA/style.css b/groups/RODA/style.css index 2bc5542..653b8d6 100644 --- a/groups/RODA/style.css +++ b/groups/RODA/style.css @@ -1,48 +1,305 @@ -:root { - --brand-navy: #003150; - --brand-yellow: #feb401; - --text-main: #1e293b; - --text-soft: #64748b; - --bg-soft: #f8fafc; - --line: #e2e8f0; +.bg-pattern { + background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); } -* { box-sizing: border-box; } -html, body { margin: 0; padding: 0; } -body { font-family: "Roboto", Arial, sans-serif; color: var(--text-main); background: #fff; line-height: 1.6; } -.container { width: min(1100px, 92%); margin-inline: auto; } +/* Navbar & Accessibility Fixes */ +#nav-wrapper { + position: fixed !important; + top: 0; + left: 0; + right: 0; + z-index: 50; + backface-visibility: hidden; + -webkit-backface-visibility: hidden; + will-change: box-shadow; +} -.nav { background: var(--brand-navy); color: #fff; border-bottom: 4px solid var(--brand-yellow); padding: 14px 0; } -.brand { font-size: 1.1rem; font-weight: 700; letter-spacing: .02em; } +#nav-wrapper>div:first-child { + transform: translateZ(0); + -webkit-transform: translateZ(0); +} -.hero { position: relative; color: #fff; min-height: 220px; display: flex; align-items: flex-end; overflow: hidden; } -.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: brightness(0.45); } -.hero-inner { position: relative; z-index: 1; padding: 36px 0; } -.badge { display: inline-block; background: var(--brand-yellow); color: #111827; font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: .2rem .45rem; margin-bottom: 12px; } -.hero h1 { margin: 0; font-size: clamp(1.6rem, 3.2vw, 2.8rem); line-height: 1.2; } +@media (max-width: 1023px) { + #nav-wrapper>div:first-child { + min-height: 0 !important; + max-height: none; + } +} -.layout { display: grid; grid-template-columns: 1fr; gap: 2rem; padding: 2rem 0 4rem; } -@media (min-width: 1024px) { .layout { grid-template-columns: minmax(0, 3fr) minmax(260px, 1fr); } } +html { + scroll-behavior: smooth; +} -.meta { font-size: .78rem; text-transform: uppercase; color: #475569; display: flex; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1rem; } -.cover { background: var(--bg-soft); border: 1px solid var(--line); margin-bottom: 1.5rem; } -.cover img { width: 100%; height: auto; display: block; } +.ticker-wrap { + mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); + -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%); +} -.article-body > * + * { margin-top: 1.1em; } -.article-body h2 { font-size: 1.35rem; margin: 1.6em 0 .5em; } -.article-body h3 { font-size: 1.1rem; margin: 1.4em 0 .4em; } -.article-body p { margin: 0 0 1em; } -.article-body ul, .article-body ol { padding-left: 1.4rem; } -.article-body blockquote { border-left: 4px solid #005eb8; background: #eef6ff; padding: .8rem 1rem; color: #334155; } -.article-body a { color: #005eb8; } -.article-body img { max-width: 100%; border-radius: 8px; } -.article-body code { background: #f1f5f9; padding: .1em .35em; border-radius: 4px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; } +.ticker-track { + display: inline-flex; + white-space: nowrap; + min-width: max-content; + animation: tickerMove 30s linear infinite; + will-change: transform; +} -.note { border: 1px solid var(--line); background: var(--bg-soft); padding: 1rem; } -.note h3 { margin: 0 0 .5rem; font-size: .76rem; text-transform: uppercase; letter-spacing: .12em; color: #475569; } +.ticker-wrap:hover .ticker-track { + animation-play-state: paused; +} -.footer { margin-top: 2rem; background: var(--brand-navy); color: #fff; border-top: 4px solid var(--brand-yellow); } -.footer-inner { display: flex; align-items: center; justify-content: center; gap: .75rem; padding: 1rem 0; } -.footer-logo { height: 28px; width: auto; } -.footer-ornament { width: 100%; display: block; opacity: .9; } +@keyframes tickerMove { + 0% { + transform: translateX(0); + } + + 100% { + transform: translateX(-50%); + } +} + +/* Responsive animation timing */ +@media (max-width: 768px) { + .ticker-track { + animation-duration: 25s; + } +} + +@media (min-width: 1366px) { + .ticker-track { + animation-duration: 35s; + } +} + +.line-clamp-1 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 1; +} + +.line-clamp-2 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 2; +} + +.line-clamp-3 { + overflow: hidden; + display: -webkit-box; + -webkit-box-orient: vertical; + -webkit-line-clamp: 3; +} + +.reveal { + opacity: 1; + transform: none; +} + +.reveal-ready .reveal { + opacity: 0; + transform: translateY(24px); + transition: opacity 0.65s ease, transform 0.65s ease; +} + +.reveal-ready .reveal.is-visible { + opacity: 1; + transform: translateY(0); +} + +@media (prefers-reduced-motion: reduce) { + html { + scroll-behavior: auto; + } + + .ticker-track { + animation: none; + } + + .reveal { + opacity: 1; + transform: none; + transition: none; + } +} + +/* Dosen grid: subgrid rows agar header & footer setiap card sejajar */ +@media (min-width: 1024px) { + #dosen-grid { + grid-template-rows: auto auto; + } + #dosen-grid > a { + grid-row: span 2; + display: grid; + grid-template-rows: subgrid; + } + /* White section: flex column so expertise sits at top, rank/link pinned to bottom */ + #dosen-grid > a > div:last-child { + display: flex !important; + flex-direction: column !important; + padding-top: 1rem !important; + } + #dosen-grid > a > div:last-child > div:last-child { + margin-top: auto; + } +} + +/* Custom responsive breakpoints - overriding Tailwind CDN defaults */ +/* Mobile: 390px and up */ +@media (min-width: 390px) { + body { + font-size: 14px; + } +} + +/* Tablet: 768px and up */ +@media (min-width: 768px) { + #kbk-card-grid { + grid-template-columns: repeat(2, minmax(0, 1fr)); + } +} + +/* Laptop/Desktop: 1024px and up */ +@media (min-width: 1024px) { + nav.bg-\[#feb401\] { + display: block !important; + } + + #lang-toggle-btn { + display: flex !important; + } + + .hidden.lg\:flex { + display: flex !important; + } + + #kbk-card-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + #dosen-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + #riset-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } +} + +/* Desktop: 1366px and up */ +@media (min-width: 1366px) { + #kbk-card-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } + + #riset-grid { + grid-template-columns: repeat(3, minmax(0, 1fr)); + } + + #dosen-grid { + grid-template-columns: repeat(4, minmax(0, 1fr)); + } +} + +/* Extra Large Desktop: 1920px and up */ +@media (min-width: 1920px) { + body { + font-size: 16px; + } +} + +/* ===== MEGA MENU STYLES FROM LIMAEM ===== */ +.mega-panel { + opacity: 0; + visibility: hidden; + transition: opacity 0.2s ease, visibility 0.2s ease; + position: absolute; + top: 100%; + left: 0; + right: 0; +} + +.mega-panel.active { + opacity: 1; + visibility: visible; +} + +#mega-overlay { + opacity: 0; + visibility: hidden; + transition: opacity 0.2s ease, visibility 0.2s ease; + pointer-events: none; +} + +#mega-overlay.active { + opacity: 1; + visibility: visible; + pointer-events: auto; +} + +.mega-link-card { + display: flex; + align-items: flex-start; + gap: 1rem; + padding: 1rem; + border-radius: 0.75rem; + border: 1px solid #e2e8f0; + background: white; + transition: all 0.2s ease; +} + +.mega-link-card:hover { + border-color: #3b82f6; + box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15); + transform: translateY(-2px); +} + +.mega-link-icon { + width: 2.5rem; + height: 2.5rem; + border-radius: 0.5rem; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; + transition: all 0.2s ease; +} + +.nav-menu-btn.active { + background: rgba(255, 255, 255, 0.9); + color: #1e40af; +} + +.nav-menu-btn:hover { + background: rgba(255, 255, 255, 0.8); +} + +#main-nav { + position: relative; +} + +#mega-menu-container { + position: absolute; + top: 100%; + left: 0; + right: 0; + pointer-events: none; +} + +#mega-menu-container .mega-panel { + pointer-events: auto; +} + +.nav-menu-item { + position: relative; +} + +.nav-menu-item::after { + content: ''; + position: absolute; + bottom: -12px; + left: 0; + right: 0; + height: 12px; +}