Skip to content

Commit

Permalink
Reset docs (#3722)
Browse files Browse the repository at this point in the history
  • Loading branch information
npentrel authored Dec 2, 2024
1 parent 5fc3285 commit b4b74f6
Show file tree
Hide file tree
Showing 475 changed files with 13,976 additions and 20,799 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/check_python_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def parse(type, names):
# Parse the Docs site's service page
if args.local:
if type == "app" or type == "robot":
with open(f"dist/appendix/apis/{service}/index.html") as fp:
with open(f"dist/dev/reference/apis/{service}/index.html") as fp:
soup2 = BeautifulSoup(fp, 'html.parser')
else:
if service in services_page_mapping.keys():
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/update_sdk_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def link_data_types(sdk, data_type_string):

## Link matching text, used in write_markdown():
## NOTE: Currently does not support formatting for link titles
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/appendix/apis/data-client/#binarydatabyfilter)
## (EXAMPLE: bolded DATA tab here: https://docs.viam.com/dev/reference/apis/data-client/#binarydatabyfilter)
def link_description(format_type, full_description, link_text, link_url):

## Supports 'md' link styling or 'html' link styling.
Expand Down Expand Up @@ -1830,23 +1830,23 @@ def write_markdown(type, names, methods):
if type == 'component':
## Replace underscores, and convert generic_component to just generic:
resource_adjusted = resource.replace('generic_component', 'generic').replace('_','-')
proto_anchor_link = '/appendix/apis/components/' + resource_adjusted + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/components/' + resource_adjusted + '/#' + proto_link
elif type == 'service' and resource in ['base_remote_control', 'motion', 'navigation', 'slam', 'vision']:
proto_anchor_link = '/appendix/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/' + resource.replace('base_remote_control', 'base-rc') + '/#' + proto_link
elif type == 'service' and resource == 'data_manager':
proto_anchor_link = '/appendix/apis/services/data/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/data/#' + proto_link
elif type == 'service' and resource == 'generic_service':
proto_anchor_link = '/appendix/apis/services/generic/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/generic/#' + proto_link
elif type == 'service' and resource == 'mlmodel':
proto_anchor_link = '/appendix/apis/services/ml/#' + proto_link
proto_anchor_link = '/dev/reference/apis/services/ml/#' + proto_link
elif type == 'app' and resource == 'app':
proto_anchor_link = '/appendix/apis/fleet/#' + proto_link
proto_anchor_link = '/dev/reference/apis/fleet/#' + proto_link
elif type == 'app' and resource in ["billing", "mltraining"]:
proto_anchor_link = '/appendix/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource.replace('mltraining','ml-training') + '-client/#' + proto_link
elif type == 'app' and resource in ["data", "dataset", "data_sync"]:
proto_anchor_link = '/appendix/apis/data-client/#' + proto_link
proto_anchor_link = '/dev/reference/apis/data-client/#' + proto_link
elif type == 'robot':
proto_anchor_link = '/appendix/apis/' + resource + '/#' + proto_link
proto_anchor_link = '/dev/reference/apis/' + resource + '/#' + proto_link

## Fetch just the first sentence from the proto_override_file (first text string terminated by '.\n'), ignoring hugo
## shortcodes like alerts ('{{%.*%}}.*{{% \[a-b].* %}}'), which precede some override files' (proto descriptions')
Expand Down
4 changes: 2 additions & 2 deletions assets/js/howtos.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ let refinementLists = [customRefinementList({
items: [
{ label: "Data Management", value: "data" },
{ label: "Machine Learning", value: "ml" },
{ label: "Core", value: "core" },
{ label: "Control hardware", value: "core" },
{ label: "Fleet Management", value: "fleet" },
{ label: "Registry", value: "registry" },
{ label: "Integrate other hardware", value: "registry" },
{ label: "Mobility", value: "mobility" },
],
}),
Expand Down
20 changes: 17 additions & 3 deletions assets/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ var siteMenuSubmenus = document.getElementsByClassName(
);

function submenuToggle(menu, toggle) {
console.log(menu)
let open = false;
if (toggle.children[0].className === "fas fa-chevron-right") {
open = true;
Expand All @@ -17,16 +18,29 @@ function submenuToggle(menu, toggle) {
}

// add or remove collapse class to children
let immediateChildren = menu.querySelector("ul").children;
let menuChildren = menu.querySelector("span>ul").children;
if (open) {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of immediateChildren) {
for (let c of menuChildren) {
c.classList.add("collapse");
}
}
let pageChildren = menu.querySelector("span>div>ul").children;
if (pageChildren) {
if (open) {
for (let c of pageChildren) {
c.classList.remove("collapse");
}
} else {
for (let c of pageChildren) {
c.classList.add("collapse");
}
}
}

}

for (let menu of siteMenuSubmenus) {
Expand Down
132 changes: 130 additions & 2 deletions assets/scss/_styles_project.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ a.footnote-ref::after {
/* START Adjust Heading sizes*/

.td-navbar {
background: black !important;
background-color: rgb(19,20,20) !important;
}

/* This ensures there is no padding added to the top logo bar */
Expand All @@ -35,7 +35,7 @@ a.footnote-ref::after {
font-size: 0.833rem;
line-height: 1.667em;
letter-spacing: 0.1875rem;
padding: 5px 10px;
padding: 5px 8px;
text-decoration: none;
text-transform: uppercase;
white-space: nowrap;
Expand All @@ -44,6 +44,11 @@ a.footnote-ref::after {
}
}

.td-navbar .navbar-brand svg {
height: 16px;
margin: 0;
}

.td-navbar .nav-link {
font-family: Space Mono, sans-serif;
font-weight: 400;
Expand Down Expand Up @@ -213,6 +218,14 @@ a > code {
color: #333333 !important;
}

.nav-fold * #TableOfContents ul li ul {
padding: 0;
}

.nav-fold * #TableOfContents ul li ul.is-collapsed {
display: none;
}

p, li {
color: #515151;
a {
Expand Down Expand Up @@ -2556,3 +2569,118 @@ div.explanation > .explanationvisual > .gif {
opacity: 0;
transition: opacity 250ms ease-out;
}

// Top level nav START
nav {
display: flex;
flex-direction: column;
}

.navcontainer {
min-width: 100%;
display: flex;
}

.td-topbar-sections {
margin-right: auto !important;
margin-left: 0 !important;
line-height: unset !important;
}

.td-topbar-sections > ul {
padding: 0;
padding-left: 1.25rem;
margin: 0.25rem 0 0 0;
border-left: 1px solid white;
}

.td-topbar-sections > ul > li {
padding-right: 1.5rem;
display: inline-block;
text-transform: uppercase;
font-family: Roboto Mono Variable,Roboto Mono,ui-monospace,monospace;
font-size: .875rem;
line-height: 1.25rem;
}

.td-topbar-sections > ul > li > a {
color: white;
padding-bottom: 8px;
padding-top: 8px;
}

.td-topbar-sections > ul > li > a:hover {
text-decoration: none;
}

.td-navbar {
min-height: 3.5rem;
}

.navsectiontop.active-path {
border-bottom: 1px solid white;
}

#navsearch {
min-width: 250.633px;
}

span.section-overview {
display: none
}

@media (min-width: 768px) {
.td-sidebar-nav__section ul.ul-1 {
padding-top: 0.5rem
}

.ul-1 > li.nav-fold.hide-if-desktop {
display: none;
}

.menu-toggle.open-on-desktop {
display: none;
}

li.nav-fold.open-on-desktop > span > ul > li {
display: block !important;
}

li.nav-fold.open-on-desktop.header-only > span > a {
text-transform: uppercase;
font-family: Space Mono,sans-serif;
color: #aaa;
margin-top: 1rem;
}

li.nav-fold.open-on-desktop.header-only:first-child > span > a {
margin-top: 0.5rem;
}

li.nav-fold.open-on-desktop.header-only * li {
text-transform: unset;
}

li.open-on-desktop > span > ul.ul-2 {
padding-left: 0;
}

li.open-on-desktop.header-only > span > ul.ul-3 {
padding-left: 0;
}

span.section-overview-title {
display: none
}

span.section-overview {
display: block
}

}

a.tree-root {
display: none;
}

// Top level nav END
Loading

0 comments on commit b4b74f6

Please sign in to comment.