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

#6855 adjust layout in our options tab #6890

Merged
merged 3 commits into from
Feb 23, 2018
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
62 changes: 21 additions & 41 deletions js/notebook/src/tree/Widgets/BannerWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,13 @@ export default class BannerWidget extends Widget {
<path style="fill:#0000000;" d="M 65.480469 13.867188 L 64.949219 13.125 L 64.835938 12.964844 L 64.304688 12.222656 L 61.160156 7.824219 L 62.21875 7.824219 L 64.832031 11.484375 L 67.449219 7.824219 L 68.507812 7.824219 L 65.363281 12.222656 L 65.480469 12.386719 L 68.742188 7.824219 L 69.800781 7.824219 L 66.007812 13.125 L 69.824219 18.464844 L 68.765625 18.464844 Z M 65.480469 13.867188 "/>
</g>
</svg>
`;

static readonly BASIC_HTML_ELEMENT_TEMPLATE = `
<div id="beakerx_env_toolbar" class="list_toolbar">
<div id="beakerx_info"></div>
</div>
`;

constructor(api: BeakerXApi) {
super();

this.addClass('bx-banner-widget');

$(BannerWidget.BASIC_HTML_ELEMENT_TEMPLATE).appendTo(this.node);
api
.getVersion()
.then((version) => {
Expand All @@ -64,48 +57,35 @@ export default class BannerWidget extends Widget {

private createBanner(version: string): void {
$(this.node)
.find('#beakerx_info')
.empty()
.append(
this.createLinkedBannerElementRow(),
this.createLinkedVersionElementRow(version),
this.createLinkedFromElementRow()
);
}
document.createTextNode(' version '),

private createLinkedFromElementRow() {
return $('<div>', {
text: 'from '
}).append(
$('<a>', {
target: '_blank',
href: 'http://opensource.twosigma.com/',
text: 'Two Sigma Open Source',
})
);
}
$('<a>', {
target: '_blank',
href: `${BannerWidget.GITHUB_RELEASE_TAG_BASE_URL}${version}`,
text: version
}),

private createLinkedBannerElementRow() {
return $('<div>').append(
$('<a>', {
class: 'beakerx_site_link',
target: '_blank',
href: 'http://BeakerX.com',
}).append(
$(`${BannerWidget.SVG_LOGO}`)
)
);
document.createTextNode(', from '),

$('<a>', {
target: '_blank',
href: 'http://opensource.twosigma.com/',
text: 'Two Sigma Open Source',
}),

);
}

private createLinkedVersionElementRow(version: string) {
return $('<div>', {
text: 'version '
private createLinkedBannerElementRow() {
return $('<a>', {
class: 'beakerx_site_link',
target: '_blank',
href: 'http://BeakerX.com',
}).append(
$('<a>', {
target: '_blank',
href: `${BannerWidget.GITHUB_RELEASE_TAG_BASE_URL}${version}`,
text: version
})
$(`${BannerWidget.SVG_LOGO}`)
);
}

Expand Down
5 changes: 4 additions & 1 deletion js/notebook/src/tree/styles/tree.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,13 @@

.bx-banner-widget .beakerx_site_link {
display: inline-block;
margin: 0 75px 0 0;
}

.bx-banner-widget svg {
height: 35px;
width: 206px;
height: 59px;
transform: translateY(5px);
}

.bx-options-widget {
Expand Down