Skip to content

Commit

Permalink
Translate View changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mathjazz committed Oct 23, 2023
1 parent 07c6c66 commit c4d5a2f
Show file tree
Hide file tree
Showing 35 changed files with 137 additions and 108 deletions.
27 changes: 21 additions & 6 deletions pontoon/base/static/css/dark-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@
--blue-2: #5f7285;
--light-blue: #4fc4f6;

/* Translation workspace */
--translation-background: #3f4752;
--translation-border: #5e6475;
--translation-color: #ffffff;
--translation-secondary-color: #aaaaaa;
--translation-main-button-color: #272a2f;
--translation-subtitle-color: #888888;
--editor-background: #ffffff;
--editor-color: #444444;
--editor-form-background: #272a2f;
--editor-menu-background: #272a2f;
--editor-menu-color: #aaaaaa;
--editor-menu-action-button-color: #ffffff;

/* Rarely used */
--black-brown: #2d2323;
--brown-1: #676054;
--mustard-yellow: #fed271;
--pink: #ff3366cc;
--red: #ff0a43;

/* Chart colors */
--green-blue: #4fc4f666;
--grey-9: #5f7285;
Expand Down Expand Up @@ -99,10 +120,4 @@

--white-1: #ffffff;
--white-5: #e2e2e2;

--black-brown: #2d2323;
--brown-1: #676054;
--mustard-yellow: #fed271;
--pink: #ff3366cc;
--red: #ff0a43;
}
27 changes: 21 additions & 6 deletions pontoon/base/static/css/light-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,27 @@
--blue-2: #5f7285;
--light-blue: #4fc4f6;

/* Translation workspace */
--translation-background: #f6f6f6;
--translation-border: #bbbbbb;
--translation-color: #000000;
--translation-secondary-color: #888888;
--translation-main-button-color: #000000;
--translation-subtitle-color: #555555;
--editor-background: #ffffff;
--editor-color: #444444;
--editor-form-background: #e8e8e8;
--editor-menu-background: #ffffff;
--editor-menu-color: #555555;
--editor-menu-action-button-color: #000000;

/* Rarely used */
--black-brown: #2d2323;
--brown-1: #676054;
--mustard-yellow: #fed271;
--pink: #ff3366cc;
--red: #ff0a43;

/* Chart colors */
--green-blue: #4fc4f666;
--grey-9: #5f7285;
Expand Down Expand Up @@ -98,10 +119,4 @@

--white-1: #444444;
--white-5: #e2e2e2;

--black-brown: #2d2323;
--brown-1: #676054;
--mustard-yellow: #fed271;
--pink: #ff3366cc;
--red: #ff0a43;
}
2 changes: 1 addition & 1 deletion translate/public/translate.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<title>Pontoon</title>

<!-- Inlining CSS mitigates/prevents fouc. -->
<style> body { background: var(--dark-grey-2) !important; } </style>
<style> body { background: var(--translation-background) !important; } </style>
<link href="/static/css/fontawesome-all.css" rel="stylesheet" />
<link href="/static/css/boilerplate.css" rel="stylesheet" />
<link href="/static/css/fonts.css" rel="stylesheet" />
Expand Down
4 changes: 2 additions & 2 deletions translate/src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#app > header {
background: var(--black-3);
border-bottom: 1px solid var(--dark-grey-1);
border-bottom: 1px solid var(--main-border-1);
box-sizing: border-box;
height: 60px;
min-width: 700px;
Expand All @@ -31,7 +31,7 @@
}

#app > .main-content > .panel-content {
border-left: 1px solid var(--light-grey-1);
border-left: 1px solid var(--main-border-1);
box-sizing: border-box;
width: 75%;
}
Expand Down
1 change: 0 additions & 1 deletion translate/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ button {
}

body {
background: var(--black-3);
color: var(--white-1);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

.batch-actions .topbar {
background: var(--grey-3);
border-bottom: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
padding: 12px 10px 13px;
}

Expand Down Expand Up @@ -89,7 +89,7 @@
background: var(--light-green-1);
border: none;
border-radius: 3px;
color: var(--black-3);
color: var(--translation-main-button-color);
font-weight: 600;
margin-top: 10px;
padding: 15px 5px;
Expand Down
2 changes: 1 addition & 1 deletion translate/src/modules/comments/components/AddComment.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
background-color: var(--dark-grey-1);
border: none;
border-radius: 4px;
color: var(--white-1);
color: var(--translation-color);
font-size: 11px;
max-height: 144px;
margin: auto;
Expand Down
2 changes: 1 addition & 1 deletion translate/src/modules/editor/components/Editor.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.editor {
background: var(--black-3);
border-bottom: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
display: flex;
flex-direction: column;
position: relative;
Expand Down
9 changes: 7 additions & 2 deletions translate/src/modules/editor/components/EditorMenu.css
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
.editor-menu {
background: var(--editor-menu-background);
color: var(--white-1);
padding: 10px;
position: relative;
}

.translationform + .editor-menu {
background: var(--editor-form-background);
}

.editor-menu .actions {
float: right;
}

.editor-menu .actions button {
background: transparent;
border: none;
color: var(--white-1);
color: var(--editor-menu-action-button-color);
height: 40px;
margin: 0 2px;
padding: 10px 3px;
Expand All @@ -30,7 +35,7 @@
.editor-menu .actions .action-suggest {
background: var(--light-green-1);
border-radius: 3px;
color: var(--black-3);
color: var(--translation-main-button-color);
font-weight: 600;
margin-left: 10px;
padding: 10px;
Expand Down
5 changes: 3 additions & 2 deletions translate/src/modules/editor/components/EditorSettings.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

.editor-settings .selector {
cursor: pointer;
color: var(--light-grey-7);
color: var(--editor-menu-color);
font-size: 22px;
padding: 9px 5px 9px 0;
}
Expand All @@ -17,6 +17,7 @@

.editor-settings .menu {
background-color: var(--black-3);
border: 1px solid var(--main-border-1);
bottom: auto;
color: var(--light-grey-7);
list-style: none;
Expand Down Expand Up @@ -48,7 +49,7 @@
}

.editor-settings .menu .horizontal-separator {
border-top: 1px solid var(--grey-2);
border-top: 1px solid var(--main-border-1);
height: 0;
margin: 5px 0;
padding: 0;
Expand Down
2 changes: 1 addition & 1 deletion translate/src/modules/editor/components/FtlSwitch.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.editor .ftl {
background: transparent;
border: 0;
color: var(--light-grey-7);
color: var(--editor-menu-color);
float: left;
font-size: 18px;
font-weight: bold;
Expand Down
9 changes: 7 additions & 2 deletions translate/src/modules/editor/components/KeyboardShortcuts.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,18 @@
}

.keyboard-shortcuts .selector {
color: var(--editor-menu-color);
font-size: 22px;
padding: 9px 5px;
}

.keyboard-shortcuts .selector:hover {
color: var(--light-green-1);
}

.keyboard-shortcuts .overlay {
background: var(--black-3);
border: 1px solid var(--dark-grey-1);
border: 1px solid var(--main-border-1);
font-size: 13px;
width: 400px;
height: 435px;
Expand Down Expand Up @@ -52,7 +57,7 @@

.keyboard-shortcuts .overlay span {
background: var(--dark-grey-2);
border: 1px solid var(--light-grey-1);
border: 1px solid var(--main-border-1);
border-radius: 2px;
font-weight: 300;
margin: 0 4px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.translation-length {
color: var(--light-grey-7);
color: var(--editor-menu-color);
float: left;
line-height: 22px;
padding: 9px 5px;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.entities {
background-color: var(--dark-grey-2);
height: calc(100% - 53px);
overflow-y: auto;
position: relative;
Expand Down
3 changes: 2 additions & 1 deletion translate/src/modules/entitieslist/components/Entity.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

.entity .source-string,
.entity .translation-string {
color: var(--translation-color);
display: inline-block;
margin: 0;
padding-bottom: 3px;
Expand All @@ -41,7 +42,7 @@
}

.entity .translation-string {
color: var(--light-grey-7);
color: var(--translation-secondary-color);
min-height: 20px;
text-align: start;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.entity-details {
background: var(--dark-grey-2);
display: flex;
height: 100%;
}
Expand All @@ -16,6 +15,6 @@

.entity-details .third-column {
width: 33.33%;
border-left: 1px solid var(--light-grey-1);
border-left: 1px solid var(--main-border-1);
box-sizing: border-box;
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.entity-navigation {
background: var(--grey-3);
border-bottom: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
padding: 12px 10px 13px;
}

Expand Down
10 changes: 5 additions & 5 deletions translate/src/modules/entitydetails/components/Helpers.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.third-column .top {
border-bottom: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
box-sizing: border-box;
height: calc(40% + 21px);
min-height: 200px;
Expand All @@ -26,8 +26,8 @@

.react-tabs__tab {
background: var(--grey-3);
border-bottom: 1px solid var(--light-grey-1);
border-right: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
border-right: 1px solid var(--main-border-1);
box-sizing: border-box;
color: var(--light-grey-6);
cursor: pointer;
Expand All @@ -45,7 +45,7 @@
}

.react-tabs__tab--selected {
background: var(--dark-grey-2);
background: inherit;
border-bottom: none;
}

Expand All @@ -61,7 +61,7 @@

/* Other tools styles */
.react-tabs span.count {
background: var(--dark-grey-2);
background: var(--translation-background);
border-radius: 3px;
color: var(--light-grey-6);
font-weight: 300;
Expand Down
10 changes: 5 additions & 5 deletions translate/src/modules/entitydetails/components/Metadata.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.metadata {
background-color: var(--dark-grey-2);
color: var(--light-grey-7);
border-bottom: 1px solid var(--main-border-1);
color: var(--translation-secondary-color);
font-size: 12px;
font-style: italic;
min-height: 114px;
Expand All @@ -18,7 +18,7 @@
}

.metadata .title {
color: var(--light-grey-2);
color: var(--translation-subtitle-color);
}

.metadata div a {
Expand All @@ -37,7 +37,7 @@
}

.metadata .original {
color: white;
color: var(--translation-color);
font-size: 14px;
font-style: normal;
line-height: 22px;
Expand Down Expand Up @@ -93,7 +93,7 @@
}

.metadata .context a {
color: var(--light-grey-7);
color: var(--translation-secondary-color);
}

.metadata .context a:hover {
Expand Down
1 change: 1 addition & 0 deletions translate/src/modules/history/components/History.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
}

.history p {
color: var(--translation-color);
min-height: 22px;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.history .wrapper {
border-bottom: 1px solid var(--light-grey-1);
border-bottom: 1px solid var(--main-border-1);
}

.history .translation {
Expand All @@ -24,7 +24,7 @@

.history .translation .user-avatar img {
border-radius: 6px;
border: 2px solid var(--light-grey-1);
border: 2px solid var(--icon-border-1);
}

.history .translation:hover .user-avatar img {
Expand Down
Loading

0 comments on commit c4d5a2f

Please sign in to comment.