Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOCS-3737: Move TOC #4151

Merged
merged 2 commits into from
Mar 27, 2025
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
4 changes: 2 additions & 2 deletions assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,9 @@
@include media-breakpoint-up(md) {
@supports (position: sticky) {
position: sticky;
top: 4rem;
top: 5rem;
z-index: 10;
height: calc(100vh - 4rem);
height: calc(100vh - 5rem);
}
}

Expand Down
49 changes: 46 additions & 3 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ h7, .h7 {
}

.td-sidebar-toc {
top: 6rem;
border-left: unset;
height: calc(100vh - 10rem);
}

// Breadcrumb styling
Expand Down Expand Up @@ -271,10 +273,19 @@ p, li {
}
}

.td-content.tutorials {
max-width: 1200px;
}

footer.tutorials {
max-width: 1200px;
}

// START FOOTER STYLING

footer {
border-top: 1px solid rgba(0, 0, 0, 0.1);
max-width: 1000px;
}

footer a {
Expand Down Expand Up @@ -1261,6 +1272,12 @@ td > ul, td > ol {
animation: linear 2s wiggle 2s 2;
}

@media (min-width: 992px) {
#scrollButton {
margin-right: 10%;
}
}

#chatButtonContent {
display: flex;
justify-content: space-evenly;
Expand Down Expand Up @@ -1399,7 +1416,7 @@ img.frame {
// This ensures the gray sidebar covers the area where the sticky buttons are rendered.
@media (min-width: 768px) {
.td-sidebar {
padding-bottom: 76px;
// padding-bottom: 76px;
margin-bottom: -76px;
}
}
Expand Down Expand Up @@ -2027,7 +2044,7 @@ a.ais-Pagination-link:hover {
// ensure tutorials page is 100% of height

.row.flex-xl-nowrap {
min-height: 90%;
min-height: 100%;
}


Expand Down Expand Up @@ -3327,4 +3344,30 @@ div.tablestep > table td, div.tablestep table td {
margin-top: 1rem;
}

// Numbered list styling END
footer.py-5 {
padding-bottom: 0 !important;
padding-top: 1rem !important;
margin-bottom: -2rem !important;
}

.td-main main {
padding-bottom: 0rem !important;
}

footer {
min-height: 30px !important;
}// Numbered list styling END

.center-main-landing {
justify-content: center;
}

.center-main-landing > .pl-md-5, .center-main-landing > .px-md-5 {
padding-left: 0rem !important;
padding-right: 0rem !important;
}

.center-main-landing .col.hover-card {
margin-left: 0rem !important;
margin-right: 0rem !important;
}
17 changes: 6 additions & 11 deletions layouts/docs/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,13 @@
</aside>
{{ if .Params.noToc }}
{{ else }}
<aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none">
{{ partial "page-meta-links.html" . }}
{{ partial "toc.html" . }}
{{ partial "taxonomy_terms_clouds.html" . }}
</aside>
{{ end }}
<main class="col-12 col-md-9 {{ if .Params.noToc }}col-xl-10{{ else }}col-xl-10{{ end }} pl-md-5" role="main">
<main class="col-12 col-md-9 {{ if .Params.noToc }}col-xl-10{{ else }}col-xl-8{{ end }} pl-md-5" role="main">
{{ partial "version-banner.html" . }}
{{ if ne .Params.noedit true }}
{{ partial "edit-on-github.html" . }}
Expand All @@ -34,17 +39,7 @@
</main>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
</div>
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
Expand Down
12 changes: 11 additions & 1 deletion layouts/docs/changelog.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,20 @@ <h1>{{ .Title }}</h1>
</div>
{{ .Content }}
</div>
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>

{{ partial "footer.html" . }}
</main>
</div>
</div>
{{ partial "footer.html" . }}
</div>
{{ $jsChangelog := resources.Get "js/changelog.js" }}
{{ $jsChangelog := $jsChangelog | minify }}
Expand Down
14 changes: 13 additions & 1 deletion layouts/docs/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@ <h4 class="alert-heading">DRAFT</h4>

{{ .Content }}

<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>

{{ if ne .Params.no_list true}}
{{ $pages := union .Sections .Pages }}
<div id="next-page" class="card-container">
Expand Down Expand Up @@ -90,4 +100,6 @@ <h4 class="alert-heading">DRAFT</h4>
{{ partial "feedback.html" . }}
<br />
{{ end }}{{- end -}}
</div>
</div>

{{ partial "footer.html" . }}
15 changes: 13 additions & 2 deletions layouts/docs/glossary.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,19 @@ <h4 id="{{ printf "%s" $term_identifier }}" class="glossary-anchor">{{ .Title }}
{{ end }}
{{ end }}
</div>
</main>

<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>

{{ partial "footer.html" . }}
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
Expand All @@ -57,7 +69,6 @@ <h4 id="{{ printf "%s" $term_identifier }}" class="glossary-anchor">{{ .Title }}
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>
</div>
{{ partial "footer.html" . }}
</div>
{{ partial "scripts.html" . }}
</body>
Expand Down
18 changes: 4 additions & 14 deletions layouts/docs/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,15 @@
</header>
<div class="container-fluid td-outer">
<div class="td-main">
<div class="row flex-xl-nowrap">
<aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none" id="landing-page-sidebar">
{{ partial "sidebar.html" . }}
</aside>
<main class="col-12 col-md-12 col-xl-12 pl-md-12" role="main">
<div class="row flex-xl-nowrap center-main-landing">
<main class="col-12 col-md-9 col-xl-8 pl-md-5" role="main">
{{ .Render "content" }}
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
</div>
{{ partial "footer.html" . }}
</div>

</div>

{{ partial "scripts.html" . }}

</body>
Expand Down
57 changes: 0 additions & 57 deletions layouts/docs/search.html
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this related to this PR?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not strictly

This file was deleted.

22 changes: 13 additions & 9 deletions layouts/docs/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</a>
</div>
{{ if not .Site.Params.ui.breadcrumb_disable }}{{ partial "breadcrumb.html" . }}{{ end }}
<div class="td-content">
<div class="td-content tutorials">
<h1>{{ .Title }}</h1>
<p>
Tutorials provide instructions to build small projects while teaching you new skills.
Expand Down Expand Up @@ -98,17 +98,21 @@ <h4 class="alert-heading">Javascript</h4>
</noscript>
</div>
<p>Find more examples of how Viam is being used in the world by reviewing <a href="https://www.viam.com/customers" target="_blank">Customer Stories</a>, <a href="/tutorials/">tutorials</a>, or <a href="https://www.viam.com/blog?categories=Tutorials" target="_blank">blog posts</a>.</p>

<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
<button onclick="toTop()" class="docsbutton" id="scrollButton" title="Go to top" style="visibility: hidden;">
<i style="font-size:x-large;" class="fas fa-chevron-up"></i>
</button>

{{ partial "footer.html" . "tutorials" }}
</main>
</div>
{{ $img := resources.GetMatch "/icons/learn-viam-robot-icon-ai.svg" }}
<button class="docsbutton" id="chatButton" title="Chatbot and support">
<span id="chatButtonContent">
<i style="font-size:x-large;" class="fas fa-comments"></i>
<span>Ask AI</span>
</span>
</button>
</div>
{{ partial "footer.html" . }}
</div>

{{ partial "scripts.html" . }}
Expand Down
20 changes: 10 additions & 10 deletions layouts/partials/footer.html
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
{{ $links := .Site.Params.links }}
<footer class="bg-dark py-5 row d-print-none">
<footer class="bg-dark py-5 row d-print-none {{ if eq .Page.Title "Tutorials" }}tutorials{{ end }}">
<div class="container-fluid mx-sm-5">
<div class="row">
<div class="col-6 col-sm-4 text-xs-center order-sm-2">
{{ with $links }}
<div class="col-2 col-sm-2 text-xs-center order-sm-2">
<!-- {{ with $links }}
{{ with index . "user"}}
{{ template "footer-links-block" . }}
{{ end }}
{{ end }}
{{ end }} -->
</div>
<div class="col-6 col-sm-4 text-right text-xs-center order-sm-3">
{{ with $links }}
<div class="col-6 col-sm-2 text-right text-xs-center order-sm-3">
<!-- {{ with $links }}
{{ with index . "developer"}}
{{ template "footer-links-block" . }}
{{ end }}
{{ end }}
{{ end }} -->
</div>
<div class="col-12 col-sm-4 text-center py-2 order-sm-2">
<div class="col-12 col-sm-8 text-center py-2 order-sm-2">
{{ with .Site.Params.copyright }}<small class="text-white">&copy; {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}</small><BR>{{ end }}
{{ with .Site.Params.privacy_policy }}<small class="ml-2"><a href="{{ . }}" target="_blank" rel="noopener">{{ "PRIVACY POLICY" }}</a></small>{{ end }}
{{ with .Site.Params.tos_statement }}<small class="ml-2"><a href="{{ . }}" target="_blank" rel="noopener">{{ "TERMS" }}</a></small> {{ end }}
Expand All @@ -32,7 +32,7 @@
</div>
</div>
</footer>
{{ define "footer-links-block" }}
<!-- {{ define "footer-links-block" }}
<ul class="list-inline mb-0">
{{ range . }}
<li class="list-inline-item mx-2 h3" data-toggle="tooltip" data-placement="top" title="{{ .name }}" aria-label="{{ .name }}">
Expand All @@ -42,4 +42,4 @@
</li>
{{ end }}
</ul>
{{ end }}
{{ end }} -->
Loading
Loading