diff --git a/package.json b/package.json index 5517372d..98b776eb 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "license": "MIT", "homepage": "https://github.com/maputnik/editor#readme", "dependencies": { + "classnames": "^2.2.5", "codemirror": "^5.18.2", "color": "^1.0.3", "file-saver": "^1.3.2", diff --git a/src/components/Button.jsx b/src/components/Button.jsx index a7892060..328ae66f 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -1,4 +1,5 @@ import React from 'react' +import classnames from 'classnames' import colors from '../config/colors' import { margins, fontSizes } from '../config/scales' @@ -6,12 +7,13 @@ class Button extends React.Component { static propTypes = { onClick: React.PropTypes.func, style: React.PropTypes.object, + className: React.PropTypes.string, } render() { return {this.props.children} diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 1efa4a8e..0a67d400 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -1,5 +1,6 @@ import React from 'react' import FileReaderInput from 'react-file-reader-input' +import classnames from 'classnames' import MdFileDownload from 'react-icons/lib/md/file-download' import MdFileUpload from 'react-icons/lib/md/file-upload' @@ -23,39 +24,28 @@ import SourcesModal from './modals/SourcesModal' import OpenModal from './modals/OpenModal' import style from '../libs/style' -import colors from '../config/colors' -import { margins, fontSizes } from '../config/scales' -const IconText = props => - {props.children} - +function IconText(props) { + return {props.children} +} -const ToolbarLink = props => - {props.children} - + {props.children} + +} -class ToolbarAction extends React.Component { - static propTypes = { - onClick: React.PropTypes.func.isRequired, - } - - render() { - return - {this.props.children} - - } +function ToolbarAction(props) { + return + {props.children} + } export default class Toolbar extends React.Component { @@ -127,15 +117,10 @@ export default class Toolbar extends React.Component { /> - Maputnik - Maputnik + Maputnik +

Maputnik

diff --git a/src/components/inputs/InputBlock.jsx b/src/components/inputs/InputBlock.jsx index b264e14b..74a3609a 100644 --- a/src/components/inputs/InputBlock.jsx +++ b/src/components/inputs/InputBlock.jsx @@ -30,7 +30,6 @@ class InputBlock extends React.Component { render() { return
this.changeValue(e.target.value)} diff --git a/src/components/inputs/StringInput.jsx b/src/components/inputs/StringInput.jsx index 03af5276..8d6c7447 100644 --- a/src/components/inputs/StringInput.jsx +++ b/src/components/inputs/StringInput.jsx @@ -23,10 +23,7 @@ class StringInput extends React.Component { render() { return this.setState({ value: e.target.value })} diff --git a/src/components/layers/LayerListItem.jsx b/src/components/layers/LayerListItem.jsx index f394559d..d21f7712 100644 --- a/src/components/layers/LayerListItem.jsx +++ b/src/components/layers/LayerListItem.jsx @@ -1,5 +1,6 @@ import React from 'react' import Color from 'color' +import classnames from 'classnames' import CopyIcon from 'react-icons/lib/md/content-copy' import VisibilityIcon from 'react-icons/lib/md/visibility' @@ -34,32 +35,15 @@ class LayerTypeDragHandle extends React.Component { class IconAction extends React.Component { static propTypes = { action: React.PropTypes.string.isRequired, - active: React.PropTypes.bool, onClick: React.PropTypes.func.isRequired, } - constructor(props) { - super(props) - this.state = { hover: false } - } - renderIcon() { - const iconStyle = { - fill: colors.black - } - - if(this.props.active) { - iconStyle.fill = colors.midgray - } - if(this.state.hover) { - iconStyle.fill = colors.lowgray - } - switch(this.props.action) { - case 'copy': return - case 'show': return - case 'hide': return - case 'delete': return + case 'copy': return + case 'show': return + case 'hide': return + case 'delete': return default: return null } } @@ -67,10 +51,7 @@ class IconAction extends React.Component { render() { return this.setState({hover: true})} - onMouseOut={e => this.setState({hover: false})} > {this.renderIcon()} @@ -105,9 +86,6 @@ class LayerListItem extends React.Component { constructor(props) { super(props) - this.state = { - hover: false - } } getChildContext() { @@ -117,42 +95,25 @@ class LayerListItem extends React.Component { } render() { - const itemStyle = { - backgroundColor: colors.black, - } - - if(this.state.hover) { - itemStyle.backgroundColor = Color(colors.black).lighten(0.10).string() - } - - if(this.props.isSelected) { - itemStyle.backgroundColor = Color(colors.black).lighten(0.15).string() - } - - const iconProps = { - active: this.state.hover || this.props.isSelected - } - return
  • this.props.onLayerSelect(this.props.layerId)} - onMouseOver={e => this.setState({hover: true})} - onMouseOut={e => this.setState({hover: false})} - className="maputnik-layer-list-item" - > + className={classnames({ + "maputnik-layer-list-item": true, + "maputnik-layer-list-item-selected": this.props.isSelected, + })}> {this.props.layerId} - this.props.onLayerDestroy(this.props.layerId)} /> - this.props.onLayerCopy(this.props.layerId)} /> - this.props.onLayerVisibilityToggle(this.props.layerId)} /> diff --git a/src/components/modals/AddModal.jsx b/src/components/modals/AddModal.jsx index 93254210..407c0391 100644 --- a/src/components/modals/AddModal.jsx +++ b/src/components/modals/AddModal.jsx @@ -100,7 +100,7 @@ class AddModal extends React.Component { onChange={v => this.setState({ 'source-layer': v })} /> } - diff --git a/src/components/modals/Modal.jsx b/src/components/modals/Modal.jsx index 6061d75f..7f9a31be 100644 --- a/src/components/modals/Modal.jsx +++ b/src/components/modals/Modal.jsx @@ -1,10 +1,6 @@ import React from 'react' - import CloseIcon from 'react-icons/lib/md/close' - import Overlay from './Overlay' -import colors from '../../config/colors' -import { margins, fontSizes } from '../../config/scales' class Modal extends React.Component { static propTypes = { @@ -16,15 +12,15 @@ class Modal extends React.Component { render() { return
    -
    - {this.props.title} - +
    +

    {this.props.title}

    + this.props.onOpenToggle(false)} - style={{ cursor: 'pointer' }} > + > -
    +
    {this.props.children}
    diff --git a/src/components/modals/OpenModal.jsx b/src/components/modals/OpenModal.jsx index 8b186d4b..85a1bb43 100644 --- a/src/components/modals/OpenModal.jsx +++ b/src/components/modals/OpenModal.jsx @@ -10,8 +10,6 @@ import FileUploadIcon from 'react-icons/lib/md/file-upload' import AddIcon from 'react-icons/lib/md/add-circle-outline' import style from '../../libs/style.js' -import colors from '../../config/colors' -import { margins, fontSizes } from '../../config/scales' import publicStyles from '../../config/styles.json' class PublicStyle extends React.Component { @@ -23,38 +21,18 @@ class PublicStyle extends React.Component { } render() { - return
    + return
    - - - Gallery Styles - - Open one of the publicly available styles to start from. - - {styleOptions} +
    +

    Upload Style

    +

    Upload a JSON style from your computer.

    + + + +
    +
    +

    Gallery Styles

    +

    + Open one of the publicly available styles to start from. +

    + {styleOptions} +
    } } diff --git a/src/components/modals/Overlay.jsx b/src/components/modals/Overlay.jsx index 6318b4a7..29849bed 100644 --- a/src/components/modals/Overlay.jsx +++ b/src/components/modals/Overlay.jsx @@ -1,26 +1,5 @@ import React from 'react' -class ViewportOverlay extends React.Component { - static propTypes = { - style: React.PropTypes.object - } - - render() { - const overlayStyle = { - position: 'fixed', - top: 0, - right: 0, - bottom: 0, - left: 0, - zIndex: 2, - opacity: 0.875, - backgroundColor: 'rgb(28, 31, 36)', - ...this.props.style - } - - return
    - } -} class Overlay extends React.Component { static propTypes = { @@ -29,23 +8,14 @@ class Overlay extends React.Component { } render() { - return
    - -
    + let overlayStyle = {} + if(!this.props.isOpen) { + overlayStyle['display'] = 'none'; + } + + return
    +
    {this.props.children} -
    } } diff --git a/src/index.jsx b/src/index.jsx index bd9f49d7..147313c3 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -2,8 +2,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import './favicon.ico' -import './style.scss' -import './index.css' +import './styles/index.scss' import App from './components/App'; ReactDOM.render(, document.querySelector("#app")); diff --git a/src/style.scss b/src/style.scss deleted file mode 100644 index a7fd0b55..00000000 --- a/src/style.scss +++ /dev/null @@ -1,222 +0,0 @@ -$color-black: #1c1f24; -$color-gray: #26282e; -$color-midgray: #36383e; -$color-lowgray: #8e8e8e; -$color-white: #f0f0f0; -$margin-1: 3px; -$margin-2: 5px; -$margin-3: 10px; -$margin-4: 30px; -$margin-5: 40px; -$font-size-1: 24px; -$font-size-2: 20px; -$font-size-3: 18px; -$font-size-4: 16px; -$font-size-5: 14px; -$font-size-6: 12px; -$font-family: Roboto, sans-serif; -.maputnik-toolbar { - position: fixed; - height: 40px; - width: 100%; - z-index: 100; - left: 0; - top: 0; - background-color: $color-black; -} -.maputnik-layer-list-container { - padding: 0; - margin: 0; - padding-bottom: $margin-5; -} -.maputnik-layer-list-item { - font-weight: 400; - color: $color-lowgray; - font-size: $font-size-6; - border-width: 0px 0px 1px; - border-style: solid; - border-color: lighten($color-black, 0.1); - user-select: none; - list-style: none; - z-index: 2000; - cursor: pointer; - position: relative; - padding: 5px 10px; - background-color: $color-black; - line-height: 1.3; - display: flex; - flex-direction: row; -} -.maputnik-icon-action { - display: inline; - margin-left: $margin-1; -} -.maputnik-scroll-container { - overflow-x: visible; - overflow-y: scroll; - bottom: 0px; - left: 0px; - right: 0px; - top: 1px; - position: absolute; -} -.maputnik-layout { - font-family: $font-family; - color: $color-white; -} -.maputnik-layout-list { - position: fixed; - bottom: 0px; - height: 100%; - top: 40px; - left: 0px; - z-index: 1; - width: 200px; - overflow: hidden; - background-color: $color-black; -} -.maputnik-layout-drawer { - position: fixed; - bottom: 0px; - height: 100%; - top: 40px; - left: 200px; - z-index: 1; - width: 350px; - background-color: $color-black; -} -.maputnik-layout-bottom { - position: fixed; - height: 50px; - bottom: 0px; - left: 550px; - z-index: 1; - width: 100%; - background-color: $color-black; -} -.maputnik-layer-editor-group { - font-weight: bold; - font-size: $font-size-5; - background-color: darken($color-gray, 1.5); - color: $color-lowgray; - cursor: pointer; - user-select: none; - padding: $margin-2; - display: flex; - flex-direction: row; - line-height: 20px; -} -.maputnik-map { - position: fixed !important; - top: 40px; - right: 0px; - bottom: 0px; - height: 100%; - width: 75%; -} -.maputnik-toolbar-link { - display: inline-block; - padding: $margin-3; - font-size: $font-size-5; - cursor: pointer; - color: $color-white; - text-decoration: none; -} -.maputnik-toolbar-action { - @extend .maputnik-toolbar-link; - &:hover { - background-color: $color-gray; - } -} -.maputnik-doc-wrapper { - display: inline-block; - box-sizing: border-box; - font-size: $font-size-6; - line-height: 2; - color: $color-lowgray; - user-select: none; - position: relative; - vertical-align: top; - width: 50%; -} -.maputnik-base { - display: inline-block; - box-sizing: border-box; - font-size: $font-size-6; - line-height: 2; - padding-left: $margin-2; - padding-right: $margin-2; -} -.maputnik-input { - @extend .maputnik-base; - border: none; - background-color: $color-gray; - color: $color-lowgray; -} -.maputnik-string { - @extend .maputnik-input; - width: 50%; -} -.maputnik-number { - @extend .maputnik-input; -} -.maputnik-color { - @extend .maputnik-input; -} -.maputnik-color-wrapper { - position: relative; - display: inline; -} -.maputnik-color-picker-offset { -} -.maputnik-color-picker-overlay { -} -.maputnik-button { - cursor: pointer; - background-color: $color-midgray; - color: $color-lowgray; - font-size: $font-size-6; - padding: $margin-2; - user-select: none; - border-radius: 2px; - box-sizing: border-box; -} -.maputnik-layer-list-item-id { - width: 115px; - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} -.maputnik-filter-editor-property { - display: inline-block; - width: '22%'; -} -.maputnik-filter-editor-operator { - display: inline-block; - width: 19%; - margin-left: 2%; -} -.maputnik-filter-editor-args { - display: inline-block; - width: 54%; - margin-left: 2%; -} -.maputnik-modal { - min-width: 350px; - max-width: 600px; - background-color: $color-black; - box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3); -} -.maputnik-modal-header { - background-color: $color-gray; - display: flex; - flex-direction: row; - padding: $margin-3; - font-size: $font-size-5; -} -.maputnik-modal-header-toggle { - cursor: pointer; -} -.maputnik-modal-content { - padding: $margin-3; -} diff --git a/src/styles/_base.scss b/src/styles/_base.scss new file mode 100644 index 00000000..3c15e2ab --- /dev/null +++ b/src/styles/_base.scss @@ -0,0 +1,58 @@ +@font-face { + font-family: 'Roboto'; + src: url('../fonts/Roboto-Regular.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} + +@font-face { + font-family: 'Roboto'; + src: url('../fonts/Roboto-Medium.ttf') format('truetype'); + font-weight: bold; + font-style: normal; +} + +html { + color: $color-white; + font-size: $font-size-2; + box-sizing: border-box; +} + +*, *:before, *:after { + box-sizing: inherit; +} + +p { + font-size: $font-size-6; + padding-top: $margin-2; + padding-bottom: $margin-2; + color: $color-lowgray; +} + +h1 { + font-size: $font-size-2; + margin-bottom: $margin-3; +} + +h2 { + font-size: $font-size-3; + margin-bottom: $margin-3; +} + +h3 { + font-size: $font-size-4; + margin-bottom: $margin-3; +} + +h4 { + font-size: $font-size-5; + margin-bottom: $margin-3; +} + +input:focus { + color: $color-white !important; + outline: #8e8e8e auto 1px !important; +} +label:hover { + color: $color-white; +} diff --git a/src/styles/_components.scss b/src/styles/_components.scss new file mode 100644 index 00000000..822ec8eb --- /dev/null +++ b/src/styles/_components.scss @@ -0,0 +1,57 @@ + +.maputnik-icon-text { + padding-left: $margin-1; +} + +.maputnik-icon-action { + display: inline; + margin-left: $margin-1; +} +.maputnik-map { + position: fixed !important; + top: 40px; + right: 0px; + bottom: 0px; + height: 100%; + width: 75%; +} +.maputnik-doc-wrapper { + display: inline-block; + box-sizing: border-box; + font-size: $font-size-6; + line-height: 2; + color: $color-lowgray; + user-select: none; + position: relative; + vertical-align: top; + width: 50%; +} +.maputnik-button { + cursor: pointer; + background-color: $color-midgray; + color: $color-lowgray; + font-size: $font-size-6; + padding: $margin-2; + user-select: none; + border-radius: 2px; + box-sizing: border-box; + + &:hover { + background-color: lighten($color-midgray, 6); + color: $color-white; + } +} + +.maputnik-big-button { + margin-top: $margin-3; + display: inline-block; + padding: $margin-3; + font-size: $font-size-5; +} +.maputnik-input-block { + margin: $margin-3; +} + +.maputnik-space { + flex-grow: 1; +} diff --git a/src/styles/_input.scss b/src/styles/_input.scss new file mode 100644 index 00000000..2c26cc21 --- /dev/null +++ b/src/styles/_input.scss @@ -0,0 +1,34 @@ +.maputnik-base { + display: inline-block; + box-sizing: border-box; + font-size: $font-size-6; + line-height: 2; + padding-left: $margin-2; + padding-right: $margin-2; +} +.maputnik-input { + @extend .maputnik-base; + border: none; + background-color: $color-gray; + color: $color-lowgray; +} +.maputnik-string { + @extend .maputnik-input; + width: 50%; +} +.maputnik-number { + @extend .maputnik-input; +} + +//COLOR PICKER +.maputnik-color { + @extend .maputnik-input; +} +.maputnik-color-wrapper { + position: relative; + display: inline; +} +.maputnik-color-picker-offset { +} +.maputnik-color-picker-overlay { +} diff --git a/src/styles/_layer.scss b/src/styles/_layer.scss new file mode 100644 index 00000000..5fb4ef19 --- /dev/null +++ b/src/styles/_layer.scss @@ -0,0 +1,74 @@ + +// LAYER LIST +.maputnik-layer-list-container { + padding: 0; + margin: 0; + padding-bottom: $margin-5; +} +.maputnik-layer-list-item { + font-weight: 400; + color: $color-lowgray; + font-size: $font-size-6; + border-width: 0px 0px 1px; + border-style: solid; + border-color: lighten($color-black, 0.1); + user-select: none; + list-style: none; + z-index: 2000; + cursor: pointer; + position: relative; + padding: 5px 10px; + background-color: $color-black; + line-height: 1.3; + display: flex; + flex-direction: row; +} + +.maputnik-icon-action svg { + fill: $color-black; +} + +.maputnik-layer-list-item:hover, .maputnik-layer-list-item-selected { + background-color: lighten($color-black, 0.8); + + .maputnik-icon-action svg { + fill: $color-midgray; + &:hover { + fill: $color-lowgray; + } + } +} +.maputnik-layer-list-item-id { + width: 115px; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +// FILTER EDITOR +.maputnik-layer-editor-group { + font-weight: bold; + font-size: $font-size-5; + background-color: darken($color-gray, 1.5); + color: $color-lowgray; + cursor: pointer; + user-select: none; + padding: $margin-2; + display: flex; + flex-direction: row; + line-height: 20px; +} +.maputnik-filter-editor-property { + display: inline-block; + width: '22%'; +} +.maputnik-filter-editor-operator { + display: inline-block; + width: 19%; + margin-left: 2%; +} +.maputnik-filter-editor-args { + display: inline-block; + width: 54%; + margin-left: 2%; +} diff --git a/src/styles/_layout.scss b/src/styles/_layout.scss new file mode 100644 index 00000000..463bfa4a --- /dev/null +++ b/src/styles/_layout.scss @@ -0,0 +1,46 @@ +//SCROLLING +.maputnik-scroll-container { + overflow-x: visible; + overflow-y: scroll; + bottom: 0px; + left: 0px; + right: 0px; + top: 1px; + position: absolute; +} + +//APP LAYOUT +.maputnik-layout { + font-family: $font-family; + color: $color-white; +} +.maputnik-layout-list { + position: fixed; + bottom: 0px; + height: 100%; + top: 40px; + left: 0px; + z-index: 1; + width: 200px; + overflow: hidden; + background-color: $color-black; +} +.maputnik-layout-drawer { + position: fixed; + bottom: 0px; + height: 100%; + top: 40px; + left: 200px; + z-index: 1; + width: 350px; + background-color: $color-black; +} +.maputnik-layout-bottom { + position: fixed; + height: 50px; + bottom: 0px; + left: 550px; + z-index: 1; + width: 100%; + background-color: $color-black; +} diff --git a/src/styles/_modal.scss b/src/styles/_modal.scss new file mode 100644 index 00000000..89b0c387 --- /dev/null +++ b/src/styles/_modal.scss @@ -0,0 +1,102 @@ +//MODAL +.maputnik-modal { + min-width: 350px; + max-width: 600px; + background-color: $color-black; + box-shadow: 0px 0px 5px 0px rgba(0,0,0,0.3); + z-index: 3; +} +.maputnik-modal-section { + padding-top: $margin-3; + padding-bottom: $margin-3; +} +.maputnik-modal-header { + background-color: $color-gray; + display: flex; + flex-direction: row; + padding: $margin-3; +} +.maputnik-modal-header-title { + font-size: $font-size-5; + margin: 0; +} + +.maputnik-modal-header-toggle { + cursor: pointer; +} +.maputnik-modal-content { + padding: $margin-3; +} + +.maputnik-modal-header-space { + @extend .maputnik-space; +} + +//OVERLAY +.maputnik-overlay-viewport { + position: fixed; + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + z-index: 2; + opacity: 0.875; + background-color: rgb(28, 31, 36); +} + +.maputnik-overlay { + top: 0px; + right: 0px; + bottom: 0px; + left: 0px; + position: fixed; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +//OPEN MODAL +.maputnik-upload-button { + @extend .maputnik-big-button; +} +.maputnik-public-style { + vertical-align: top; + margin-top: 10px; + margin-right: 10px; + background-color: $color-gray; + display: inline-block; + width: 180px; + font-size: $font-size-2; + color: $color-lowgray; +} +.maputnik-public-style-button { + background-color: $color-gray; + padding: $margin-3; + display: block; + + &:hover { + background-color: $color-midgray; + } +} +.maputnik-public-style-header { + display: flex; + flex-direction: row; +} + +.maputnik-public-style-thumbnail { + display: block; + margin-top: $margin-2; + max-width: 100%; +} + +//ADD MODAL +.maputnik-add-layer-button { + margin-right: $margin-3; + float: right; + display: inline-block; + margin-top: 3; + margin-bottom: $margin-3; + text-align: right; + @extend .maputnik-big-button; +} diff --git a/src/styles/_picker.scss b/src/styles/_picker.scss new file mode 100644 index 00000000..f1691b2c --- /dev/null +++ b/src/styles/_picker.scss @@ -0,0 +1,12 @@ + + +.chrome-picker { + background-color: #1c1f24 !important; + font-family: inherit !important; +} + +.chrome-picker input { + background-color: rgb(38, 40, 46) !important; + color: rgb(142, 142, 142) !important; + box-shadow: none !important; +} diff --git a/src/index.css b/src/styles/_reset.scss similarity index 55% rename from src/index.css rename to src/styles/_reset.scss index 5f64e618..6e3e66ce 100644 --- a/src/index.css +++ b/src/styles/_reset.scss @@ -1,17 +1,3 @@ -@font-face { - font-family: 'Roboto'; - src: url('./fonts/Roboto-Regular.ttf') format('truetype'); - font-weight: normal; - font-style: normal; -} - -@font-face { - font-family: 'Roboto'; - src: url('./fonts/Roboto-Medium.ttf') format('truetype'); - font-weight: bold; - font-style: normal; -} - html { background-color: rgb(28, 31, 36); } @@ -60,32 +46,3 @@ table { border-collapse: collapse; border-spacing: 0; } - -.chrome-picker { - background-color: #1c1f24 !important; - font-family: inherit !important; -} - -.chrome-picker input { - background-color: rgb(38, 40, 46) !important; - color: rgb(142, 142, 142) !important; - box-shadow: none !important; -} - -::-webkit-scrollbar { - background-color: #26282e; - width: 5px; -} - -::-webkit-scrollbar-thumb { - border-radius: 6px; - -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); - background-color: #666; - padding-left: 2px; - padding-right: 2px; -} - -input:focus { - color: white !important; - outline: #8e8e8e auto 1px !important; -} diff --git a/src/styles/_scrollbar.scss b/src/styles/_scrollbar.scss new file mode 100644 index 00000000..7f9f9d6c --- /dev/null +++ b/src/styles/_scrollbar.scss @@ -0,0 +1,12 @@ +::-webkit-scrollbar { + background-color: #26282e; + width: 5px; +} + +::-webkit-scrollbar-thumb { + border-radius: 6px; + -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #666; + padding-left: 2px; + padding-right: 2px; +} diff --git a/src/styles/_toolbar.scss b/src/styles/_toolbar.scss new file mode 100644 index 00000000..0e2d5c60 --- /dev/null +++ b/src/styles/_toolbar.scss @@ -0,0 +1,47 @@ +// TOOLBAR +.maputnik-toolbar { + position: fixed; + height: $toolbar-height; + width: 100%; + z-index: 100; + left: 0; + top: 0; + background-color: $color-black; +} + +.maputnik-toolbar-logo { + width: 180px; + text-align: left; + background-color: $color-black; + padding: $margin-2; + height: $toolbar-height; + + h1 { + display: inline; + } + + img { + width: 30px; + height: 30px; + padding-right: $margin-2; + vertical-align: middle; + } +} + +.maputnik-toolbar-link { + vertical-align: top; + height: $toolbar-height; + display: inline-block; + padding: $margin-3; + font-size: $font-size-5; + cursor: pointer; + color: $color-white; + text-decoration: none; + &:hover { + background-color: $color-midgray; + } +} + +.maputnik-toolbar-action { + @extend .maputnik-toolbar-link; +} diff --git a/src/styles/index.scss b/src/styles/index.scss new file mode 100644 index 00000000..953354e1 --- /dev/null +++ b/src/styles/index.scss @@ -0,0 +1,31 @@ +$color-black: #1c1f24; +$color-gray: #26282e; +$color-midgray: #36383e; +$color-lowgray: #8e8e8e; +$color-white: #f0f0f0; +$margin-1: 3px; +$margin-2: 5px; +$margin-3: 10px; +$margin-4: 30px; +$margin-5: 40px; +$font-size-1: 24px; +$font-size-2: 20px; +$font-size-3: 18px; +$font-size-4: 16px; +$font-size-5: 14px; +$font-size-6: 12px; +$font-family: Roboto, sans-serif; + +$toolbar-height: 40px; + +@import 'reset'; +@import 'base'; + +@import 'components'; +@import 'scrollbar'; +@import 'picker'; +@import 'toolbar'; +@import 'modal'; +@import 'layout'; +@import 'layer'; +@import 'input';