Template:Article/styles.css: Difference between revisions

From AbhiprayaVedi
No edit summary
Tag: Reverted
No edit summary
 
(24 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Template:Article/styles.css */
/* Template:Article/styles.css */
/* Separate CSS from wiki markup to prevent conflicts */
/* Separate CSS from wiki markup to prevent conflicts */
.article-container {
.article-container {
     max-width: 1200px;
     max-width: 1200px;
Line 9: Line 8:
     color: #333;
     color: #333;
}
}
 
#contentSub,
/* Header Styles */
#mw-content-subtitle,
.mw-displaytitle-subtitle {
display: none !important;
}
/* Header Styles - Reduced height */
.article-header {
.article-header {
    text-align: center;
     border-bottom: 2px solid #e0e0e0;
     border-bottom: 2px solid #e0e0e0;
     padding-bottom: 4px;
     padding: 8px 0 10px 0; /* Reduced padding */
     margin-bottom: 0px;
     margin-bottom: 20px;     /* Reduced margin */
}
}
.author-info {
.author-info {
     display: flex;
     display: flex;
     align-items: center;
     align-items: center;
    justify-content: center;  /* ← Add this for horizontal centering */
     gap: 15px;
     gap: 15px;
     flex-wrap: wrap;
     flex-wrap: wrap;
    min-height: 30px;
    line-height: 1.2;
}
}
.author-name {
.author-name {
     font-weight: bold;
     font-weight: bold;
Line 29: Line 34:
     color: #2c3e50;
     color: #2c3e50;
}
}
.date-info {
.date-info {
     color: #7f8c8d;
     color: #7f8c8d;
     font-size: 0.9em;
     font-size: 0.9em;
}
}
.category-badge {
.category-badge {
     background: #3498db;
     background: #3498db;
Line 41: Line 44:
     border-radius: 3px;
     border-radius: 3px;
     font-size: 0.85em;
     font-size: 0.85em;
    line-height: 1.4;
}
}
/* Introduction */
/* Introduction */
.introduction-section {
.introduction-section {
Line 49: Line 52:
     border-left: 4px solid #3498db;
     border-left: 4px solid #3498db;
     padding: 15px 20px;
     padding: 15px 20px;
     margin-bottom: 30px;
     margin-bottom: 5px;
     background: #f8f9fa;
     background: #f8f9fa;
}
}
/* Two Column Layout */
/* Two Column Layout */
.content-wrapper {
.content-wrapper {
Line 58: Line 60:
     grid-template-columns: 1fr 300px;
     grid-template-columns: 1fr 300px;
     gap: 30px;
     gap: 30px;
     margin-top: 25px;
     margin-top: 10px;
}
}
 
/* Main Content – force it to contain floats */
.main-content {
.main-content {
     min-width: 0; /* Prevent overflow */
     min-width: 0;
    display: flow-root;        /* This creates a block formatting context and clears internal floats */
}
}
 
/* Left Image – ensure it doesn't overflow the container */
/* Image Styles - Fixed alignment */
.image-left {
.image-left {
     float: left;
     float: left;
     margin: 0 20px 20px 0;
     margin: 20px 20px 15px 0;
     max-width: 400px;
     max-width: 45%;            /* Allow some flexibility */
     clear: left;
    width: auto;
    box-sizing: border-box;
     clear: left;               /* Prevent stacking with other floats */
}
}
 
.image-left img {
    max-width: 100%;
    height: auto;
}
/* Prevent the image caption from being wider than the image */
.image-left figure,
.image-left figure,
.image-left .thumb {
.image-left .thumb {
     margin: 0 !important;
     max-width: 100% !important;
    height: auto;
}
}
.image-left figcaption,
.image-left figcaption,
.image-left .thumbcaption {
.image-left .thumbcaption {
Line 85: Line 93:
     padding: 5px;
     padding: 5px;
     background: #f8f9fa;
     background: #f8f9fa;
    margin-top: 5px;
}
}
.content-image {
.content-image {
     clear: both;
     clear: both;
Line 92: Line 100:
     text-align: center;
     text-align: center;
}
}
.content-image figure {
.content-image figure {
     display: inline-block;
     display: inline-block;
     margin: 0 auto;
     margin: 0 auto;
}
}
.content-image figcaption,
.content-image figcaption,
.content-image .thumbcaption {
.content-image .thumbcaption {
Line 106: Line 112:
     background: #f8f9fa;
     background: #f8f9fa;
}
}
 
/* Article Text - Fixed flow around images */
/* Article Text */
.article-text {
.article-text {
     overflow: hidden; /* Clear floats */
     min-height: 100px; /* Ensure content area has height */
}
}
/* Source Attribution */
/* Source Attribution */
.source-attribution {
.source-attribution {
    clear: both;  /* Clear any floats from images */
     margin-top: 30px;
     margin-top: 30px;
     padding: 15px;
     padding: 15px;
Line 120: Line 125:
     font-size: 0.9em;
     font-size: 0.9em;
}
}
/* Sidebar */
/* Sidebar */
.right-sidebar {
.right-sidebar {
Line 126: Line 130:
}
}


/* Author Infobox */
/* Author Infobox - Aligned with left image */
.author-infobox {
.author-infobox {
     background: white;
     background: white;
     border: 1px solid #e0e0e0;
     border: 1px solid #e0e0e0;
     border-radius: 8px;
     border-radius: 8px;
     padding: 15px;
     padding: 0; /* Removed padding for alignment */
     margin-bottom: 20px;
     margin-bottom: 20px;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden; /* Contain the image */
}
}


.author-photo {
.author-photo {
     text-align: center;
     text-align: center;
     margin-bottom: 10px;
     margin: 0;  /* Remove any margins */
    line-height: 0; /* Remove line-height spacing */
}
}


.author-photo img {
.author-photo img {
     border-radius: 50%;
     width: 80%;
     max-width: 150px;
     height: auto;
    display: block;
    margin: 0 auto;                /* This centres the block image */
    border-radius: 8px 8px 0 0;
}
}


.author-name-box {
.author-name-box {
     text-align: center;
     text-align: center;
     font-size: 1.2em;
     font-size: 1.0em;
     font-weight: bold;
     font-weight: bold;
     margin-bottom: 10px;
     padding: 12px 15px 8px;
    color: #2c3e50;
}
}


Line 157: Line 167:
     line-height: 1.4;
     line-height: 1.4;
     color: #555;
     color: #555;
    padding: 0 15px 15px;
}
}


Line 162: Line 173:
.highlight-box {
.highlight-box {
     background: #fff3cd;
     background: #fff3cd;
     border: 1px solid #ffc107;
     border: 1px solid;  
     border-radius: 6px;
     border-radius: 6px;
     padding: 12px;
     padding: 12px;
Line 170: Line 181:
.highlight-title {
.highlight-title {
     font-size: 1.5em;
     font-size: 1.5em;
    background-color: #ffe494;
     margin-bottom: 5px;
     margin-bottom: 5px;
}
}
Line 178: Line 190:
}
}


/* Key Points */
/* Key Points - Better separation */
.keypoints-float {
.keypoints-float {
     background: white;
     background: white;
     border: 1px solid #e0e0e0;
     border: 1px solid #e0e0e0;
     border-radius: 8px;
     border-radius: 8px;
     padding: 15px;
     padding: 0; /* Remove padding for full-width items */
     margin-top: 20px;
     margin-top: 20px;
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
     box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}
}


.keypoints-header {
.keypoints-header {
     font-size: 1.5em;
     font-size: 1.5em;
     margin-bottom: 10px;
     padding: 15px 15px 10px;
    background: #4bc0f2;
    border-bottom: 1px solid #e0e0e0;
}
}


Line 200: Line 215:


.keypoints-list li {
.keypoints-list li {
     padding: 8px 0;
     padding: 12px 15px;
     border-bottom: 1px solid #eee;
    margin: 0; /* Remove any margins */
     border-bottom: 1px solid #e8e8e8;
    background: #fafafa; /* Subtle background */
     font-size: 0.95em;
     font-size: 0.95em;
    line-height: 1.5;
    transition: background 0.2s; /* Smooth hover effect */
}
.keypoints-list li:hover {
    background: #f0f0f0;  /* Slightly darker on hover */
}
}


.keypoints-list li:last-child {
.keypoints-list li:last-child {
     border-bottom: none;
     border-bottom: none;
}
/* Alternate row colors for better distinction */
.keypoints-list li:nth-child(even) {
    background: #ffffff;
}
.keypoints-list li:nth-child(even):hover {
    background: #f5f5f5;
}
}


Line 223: Line 255:
         margin: 0 auto 20px;
         margin: 0 auto 20px;
         max-width: 100%;
         max-width: 100%;
    }
   
    .author-infobox {
        max-width: 400px;
        margin: 0 auto 20px;
     }
     }
}
}
Line 239: Line 276:
         max-width: 100%;
         max-width: 100%;
     }
     }
}
/* Related Articles */
.related-articles {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}
.related-articles h2 {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}
.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.related-articles li {
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}
.related-articles li:last-child {
    border-bottom: none;
}
.related-articles a {
    color: #2980b9;
    text-decoration: none;
}
.related-articles a:hover {
    text-decoration: underline;
}
}

Latest revision as of 16:06, 2 May 2026

/* Template:Article/styles.css */
/* Separate CSS from wiki markup to prevent conflicts */
.article-container {
    max-width: 1200px;
    margin: 0 auto;
    font-family: 'Noto Sans Malayalam', 'Noto Sans', sans-serif;
    line-height: 1.6;
    color: #333;
}
#contentSub,
#mw-content-subtitle,
.mw-displaytitle-subtitle {
display: none !important;
}
/* Header Styles - Reduced height */
.article-header {
    text-align: center;
    border-bottom: 2px solid #e0e0e0;
    padding: 8px 0 10px 0;  /* Reduced padding */
    margin-bottom: 20px;      /* Reduced margin */
}
.author-info {
    display: flex;
    align-items: center;
    justify-content: center;   /* ← Add this for horizontal centering */
    gap: 15px;
    flex-wrap: wrap;
    min-height: 30px;
    line-height: 1.2;
}
.author-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #2c3e50;
}
.date-info {
    color: #7f8c8d;
    font-size: 0.9em;
}
.category-badge {
    background: #3498db;
    color: white;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 0.85em;
    line-height: 1.4;
}
/* Introduction */
.introduction-section {
    font-size: 1.1em;
    font-style: italic;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin-bottom: 5px;
    background: #f8f9fa;
}
/* Two Column Layout */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin-top: 10px;
}
/* Main Content – force it to contain floats */
.main-content {
    min-width: 0;
    display: flow-root;        /* This creates a block formatting context and clears internal floats */
}
/* Left Image – ensure it doesn't overflow the container */
.image-left {
    float: left;
    margin: 20px 20px 15px 0;
    max-width: 45%;             /* Allow some flexibility */
    width: auto;
    box-sizing: border-box;
    clear: left;                /* Prevent stacking with other floats */
}
.image-left img {
    max-width: 100%;
    height: auto;
}
/* Prevent the image caption from being wider than the image */
.image-left figure,
.image-left .thumb {
    max-width: 100% !important;
    height: auto;
}
.image-left figcaption,
.image-left .thumbcaption {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    padding: 5px;
    background: #f8f9fa;
    margin-top: 5px;
}
.content-image {
    clear: both;
    margin: 25px 0;
    text-align: center;
}
.content-image figure {
    display: inline-block;
    margin: 0 auto;
}
.content-image figcaption,
.content-image .thumbcaption {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    padding: 8px;
    background: #f8f9fa;
}
/* Article Text - Fixed flow around images */
.article-text {
    min-height: 100px; /* Ensure content area has height */
}
/* Source Attribution */
.source-attribution {
    clear: both;  /* Clear any floats from images */
    margin-top: 30px;
    padding: 15px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 0.9em;
}
/* Sidebar */
.right-sidebar {
    min-width: 0;
}

/* Author Infobox - Aligned with left image */
.author-infobox {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;  /* Removed padding for alignment */
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden; /* Contain the image */
}

.author-photo {
    text-align: center;
    margin: 0;  /* Remove any margins */
    line-height: 0; /* Remove line-height spacing */
}

.author-photo img {
    width: 80%;
    height: auto;
    display: block;
    margin: 0 auto;                /* This centres the block image */
    border-radius: 8px 8px 0 0;
}

.author-name-box {
    text-align: center;
    font-size: 1.0em;
    font-weight: bold;
    padding: 12px 15px 8px;
    color: #2c3e50;
}

.author-bio {
    font-size: 0.9em;
    line-height: 1.4;
    color: #555;
    padding: 0 15px 15px;
}

/* Highlights */
.highlight-box {
    background: #fff3cd;
    border: 1px solid; 
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

.highlight-title {
    font-size: 1.5em;
    background-color: #ffe494;
    margin-bottom: 5px;
}

.highlight-text {
    font-size: 0.95em;
    line-height: 1.4;
}

/* Key Points - Better separation */
.keypoints-float {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;  /* Remove padding for full-width items */
    margin-top: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
}

.keypoints-header {
    font-size: 1.5em;
    padding: 15px 15px 10px;
    background: #4bc0f2;
    border-bottom: 1px solid #e0e0e0;
}

.keypoints-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.keypoints-list li {
    padding: 12px 15px;
    margin: 0;  /* Remove any margins */
    border-bottom: 1px solid #e8e8e8;
    background: #fafafa;  /* Subtle background */
    font-size: 0.95em;
    line-height: 1.5;
    transition: background 0.2s; /* Smooth hover effect */
}

.keypoints-list li:hover {
    background: #f0f0f0;  /* Slightly darker on hover */
}

.keypoints-list li:last-child {
    border-bottom: none;
}

/* Alternate row colors for better distinction */
.keypoints-list li:nth-child(even) {
    background: #ffffff;
}

.keypoints-list li:nth-child(even):hover {
    background: #f5f5f5;
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .right-sidebar {
        order: -1; /* Move sidebar to top on mobile */
    }
    
    .image-left {
        float: none;
        margin: 0 auto 20px;
        max-width: 100%;
    }
    
    .author-infobox {
        max-width: 400px;
        margin: 0 auto 20px;
    }
}

/* Print Styles */
@media print {
    .right-sidebar {
        display: none;
    }
    
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .article-container {
        max-width: 100%;
    }
}

/* Related Articles */
.related-articles {
    margin-top: 40px;
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.related-articles h2 {
    font-size: 1.2em;
    margin: 0 0 15px 0;
    color: #2c3e50;
    border-bottom: 1px solid #ddd;
    padding-bottom: 8px;
}

.related-articles ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.related-articles li {
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}

.related-articles li:last-child {
    border-bottom: none;
}

.related-articles a {
    color: #2980b9;
    text-decoration: none;
}

.related-articles a:hover {
    text-decoration: underline;
}