-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[2.0] docs site redesign! #2243
Merged
Merged
Changes from all commits
Commits
Show all changes
72 commits
Select commit
Hold shift + click to select a range
9241c56
new docs design
af2a0ff
Merge remote-tracking branch 'origin/master' into feature/site-2.0
474c7a4
add icons for icons and select
66be859
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
f8000fe
move Banner into docs-theme
ebec595
fix logo/title alignment
4a28124
NavbarActions uses ButtonGroup
915cce3
replace navbarLeft/Right props with one title prop
717d7c8
nav styles
ae5c716
refactor Navigator to use Omnibar, separate NavigatorTrigger SFC
042cc3e
add select dependency
1d73b25
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
b9de85b
add renderNavMenuItem prop to Documentation
2aa72bf
refactor NavMenu styles and pull NavMenuItem to separate file
2dbf749
custom nav menu items in BlueprintDocs
c43222c
rename JS table page
f19ee92
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
2891d91
update timezone icon, mute pkg version link
b11938c
big refactors to docs-theme
2ccd94a
NavbarActions => NavHeader, new style
efe5b0a
tweak spacing variables
844a935
improve pkg icon colors
2480e1c
navigator styles
d1b7664
prevent body scrolling
334758f
prevent nav wrapper from scrolling horizontally
c32a643
delete unnecessary SVG assets
789dfff
update timezone icon
e522768
fill-rule -> fillRule
0d09d57
more squared off padding for the content
76735ad
API dialog is now a an overlay
1291fdc
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
ce3747d
Merge remote-tracking branch 'origin/develop' into feature/site-2.0
5e9e411
fix alignment of interface description and first th/td
aada85a
tweak dark props overlay shadow
1f6b246
Documentation banner prop, simplify banner styles
f405337
Merge branch 'feature/site-2.0' of github.com:palantir/blueprint into…
bcaffdb
start fixing TypeAliasTable
4cac783
dark theme on API overlay
eeacffc
fix type alias style
1eeb22b
navigator changes hash
74322cc
fix package name alignment in modifiers table
9b0eeb2
remove outline on content wrapper (because of tabIndex)
c641b72
Merge branch 'feature/site-2.0' of github.com:palantir/blueprint into…
5d19d96
fix running-text issues with optional className in renderBlock
3a30862
versions menu in navHeader
8a85ea9
delete unused navbar styles, move some to docs-app
825c309
KeyCombo minimal modifiers renders short hotkey, use it in NavButton
02d2f92
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
39af756
fix padding on docs-section in interface table
336ffb3
fix padding of interface docs
a3582ac
renderBlock wraps all contents in a single element
de1e376
fix Color aliases table, remove huge unused comment
95b2dc7
use interactive tags for View Source links
af111b2
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
5bf9ed7
move documentation scroll handler to fix scrollspy
6cc8b34
small fixes: examples alignment, renderBlock key, banner height
e92c19a
fix the running-text problems once and for all!
259c075
docs-flex layout uses pt-flex-container, fix banner height
12ae349
switch View Source link to minimal button (clickable)
bd4a991
fix icons list width
75fb3b2
:star2: Components becomes non-interactive header that expands its menu!
cadae7a
switch back to body scroll container layout
b25ed4e
prevent page shift when Overlay open:
433c7ba
restore scroll spy
ed541fc
new Logo component rendering logo SVG inline
18b4e60
Merge branch 'develop' of github.com:palantir/blueprint into feature/…
6088a31
refactor logo styles, delete old SVG files
0188e90
small navigator style fixes
0442895
fix docs-nav height with banner
bd004a5
fix sidebar width, remove left padding
7207678
fix api overlay desc size
llorca c76b37a
make copy to clipboard tick consistent everywhere
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/* | ||
* Copyright 2015 Palantir Technologies, Inc. All rights reserved. | ||
* | ||
* Licensed under the terms of the LICENSE file distributed with this project. | ||
*/ | ||
|
||
import * as React from "react"; | ||
|
||
export const Logo: React.SFC = () => ( | ||
<svg width="65" height="76" xmlns="http://www.w3.org/2000/svg"> | ||
<g fillRule="nonzero"> | ||
<path d="M28.795 2.421l2.177-1.254a4 4 0 0 1 4.039.027l28.032 16.643A4 4 0 0 1 65 21.277v33.446a4 4 0 0 1-1.958 3.44l-28.03 16.644a4 4 0 0 1-4.039.027L2.004 58.154A4 4 0 0 1 0 54.687V21.313a4 4 0 0 1 2.004-3.467l26.79-15.425zm3.175.48l-.499-.867v-1h3.742L32.01 2.878a2.008 2.008 0 0 0-.04.023zM3.002 19.58A2 2 0 0 0 2 21.313v33.374a2 2 0 0 0 1.002 1.733l28.97 16.68a2 2 0 0 0 2.018-.013l28.03-16.644a2 2 0 0 0 .98-1.72V21.277a2 2 0 0 0-.979-1.72L33.99 2.914a2 2 0 0 0-1.98-.036L3.003 19.58z" /> | ||
<path d="M34.512 19.74L49 28.435v20.132l-15.984 9.59-.506-.284-14.98-8.427A3 3 0 0 1 16 46.83V28.415l15.497-8.717a3 3 0 0 1 3.015.043zM47 29.567l-13.518-8.11a1 1 0 0 0-1.005-.015L18 29.585V46.83a1 1 0 0 0 .51.871l14.474 8.143L47 47.434V29.566z" /> | ||
<path d="M.396 21.602l.97-1.749 26.238 14.545-.97 1.749z" /> | ||
<path d="M23.396 34.602l.97-1.749 26.238 14.545-.97 1.749z" /> | ||
<path d="M33 20l-16 9v19l16-9V20zm30 0l-16 9v20l16-9V20z" /> | ||
<path d="M63 39l-16 9v19l16-9z" /> | ||
<path d="M49 47l-16 9v19l16-9z" /> | ||
</g> | ||
</svg> | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
* Copyright 2017 Palantir Technologies, Inc. All rights reserved. | ||
* | ||
* Licensed under the terms of the LICENSE file distributed with this project. | ||
*/ | ||
|
||
import { | ||
Classes, | ||
Hotkey, | ||
Hotkeys, | ||
HotkeysTarget, | ||
Icon, | ||
Menu, | ||
MenuItem, | ||
NavbarHeading, | ||
Popover, | ||
Position, | ||
Tag, | ||
} from "@blueprintjs/core"; | ||
import { IPackageInfo } from "@blueprintjs/docs-data"; | ||
import { NavButton } from "@blueprintjs/docs-theme"; | ||
import classNames from "classnames"; | ||
import * as React from "react"; | ||
import { Logo } from "./logo"; | ||
|
||
export interface INavHeaderProps { | ||
onToggleDark: (useDark: boolean) => void; | ||
useDarkTheme: boolean; | ||
versions: IPackageInfo[]; | ||
} | ||
|
||
@HotkeysTarget | ||
export class NavHeader extends React.PureComponent<INavHeaderProps, {}> { | ||
public render() { | ||
const { useDarkTheme } = this.props; | ||
return ( | ||
<> | ||
<div className="docs-nav-title"> | ||
<a className="docs-logo" href="/"> | ||
<Logo /> | ||
</a> | ||
<div> | ||
<NavbarHeading className="docs-heading"> | ||
<span>Blueprint</span> {this.renderVersionsMenu()} | ||
</NavbarHeading> | ||
<a className={Classes.TEXT_MUTED} href="https://github.com/palantir/blueprint" target="_blank"> | ||
<small>View on GitHub</small> | ||
</a> | ||
</div> | ||
</div> | ||
<div className="docs-nav-divider" /> | ||
<NavButton | ||
icon={useDarkTheme ? "flash" : "moon"} | ||
hotkey="shift + d" | ||
text={useDarkTheme ? "Light theme" : "Dark theme"} | ||
onClick={this.handleDarkSwitchChange} | ||
/> | ||
</> | ||
); | ||
} | ||
|
||
public renderHotkeys() { | ||
return ( | ||
<Hotkeys> | ||
<Hotkey | ||
global={true} | ||
combo="shift + d" | ||
label="Toggle dark theme" | ||
onKeyDown={this.handleDarkSwitchChange} | ||
/> | ||
</Hotkeys> | ||
); | ||
} | ||
|
||
private renderVersionsMenu() { | ||
const { versions } = this.props; | ||
if (versions.length === 1) { | ||
return ( | ||
<div className="pt-text-muted" key="_versions"> | ||
v{versions[0].version} | ||
</div> | ||
); | ||
} | ||
|
||
const match = /docs\/v([0-9]+)/.exec(location.href); | ||
// default to latest release if we can't find a major version in the URL | ||
const currentRelease = match == null ? versions[versions.length - 1].version : match[1]; | ||
const releaseItems = versions.map((rel, i) => <MenuItem key={i} href={rel.url} text={rel.version} />); | ||
const menu = <Menu className="docs-version-list">{releaseItems}</Menu>; | ||
|
||
return ( | ||
<Popover content={menu} position={Position.BOTTOM} key="_versions"> | ||
<Tag className={classNames(Classes.INTERACTIVE, Classes.MINIMAL, Classes.ROUND)}> | ||
v{currentRelease.split(".", 1)} <Icon icon="caret-down" /> | ||
</Tag> | ||
</Popover> | ||
); | ||
} | ||
|
||
private handleDarkSwitchChange = () => { | ||
this.props.onToggleDark(!this.props.useDarkTheme); | ||
}; | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2018