From a6cd210ef6160f1dc9ec678ec77feabc3875c25f Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Fri, 15 Dec 2017 12:02:11 +0000 Subject: [PATCH] Update v1 dash pane with new copy & restyle to fit correctly --- services/web/app/views/project/list.pug | 10 +++-- .../stylesheets/_ol_style_includes.less | 2 +- .../stylesheets/app/sidebar-v1-dash-link.less | 32 -------------- .../stylesheets/app/sidebar-v2-dash-pane.less | 42 +++++++++++++++++++ .../public/stylesheets/core/ol-variables.less | 7 ++-- 5 files changed, 53 insertions(+), 40 deletions(-) delete mode 100644 services/web/public/stylesheets/app/sidebar-v1-dash-link.less create mode 100644 services/web/public/stylesheets/app/sidebar-v2-dash-pane.less diff --git a/services/web/app/views/project/list.pug b/services/web/app/views/project/list.pug index 7ee28763a8..710eeee028 100644 --- a/services/web/app/views/project/list.pug +++ b/services/web/app/views/project/list.pug @@ -64,10 +64,12 @@ block content include ./list/side-bar if isShowingV1Projects && settings.overleaf && settings.overleaf.host - .project-list-sidebar-v1-link.col-md-2.col-xs-3 - span Want to go back to the V1 dashboard? - a.btn.btn-default(href=settings.overleaf.host + "/dash?prefer-v1-dash=1") - | Go back to V1 + .project-list-sidebar-v2-pane.col-md-2.col-xs-3 + span Welcome to the Overleaf v2 alpha! #[a.project-list-sidebar-faq(href=settings.overleaf.host + "/help/v2") Find out more]. + span To tag or rename your v1 projects, please go back to Overleaf v1. + a.project-list-sidebar-v1-link.btn.btn-default( + href=settings.overleaf.host + "/dash?prefer-v1-dash=1" + ) Go back to v1 .project-list-main.col-md-10.col-xs-9 include ./list/notifications diff --git a/services/web/public/stylesheets/_ol_style_includes.less b/services/web/public/stylesheets/_ol_style_includes.less index c8505c2e56..f2832bd219 100644 --- a/services/web/public/stylesheets/_ol_style_includes.less +++ b/services/web/public/stylesheets/_ol_style_includes.less @@ -1 +1 @@ -@import "app/sidebar-v1-dash-link.less"; +@import "app/sidebar-v2-dash-pane.less"; diff --git a/services/web/public/stylesheets/app/sidebar-v1-dash-link.less b/services/web/public/stylesheets/app/sidebar-v1-dash-link.less deleted file mode 100644 index 072042226e..0000000000 --- a/services/web/public/stylesheets/app/sidebar-v1-dash-link.less +++ /dev/null @@ -1,32 +0,0 @@ -@v1-dash-link-height: 130px; - -.project-list-sidebar { - height: calc(~"100% -" @v1-dash-link-height); -} - -.project-list-sidebar-v1-link { - position: absolute; - bottom: 0; - height: @v1-dash-link-height; - background-color: @v1-dash-link-bg; - text-align: center; - display: flex; - flex-direction: column; - justify-content: center; - color: white; -} - - .project-list-sidebar-v1-link a { - display: block; - margin-left: auto; - margin-right: auto; - margin-top: 12.5px; - padding-top: 0; - padding-bottom: 0; - background-color: @v1-dash-link-btn-bg; - color: #fff; - } - - .project-list-sidebar-v1-link a:hover { - background-color: @v1-dash-link-btn-hover-bg; - } \ No newline at end of file diff --git a/services/web/public/stylesheets/app/sidebar-v2-dash-pane.less b/services/web/public/stylesheets/app/sidebar-v2-dash-pane.less new file mode 100644 index 0000000000..6adb952bed --- /dev/null +++ b/services/web/public/stylesheets/app/sidebar-v2-dash-pane.less @@ -0,0 +1,42 @@ +@v2-dash-pane-link-height: 130px; + +.project-list-sidebar { + height: calc(~"100% -" @v2-dash-pane-link-height); +} + +.project-list-sidebar-v2-pane { + position: absolute; + bottom: 0; + height: @v2-dash-pane-link-height; + background-color: @v2-dash-pane-bg; + text-align: center; + display: flex; + flex-direction: column; + justify-content: center; + color: white; + font-size: 13px; +} + + .project-list-sidebar-faq { + color: @v2-dash-pane-link-color; + text-decoration: underline; + } + + .project-list-sidebar-faq:hover { + color: @v2-dash-pane-link-color; + text-decoration: none; + } + + .project-list-sidebar-v1-link { + display: block; + margin-left: auto; + margin-right: auto; + padding-top: 0; + padding-bottom: 0; + background-color: @v2-dash-pane-btn-bg; + font-size: 13px; + } + + .project-list-sidebar-v1-link:hover { + background-color: @v2-dash-pane-btn-hover-bg; + } \ No newline at end of file diff --git a/services/web/public/stylesheets/core/ol-variables.less b/services/web/public/stylesheets/core/ol-variables.less index 508ae6ed37..329f1005f1 100644 --- a/services/web/public/stylesheets/core/ol-variables.less +++ b/services/web/public/stylesheets/core/ol-variables.less @@ -110,9 +110,10 @@ @sidebar-active-bg : @ol-blue-gray-6; @sidebar-hover-bg : @ol-blue-gray-4; @sidebar-hover-text-decoration : none; -@v1-dash-link-bg : @ol-blue-gray-4; -@v1-dash-link-btn-bg : @ol-blue-gray-5; -@v1-dash-link-btn-hover-bg : @ol-blue-gray-6; +@v2-dash-pane-bg : @ol-blue-gray-4; +@v2-dash-pane-link-color : #FFF; +@v2-dash-pane-btn-bg : @ol-blue-gray-5; +@v2-dash-pane-btn-hover-bg : @ol-blue-gray-6; @folders-menu-margin : 0 -(@grid-gutter-width / 2); @folders-menu-line-height : @structured-list-line-height;