Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,5 @@ favicon_ico: "favicon.ico"
# - vendor/cache/
# - vendor/gems/
# - vendor/ruby/

color_scheme: delphi
11 changes: 8 additions & 3 deletions docs/_includes/head_custom.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css" integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js" integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js" integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.css"
integrity="sha384-AfEj0r4/OFrOo5t7NnNe46zW/tFgW6x/bCJG8FqQCEo3+Aro6EYUG4+cU+KJWu/X" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/katex.min.js"
integrity="sha384-g7c+Jr9ZivxKLnZTDUhnkOnsh30B4H0rpLUpJ4jAIKs4fnJI+sEnkvrMWph2EDg4"
crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/dist/contrib/auto-render.min.js"
integrity="sha384-mll67QQFJfxn0IYznZYonOWZ644AWYC+Pt2cHqMaRhXVrursRwvLnLaebdGIlYNa" crossorigin="anonymous"
onload="renderMathInElement(document.getElementById('main-content'));"></script>
<script src="{{ '/assets/js/tabs.js' | relative_url }}"></script>
35 changes: 35 additions & 0 deletions docs/_sass/color_schemes/delphi.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// Delphi Color Scheme - Delphidocs Style
// Blue headings/title, Red links

// Core Colors
$cmu-red: #C41230;
$berkley-blue: #002676;
$fg: #172431;
$bg: #fff;
$border: #e1e4e8;

// Base Colors
$body-background-color: $bg;
$body-text-color: $fg;
$headings-color: $berkley-blue;
$link-color: $cmu-red;
$border-color: $border;

// Sidebar and Navigation
$site-title-color: $berkley-blue;
$nav-list-link-color: $fg;
$nav-list-link-hover-color: $berkley-blue;
$nav-list-link-active-color: $berkley-blue;
$nav-child-link-color: $fg;

// Code
$code-background-color: #f6f8fa;
$code-text-color: $fg;

// Layout Configuration
// Sidebar width
$nav-width: 22rem;
$nav-width-md: 22rem;

// Content area width
$content-width: 100rem;
227 changes: 227 additions & 0 deletions docs/_sass/custom/custom.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,227 @@
@import url('https://fonts.googleapis.com/css2?family=Source+Serif+Pro:wght@400;600;700&family=Source+Sans+Pro:wght@400;600&display=swap');

// Import Custom Tabs Styles
@import "custom/tabs";

body {
font-family: 'Source Sans Pro', Helvetica, Arial, sans-serif;
color: var(--body-text);
}

.site-header {
transition: all 0.3s ease;
border-bottom: none !important;
background-color: var(--body-background) !important;
font-family: 'Source Serif Pro', serif !important;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.site-title {
font-family: 'Source Serif Pro', serif !important;
font-weight: 600;
color: #002676 !important;
white-space: nowrap !important;
}

.main-content h1 {
border-bottom: none;
line-height: 1.15;
margin: 2.75rem 0 1.05rem;
}

h1,
h2,
h3,
h4,
h5,
h6 {
font-family: 'Source Serif Pro', serif !important;
color: #002676 !important;
line-height: 1.15;
margin: 2.75rem 0 1.05rem;
}

aside {
padding-top: 1.5rem;
border-left: none;

h2 {
margin-top: 1.2rem;
font-size: 1.25rem;
font-family: 'Source Serif Pro', serif;
color: #002676;
}

.roles {
color: var(--body-text);
opacity: 0.8;
}

.nav-list-item {
margin-bottom: 0.25rem;
}

.nav-list-link {
padding: 0.25rem 0.5rem;
border-radius: 4px;
transition: background-color 0.2s, color 0.2s;

&:hover {
background-color: rgba(0, 38, 118, 0.05);
color: #941120;

Check warning on line 71 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJU&open=AZsPeyMFm-gH-i2lKAJU&pullRequest=1699
text-decoration: none;
}

&.active {
font-weight: 600;
color: #941120;
background-color: rgba(196, 18, 48, 0.03);

Check warning on line 78 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJV&open=AZsPeyMFm-gH-i2lKAJV&pullRequest=1699
}
}

.list-unstyled li {
margin-bottom: 0.5rem;
}

.dev-status .list-unstyled li {
margin-bottom: 0.1rem;
}
}

@media (max-width: 576px) {
aside {
margin: 0.5rem;
width: calc(100vw - 1rem);
background-color: #f8f9fa;
border-radius: 4px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);

h2:first-child {
margin-top: 1rem;
}
}
}

.row>main {
margin-bottom: 56px;
}

footer {
border-top: 1px solid rgba(0, 0, 0, 0.05);
margin: 0 0 1rem 0;
font-size: 0.8rem;
color: var(--body-text);
padding-top: 1rem;
}

.site-footer-credits {
display: none !important;
}

table {
width: 100%;
border-collapse: collapse;
margin-bottom: 1.5rem;

th,
td {
padding: 0.75rem;
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

th {
text-align: left;
font-weight: 600;
color: #002676;
border-bottom: 2px solid rgba(0, 38, 118, 0.2);
}
}

code {
background-color: rgba(0, 0, 0, 0.04);
padding: 0.2em 0.4em;
border-radius: 3px;
font-size: 85%;
}

pre code {
background-color: transparent;
padding: 0;
}

.note,
.warning,
.important,
.tip,
.caution {
padding: 1rem;
margin: 1.5rem 0;
border-left: 4px solid;
border-radius: 4px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);

>p {
margin: 0;
}

>p:first-child strong:first-child {
display: block;
margin-bottom: 0.5rem;
font-size: 0.9rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
}

.note {
background-color: rgba(0, 123, 192, 0.05);
border-left-color: #007BC0;
color: #005F95;

Check warning on line 179 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJW&open=AZsPeyMFm-gH-i2lKAJW&pullRequest=1699

>p:first-child strong:first-child {
color: #005F95;
}
}

.important {
background-color: rgba(0, 38, 118, 0.05);
border-left-color: #002676;
color: #002676;

Check warning on line 189 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJX&open=AZsPeyMFm-gH-i2lKAJX&pullRequest=1699

>p:first-child strong:first-child {
color: #002676;
}
}

.warning,
.caution {
background-color: rgba(196, 18, 48, 0.03);
border-left-color: #C41230;
color: #941120;

Check warning on line 200 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJY&open=AZsPeyMFm-gH-i2lKAJY&pullRequest=1699

>p:first-child strong:first-child {
color: #941120;
}
}


.tip {
background-color: rgba(54, 143, 51, 0.05);
border-left-color: #368f33;
color: #1b5e20;

Check warning on line 211 in docs/_sass/custom/custom.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyMFm-gH-i2lKAJZ&open=AZsPeyMFm-gH-i2lKAJZ&pullRequest=1699

>p:first-child strong:first-child {
color: #2e7d32;
}
}

.note>blockquote,
.warning>blockquote,
.important>blockquote,
.tip>blockquote,
.caution>blockquote {
border-left: none;
padding-left: 0;
margin-left: 0;
color: inherit;
}
64 changes: 64 additions & 0 deletions docs/_sass/custom/tabs.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Code Tabs Styling
.code-tabs {
margin-bottom: 1.5rem;
border: 1px solid var(--border-color);
border-radius: 4px;
overflow: hidden;

.tab-header {
display: flex;
background-color: #f6f8fa;
border-bottom: 1px solid var(--border-color);

button {
background: none;
border: none;
padding: 0.75rem 1.5rem;
cursor: pointer;
font-family: 'Source Sans Pro', sans-serif;
font-size: 0.9rem;
color: var(--body-text);
border-right: 1px solid transparent;
border-bottom: 2px solid transparent;
transition: all 0.2s ease;

&:hover {
color: #005F95;
background-color: rgba(0, 123, 192, 0.05);

Check warning on line 27 in docs/_sass/custom/tabs.scss

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Text does not meet the minimal contrast requirement with its background.

See more on https://sonarcloud.io/project/issues?id=cmu-delphi_delphi-epidata&issues=AZsPeyLUm-gH-i2lKAJT&open=AZsPeyLUm-gH-i2lKAJT&pullRequest=1699
}

&.active {
color: #002676;
font-weight: 600;
background-color: #fff;
border-bottom: 2px solid #002676;
border-right: 1px solid var(--border-color);
margin-bottom: -1px;
}

&:focus {
outline: none;
}
}
}

.tab-content {
display: none;
padding: 1rem;
background-color: #fff;

&.active {
display: block;
}

div[class*="language-"] {
margin: 0;
border-radius: 0;
}

pre {
margin: 0;
border: none;
}
}
}
31 changes: 31 additions & 0 deletions docs/assets/js/tabs.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
// Simple Tab Switching Logic
function activateTab(clickedButton, container) {
const buttons = container.querySelectorAll('.tab-header button');
const contents = container.querySelectorAll('.tab-content');

// Deactivate all
buttons.forEach(btn => btn.classList.remove('active'));
contents.forEach(content => content.classList.remove('active'));

// Activate clicked button
clickedButton.classList.add('active');

// Activate corresponding content
const tabId = clickedButton.dataset.tab;
const content = container.querySelector(`.tab-content[data-tab="${tabId}"]`);
if (content) {
content.classList.add('active');
}
}

function initTabContainer(container) {
const buttons = container.querySelectorAll('.tab-header button');
buttons.forEach(button => {
button.addEventListener('click', () => activateTab(button, container));
});
}

document.addEventListener('DOMContentLoaded', () => {
const tabContainers = document.querySelectorAll('.code-tabs');
tabContainers.forEach(initTabContainer);
});
Loading