You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

635 lines
11 KiB

/* Responsive Design - Mobile-first approach */
/* Mobile styles (default, < 768px) */
@media (max-width: 767px) {
/* Layout */
.feed-sidebar {
display: none;
}
.wiki-sidebar {
display: none;
}
.layout-container {
flex-direction: column;
padding: 1rem;
gap: 1rem;
}
.main-content {
width: 100%;
min-width: 0;
}
/* Ensure no overflow on mobile */
article, .feed-container, .nav-container {
overflow-x: hidden;
word-wrap: break-word;
}
/* Navigation */
.mobile-menu-toggle {
display: flex;
}
.nav-menu {
position: fixed;
top: 80px; /* Match header height */
left: -100%;
width: 100%;
height: calc(100vh - 80px);
background: var(--bg-secondary);
flex-direction: column;
align-items: flex-start;
padding: 2rem;
transition: left 0.3s;
border-top: 1px solid var(--border-color);
z-index: 999;
box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
overflow-y: auto;
}
.nav-menu.active {
left: 0;
}
.nav-menu li {
width: 100%;
padding: 0.5rem 0;
}
.dropdown-menu {
position: static;
opacity: 1;
visibility: visible;
border: none;
box-shadow: none;
margin-left: 1rem;
margin-top: 0.5rem;
margin-bottom: 0.5rem;
}
.dropdown-toggle .dropdown-arrow {
transform: none !important;
}
/* Typography */
h1 {
font-size: 1.75rem;
line-height: 1.2;
}
h2 {
font-size: 1.5rem;
line-height: 1.3;
}
h3 {
font-size: 1.25rem;
}
h4 {
font-size: 1.1rem;
}
/* Spacing */
article {
padding: 1rem;
margin-bottom: 1rem;
}
.nav-container {
padding: 0.5rem 1rem;
}
/* Landing Page */
.landing-page {
padding: 1rem;
}
.landing-page .hero {
padding: 1.5rem 0;
margin-bottom: 2rem;
}
.landing-page .hero h1 {
font-size: 1.75rem;
margin-bottom: 0.75rem;
}
.landing-page .hero .lead {
font-size: 1rem;
padding: 0 1rem;
}
.landing-page .features {
margin-top: 2rem;
}
.landing-page .features h2 {
font-size: 1.5rem;
margin-bottom: 1.5rem;
}
.feature-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
margin-top: 1.5rem;
}
.feature-card {
padding: 1.5rem;
}
.feature-card h3 {
font-size: 1.1rem;
margin-bottom: 0.75rem;
}
.feature-image-title {
font-size: 1rem;
}
.feature-image-summary {
font-size: 0.85rem;
}
.feature-image-overlay {
padding: 1rem 0.75rem 0.75rem;
}
.feature-card .wiki-links {
gap: 0.5rem;
margin-bottom: 1rem;
}
.feature-card .wiki-link {
padding: 0.4rem 0.75rem;
font-size: 0.85rem;
}
/* Blog Layout */
.blog-layout {
flex-direction: column;
padding: 1rem;
gap: 1.5rem;
}
.blog-sidebar {
width: 100%;
position: static;
max-height: none;
overflow-y: visible;
padding: 1.5rem;
order: 2;
}
.blog-content {
order: 1;
padding: 1.5rem;
}
.blog-header {
margin-bottom: 1.5rem;
padding-bottom: 1.5rem;
}
.blog-title {
font-size: 1.5rem;
}
.blog-image img {
max-width: 150px;
}
.article-title {
font-size: 1.75rem;
line-height: 1.3;
}
.article-summary {
font-size: 1rem;
padding: 0.75rem;
margin: 1rem 0;
}
.article-link {
padding: 0.75rem;
}
.article-link-title {
font-size: 0.95rem;
}
.article-link-meta {
font-size: 0.8rem;
}
/* Contact Page */
.contact-page {
padding: 1rem;
}
.contact-links {
padding: 1rem;
margin-bottom: 1.5rem;
}
.contact-links h2 {
font-size: 1.25rem;
margin-bottom: 0.75rem;
}
.nostr-profile {
padding: 1rem;
margin-bottom: 1.5rem;
}
.nostr-profile-content {
flex-direction: column;
align-items: center;
text-align: center;
}
.nostr-profile-picture {
width: 100px;
height: 100px;
margin-bottom: 1rem;
}
.nostr-profile-info {
width: 100%;
}
.contact-form {
margin-top: 1.5rem;
}
.form-group {
margin-bottom: 1.25rem;
}
.form-group input[type="text"],
.form-group textarea {
padding: 0.625rem;
font-size: 16px; /* Prevent zoom on iOS */
}
.form-group textarea {
min-height: 120px;
}
.form-actions {
flex-direction: column;
gap: 0.75rem;
}
/* Buttons */
.btn {
padding: 0.625rem 1.25rem;
font-size: 0.95rem;
min-width: 44px; /* Touch target */
}
/* Full-width buttons in forms and feature cards */
.form-actions .btn,
.feature-card .btn {
width: 100%;
justify-content: center;
}
/* Tables */
table {
font-size: 0.875rem;
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
thead, tbody, tr {
display: table;
width: 100%;
table-layout: fixed;
}
th, td {
padding: 0.5rem;
word-break: break-word;
}
/* E-books table: show only avatar on mobile, narrow author column */
.ebooks-table {
display: block;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.ebooks-table thead,
.ebooks-table tbody,
.ebooks-table tr {
display: table;
width: 100%;
table-layout: fixed;
}
.ebooks-table th[data-sort="author"],
.ebooks-table td:nth-child(2) {
width: 60px;
min-width: 60px;
max-width: 60px;
padding: 0.5rem;
text-align: center;
}
.ebooks-table th:not([data-sort="author"]),
.ebooks-table td:not(:nth-child(2)) {
padding: 0.5rem;
}
.ebooks-table td .user-badge {
display: flex;
justify-content: center;
align-items: center;
padding: 0;
background: transparent;
border: none;
width: 100%;
}
.ebooks-table td .user-badge-name,
.ebooks-table td .user-badge-handle {
display: none !important;
}
.ebooks-table td .user-badge-avatar,
.ebooks-table td .user-badge-avatar-placeholder {
width: 40px;
height: 40px;
margin: 0;
}
.ebooks-table td .user-badge-avatar-placeholder .icon-inline {
width: 20px;
height: 20px;
}
/* Wiki Pages */
.breadcrumbs {
margin-bottom: 0.75rem;
font-size: 0.875rem;
}
.breadcrumbs ol {
flex-wrap: wrap;
gap: 0.25rem;
}
.page-header {
margin-bottom: 1.5rem;
padding-bottom: 1rem;
}
.page-summary {
font-size: 1rem;
}
.page-content {
line-height: 1.7;
font-size: 0.95rem;
}
/* Feed */
.feed-container {
padding: 1rem;
}
.feed-item {
padding: 0.75rem 0;
}
.feed-header {
flex-direction: column;
align-items: flex-start;
gap: 0.25rem;
}
.feed-content {
font-size: 0.85rem;
}
.feed-time {
font-size: 0.8rem;
}
/* Error Pages */
.error-page {
padding: 2rem 1rem;
}
.error-page h1 {
font-size: 3rem;
}
.error-page p {
font-size: 1.1rem;
}
/* Footer */
footer {
padding: 1.5rem 1rem;
font-size: 0.875rem;
}
/* Code blocks */
pre {
padding: 0.75rem;
font-size: 0.85rem;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
code {
font-size: 0.85rem;
padding: 0.15rem 0.3rem;
}
/* Lists */
ul, ol {
margin-left: 1.5rem;
margin-bottom: 0.75rem;
}
/* Logo */
.logo {
font-size: 1.1rem;
margin-right: 1rem;
}
.logo-icon {
width: 28px;
height: 28px;
}
/* Touch-friendly targets */
a, button {
min-height: 44px; /* iOS recommended touch target */
display: inline-flex;
align-items: center;
}
.nav-menu a {
min-height: 48px;
padding: 0.75rem 0;
}
.wiki-menu a {
min-height: 44px;
}
/* Images */
img {
max-width: 100%;
height: auto;
}
/* Prevent horizontal scroll */
body {
overflow-x: hidden;
}
html {
overflow-x: hidden;
}
/* Alerts */
.alert {
padding: 0.875rem;
font-size: 0.9rem;
}
/* User badges */
.user-badge {
padding: 0.375rem 0.5rem;
}
.user-badge-avatar,
.user-badge-avatar-placeholder {
width: 20px;
height: 20px;
}
/* Feed sidebar hidden on mobile but show on landing if needed */
.landing-page .feed-section {
margin: 1.5rem 0;
}
}
/* Tablet styles (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
.feed-sidebar {
width: 250px;
}
.wiki-sidebar {
width: 200px;
}
.layout-container {
padding: 1.5rem;
gap: 1.5rem;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
/* Landing Page */
.landing-page {
padding: 1.5rem;
}
.feature-grid {
grid-template-columns: repeat(2, 1fr);
gap: 1.5rem;
}
/* Blog Layout */
.blog-layout {
padding: 1.5rem;
gap: 2rem;
}
.blog-sidebar {
width: 300px;
}
.blog-content {
padding: 2rem;
}
/* Contact Page */
.contact-page {
padding: 1.5rem;
}
.nostr-profile-content {
flex-direction: row;
text-align: left;
}
.form-actions {
flex-direction: row;
}
.form-actions .btn {
width: auto;
}
/* Buttons */
.btn {
width: auto;
}
.feature-card .btn {
width: auto;
}
}
/* Desktop styles (> 1024px) */
@media (min-width: 1025px) {
.feed-sidebar {
display: block;
}
.layout-container {
max-width: 1400px;
}
}
/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
/* High contrast mode support */
@media (prefers-contrast: high) {
:root {
--bg-primary: #1a1a1a;
--bg-secondary: #0f0f0f;
--text-primary: #ffffff;
--text-secondary: #e0e0e0;
--link-color: #9bb3ff;
--border-color: #606060;
}
}