Skip to content

Commit

Permalink
Merge pull request #168 from 10up/feature/content-width
Browse files Browse the repository at this point in the history
Feature/content width
  • Loading branch information
fabiankaegy authored Aug 22, 2024
2 parents 572b015 + 2a9a444 commit 004e927
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 7 deletions.
3 changes: 2 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@
@import "global-sidebar";
@import "homepage-search";
@import "homepage-components";
@import "docs-content";
@import "docs-content";
@import "toc";
16 changes: 13 additions & 3 deletions src/css/global-footer.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
.footer {
padding-inline: 0;
border-top: 2px solid var(--ifm-color-secondary-lightest);

& > .container {
padding: 0;
margin: 0;
max-width: 100%;
}
}

.footer-about {
Expand All @@ -10,7 +16,7 @@

.footer-about-inner {
margin: 0 auto;
max-width: var(--wide-width);
max-width: var(--normal-width);
text-align: center;
}

Expand Down Expand Up @@ -57,14 +63,18 @@
background-color: var(--ifm-color-primary-dark);
}

.footer__links {
max-width: var(--normal-width);
margin: 0 auto;
}

.footer-10up {
padding: 3rem var(--ifm-spacing-horizontal);
}

.footer-10up .wrap {
margin: 0 auto;
max-width: var(--wide-width);
max-width: var(--normal-width);
text-align: center;
}

Expand Down Expand Up @@ -96,4 +106,4 @@
.footer-10up p {
margin: 0;
}
}
}
2 changes: 1 addition & 1 deletion src/css/global-site.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ main > .container {
}

.content-wrapper {
width: var(--wide-width);
width: var(--normal-width);
margin-inline: auto;
}

Expand Down
32 changes: 32 additions & 0 deletions src/css/toc.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.table-of-contents {
border-left: none;

& li {
margin: 0 0.25rem 0 0;

& ul {
margin-left: 0.75rem;
}
}

& a {
padding: var(--ifm-menu-link-padding-vertical) var(--ifm-menu-link-padding-horizontal);
text-decoration: none;
border-radius: .5rem;

&:hover {
color: var(--ifm-color-primary);
text-decoration: underline;
}
}

& .table-of-contents__link--active {
outline: 1px solid #ddd;
box-shadow: 0 2px 3px -1px rgba(0, 0, 0, 0.1);
font-weight: 700;
}

& code {
font-size: inherit;
}
}
5 changes: 3 additions & 2 deletions src/css/variables.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
--ifm-link-decoration: underline;
--ifm-link-hover-color: var(--ifm-color-primary-dark);
--ifm-code-font-size: 1rem;
--ifm-container-width-xl: 80ch;
--ifm-container-width-xl: 120ch;
--ifm-container-width: 80ch;
--ifm-font-family-base: -apple-system, BlinkMacSystemFont, "Segoe UI",
Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
Expand All @@ -36,6 +36,7 @@
--c-10up-secondary-dark: #7ED5D4;

--wide-width: min(calc(100vw - 2.5rem), calc(var(--ifm-container-width-xl) + 300px));
--normal-width: min(calc(100vw - 2.5rem), calc(var(--ifm-container-width) + 300px));

--docusaurus-highlighted-code-line-bg: #e0e0e0;
}
}

0 comments on commit 004e927

Please sign in to comment.