header.css 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354
  1. .cp__header {
  2. @apply z-10;
  3. -webkit-app-region: drag;
  4. padding-top: var(--ls-headbar-inner-top-padding);
  5. height: calc(var(--ls-headbar-height) + var(--ls-headbar-inner-top-padding));
  6. display: flex;
  7. align-items: center;
  8. justify-content: space-between;
  9. flex: 0 0 auto;
  10. position: sticky;
  11. top: 0;
  12. left: 0;
  13. right: 0;
  14. user-select: none;
  15. line-height: 1;
  16. white-space: nowrap;
  17. > .l {
  18. @apply pl-4;
  19. width: var(--ls-left-sidebar-width);
  20. height: 100%;
  21. align-items: center;
  22. transition: padding-left .2s;
  23. }
  24. > .r {
  25. @apply pr-4;
  26. align-items: center;
  27. flex: 1;
  28. justify-content: flex-end;
  29. }
  30. /* To prevent header glitch on Safari */
  31. > .l, > .r {
  32. -webkit-transform: translate3d(0, 0, 0);
  33. transform: translate3d(0, 0, 0);
  34. }
  35. .it svg {
  36. transform: scale(0.8);
  37. }
  38. .button {
  39. display: flex;
  40. align-items: center;
  41. justify-content: center;
  42. opacity: .8;
  43. .ti, .tie {
  44. font-size: 20px;
  45. }
  46. }
  47. .ui-items-container .button {
  48. width: auto;
  49. padding: 0 8px;
  50. }
  51. svg.warning {
  52. transform: scale(0.6);
  53. color: red;
  54. }
  55. &-tips {
  56. position: absolute;
  57. padding: 13px 0;
  58. text-align: center;
  59. font-weight: 500;
  60. background: transparent;
  61. margin-top: 0;
  62. line-height: 0;
  63. top: 0;
  64. left: 40%;
  65. transform: translateX(-50%);
  66. z-index: 1000;
  67. > p {
  68. color: var(--ls-primary-text-color);
  69. margin: 0;
  70. display: inline-flex;
  71. align-items: center;
  72. font-size: 14px;
  73. }
  74. a {
  75. color: var(--ls-link-text-color, #045591) !important;
  76. }
  77. a.restart {
  78. position: relative;
  79. display: flex;
  80. align-items: center;
  81. svg {
  82. color: currentColor !important;
  83. margin-right: 2px;
  84. }
  85. > strong {
  86. display: inline-block;
  87. padding-left: 2px;
  88. cursor: pointer;
  89. }
  90. }
  91. }
  92. .dropdown-wrapper {
  93. .ti, .tie {
  94. opacity: .9;
  95. }
  96. }
  97. .add-graph-btn {
  98. border: 1px dashed var(--ls-border-color);
  99. padding: 0 8px;
  100. strong {
  101. padding: 0 10px;
  102. position: relative;
  103. top: 1px;
  104. }
  105. }
  106. }
  107. .is-electron.is-mac .cp__header {
  108. > .l {
  109. padding-left: 78px;
  110. }
  111. }
  112. .cp__header .navigation svg {
  113. transform: scale(0.7);
  114. }
  115. .is-electron.is-mac.is-fullscreen .cp__header > .l {
  116. padding-left: 1rem;
  117. }
  118. .cp__header a, .cp__header svg {
  119. -webkit-app-region: no-drag;
  120. }
  121. .cp__header-logo {
  122. @apply p-2;
  123. }
  124. .cp__header-logo {
  125. display: none;
  126. }
  127. .cp__header-logo:hover {
  128. opacity: 1;
  129. }
  130. .cp__header-logo-img {
  131. width: 24px;
  132. height: 24px;
  133. }
  134. @screen sm {
  135. .cp__header {
  136. @apply shadow-none;
  137. }
  138. .cp__header-logo {
  139. display: block;
  140. }
  141. }
  142. .cp__header-logo svg {
  143. transform: scale(0.9);
  144. }
  145. #repo-name {
  146. display: table-cell;
  147. white-space: nowrap;
  148. overflow: hidden;
  149. text-overflow: ellipsis;
  150. max-width: 15ch;
  151. height: 14px;
  152. }
  153. .button {
  154. @apply h-8 px-2.5 py-1 rounded-md opacity-60;
  155. display: block;
  156. user-select: none;
  157. &:hover, &.active {
  158. opacity: 1;
  159. background: none;
  160. @screen md {
  161. background: var(--ls-tertiary-background-color);
  162. }
  163. }
  164. &:active {
  165. opacity: .7;
  166. }
  167. }
  168. .button.icon {
  169. @apply w-8 h-8 p-1;
  170. }
  171. .button.icon.add-graph-btn {
  172. width: unset;
  173. margin: 0 6px;
  174. }
  175. .is-mac.is-electron :is(.cp__header, .cp__right-sidebar-topbar) :is(button, .button, a):not(.file-sync-item) {
  176. cursor: default !important;
  177. }
  178. html.is-ios.is-safari {
  179. .cp__header {
  180. background-color: var(--ls-primary-background-color);
  181. }
  182. .is-vw-pending {
  183. display: none !important;
  184. }
  185. }
  186. html.is-native-iphone,
  187. html.is-native-iphone-without-notch,
  188. html.is-native-ipad {
  189. #main-container {
  190. padding-top: 0px;
  191. display: flex;
  192. flex-direction: column;
  193. }
  194. #main-content-container {
  195. padding-left: 22px;
  196. padding-right: 14px;
  197. padding-top: 0px;
  198. height: calc(100vh - var(--ls-headbar-inner-top-padding) - var(--ls-headbar-height));
  199. @screen sm {
  200. padding-left: 2rem;
  201. }
  202. .page {
  203. margin-top: 24px;
  204. }
  205. }
  206. .cp__header {
  207. > .r {
  208. display: flex;
  209. }
  210. .button {
  211. opacity: 1;
  212. }
  213. }
  214. }
  215. html.is-native-ipad {
  216. --ls-headbar-inner-top-padding: 0px;
  217. --ls-headbar-height: 4rem;
  218. .cp__header {
  219. background-color: transparent !important;
  220. display: flex;
  221. > .l {
  222. /* background-color: var(--ls-primary-background-color); */
  223. padding-top: 20px;
  224. }
  225. > .r {
  226. flex: 1;
  227. background-color: var(--ls-primary-background-color);
  228. height: 100%;
  229. padding-top: 20px;
  230. justify-content: flex-end;
  231. align-items: center;
  232. }
  233. }
  234. .left-sidebar-inner {
  235. > .wrap {
  236. padding-top: 20px;
  237. }
  238. }
  239. .cp__right-sidebar {
  240. &-settings {
  241. margin-top: -4px;
  242. }
  243. &-topbar {
  244. padding-top: 37px;
  245. }
  246. &-inner {
  247. .resizer {
  248. top: 30vh;
  249. width: 12px;
  250. height: 40vh;
  251. }
  252. .resizer:hover {
  253. background-color: var(--ls-guideline-color, #ddd);
  254. }
  255. }
  256. }
  257. }
  258. html.is-native-iphone {
  259. --ls-headbar-inner-top-padding: 36px;
  260. .left-sidebar-inner {
  261. .create {
  262. padding-bottom: 32px;
  263. }
  264. }
  265. .ui__notifications {
  266. top: calc(var(--ls-headbar-height) + var(--ls-headbar-inner-top-padding) - 0.3rem);
  267. }
  268. @media (orientation: landscape) {
  269. --ls-headbar-inner-top-padding: 8px;
  270. --ls-headbar-height: 2.5rem;
  271. }
  272. }
  273. html.is-native-iphone-without-notch {
  274. --ls-headbar-inner-top-padding: 15px;
  275. --ls-headbar-height: 2.5rem;
  276. @media (orientation: landscape) {
  277. --ls-headbar-inner-top-padding: 0px;
  278. --ls-headbar-height: 2.5rem;
  279. }
  280. }
  281. html.is-zoomed-native-ios {
  282. --ls-headbar-inner-top-padding: 30px;
  283. @media (orientation: landscape) {
  284. --ls-headbar-inner-top-padding: 8px;
  285. --ls-headbar-height: 2.5rem;
  286. }
  287. }