refactor(styles): move inline styles from index.qmd to style.scss

- Move abstract section styles to centralized SCSS file
- Move book card styles including hover effects and responsive design
- Move blockquote styles for consistent theming
- Remove inline style blocks from index.qmd for better separation of concerns
- Maintain existing functionality while improving code organization
This commit is contained in:
Vijay Janapa Reddi
2025-08-16 14:45:03 -04:00
parent 3b395f6206
commit 4e54875c3c
2 changed files with 116 additions and 100 deletions

View File

@@ -716,6 +716,102 @@ figcaption.quarto-float-caption-top {
}
}
// Abstract section styles for homepage
.abstract-section {
display: flex;
gap: 40px;
align-items: flex-start;
margin: 30px 0;
}
.abstract-content {
flex: 1;
}
.book-card {
flex-shrink: 0;
width: 300px;
text-align: center;
padding: 25px 15px;
background: linear-gradient(135deg, #fefefe 0%, #f8f9fa 50%, #f0f2f5 100%);
border: 1px solid #e8eaed;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(165, 28, 48, 0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.book-image {
width: 100%;
max-width: 240px;
height: auto;
margin-bottom: 18px;
}
.book-card-link {
text-decoration: none;
color: inherit;
display: block;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.book-card-link:hover {
transform: scale(1.02);
}
.book-card-link:hover .book-card {
box-shadow: 0 12px 40px rgba(165, 28, 48, 0.15), 0 4px 12px rgba(0,0,0,0.08);
}
.book-title {
margin: 0 0 6px 0;
color: #495057;
font-size: 1em;
font-weight: 600;
text-shadow: none;
}
.book-subtitle {
margin: 0;
color: #6c757d;
font-size: 0.9em;
font-weight: 600;
letter-spacing: 0.3px;
}
// Responsive styles for abstract section
@media (max-width: 768px) {
.abstract-section {
flex-direction: column;
gap: 20px;
}
.abstract-content {
margin-bottom: 20px;
}
.book-card-link {
width: 100%;
max-width: 300px;
margin: 0 auto;
}
.book-card {
padding: 15px 10px;
}
.book-image {
max-width: 200px;
margin-bottom: 12px;
}
.book-title {
font-size: 1em;
}
.book-subtitle {
font-size: 0.85em;
}
}
// Support mission section - call-to-action box
.support-mission {
background-color: #f8f9fa;
@@ -750,6 +846,22 @@ figcaption.quarto-float-caption-top {
}
}
// Blockquote styling for homepage
blockquote {
margin: 30px 0;
padding: 20px 25px;
border-left: 4px solid #6c757d;
background-color: #f8f9fa;
font-style: italic;
border-radius: 0 8px 8px 0;
footer {
margin-top: 10px;
font-size: 0.9em;
color: #6c757d;
}
}
// Clean podcast section for homepage
.podcast-section {
background-color: #f8f9fa;

View File

@@ -12,103 +12,7 @@ format:
affiliation: Harvard University
---
```{=html}
<style>
.abstract-section {
display: flex;
gap: 40px;
align-items: flex-start;
margin: 30px 0;
}
.abstract-content {
flex: 1;
}
.book-card {
flex-shrink: 0;
width: 300px;
text-align: center;
padding: 25px 15px;
background: linear-gradient(135deg, #fefefe 0%, #f8f9fa 50%, #f0f2f5 100%);
border: 1px solid #e8eaed;
border-radius: 16px;
box-shadow: 0 8px 32px rgba(165, 28, 48, 0.08), 0 2px 8px rgba(0,0,0,0.04);
}
.book-image {
width: 100%;
max-width: 240px;
height: auto;
margin-bottom: 18px;
}
.book-card-link {
text-decoration: none;
color: inherit;
display: block;
transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}
.book-card-link:hover {
transform: scale(1.02);
}
.book-card-link:hover .book-card {
box-shadow: 0 12px 40px rgba(165, 28, 48, 0.15), 0 4px 12px rgba(0,0,0,0.08);
}
.book-title {
margin: 0 0 6px 0;
color: #495057;
font-size: 1em;
font-weight: 600;
text-shadow: none;
}
.book-subtitle {
margin: 0;
color: #6c757d;
font-size: 0.9em;
font-weight: 600;
letter-spacing: 0.3px;
}
@media (max-width: 768px) {
.abstract-section {
flex-direction: column;
gap: 20px;
}
.abstract-content {
margin-bottom: 20px;
}
.book-card-link {
width: 100%;
max-width: 300px;
margin: 0 auto;
}
.book-card {
padding: 15px 10px;
}
.book-image {
max-width: 200px;
margin-bottom: 12px;
}
.book-title {
font-size: 1em;
}
.book-subtitle {
font-size: 0.85em;
}
}
</style>
```
# Abstract {.unnumbered}
@@ -165,7 +69,7 @@ async function fetchGitHubStars() {
} catch (error) {
console.error('Failed to fetch GitHub stars:', error);
// Show a fallback message if API fails
starElement.textContent = '2,061+';
starElement.textContent = 'Loading...';
starElement.style.opacity = '1';
}
}
@@ -194,9 +98,9 @@ When ML systems concepts are taught, students often learn individual components
**The Future:** As AI becomes more autonomous, the critical bottleneck won't be just the algorithms—it will be the AI engineers who can build efficient, scalable, and sustainable systems.
```{=html}
<blockquote style="margin: 30px 0; padding: 20px 25px; border-left: 4px solid #6c757d; background-color: #f8f9fa; font-style: italic; border-radius: 0 8px 8px 0;">
<blockquote>
"If you want to go fast, go alone. If you want to go far, go together."
<footer style="margin-top: 10px; font-size: 0.9em; color: #6c757d;">— African Proverb</footer>
<footer>— African Proverb</footer>
</blockquote>
```