Skip to content

Commit

Permalink
Merge pull request TryGhost#4219 from PaulAdamDavis/overlays
Browse files Browse the repository at this point in the history
Rename right-outlet to settings-menu
  • Loading branch information
JohnONolan committed Oct 21, 2014
2 parents 9ec4b35 + a32e5a7 commit 2d401c4
Show file tree
Hide file tree
Showing 21 changed files with 278 additions and 254 deletions.
3 changes: 2 additions & 1 deletion core/client/assets/sass/components/navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
width: 16px;
}

body.right-outlet-expanded & {
// This selector ends up being `body.settings-menu-expanded .global-nav`
body.settings-menu-expanded & {
transform: translate3d(-350px, 0px, 0px);
}

Expand Down
8 changes: 6 additions & 2 deletions core/client/assets/sass/components/notifications.scss
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
z-index: 980;
width: 300px;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
body.right-outlet-expanded & {

// This selector ends up being `body.settings-menu-expanded .notifications`
body.settings-menu-expanded & {
transform: translate3d(350px, 0px, 0px);
}
}
Expand All @@ -24,7 +26,9 @@
right: 0;
z-index: 9999;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
body.right-outlet-expanded & {

// This selector ends up being `body.settings-menu-expanded .notifications`
body.settings-menu-expanded & {
transform: translate3d(100%, 0px, 0px);
}
}
Expand Down
171 changes: 171 additions & 0 deletions core/client/assets/sass/components/settings-menu.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
//
// Settings Menu
// --------------------------------------------------


// Wrapper
.settings-menu-container {
background: $lightestgrey;
width: 100%;
max-width: 350px;
position: fixed;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
transform: translate3d(60px, 0px, 0px);

// This selector ends up being `body.settings-menu-expanded .settings-menu-container`
body.settings-menu-expanded & {
transform: translate3d(0, 0px, 0px);
}
.settings-menu-pane {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: translate3d(0, 0px, 0px);
opacity: 1;
overflow: auto;
-webkit-overflow-scrolling: touch;

@media (min-width: 901px) {
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
}

&.settings-menu-pane-out-left {
transform: translate3d(-100%, 0px, 0px);
}
&.settings-menu-pane-out-right {
transform: translate3d(100%, 0px, 0px);
}
&.settings-menu-pane-in {
transform: translate3d(0, 0px, 0px);
}
}
}

// Header
.settings-menu-header {
position: relative;
padding: 19px 24px;

h4 {
font-weight: normal;
font-size: 1.6rem;
line-height: 1.375;
margin: 0;
}

.close {
right: 0;

&:before {
right: 22px;
}

}

}

.settings-menu-header.subview {

h4 {
text-align: center;
}

.back {
left: 0;

&:before {
left: 19px;
}

}

}

.settings-menu-header-action {
position: absolute;
top: 0;
bottom: 7px;
width: 45px;
padding: 0;

&:before {
position: absolute;
top: 50%;
transform: translateY(-50%);
color: $midbrown;
font-size: 2rem;
}

&:hover {

&:before {
color: $midgrey;
}

}

}

// Content
.settings-menu-content {
padding: 0 24px 24px;

.image-uploader {
padding-top: 35px;
padding-bottom: 35px;
margin: 0 0 1.6rem 0;

input {
width: auto;
}

}

textarea {
height: 108px;
}

.nav-list {
margin-top: 3rem;
}

.pre-image-uploader {
width: auto;
min-height: 50px;
max-height: 250px;
margin-top: 0;
}

.word-count {
font-weight: bold;
}

}//.settings-menu-content


//
// Content Cover
// --------------------------------------------------
// A transparent div that goes over the content, used
// to listen for clicks to close the right outlet

body.settings-menu-expanded {

.content-cover {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 600;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
transform: translate3d(-350px, 0px, 0px); // Not off the screen, to give a parallax effect
}//.editor-cover

}//body.settings-menu-expanded
45 changes: 3 additions & 42 deletions core/client/assets/sass/layouts/default.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
transition: transform 0.4s cubic-bezier(0.1, 0.7, 0.1, 1);
}

// This selector ends up being `body.settings-menu-expanded .viewport`
body.global-nav-expanded & {
transform: translate3d(260px, 0px, 0px);
}

body.right-outlet-expanded & {
// This selector ends up being `body.settings-menu-expanded .viewport`
body.settings-menu-expanded & {
@media (max-width: 350px) {
transform: translate3d(-100%, 0px, 0px);
}
Expand All @@ -54,47 +56,6 @@
}
}

.right-outlet {
background: $lightestgrey;
width: 100%;
max-width: 350px;
position: fixed;
top: 0;
right: 0;
bottom: 0;
overflow: hidden;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
transform: translate3d(60px, 0px, 0px);
body.right-outlet-expanded & {
transform: translate3d(0, 0px, 0px);
}
.outlet-pane {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
transform: translate3d(0, 0px, 0px);
opacity: 1;

overflow: auto;
-webkit-overflow-scrolling: touch;

@media (min-width: 901px) {
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
}

&.outlet-pane-out-left {
transform: translate3d(-100%, 0px, 0px);
}
&.outlet-pane-out-right {
transform: translate3d(100%, 0px, 0px);
}
&.outlet-pane-in {
transform: translate3d(0, 0px, 0px);
}
}
}

//
// The header bar - visible below 900px
Expand Down
53 changes: 34 additions & 19 deletions core/client/assets/sass/layouts/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -673,25 +673,6 @@ body.zen {
text-align: right;
}


//
// Post Settings Menu
// --------------------------------------------------

body.right-outlet-expanded {

.editor-cover {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 600;
transition: transform $side-outlet-transition-duration cubic-bezier(0.1, 0.7, 0.1, 1);
transform: translate3d(-350px, 0px, 0px); // Not off the screen, to give a parallax effect
}//.editor-cover
}//body.right-outlet-expanded

.post-settings {
@include icon($i-settings, 14px);
display: inline-block;
Expand All @@ -718,6 +699,40 @@ body.zen {
} // .post-settings-menu


//
// Post Settings Menu eta Data
// --------------------------------------------------

// These styles are copied from Google.com
.seo-preview {
font-family: Arial, sans-serif;
}

.seo-preview-title {
font-size: 1.8rem;
line-height: 2.16rem;
color: #1E0FBE;
text-overflow: ellipses;
-webkit-text-overflow: ellipsis;
word-wrap: break-word;
}

.seo-preview-link {
margin: 1px 0 2px 0;
font-size: 1.3rem;
line-height: 1.6rem;
color: #006621;
word-wrap: break-word;
}

.seo-preview-description {
font-size: 1.3rem;
line-height: 1.4;
color: #545454;
word-wrap: break-word;
}


//
// Markdown Help Modal
// --------------------------------------------------
Expand Down
Loading

0 comments on commit 2d401c4

Please sign in to comment.