|
| 1 | +/* |
| 2 | + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 3 | + * title Nord Hyper + |
| 4 | + * project nord-hyper + |
| 5 | + * repository https://github.com/arcticicestudio/nord-hyper + |
| 6 | + * author Arctic Ice Studio + |
| 7 | + |
| 8 | + * copyright Copyright (c) 2017 + |
| 9 | + * ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
| 10 | + */ |
| 11 | +const nord = { |
| 12 | + nord0: "#2E3440", |
| 13 | + nord1: "#3B4252", |
| 14 | + nord2: "#434C5E", |
| 15 | + nord3: "#4C566A", |
| 16 | + nord4: "#D8DEE9", |
| 17 | + nord5: "#E5E9F0", |
| 18 | + nord6: "#ECEFF4", |
| 19 | + nord7: "#8FBCBB", |
| 20 | + nord8: "#88C0D0", |
| 21 | + nord9: "#81A1C1", |
| 22 | + nord10: "#5E81AC", |
| 23 | + nord11: "#BF616A", |
| 24 | + nord12: "#D08770", |
| 25 | + nord13: "#EBCB8B", |
| 26 | + nord14: "#A3BE8C", |
| 27 | + nord15: "#B48EAD" |
| 28 | +}; |
| 29 | + |
| 30 | +const backgroundColor = nord.nord0; |
| 31 | +const foregroundColor = nord.nord4; |
| 32 | +const cursorColor = nord.nord4; |
| 33 | +const borderColor = backgroundColor; |
| 34 | + |
| 35 | +const colors = { |
| 36 | + black: nord.nord1, |
| 37 | + red: nord.nord11, |
| 38 | + green: nord.nord14, |
| 39 | + yellow: nord.nord13, |
| 40 | + blue: nord.nord9, |
| 41 | + magenta: nord.nord15, |
| 42 | + cyan: nord.nord8, |
| 43 | + white: nord.nord5, |
| 44 | + lightBlack: nord.nord3, |
| 45 | + lightRed: nord.nord11, |
| 46 | + lightGreen: nord.nord14, |
| 47 | + lightYellow: nord.nord13, |
| 48 | + lightBlue: nord.nord9, |
| 49 | + lightMagenta: nord.nord15, |
| 50 | + lightCyan: nord.nord7, |
| 51 | + lightWhite: nord.nord6, |
| 52 | + colorCubes: nord.nord6, |
| 53 | + grayscale: foregroundColor |
| 54 | +}; |
| 55 | + |
| 56 | +exports.decorateConfig = config => { |
| 57 | + return Object.assign({}, config, { |
| 58 | + foregroundColor, |
| 59 | + backgroundColor, |
| 60 | + borderColor, |
| 61 | + cursorColor: cursorColor, |
| 62 | + colors, |
| 63 | + cursorShape: "BEAM", |
| 64 | + fontSize: config.fontSize || 16, |
| 65 | + fontFamily: "'Source Code Pro', Hack" || config.fontFamily, |
| 66 | + termCSS: ` |
| 67 | + ${config.termCSS || ""} |
| 68 | + ::selection { |
| 69 | + background: rgba(67, 76, 94, 0.8) !important; |
| 70 | + } |
| 71 | + .cursor-node { |
| 72 | + border-left-width: 2px; |
| 73 | + } |
| 74 | + @keyframes blink { |
| 75 | + 10%, 50% { opacity: 0 } |
| 76 | + 60%, 100% { opacity: 1 } |
| 77 | + } |
| 78 | + .cursor-node[focus=true] { |
| 79 | + mix-blend-mode: difference; |
| 80 | + } |
| 81 | + .cursor-node[focus=true]:not([hyper-blink-moving]) { |
| 82 | + box-sizing: content-box !important; |
| 83 | + animation: blink 1s ease infinite; |
| 84 | + } |
| 85 | + `, |
| 86 | + css: ` |
| 87 | + ${config.css || ""} |
| 88 | + * { |
| 89 | + text-rendering: optimizeLegibility !important; |
| 90 | + } |
| 91 | + .header_header { |
| 92 | + background-color: ${backgroundColor} !important; |
| 93 | + top: 0 !important; |
| 94 | + right: 0 !important; |
| 95 | + left: 0 !important; |
| 96 | + } |
| 97 | + ::selection { |
| 98 | + background: rgba(67, 76, 94, 0.8) !important; |
| 99 | + } |
| 100 | + .tab_first { |
| 101 | + margin-left: 0 !important; |
| 102 | + padding: 0 !important; |
| 103 | + } |
| 104 | + .tabs_list, |
| 105 | + .tab_tab { |
| 106 | + border: 0 !important; |
| 107 | + } |
| 108 | + .tab_tab { |
| 109 | + color: ${foregroundColor} !important; |
| 110 | + transition: color 400ms ease, background 400ms ease; |
| 111 | + } |
| 112 | + .tab_tab.tab_active, |
| 113 | + .tab_tab:hover { |
| 114 | + background-color: ${nord.nord1}; |
| 115 | + } |
| 116 | + .splitpane_divider { |
| 117 | + background-color: rgba(67, 76, 94, 0.8) !important; |
| 118 | + } |
| 119 | + ` |
| 120 | + }); |
| 121 | +}; |
0 commit comments