Files
wona.github.com/css/mobile.css
2025-06-27 08:42:30 +05:30

528 lines
8.5 KiB
CSS

/* Mobile view - Apppplied at 768px and below */
@media (max-width: 768px) {
/* Base Mobile Settings */
body {
font-size: 14px;
overflow-x: hidden;
}
.container {
padding-left: 15px;
padding-right: 15px;
}
/* Pre-nav and Navigation */
.pre-nav, .pre-footer {
height: auto;
min-height: 80px;
padding: 15px 0;
position: relative;
}
.pre-nav .brand,
.pre-footer .brand {
display: block;
float: none;
text-align: center;
padding: 10px 0;
}
.pre-nav .social,
.pre-footer .social {
display: block;
float: none;
text-align: center;
padding: 10px 0;
margin-top: 10px;
}
.pre-nav .social > *,
.pre-footer .social > * {
margin: 0 5px;
}
.pre-nav .name-container .name {
font-size: 16px;
}
.pre-nav .name-container .desc {
font-size: 12px;
}
.pre-nav .logo {
height: 50px;
}
/* Mobile Toggle Button Styles */
.navbar-toggle {
position: absolute;
right: 15px;
top: 25px;
transform: translateY(-50%);
border: 1px solid #ddd;
background-color: transparent;
padding: 4px 6px;
border-radius: 4px;
cursor: pointer;
z-index: 1000;
}
.navbar-toggle:hover,
.navbar-toggle:focus {
background-color: #f5f5f5;
border-color: #bbb;
}
.navbar-toggle .icon-bar {
display: block;
width: 22px;
height: 2px;
background-color: #888;
border-radius: 1px;
margin: 4px 0;
transition: all 0.3s ease;
}
/* Hide original navbar on mobile */
.navbar {
display: none;
}
/* Mobile Navigation Menu Styles */
.mobile-nav {
display: none;
margin-top: 10px;
border-top: 1px solid #e5e5e5;
padding-top: 15px;
clear: both;
width: 100%;
}
.mobile-nav.show {
display: block;
animation: slideDown 0.3s ease-out;
}
@keyframes slideDown {
from {
opacity: 0;
transform: translateY(-10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.mobile-nav ul {
list-style: none;
padding: 0;
margin: 0;
}
.mobile-nav li {
margin-bottom: 0;
}
.mobile-nav a {
display: block;
padding: 12px 15px;
text-decoration: none;
color: #333;
border-bottom: 1px solid #eee;
transition: background-color 0.2s ease;
}
.mobile-nav a:hover {
background-color: #f5f5f5;
text-decoration: none;
color: #333;
}
/* Mobile Dropdown Styles */
.mobile-nav .dropdown-menu {
position: static;
display: none;
float: none;
width: auto;
margin-top: 0;
background-color: #f9f9f9;
border: none;
border-radius: 0;
box-shadow: none;
padding-left: 0;
}
.mobile-nav .dropdown.open .dropdown-menu {
display: block;
}
.mobile-nav .dropdown-menu a {
padding-left: 30px;
background-color: #f9f9f9;
font-size: 13px;
}
.mobile-nav .dropdown-menu a:hover {
background-color: #f0f0f0;
}
.mobile-nav .dropdown-toggle::after {
content: ' ▼';
font-size: 10px;
float: right;
margin-top: 2px;
transition: transform 0.2s ease;
}
.mobile-nav .dropdown.open .dropdown-toggle::after {
transform: rotate(180deg);
}
/* Navbar */
.navbar-nav {
margin: 0;
font-size: 14px;
}
.navbar-nav > li {
display: block;
float: none;
margin-bottom: 0;
}
.navbar-nav > li > a {
padding: 10px 15px;
text-align: left;
}
.navbar-collapse {
border-top: 1px solid #e5e5e5;
margin-top: 10px;
padding-top: 10px;
}
/* Header Styles */
#header {
margin-bottom: 20px;
}
#header .header-row {
height: auto;
min-height: 250px;
border-radius: 0;
}
#header .cover-image {
height: 200px;
order: 1;
}
#header .cover-details {
order: 2;
padding: 20px 15px;
}
#header .title {
font-size: 20px;
margin-bottom: 15px;
}
#header .cover-title-label {
font-size: 12px;
}
#header .cover-excerpt {
font-size: 13px;
line-height: 1.4;
}
/* Category Header */
#header.category-header .cover-image {
height: 150px;
margin-bottom: 15px;
}
/* New Articles Section */
#new-articles {
margin-bottom: 30px;
}
#new-articles .container-title {
position: static;
font-size: 18px;
margin-bottom: 15px;
padding: 10px 15px;
text-align: center;
}
#new-articles .article-col {
padding: 5px 0;
margin-bottom: 15px;
}
#new-articles .article {
height: 250px;
margin-top: 0;
}
#new-articles .details {
padding: 15px;
}
#new-articles .details .title {
font-size: 16px;
line-height: 1.3;
}
#new-articles .details .date {
position: static;
margin-top: 5px;
font-size: 11px;
}
/* Article Horizontal Layout */
.article-horiozntal {
height: auto;
margin-bottom: 25px;
}
.article-horiozntal .img-container {
height: 150px;
margin-bottom: 10px;
}
.article-horiozntal .details-container {
padding-left: 0;
}
.article-horiozntal .title {
font-size: 16px;
line-height: 1.4;
}
.article-horiozntal .excerpt {
font-size: 13px;
line-height: 1.4;
margin-top: 10px;
}
/* Post Styles */
.post {
font-size: 16px;
line-height: 1.6;
}
.post .header {
padding-bottom: 20px;
}
.post .body {
padding-top: 20px;
}
.post .cover-img {
height: 200px;
margin-bottom: 20px;
}
.post .header .title {
font-size: 20px;
line-height: 1.3;
}
.post .header .tag {
font-size: 14px;
}
.post .fb-content {
margin-top: 25px;
}
/* More Articles */
#more-articles-container {
margin-top: 25px;
margin-bottom: 30px;
}
#more-articles .article {
height: 120px;
margin-bottom: 15px;
}
#more-articles .details {
padding: 10px;
}
#more-articles .title {
font-size: 14px;
line-height: 1.3;
}
/* Category Posts */
.category-posts {
margin-top: 15px;
}
.category-posts .article-horiozntal {
margin-bottom: 20px;
}
/* Bootstrap Grid Fixes */
.col-md-4, .col-md-8, .col-sm-3, .col-sm-6 {
width: 100%;
padding-left: 0;
padding-right: 0;
}
/* Facebook Plugin Responsiveness */
.fb-page {
width: 100% !important;
margin-top: 20px;
}
.fb-comments {
width: 100% !important;
}
/* Hide Facebook sidebar on mobile */
.post .col-md-4 {
display: none;
}
.category-posts .col-md-4 {
display: none;
}
/* Make content full width on mobile */
.post .col-md-8,
.category-posts .col-md-8 {
width: 100%;
}
/* Images Responsiveness */
img {
max-width: 100%;
height: auto;
}
.img-center-fill {
width: 100%;
height: 100%;
object-fit: cover;
}
/* Footer */
footer {
margin-top: 30px;
padding-top: 20px;
}
.copyright {
text-align: center;
font-size: 12px;
}
/* Utility Classes */
.hidden-mobile {
display: none !important;
}
.visible-mobile {
display: block !important;
}
/* Text adjustments */
h1 { font-size: 24px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }
h5 { font-size: 14px; }
h6 { font-size: 13px; }
/* Remove margins and padding that cause horizontal scroll */
.row {
margin-left: 0;
margin-right: 0;
}
.outer-row {
margin-left: -5px;
margin-right: -5px;
}
/* Ensure no horizontal scroll */
html, body {
max-width: 100%;
overflow-x: hidden;
}
}
/* Extra Small Devices (phones, less than 480px) */
@media (max-width: 480px) {
body {
font-size: 13px;
}
.container {
padding-left: 10px;
padding-right: 10px;
}
#header .title {
font-size: 18px;
}
#new-articles .details .title {
font-size: 14px;
}
.post .header .title {
font-size: 18px;
}
.post {
font-size: 15px;
}
#new-articles .container-title {
font-size: 16px;
}
.container-title {
font-size: 20px;
}
.pre-nav .name-container .name {
font-size: 14px;
}
.pre-nav .name-container .desc {
font-size: 11px;
}
/* Adjust togge button for smaller screens */
.navbar-toggle {
right: 10px;
padding: 3px 5px;
}
.navbar-toggle .icon-bar {
width: 18px;
height: 2px;
margin: 3px 0;
}
/* Mobile nav adjustments for small screensss */
.mobile-nav a {
padding: 10px 12px;
font-size: 14px;
}
.mobile-nav .dropdown-menu a {
padding-left: 25px;
font-size: 12px;
}
}