Files
cs249r_book/style-light.scss
Vijay Janapa Reddi 5c91fdbc8c Adds auto-generated self-check quizzes
Implements automatic generation of self-check quizzes for textbook chapters and sections.

This includes:
- A new script to generate question/answer pairs using the OpenAI API
- Functionality to inject these quizzes into the markdown files as callout blocks.
- GUI for review.
- Adds quiz and answer definitions to the _quarto.yml and style files

The script extracts sections from markdown files, sends them to OpenAI with a carefully crafted prompt, and formats the returned questions and answers into Quarto-compatible callout blocks. The generated quizzes are inserted at the end of each corresponding section. An "Answers" section is created and populated at the end of the document.
2025-06-16 21:12:15 -04:00

95 lines
2.6 KiB
SCSS

/* Override font color in Sandstone theme */
.theme-sandstone {
color: #A51C30; /* Set font color to #A51C30 */
}
/*-- scss:defaults --*/
:root {
--link-color: #A51C30; /* Define the CSS variable for link color */
}
/*-- scss:rules --*/
body {
-webkit-font-smoothing: auto;
}
a {
color: var(--link-color); /* Use the CSS variable for link color */
text-decoration: underline;
-webkit-text-decoration: underline;
-moz-text-decoration: underline;
-ms-text-decoration: underline;
-o-text-decoration: underline;
}
a:hover {
color: var(--link-color); /* Ensure link color remains the same on hover */
}
a:not([href]):not([class]),
a:not([href]):not([class]):hover {
color: inherit;
text-decoration: none;
}
/* Set color and link styles for active items in the sidebar */
div.sidebar-item-container .active,
div.sidebar-item-container .show > .nav-link,
div.sidebar-item-container .sidebar-link > code {
color: var(--link-color);
}
/* Set color for TOC links on hover */
.sidebar nav[role=doc-toc] ul > li > a:hover,
.sidebar nav[role=doc-toc] ul > li > ul > li > a:hover {
color: var(--link-color) !important;
}
/* Set border color and text color for active TOC links */
.sidebar nav[role=doc-toc] ul > li > a.active,
.sidebar nav[role=doc-toc] ul > li > ul > li > a.active {
border-left: 1px solid var(--link-color);
color: var(--link-color) !important;
}
/* Set text color for active TOC links on hover */
.sidebar nav[role=doc-toc] ul > li > a.active:hover,
.sidebar nav[role=doc-toc] ul > li > ul > li > a.active:hover {
color: var(--link-color);
/* Add any additional hover styles here */
}
.navbar-dark,
.navbar[data-bs-theme=dark] {
--bs-navbar-active-color: var(--link-color);
--bs-navbar-brand-hover-color: var(--link-color);
--bs-navbar-hover-color: var(--link-color);
--bs-navbar-hover-color: var(--link-color);
--bs-navbar-active-color: var(--link-color);
--bs-navbar-brand-hover-color: var(--link-color);
}
.navbar .quarto-navbar-tools .quarto-navigation-tool:hover {
color: var(--link-color);
}
.callout .callout-header {
display: flex;
align-items: center; /* Vertically centers icon + title */
gap: 0em; /* Optional: spacing between icon and text */
padding-top: 0.6em;
padding-bottom: 0.6em;
}
.callout .callout-icon {
display: flex;
align-items: center;
justify-content: center;
height: 100%; /* Ensure it takes the full height of the header */
}
.callout .callout-icon::before {
line-height: 0.5;
vertical-align: middle;
font-size: 1.1em; /* Slightly scale icon if needed */
}