Skip to content

Commit

Permalink
home layout changes
Browse files Browse the repository at this point in the history
  • Loading branch information
colegoldsmith committed May 21, 2024
1 parent ee2dc35 commit 3408cd2
Show file tree
Hide file tree
Showing 9 changed files with 193 additions and 41 deletions.
Binary file added preview-src/img/vector-ui-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added preview-src/img/vector-ui-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
208 changes: 171 additions & 37 deletions preview-src/page-templates/home.adoc

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion src/css/asciidoc/ds-layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
/* Extend .doc max-width */
@layer base {
html[data-layout="landing"],
html[data-layout="full"] {
html[data-layout="full"],
html[data-layout="home"] {
main {
max-width: calc(1280 / var(--rem-base) * 1rem);
width: auto;
Expand All @@ -33,6 +34,12 @@
}
}

html[data-layout="home"] {
.doc > h1.page {
display: none;
}
}

.sect1.text-h1 {
font-size: 1rem;
font-weight: 400;
Expand Down
9 changes: 9 additions & 0 deletions src/layouts/home.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="en" data-layout="home">
<head>
{{> head defaultPageTitle='Untitled'}}
</head>
<body class="{{#with (or page.attributes.role page.role)}} {{{this}}}{{/with}}">
{{> body}}
</body>
</html>
2 changes: 2 additions & 0 deletions src/partials/body.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@
<div class="grid drawer-content {{#if site.keys.globalNav}}pt-32{{else}}pt-20{{/if}}">
{{> main}}
</div>
{{#unless (eq page.layout 'home')}}
<div class="z-30 drawer-side {{#if site.keys.globalNav}}pt-32{{else}}pt-20{{/if}}">
<label for="nav-drawer-input" aria-label="close sidebar" class="drawer-overlay"></label>
{{> nav}}
</div>
{{/unless}}
</div>
{{> body-end-scripts}}
2 changes: 1 addition & 1 deletion src/partials/breadcrumbs.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full'))}}
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full') (eq page.layout 'home'))}}
<nav class="flex" aria-label="breadcrumbs">
{{#if page.breadcrumbs}}
<ul class="flex flex-wrap !list-none !m-0 !p-0">
Expand Down
2 changes: 1 addition & 1 deletion src/partials/support-feedback.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full'))}}
{{#unless (or (eq page.layout 'landing') (eq page.layout 'full') (eq page.layout 'home'))}}
<div class="flex gap-10 mt-12">
<div class="flex flex-col">
<h3 class="!m-0">Was this helpful?</h3>
Expand Down
2 changes: 1 addition & 1 deletion src/partials/toc.hbs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{#unless (or (eq page.layout 'full') (eq page.layout 'landing'))}}
{{#unless (or (eq page.layout 'full') (eq page.layout 'landing') (eq page.layout 'home'))}}
<aside
class="toc sidebar peer sticky hidden h-[min(100%,calc(100vh-10rem))] mb-[14rem] w-[20rem] xl:flex xl:flex-col xl:col-start-2{{#if site.keys.globalNav}} top-[9rem]{{else}} top-[6rem]{{/if}}"
data-title="{{{or page.attributes.toctitle 'Contents'}}}"
Expand Down

0 comments on commit 3408cd2

Please sign in to comment.