@import '~nprogress/nprogress.css'; @name: gitako; @min-screen-width: 1280px; @github-content-width: 1020px; @side-bar-base-width: (@min-screen-width - @github-content-width); @min-width-with-gitako: (@min-screen-width + @side-bar-base-width); @github-header-z-index: 32; @github-pull-request-float-header-z-index: 110; @minimal-z-index: max(@github-header-z-index, @github-pull-request-float-header-z-index) + 1; :root { --gitako-width: @side-bar-base-width; } .@{name}-ready { .js-header-wrapper { background: #24292e; } .Header { max-width: 1012px; margin: 0 auto; } } @media (min-width: @github-content-width) { body { min-width: @github-content-width; } } .markdown-body { .clippy-wrapper { position: relative; width: 0; height: 0; top: 8px; left: ~'calc(100% - 40px)'; z-index: 1; .clippy { width: 32px; height: 32px; border: 1px solid #ddd; border-radius: 4px; background: #f9f9f9; &:hover { background: #fff; } &:active { background: #f0f0f0; } .icon { width: 100%; height: 100%; display: block; background-image: url('./assets/icons/octicons/clippy.svg?inline'); background-position: center; background-repeat: no-repeat; } &.success { .icon { background-image: url('./assets/icons/octicons/check.svg?inline'); } } &.fail { .icon { background-image: url('./assets/icons/octicons/x.svg?inline'); } } } } } .hidden { display: none; } .invisible { visibility: hidden; } .@{name}-toggle-show-button-wrapper { @animation-duration: 0.5s; position: fixed; top: 5px; left: 0; z-index: @minimal-z-index; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; min-width: 30px; height: 30px; will-change: transform; border: 1px solid transparent; .transform-expanded { transform: translate(calc(var(--gitako-width) - 30px)); } .transform-collapsed { transform: translate(5px); } .transform-expanded; animation: toggle-show-button-wrapper-expand @animation-duration; &.collapsed { border-color: #999999; border-radius: 3px; background: #f5f5f5; .transform-collapsed; animation: toggle-show-button-wrapper-collapse @animation-duration; .action-icon { color: #0366d6d0; } } @keyframes toggle-show-button-wrapper-expand { from { .transform-collapsed; } to { .transform-expanded; } } @keyframes toggle-show-button-wrapper-collapse { from { .transform-expanded; } to { .transform-collapsed; } } .action-icon { color: #666666; width: 16px; height: 20px; margin: 5px 6px; transition: all @animation-duration ease; } &:hover { .error-message { display: inline; } } &.error { .action-icon { color: #cb2431; } } .error-message { display: none; margin: 0 4px; } } .@{name}-side-bar { .@{name}-position-wrapper { position: fixed; top: 0; left: 0; height: 100vh; z-index: @minimal-z-index; display: flex; &.hidden { .hidden; } .gitako-position-content { width: var(--gitako-width); } } .@{name}-resize-handler { display: flex; align-items: center; cursor: ew-resize; user-select: none; width: 0; background: #e1e4e8; border-left: 1px solid #e1e4e8; &:hover { width: 16px; background: #fafbfc; border-right: 1px solid #e1e4e8; } .grabber-icon { transform: rotate(90deg); width: 12px; font-size: 0; } } .@{name}-side-bar-body { width: 100%; height: 100%; display: flex; flex-direction: column; background: #fafbfc; border-right: 1px solid #e1e4e8; border-left: 1px solid #e1e4e8; overflow: hidden; &.hidden { .hidden; } .octicon { transition: 0.3s ease; color: rgba(3, 47, 98, 0.55); vertical-align: initial; } .octicon-wrapper { display: inline-block; width: 16px; height: 16px; text-align: center; vertical-align: middle; } .octicon-color { color: rgba(3, 47, 98, 0.55); } .@{name}-side-bar-content { display: flex; flex: 1; flex-direction: column; max-height: calc(100vh - 34px); // temporary fix for layout issue occurred since Chrome v76 min-height: 0; // make content shrinkable .meta-bar { position: relative; padding: 10px; padding-right: 30px; font-size: 13px; line-height: 20px; color: #586069; background-color: #f1f8ff; border-bottom: 1px solid #c8e1ff; a { // fix a weird bug: // when gitako failed loading repo, cursor hovering in meta bar will be 'text' cursor: pointer; } .repo-name { font-weight: bolder; } } .description { padding: 4px 10px; } .loading-indicator-container { width: 100%; height: 100%; display: flex; justify-content: center; align-items: center; .loading-indicator { display: flex; align-items: center; } .loading-indicator-icon { width: 20px; height: 20px; animation: rotate 2s infinite linear; } } .file-explorer { width: 100%; height: 100%; outline: none; display: flex; flex-direction: column; flex-wrap: nowrap; &.freeze { filter: blur(1.5px) opacity(0.6) grayscale(0.9); cursor: pointer; > * { pointer-events: none; user-select: none; } } /* search input */ .search-input-wrapper { input[type='text'].form-control { box-shadow: none; width: 100%; } } .no-results { padding: 0px 10px; color: #666; } .files { flex: 1; overflow: auto; } .node-item-row { background: #fff; &:hover { background: #f6f8fa; } &.focused { background: #f0f0f6; } &.disabled { .node-item { pointer-events: none; color: #999999; } } .node-item { display: flex; justify-content: space-between; margin: 0; color: #0366d6; line-height: 20px; padding: 6px 10px; cursor: pointer; border-top: 1px solid #eaecef; transition: all 0.5s ease; white-space: nowrap; // folder icon rotate when expand &.expanded .octicon.octicon-triangle-right { transform: rotate(90deg); } .node-item-name { padding-left: 6px; vertical-align: middle; } .node-item:hover .node-item-name { text-decoration: underline; } } } } .go-to-wrapper { max-width: 16px; overflow: hidden; transition: max-width 0.5s linear; &:hover { max-width: 160px; } .go-to-button { white-space: nowrap; background: transparent; border: none; padding: 0; } } } .@{name}-settings-bar { z-index: 2; background: #fafbfc; display: flex; flex-direction: column; &-title { border-top: 1px solid #eaecef; padding: 6px 10px; box-shadow: 0 1px 8px 0 rgba(0, 0, 0, 0.2), 0 3px 4px 0 rgba(0, 0, 0, 0.14), 0 3px 3px -2px rgba(0, 0, 0, 0.12); z-index: 1; } &-content { padding: 10px 10px; flex: 1; overflow: auto; position: relative; .shadow-shelter { position: absolute; width: 100%; height: 10px; top: 0; left: 0; background: #fafbfc; z-index: 1; } &-section { padding-bottom: 10px; } /* inputs for access token & shortcut were too wide */ input.form-control { min-width: 100px; } } .access-token { border-bottom: none; // prevent overwrite by github style .hint { color: #6a737d; } } .access-token-input-control { display: flex; margin-top: 8px; .access-token-input { flex: 1; box-shadow: none; &:disabled { cursor: not-allowed; } } } .toggle-shortcut { .hint { color: #6a737d; } } .toggle-shortcut-input-control { display: flex; margin-top: 8px; .toggle-shortcut-input { flex: 1; box-shadow: none; } } .singleton { .hint { color: #6a737d; } } .placeholder-row { flex-shrink: 0; display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-top: 1px solid #eaecef; .version { color: #999999; } .show-settings-icon { width: 20px; height: 20px; cursor: pointer; } .hide-settings-icon { width: 20px; height: 20px; cursor: pointer; } } } } } @keyframes rotate { from { transform: rotateZ(0); } to { transform: rotateZ(360deg); } }