Skip to content

Commit

Permalink
JS-3473: dark mode colors
Browse files Browse the repository at this point in the history
  • Loading branch information
mhlv committed Dec 6, 2023
1 parent 34d9518 commit bd2e2c0
Show file tree
Hide file tree
Showing 12 changed files with 73 additions and 4 deletions.
6 changes: 6 additions & 0 deletions src/img/theme/dark/icon/block/embed/chart.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 14 additions & 0 deletions src/img/theme/dark/icon/block/embed/figma.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/img/theme/dark/icon/block/embed/googleMaps.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/img/theme/dark/icon/block/embed/latex.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/img/theme/dark/icon/block/embed/mermaid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/theme/dark/icon/block/embed/miro.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/theme/dark/icon/block/embed/soundcloud.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/theme/dark/icon/block/embed/vimeo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/img/theme/dark/icon/block/embed/youtube.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/scss/block/embed.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#input { display: block; }
}

.preview { position: relative; z-index: 99; height: 240px; background-color: $colorShapeHighlightLight; display: none; }
.preview { display: none; position: relative; z-index: 99; height: 240px; background-color: $colorShapeHighlightLight; border-radius: 4px; }
.preview {
.icon { width: 60px; height: 60px; background-size: 60px 60px; position: absolute; left: 50%; top: 50%; margin: -30px 0px 0px -30px; }
.icon.embedLatex { background-image: url('~img/icon/block/embed/latex.svg'); }
Expand Down
17 changes: 15 additions & 2 deletions src/scss/theme/dark/block.scss
Original file line number Diff line number Diff line change
Expand Up @@ -296,9 +296,22 @@
/* BlockEmbed */

.block.blockEmbed {
.preview { background-color: $colorShapeHighlightLight; }
.preview {
.icon.embedLatex { background-image: url('#{$themePath}/icon/block/embed/latex.svg'); }
.icon.embedMermaid { background-image: url('#{$themePath}/icon/block/embed/mermaid.svg'); }
.icon.embedYoutube { background-image: url('#{$themePath}/icon/block/embed/youtube.svg'); }
.icon.embedVimeo { background-image: url('#{$themePath}/icon/block/embed/vimeo.svg'); }
.icon.embedGoogleMaps { background-image: url('#{$themePath}/icon/block/embed/googleMaps.svg'); }
.icon.embedSoundcloud { background-image: url('#{$themePath}/icon/block/embed/soundcloud.svg'); }
.icon.embedChart { background-image: url('#{$themePath}/icon/block/embed/chart.svg'); }
.icon.embedMiro { background-image: url('#{$themePath}/icon/block/embed/miro.svg'); }
.icon.embedFigma { background-image: url('#{$themePath}/icon/block/embed/figma.svg'); }
}

.select { color: $colorTextPrimary; }
.wrap.isEditing { box-shadow: 0px 0px 0px 1px $colorShapePrimary; }
#input { background: $colorShapeSecondary; }
.wrap.isEditing { background-color: $colorShapeHighlightLight; }
#input { background: $colorShapeSecondary; border-color: $colorShapeHighlightLight; }
}

/* BlockBookmark */
Expand Down
2 changes: 1 addition & 1 deletion src/ts/component/block/embed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ const BlockEmbed = observer(class BlockEmbedIndex extends React.Component<I.Bloc
};

this.placeholderCheck(this.text);

if (withPreview) {
this.setState({ withPreview: false });
};
Expand Down

0 comments on commit bd2e2c0

Please sign in to comment.