Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
20 changes: 10 additions & 10 deletions _extensions/posit-dev/posit-docs/_extension.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
title: posit-docs
author: Ashley Henry, David Aja, Aron Atkins
version: 4.0.2
quarto-required: ">=1.3.340"
version: 7.0.0
quarto-required: ">=1.5.57"
contributes:
project:
project:
Expand All @@ -14,19 +14,19 @@ contributes:
logo: "assets/images/posit-icon-fullcolor.svg"
logo-alt: "Posit Documentation"
right:
- icon: "list"
aria-label: 'Drop-down menu for additional Posit resources'
menu:
- text: "docs.posit.co"
href: "https://docs.posit.co"
- text: "Posit Support"
href: "https://support.posit.co/hc/en-us/"
- icon: "list"
aria-label: 'Drop-down menu for additional Posit resources'
menu:
- text: "docs.posit.co"
href: "https://docs.posit.co"
- text: "Posit Support"
href: "https://support.posit.co/hc/en-us/"
search:
copy-button: true
show-item-context: true
format:
html:
theme:
theme:
light: [theme.scss]
dark: [theme-dark.scss]
link-external-icon: true
Expand Down
66 changes: 28 additions & 38 deletions _extensions/posit-dev/posit-docs/assets/_analytics.html
Original file line number Diff line number Diff line change
@@ -1,40 +1,30 @@
<!-- Google Analytics 4 (G-XXXXXXXXXX) -->
<script>
/* Use GA when hosted by our public docs site, not when installed. */
if (location.href.indexOf("docs.posit.co") >= 0) {
window.dataLayer = window.dataLayer || []
function gtag() { dataLayer.push(arguments) }
/* Set up integration and send page view */
gtag("js", new Date())
gtag("config", "GTM-KHBDBW7")

/* Register virtual event handlers */
document.addEventListener("DOMContentLoaded", function () {
if (document.forms.search) {
var query = document.forms.search.query
query.addEventListener("blur", function () {
if (this.value) {
gtag("event", "search", { search_term: this.value })
}
})
}

/* Send page view on location change */
if (typeof location$ !== "undefined")
location$.subscribe(function (url) {
gtag("config", "GTM-KHBDBW7", {
page_path: url.pathname
})
})
})
/* Create script tag */
var script = document.createElement("script")
script.async = true
script.src = "https://www.googletagmanager.com/gtag/js?id=GTM-KHBDBW7"
<!-- Google Tag Manager -->
<script type="text/javascript">
const sURL = window.location.href;
if (sURL.includes("docs.posit.co") || sURL.includes("netlify.app")) {
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-KHBDBW7');
}
</script>
<!-- End Google Tag Manager -->

/* Inject script tag */
var container = document.getElementsByTagName("head")[0]
var firstChild = container.firstChild
container.insertBefore(script, firstChild)
}
<!-- Display cookie icon in footer in docs.posit.co/netlify.app URLs; hide icon on other URLs -->
<script type="text/javascript">
window.onload = function () {
// target the <li> instead of the icon to allow screenreaders to properly
// calculate the size of the list when the icon is hidden
const prefCenter = document.querySelector("li:has(#open_preferences_center)");
if (prefCenter) { // Test for prefCenter ID presence
const sURL = window.location.href;
// Show the icon only if the URL contains "docs.posit.co" or "netlify.app"
if (sURL.includes("docs.posit.co") || sURL.includes("netlify.app")) {
prefCenter.style.display = "inline";
prefCenter.style.visibility = "visible";
} else {
// Hide the icon for all other URLs
prefCenter.style.display = "none";
prefCenter.style.visibility = "hidden";
}
}
};
</script>
<!-- End display/hide cookie icon -->
71 changes: 66 additions & 5 deletions _extensions/posit-dev/posit-docs/theme-dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ $body-bg: $dark-md-background !default; // dark mode change
}

.nav-link {
font-family: $font-family-monospace;
text-transform: uppercase;
letter-spacing: 0.03em;
font-size: 14px !important;
font-weight: 500 !important;
color: #fff !important;
}

Expand Down Expand Up @@ -172,6 +167,12 @@ $body-bg: $dark-md-background !default; // dark mode change
color: $posit-light-gray-1 !important;
}

// Cookie pop-up

.termsfeed-com---palette-light .cc-pc-head-lang select {
background-color: #ffffff;
}

// Page navigation

.nav-page .nav-page-text {
Expand All @@ -186,6 +187,41 @@ td code:not(.sourceCode) {
color: #ffffff;
}

table caption code {
background-color: #6e768166;
color: #ffffff;
}

h1 code{
background-color: #6e768166 !important;
color: #ffffff;
}

h2 code{
background-color: #6e768166 !important;
color: #ffffff;
}

h3 code{
background-color: #6e768166 !important;
color: #ffffff;
}

h4 code{
background-color: #6e768166 !important;
color: #ffffff;
}

h5 code{
background-color: #6e768166 !important;
color: #ffffff;
}

h6 code{
background-color: #6e768166 !important;
color: #ffffff;
}

// Code blocks

pre code:not(.sourceCode) {
Expand All @@ -194,6 +230,14 @@ pre code:not(.sourceCode) {
padding: 9px !important;
}

code span.co {
font-style: normal !important
}

code span.er {
text-decoration: none !important;
}

/* Code block title*/

.quarto-dark .code-with-filename .code-with-filename-file {
Expand Down Expand Up @@ -309,6 +353,12 @@ div.callout-note.callout-style-default > .callout-header {
background-color: $posit-blue !important;
}

.callout-note .callout-icon::before, .callout.callout-style-simple .callout-toggle::before {
background-size: 1rem 1rem;
background-color: $posit-blue;
border-radius: 1rem;
}

/* Warning */

div.callout-warning.callout {
Expand All @@ -327,6 +377,11 @@ div.callout-warning.callout-style-default > .callout-header {
background-color: $posit-dark-orange-1 !important;
}

.callout-warning .callout-icon::before, .callout.callout-style-simple .callout-toggle::before {
clip-path: polygon(50% 0%, 100% 90%, 0% 90%);
background-color: $posit-orange;
}

/* Important */

div.callout-important.callout {
Expand All @@ -345,6 +400,12 @@ div.callout-important.callout-style-default > .callout-header {
background-color: $posit-burgundy !important;
}

.callout-important .callout-icon::before, .callout.callout-style-simple .callout-toggle::before {
background-size: 1rem 1rem;
background-color: $posit-burgundy;
border-radius: 1rem;
}

// Tables

.table > :not(caption) > * > * {
Expand Down
48 changes: 28 additions & 20 deletions _extensions/posit-dev/posit-docs/theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ $font-size-base: 1rem;
// scss-docs-end font-variables

//font and body color
$body-color: $posit-gray;
$body-color: $posit-dark-gray-1;

// scss-docs-start font-sizes
$h1-font-size: 44px;
Expand All @@ -43,7 +43,7 @@ h2 {

// Headings
// scss-docs-start headings-variables
$headings-font-weight: 300 !important;
$headings-font-weight: 400 !important;
// scss-docs-end headings-variables

// Customize the navbar
Expand All @@ -66,8 +66,9 @@ $list-group-color: $primary !default;

/* Body font */
body {
letter-spacing: -0.2px !important;
font-weight: 300 !important;
font-weight: 400 !important;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}

// Nav and footer
Expand Down Expand Up @@ -97,12 +98,9 @@ body {
}

.nav-link {
font-family: $font-family-monospace;
text-transform: uppercase;
letter-spacing: 0.03em;
font-size: 14px !important;
font-weight: 500 !important;
color: $posit-gray !important;
font-size: 16px !important;
font-weight: 600 !important;
color: $posit-dark-gray-1 !important;
}

.navbar-nav .nav-link.active,
Expand All @@ -111,14 +109,15 @@ body {
font-weight: 700 !important;
}

/* Adds separation between nav bar links and site title */
.navbar-collapse {
margin-left: 50px !important;
}

/* Footer */

.nav-footer {
font-family: $font-family-monospace;
text-transform: uppercase;
font-size: 14px;
border-top: solid #0000001a 0.01em;
align-items: center !important;
}

.nav-footer .nav-footer-center {
Expand Down Expand Up @@ -146,9 +145,7 @@ body {
#footer-right-posit-logo {
width: 18px;
min-width: 18px;
margin-left: -3px !important;
margin-right: -3px !important;
padding-top: 1px;
margin-left: -10px !important;
}

/* Posit logo - footer
Expand All @@ -166,6 +163,11 @@ body {
font-size: 18px !important;
}

.bi-cookie {
font-size: 18px !important;

}

// Footnotes

.footnote-back {
Expand All @@ -188,7 +190,7 @@ body {
.nav-tabs .nav-item.show .nav-link {
color: #000000 !important;
font-weight: 700 !important;
text-decoration: underline 1px $posit-orange !important;
text-decoration: underline 1px $posit-orange !important;
}

.nav-tabs .nav-link:hover,
Expand Down Expand Up @@ -269,7 +271,7 @@ body {
.sidebar nav[role="doc-toc"] > ul li a {
text-transform: none !important;
font-family: $font-family-sans-serif;
font-weight: 400 !important;
font-weight: 500 !important;
letter-spacing: -0.2px !important;
}

Expand Down Expand Up @@ -358,7 +360,7 @@ header h1 .preview-header,
div span.preview-feature {
color: $preview-header;
border: 1px solid $preview-header-border;
font-weight: 400;
font-weight: 500;
font-size: 9pt !important;
padding: 0rem 0.4rem;
}
Expand Down Expand Up @@ -395,3 +397,9 @@ ol.groovyAlpha li > p:before {
line-height: 16px;
vertical-align: middle;
}

// Mermaid diagrams

#mermaid-1 .nodeLabel {
font-weight: 700!important;
}
4 changes: 2 additions & 2 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ website:
- icon: question-circle-fill
aria-label: 'Link to Posit Support'
href: "https://support.posit.co/hc/en-us"
- text: '<a href="#" id="open_preferences_center" title="Manage your cookie preferences"><i class="bi bi-cookie"></i></i></a>'
aria-label: 'Cookie Prefs'
- icon: lightbulb-fill
aria-label: 'Link to Posit Solutions'
href: "https://solutions.posit.co/"
- text: "<img alt='Link to Posit Documentation' src='/images/posit-guide-ltmd.svg' id='footer-right-logo'>"
href: "https://docs.posit.co/"
- text: "<img alt='Link to main Posit site' src='/images/posit-icon-fullcolor.svg' id='footer-right-posit-logo'>"
href: "https://posit.co/"
sidebar:
Expand Down