Commit 44414c43 by Torkel Ödegaard

Misc styling fixes to explore: start page, slate code editor colors, text…

Misc styling fixes to explore: start page, slate code editor colors, text highlight in auto completeter suggestion
parent 4de28ef8
import React, { PureComponent } from 'react'; import React, { PureComponent } from 'react';
import classNames from 'classnames';
import PromCheatSheet from './PromCheatSheet'; import PromCheatSheet from './PromCheatSheet';
const TAB_MENU_ITEMS = [ export default class PromStart extends PureComponent<any> {
{
text: 'Start',
id: 'start',
icon: 'fa fa-rocket',
},
];
export default class PromStart extends PureComponent<any, { active: string }> {
state = {
active: 'start',
};
onClickTab = active => {
this.setState({ active });
};
render() { render() {
const { active } = this.state;
const customCss = '';
return (
<div style={{ margin: '45px 0', border: '1px solid #ddd', borderRadius: 5 }}>
<div className="page-header-canvas">
<div className="page-container">
<div className="page-header">
<nav>
<ul className={`gf-tabs ${customCss}`}>
{TAB_MENU_ITEMS.map((tab, idx) => {
const tabClasses = classNames({
'gf-tabs-link': true,
active: tab.id === active,
});
return ( return (
<li className="gf-tabs-item" key={tab.id}> <div className="grafana-info-box">
<a className={tabClasses} onClick={() => this.onClickTab(tab.id)}> <PromCheatSheet onClickExample={this.props.onClickExample} />} etdiv>
<i className={tab.icon} />
{tab.text}
</a>
</li>
);
})}
</ul>
</nav>
</div>
</div>
</div>
<div className="page-container page-body">
{active === 'start' && <PromCheatSheet onClickExample={this.props.onClickExample} />}
</div>
</div> </div>
); );
} }
......
...@@ -44,9 +44,10 @@ $brand-success: $green; ...@@ -44,9 +44,10 @@ $brand-success: $green;
$brand-warning: $brand-primary; $brand-warning: $brand-primary;
$brand-danger: $red; $brand-danger: $red;
$query-red: $red; $query-red: #e24d42;
$query-green: $green; $query-green: #74e680;
$query-purple: $purple; $query-purple: #fe85fc;
$query-keyword: #66d9ef;
$query-orange: $orange; $query-orange: $orange;
// Status colors // Status colors
...@@ -203,7 +204,7 @@ $search-filter-box-bg: $gray-blue; ...@@ -203,7 +204,7 @@ $search-filter-box-bg: $gray-blue;
// Typeahead // Typeahead
$typeahead-shadow: 0 5px 10px 0 $black; $typeahead-shadow: 0 5px 10px 0 $black;
$typeahead-selected-bg: $dark-4; $typeahead-selected-bg: $dark-4;
$typeahead-selected-color: $blue; $typeahead-selected-color: $yellow;
// Dropdowns // Dropdowns
// ------------------------- // -------------------------
......
...@@ -49,6 +49,7 @@ $query-red: $red; ...@@ -49,6 +49,7 @@ $query-red: $red;
$query-green: $green; $query-green: $green;
$query-purple: $purple; $query-purple: $purple;
$query-orange: $orange; $query-orange: $orange;
$query-keyword: $blue;
// Status colors // Status colors
// ------------------------- // -------------------------
...@@ -217,10 +218,10 @@ $tab-border-color: $gray-5; ...@@ -217,10 +218,10 @@ $tab-border-color: $gray-5;
$search-shadow: 0 5px 30px 0 $gray-4; $search-shadow: 0 5px 30px 0 $gray-4;
$search-filter-box-bg: $gray-7; $search-filter-box-bg: $gray-7;
// Typeahead // ypeahead
$typeahead-shadow: 0 5px 10px 0 $gray-5; $typeahead-shadow: 0 5px 10px 0 $gray-5;
$typeahead-selected-bg: lighten($blue, 57%); $typeahead-selected-bg: $gray-6;
$typeahead-selected-color: $blue; $typeahead-selected-color: $yellow;
// Dropdowns // Dropdowns
// ------------------------- // -------------------------
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
width: 100%; width: 100%;
cursor: text; cursor: text;
line-height: $line-height-base; line-height: $line-height-base;
color: $text-color-weak; color: $text-color;
background-color: $panel-bg; background-color: $panel-bg;
background-image: none; background-image: none;
border: $panel-border; border: $panel-border;
...@@ -95,45 +95,45 @@ ...@@ -95,45 +95,45 @@
color: $text-color-weak; color: $text-color-weak;
} }
.token.punctuation { .token.variable,
color: $text-color-weak; .token.entity {
color: $text-color;
} }
.token.property, .token.property,
.token.tag, .token.tag,
.token.boolean,
.token.number,
.token.function-name,
.token.constant, .token.constant,
.token.symbol, .token.symbol,
.token.deleted { .token.deleted {
color: $query-red; color: $query-red;
} }
.token.attr-value,
.token.selector, .token.selector,
.token.attr-name,
.token.string, .token.string,
.token.char, .token.char,
.token.function,
.token.builtin, .token.builtin,
.token.inserted { .token.inserted {
color: $query-green; color: $query-green;
} }
.token.boolean,
.token.number,
.token.operator, .token.operator,
.token.entity, .token.url {
.token.url,
.token.variable {
color: $query-purple; color: $query-purple;
} }
.token.function,
.token.attr-name,
.token.function-name,
.token.atrule, .token.atrule,
.token.attr-value,
.token.keyword, .token.keyword,
.token.class-name { .token.class-name {
color: $blue; color: $query-keyword;
} }
.token.punctuation,
.token.regex, .token.regex,
.token.important { .token.important {
color: $query-orange; color: $query-orange;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
width: 100%; width: 100%;
&-container { &-container {
padding: 2rem; padding: $dashboard-padding;
} }
&-wrapper { &-wrapper {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment