From 53ac39232c73d0e15346722b6ace06e91ecfb239 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sun, 8 Oct 2017 14:47:14 +0200 Subject: [PATCH] a compact theme --- .../src/components/tabHeader.component.scss | 6 +++--- terminus-core/src/index.ts | 3 ++- terminus-core/src/theme.compact.scss | 15 +++++++++++++++ terminus-core/src/theme.scss | 3 +-- terminus-core/src/theme.ts | 7 +++++++ .../components/pluginsSettingsTab.component.pug | 3 ++- 6 files changed, 30 insertions(+), 7 deletions(-) create mode 100644 terminus-core/src/theme.compact.scss diff --git a/terminus-core/src/components/tabHeader.component.scss b/terminus-core/src/components/tabHeader.component.scss index fc2ec89e..b0a360b5 100644 --- a/terminus-core/src/components/tabHeader.component.scss +++ b/terminus-core/src/components/tabHeader.component.scss @@ -1,7 +1,6 @@ $tabs-height: 36px; :host { - line-height: $tabs-height - 2px; cursor: pointer; flex: 1000 1 200px; @@ -24,9 +23,9 @@ $tabs-height: 36px; margin-left: 10px; width: 20px; border-radius: 10px; - line-height: 35px; text-align: center; transition: 0.25s all; + align-self: center; } .name { @@ -36,6 +35,7 @@ $tabs-height: 36px; white-space: nowrap; text-overflow: ellipsis; min-width: 0; + align-self: center; } button { @@ -49,7 +49,7 @@ $tabs-height: 36px; height: $button-size; border-radius: $button-size / 2; line-height: $button-size * 0.87; - margin-top: ($tabs-height - $button-size) * 0.5; + align-self: center; margin-right: 10px; text-align: center; diff --git a/terminus-core/src/index.ts b/terminus-core/src/index.ts index d039f2fb..af9ee658 100644 --- a/terminus-core/src/index.ts +++ b/terminus-core/src/index.ts @@ -29,7 +29,7 @@ import { HotkeyProvider } from './api/hotkeyProvider' import { ConfigProvider } from './api/configProvider' import { Theme } from './api/theme' -import { StandardTheme } from './theme' +import { StandardTheme, StandardCompactTheme } from './theme' import { CoreConfigProvider } from './config' import 'perfect-scrollbar/dist/css/perfect-scrollbar.css' @@ -47,6 +47,7 @@ const PROVIDERS = [ UpdaterService, { provide: HotkeyProvider, useClass: AppHotkeyProvider, multi: true }, { provide: Theme, useClass: StandardTheme, multi: true }, + { provide: Theme, useClass: StandardCompactTheme, multi: true }, { provide: ConfigProvider, useClass: CoreConfigProvider, multi: true }, ] diff --git a/terminus-core/src/theme.compact.scss b/terminus-core/src/theme.compact.scss new file mode 100644 index 00000000..4d9297ba --- /dev/null +++ b/terminus-core/src/theme.compact.scss @@ -0,0 +1,15 @@ +@import './theme.scss'; + +app-root { + .tab-bar { + height: 27px !important; + + .btn-tab-bar { + line-height: 29px !important; + } + } + + terminaltab .content { + margin: 5px !important; + } +} diff --git a/terminus-core/src/theme.scss b/terminus-core/src/theme.scss index 93d13eee..ba65aefa 100644 --- a/terminus-core/src/theme.scss +++ b/terminus-core/src/theme.scss @@ -131,6 +131,7 @@ app-root { background: $body-bg2; border-left: 1px solid transparent; border-right: 1px solid transparent; + border-top: 1px solid transparent; .index { color: #555; @@ -162,7 +163,6 @@ app-root { &.active { border-top: 1px solid $teal; - margin-bottom: -1px; } &.has-activity:not(.active) { @@ -179,7 +179,6 @@ app-root { &.active { border-bottom: 1px solid $teal; - margin-top: -1px; } &.has-activity:not(.active) { diff --git a/terminus-core/src/theme.ts b/terminus-core/src/theme.ts index 46df2ad3..8b43fc3e 100644 --- a/terminus-core/src/theme.ts +++ b/terminus-core/src/theme.ts @@ -7,3 +7,10 @@ export class StandardTheme extends Theme { css = require('./theme.scss') terminalBackground = '#1D272D' } + +@Injectable() +export class StandardCompactTheme extends Theme { + name = 'Compact' + css = require('./theme.compact.scss') + terminalBackground = '#1D272D' +} diff --git a/terminus-plugin-manager/src/components/pluginsSettingsTab.component.pug b/terminus-plugin-manager/src/components/pluginsSettingsTab.component.pug index 555acfb5..bca9f2bd 100644 --- a/terminus-plugin-manager/src/components/pluginsSettingsTab.component.pug +++ b/terminus-plugin-manager/src/components/pluginsSettingsTab.component.pug @@ -78,7 +78,8 @@ div(*ngIf='npmInstalled') .d-flex.w-100 .mr-auto.d-flex.flex-column strong {{plugin.name}} - small.text-muted.mb-0 {{plugin.description}} + a.text-muted.mb-0((click)='showPluginInfo(plugin)') + small {{plugin.description}} .d-flex.flex-column.align-items-end.mr-3 div {{plugin.version}} small.text-muted {{plugin.author}}