mirror of
https://github.com/overleaf/overleaf.git
synced 2025-04-17 11:39:15 +00:00
Use a dark editor surround if the theme is dark
This commit is contained in:
parent
24f140ed8b
commit
4ff9fe33b6
10 changed files with 150 additions and 3 deletions
services/web
app/views/project
public
coffee
stylesheets
|
@ -7,7 +7,7 @@ block vars
|
|||
- var suppressSystemMessages = true
|
||||
|
||||
block content
|
||||
.editor(ng-controller="IdeController")
|
||||
.editor(ng-controller="IdeController", ng-class="{'editor-dark': darkTheme}").full-size
|
||||
.loading-screen(ng-show="state.loading")
|
||||
.container
|
||||
h3 Loading...
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
aside#file-tree(ng-controller="FileTreeController")
|
||||
aside#file-tree(ng-controller="FileTreeController").full-size
|
||||
.toolbar.toolbar-small.toolbar-alt(ng-if="permissions.write")
|
||||
a(
|
||||
href,
|
||||
|
|
|
@ -89,6 +89,21 @@ define [
|
|||
We don't want to delete your data on ShareLaTeX, so this project still contains your history and collaborators.
|
||||
If the project has been renamed please look in your project list for a new project under the new name.
|
||||
""")
|
||||
|
||||
DARK_THEMES = [
|
||||
"ambiance", "chaos", "clouds_midnight", "cobalt", "idle_fingers",
|
||||
"merbivore", "merbivore_soft", "mono_industrial", "monokai",
|
||||
"pastel_on_dark", "solarized_dark", "terminal", "tomorrow_night",
|
||||
"tomorrow_night_blue", "tomorrow_night_bright", "tomorrow_night_eighties",
|
||||
"twilight", "vibrant_ink"
|
||||
]
|
||||
$scope.darkTheme = false
|
||||
$scope.$watch "settings.theme", (theme) ->
|
||||
if theme in DARK_THEMES
|
||||
$scope.darkTheme = true
|
||||
else
|
||||
$scope.darkTheme = false
|
||||
|
||||
]
|
||||
|
||||
angular.bootstrap(document.body, ["SharelatexApp"])
|
|
@ -207,3 +207,24 @@
|
|||
position: fixed;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
color: @gray-lighter;
|
||||
background-color: @editor-dark-background-color;
|
||||
|
||||
.ui-layout-resizer {
|
||||
background-color: darken(@editor-dark-background-color, 10%);
|
||||
border: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
color: white;
|
||||
background-color: @gray;
|
||||
border-color: darken(@gray-dark, 10%);
|
||||
&:hover {
|
||||
background-color: darken(@gray, 5%);
|
||||
border-color: darken(@gray-dark, 20%);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,4 +126,13 @@
|
|||
padding: @line-height-computed / 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
.chat {
|
||||
.new-message {
|
||||
background-color: lighten(@editor-dark-background-color, 10%);
|
||||
border-color: @editor-dark-toolbar-border-color;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -92,3 +92,35 @@ aside#file-tree {
|
|||
background-color: @file-tree-droppable-background-color;
|
||||
}
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
aside#file-tree {
|
||||
// background-color: lighten(@editor-dark-background-color, 10%);
|
||||
|
||||
ul.file-tree-list {
|
||||
.dropdown-toggle {
|
||||
color: @editor-dark-highlight-color;
|
||||
}
|
||||
|
||||
li {
|
||||
.entity-name {
|
||||
color: #aaaaaa;
|
||||
&:hover {
|
||||
background-color: black;
|
||||
}
|
||||
}
|
||||
&.selected {
|
||||
> .entity > .entity-name {
|
||||
color: @editor-dark-highlight-color;
|
||||
border-color: @editor-dark-highlight-color;
|
||||
i.fa-folder-open, i.fa-folder, i.fa-file, i.fa-image, i.fa-file-pdf-o {
|
||||
color: @editor-dark-highlight-color;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -155,3 +155,24 @@
|
|||
padding: 0 2px 0;
|
||||
}
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
.pdf-logs {
|
||||
background-color: lighten(@editor-dark-background-color, 10%);
|
||||
}
|
||||
.pdfjs-viewer {
|
||||
background-color: lighten(@editor-dark-background-color, 10%);
|
||||
}
|
||||
.pdf .toolbar {
|
||||
.toolbar-right a {
|
||||
i {
|
||||
border-color: @gray;
|
||||
}
|
||||
&:hover {
|
||||
i {
|
||||
border-color: @gray-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,3 +104,28 @@
|
|||
background-color: #fafafa;
|
||||
}
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
.toolbar-alt {
|
||||
background-color: darken(@editor-dark-background-color, 0%);
|
||||
}
|
||||
.toolbar {
|
||||
border-color: @editor-dark-toolbar-border-color;
|
||||
.btn-full-height {
|
||||
border-color: @editor-dark-toolbar-border-color;
|
||||
&:hover {
|
||||
background-color: black;
|
||||
color: lighten(@link-color, 10%);
|
||||
}
|
||||
}
|
||||
&.toolbar-header {
|
||||
box-shadow: none;
|
||||
}
|
||||
a:not(.btn) {
|
||||
color: @gray;
|
||||
&:hover {
|
||||
color: @gray-light;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,7 +64,6 @@
|
|||
width: @changesListWidth;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
background-color: white;
|
||||
|
||||
.loading {
|
||||
text-align: center;
|
||||
|
@ -266,3 +265,24 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.editor-dark {
|
||||
#trackChanges {
|
||||
aside.change-list {
|
||||
border-color: @editor-dark-toolbar-border-color;
|
||||
|
||||
ul li.change {
|
||||
.day {
|
||||
background-color: darken(@editor-dark-background-color, 10%);
|
||||
border-bottom: 1px solid @editor-dark-toolbar-border-color;
|
||||
}
|
||||
.description {
|
||||
border-bottom: 1px solid @editor-dark-toolbar-border-color;
|
||||
&:hover {
|
||||
background-color: black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -822,3 +822,7 @@
|
|||
|
||||
@toolbar-border-color: @gray-lighter;
|
||||
@file-tree-droppable-background-color: rgb(252, 231, 199);
|
||||
|
||||
@editor-dark-background-color: #333;
|
||||
@editor-dark-toolbar-border-color: #222;
|
||||
@editor-dark-highlight-color: #FFA03A;
|
||||
|
|
Loading…
Add table
Reference in a new issue