Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
b10a24a
feat: Add right rails work in progress
imbhargav5 Mar 15, 2019
9538231
feat: Add right rails on desktop
imbhargav5 Apr 4, 2019
8adb53a
fix: Prettier
imbhargav5 Apr 4, 2019
e259559
fix: Update styles as per review
imbhargav5 Apr 10, 2019
f849ca9
fix: Prettier formatting
imbhargav5 Apr 10, 2019
59ba33e
docs: add more info about environment
aymen94 Apr 24, 2019
879aaf2
remove duplicate line and add module dotenv
aymen94 Apr 27, 2019
afd36e5
change word
aymen94 Apr 28, 2019
fb229ad
remove word
BeniCheni Apr 30, 2019
0f90528
fix word
aymen94 Jun 9, 2019
c22fcf9
doc: add more ways
aymen94 Jun 10, 2019
2cce387
feat: Create placeholders for all top level pages
amiller-gh Sep 7, 2019
5917623
feat: Create placeholder /download page
amiller-gh Sep 7, 2019
a58b5c3
feat: Create hooks dir, add useReleaseHistory hook
jonchurch Sep 7, 2019
d29c04e
feat: Create custom hooks dir, create useReleaseData hook
jonchurch Sep 7, 2019
7d9d3c2
chore: Format useReleaseData with prettier
jonchurch Sep 7, 2019
6f7aa17
feat: Add API docs hook and render list of modules for POC API page
amiller-gh Sep 7, 2019
c11f4c5
newbs might get confused with readline var name being same as package…
ORESoftware Apr 21, 2020
2082227
Merge branch 'feat/right-rail' into sweep/den-3945-consolidate-all-br…
ORESoftware Sep 18, 2026
1769c5d
Merge branch 'aymen94-patch-1' into sweep/den-3945-consolidate-all-br…
ORESoftware Sep 18, 2026
deb2091
Merge branch 'api-docs' into sweep/den-3945-consolidate-all-branches-…
ORESoftware Sep 18, 2026
125940c
Merge branch 'patch-1' into sweep/den-3945-consolidate-all-branches-2…
ORESoftware Sep 18, 2026
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
Prev Previous commit
Next Next commit
feat: Add right rails on desktop
  • Loading branch information
imbhargav5 committed Apr 4, 2019
commit 953823193cf7747919c3f3a8b759103fb7b8c3e0
10 changes: 4 additions & 6 deletions src/components/article.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,10 @@ const Article = ({
<article className="article-reader">
<h1 className="article-reader__headline">{title}</h1>
<TOC heading="TABLE OF CONTENTS" tableOfContents={tableOfContents} />
<div className="article-reader__inner">
<div dangerouslySetInnerHTML={{ __html: html }} />
<AuthorsList authors={authors} />
<EditLink relativePath={relativePath} />
<Pagination previous={previous} next={next} />
</div>
<div dangerouslySetInnerHTML={{ __html: html }} />
<AuthorsList authors={authors} />
<EditLink relativePath={relativePath} />
<Pagination previous={previous} next={next} />
</article>
);

Expand Down
59 changes: 45 additions & 14 deletions src/components/layout.css
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ code[class*="language-"] {

main {
display: grid;
grid-template-columns: 420px auto;
grid-template-columns: 420px auto 400px;
}

.nav {
Expand Down Expand Up @@ -161,7 +161,7 @@ main {
.hero {
align-items: center;
display: flex;
grid-column-end: 3;
grid-column-end: 4;
grid-column-start: 1;
height: var(--hero-height);
position: sticky;
Expand Down Expand Up @@ -396,22 +396,53 @@ main {
padding-left: 4.2rem;
}

.article-reader__inner{
max-width: 768px;
width: calc(100% - 36.0rem);
.toc-desktop{
display : hidden;
overflow: hidden;
position: sticky;
top: 140px;
width: 100%;
z-index: 998;
padding: 0 2.4rem;
height: calc(100vh - var(--nav-height));
}

.toc-desktop__nav{
position: sticky;
top : 0;
}
.toc-desktop__nav ul {
text-align: left;
list-style: none;
margin: 0;
padding: 0;
}

.toc-desktop__heading{
padding: 1.2rem;
}

.toc-desktop__nav a {
color: var(--gray9);
text-decoration: none;
display: block;
align-items: center;
border-radius: 4px;
box-sizing: border-box;
cursor: pointer;
line-height: 2.4rem;
list-style: none;
padding: 1.2rem;
position: relative;
width: calc(100% - 4.8rem);
}

@media(min-width:1263px){
.article-reader{
display: flex;
flex-direction: row-reverse;
justify-content: space-between;
}
.article-reader__inner{
flex: 1;
}
.toc{
width: 420px;
display : none;
}
.toc-desktop{
display : block;
}
}

Expand Down
19 changes: 19 additions & 0 deletions src/components/toc-desktop.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import React from 'react';

type Props = {
heading: string;
tableOfContents: string;
};

function TOCDesktop({ heading, tableOfContents }: Props) {
return (
<div className="toc-desktop">
<nav className="toc-desktop__nav">
<h6 className="toc-desktop__heading">{heading}</h6>
<div dangerouslySetInnerHTML={{ __html: tableOfContents }} />
</nav>
</div>
);
}

export default TOCDesktop;
2 changes: 2 additions & 0 deletions src/templates/learn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Hero from '../components/hero';
import Layout from '../components/layout';
import Navigation from '../components/navigation';
import { LearnPageContext, LearnPageData } from '../types';
import TOCDesktop from '../components/toc-desktop';

type Props = {
data: LearnPageData;
Expand Down Expand Up @@ -35,6 +36,7 @@ export default ({
previous={previous}
relativePath={relativePath}
/>
<TOCDesktop heading="TABLE OF CONTENTS" tableOfContents={tableOfContents} />
</Layout>
);
};
Expand Down