formatting of dropdown login and editor menus (#239)
* removing avenir font, using montserrat instead due to licensing issues * removing old import statement for typeography scss file * dropdown formatting closes #210
This commit is contained in:
parent
5de2a6761f
commit
28323ffc09
7 changed files with 93 additions and 27 deletions
|
@ -111,7 +111,7 @@ function Nav(props) {
|
||||||
return (
|
return (
|
||||||
<li className="nav__item">
|
<li className="nav__item">
|
||||||
<p>
|
<p>
|
||||||
<Link to="/login">Login</Link> <span className="nav__item-spacer">or</span> <Link to="/signup">Sign up</Link>
|
<Link to="/login">Log in</Link> <span className="nav__item-spacer">or</span> <Link to="/signup">Sign up</Link>
|
||||||
</p>
|
</p>
|
||||||
</li>
|
</li>
|
||||||
);
|
);
|
||||||
|
@ -120,14 +120,17 @@ function Nav(props) {
|
||||||
<li className="nav__item">
|
<li className="nav__item">
|
||||||
<a>Hello, {props.user.username}!</a>
|
<a>Hello, {props.user.username}!</a>
|
||||||
<ul className="nav__dropdown">
|
<ul className="nav__dropdown">
|
||||||
|
<li className="nav__dropdown-heading">
|
||||||
|
<a>Hello, {props.user.username}!</a>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<Link to="/sketches">
|
<Link to="/sketches">
|
||||||
My Sketches
|
My sketches
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a onClick={props.logoutUser} >
|
<a onClick={props.logoutUser} >
|
||||||
Logout
|
Log out
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -230,7 +230,7 @@ class Editor extends React.Component {
|
||||||
<a onClick={this.tidyCode}>Tidy</a>
|
<a onClick={this.tidyCode}>Tidy</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a onClick={this.props.showKeyboardShortcutModal}>Keyboard Shortcuts</a>
|
<a onClick={this.props.showKeyboardShortcutModal}>Keyboard shortcuts</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div ref="container" className="editor-holder" tabIndex="0">
|
<div ref="container" className="editor-holder" tabIndex="0">
|
||||||
|
|
|
@ -49,12 +49,12 @@ class Sidebar extends React.Component {
|
||||||
<ul className="sidebar__project-options">
|
<ul className="sidebar__project-options">
|
||||||
<li>
|
<li>
|
||||||
<a aria-label="add folder" onClick={this.props.newFolder} >
|
<a aria-label="add folder" onClick={this.props.newFolder} >
|
||||||
Add Folder
|
Add folder
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a aria-label="add file" onClick={this.props.newFile} >
|
<a aria-label="add file" onClick={this.props.newFile} >
|
||||||
Add File
|
Add file
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -25,7 +25,7 @@ $themes: (
|
||||||
button-background-active-color: #f10046,
|
button-background-active-color: #f10046,
|
||||||
button-hover-color: $white,
|
button-hover-color: $white,
|
||||||
button-active-color: $white,
|
button-active-color: $white,
|
||||||
modal-background-color: #fdfdfd,
|
modal-background-color: #f4f4f4,
|
||||||
modal-button-background-color: #e6e6e6,
|
modal-button-background-color: #e6e6e6,
|
||||||
modal-border-color: #B9D0E1,
|
modal-border-color: #B9D0E1,
|
||||||
icon-color: #8b8b8b,
|
icon-color: #8b8b8b,
|
||||||
|
|
|
@ -96,15 +96,28 @@
|
||||||
display: none;
|
display: none;
|
||||||
@extend %modal;
|
@extend %modal;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: #{20 / $base-font-size}rem;
|
right: #{0 / $base-font-size}rem;
|
||||||
right: #{5 / $base-font-size}rem;
|
padding: #{8 / $base-font-size}rem #{20 / $base-font-size}rem;
|
||||||
padding: #{10 / $base-font-size}rem;
|
font-size: #{12 / $base-font-size}rem;
|
||||||
|
@include themify() {
|
||||||
|
background-color: getThemifyVariable('modal-background-color');
|
||||||
|
box-shadow: 0 0 18px getThemifyVariable('shadow-color');
|
||||||
|
}
|
||||||
.editor--options & {
|
.editor--options & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.editor__options li {
|
||||||
|
padding: #{4 / $base-font-size}rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.editor__options a {
|
||||||
|
@include themify() {
|
||||||
|
color: getThemifyVariable('secondary-text-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.editor__file-name {
|
.editor__file-name {
|
||||||
@include themify() {
|
@include themify() {
|
||||||
color: getThemifyVariable('secondary-text-color');
|
color: getThemifyVariable('secondary-text-color');
|
||||||
|
|
|
@ -34,22 +34,22 @@
|
||||||
|
|
||||||
.nav__dropdown {
|
.nav__dropdown {
|
||||||
@include themify() {
|
@include themify() {
|
||||||
background-color: map-get($theme-map, 'background-color');
|
background-color: map-get($theme-map, 'modal-background-color');
|
||||||
border: 1px solid map-get($theme-map, 'ide-border-color');
|
border: 1px solid map-get($theme-map, 'modal-border-color');
|
||||||
}
|
box-shadow: 0 0 18px getThemifyVariable('shadow-color');
|
||||||
@extend %hidden-element;
|
|
||||||
& li + li {
|
|
||||||
margin-top: #{10 / $base-font-size}rem;
|
|
||||||
}
|
}
|
||||||
|
@extend %hidden-element;
|
||||||
|
text-align: left;
|
||||||
width: #{140 / $base-font-size}rem;
|
width: #{140 / $base-font-size}rem;
|
||||||
.nav__item:hover & {
|
.nav__item:hover & {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: #{10 / $base-font-size}rem;
|
top: #{-8 / $base-font-size}rem;;
|
||||||
left: #{-10 / $base-font-size}rem;
|
left: #{-11 / $base-font-size}rem;
|
||||||
height: auto;
|
height: auto;
|
||||||
}
|
}
|
||||||
|
padding-bottom: #{8 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav__item-spacer {
|
.nav__item-spacer {
|
||||||
|
@ -57,4 +57,39 @@
|
||||||
color: map-get($theme-map, 'inactive-text-color');
|
color: map-get($theme-map, 'inactive-text-color');
|
||||||
}
|
}
|
||||||
padding: 0 #{15 / $base-font-size}rem;
|
padding: 0 #{15 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav__dropdown li {
|
||||||
|
padding: #{4 / $base-font-size}rem #{16 / $base-font-size}rem;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav__dropdown a {
|
||||||
|
@include themify() {
|
||||||
|
color: getThemifyVariable('secondary-text-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav__dropdown a:hover {
|
||||||
|
@include themify() {
|
||||||
|
color: getThemifyVariable('primary-text-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav__dropdown-heading {
|
||||||
|
@include themify() {
|
||||||
|
border-bottom: 1px dashed map-get($theme-map, 'inactive-text-color');
|
||||||
|
}
|
||||||
|
margin-top: #{3 / $base-font-size}rem;
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: #{4 / $base-font-size}rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nav__dropdown-heading a, .nav__dropdown-heading a:hover {
|
||||||
|
@include themify() {
|
||||||
|
color: getThemifyVariable('inactive-text-color');
|
||||||
|
}
|
||||||
|
cursor: default;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
@ -128,20 +128,30 @@
|
||||||
@extend %modal;
|
@extend %modal;
|
||||||
@include themify() {
|
@include themify() {
|
||||||
background-color: getThemifyVariable('modal-background-color');
|
background-color: getThemifyVariable('modal-background-color');
|
||||||
|
box-shadow: 0 0 18px getThemifyVariable('shadow-color');
|
||||||
}
|
}
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 95%;
|
top: 95%;
|
||||||
left: #{15 / $base-font-size}rem;
|
left: #{15 / $base-font-size}rem;
|
||||||
right: #{15 / $base-font-size}rem;
|
right: #{0 / $base-font-size}rem;
|
||||||
display: none;
|
display: none;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
padding: #{4 / $base-font-size}rem #{16 / $base-font-size}rem;
|
padding: #{8 / $base-font-size}rem #{16 / $base-font-size}rem;
|
||||||
z-index: 100;
|
|
||||||
.sidebar__file-item--open > .file-item__content & {
|
.sidebar__file-item--open > .file-item__content & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar__project-options li, .sidebar__file-item-options li {
|
||||||
|
padding: #{4 / $base-font-size}rem 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar__project-options a, .sidebar__file-item-options a {
|
||||||
|
@include themify() {
|
||||||
|
color: getThemifyVariable('secondary-text-color');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.sidebar__file-item-input {
|
.sidebar__file-item-input {
|
||||||
display: none;
|
display: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
@ -235,17 +245,22 @@
|
||||||
|
|
||||||
.sidebar__project-options {
|
.sidebar__project-options {
|
||||||
@extend %modal;
|
@extend %modal;
|
||||||
|
@include themify() {
|
||||||
|
background-color: getThemifyVariable('modal-background-color');
|
||||||
|
box-shadow: 0 0 18px getThemifyVariable('shadow-color');
|
||||||
|
}
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
.sidebar--project-options & {
|
.sidebar--project-options & {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
top: 100%;
|
top: #{22 / $base-font-size}rem;
|
||||||
right: #{-70 / $base-font-size}rem;
|
right: #{-6 / $base-font-size}rem;
|
||||||
padding: #{4 / $base-font-size}rem;
|
padding: #{8 / $base-font-size}rem #{16 / $base-font-size}rem;
|
||||||
width: #{110 / $base-font-size}rem;
|
width: #{145 / $base-font-size}rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.sidebar__file-item--closed .file-item__children {
|
.sidebar__file-item--closed .file-item__children {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue