repository.less 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. @import "../ui/var";
  2. @repoHeaderBorderColor: #D6D6D6;
  3. @repoHeaderBgColor: #FFF;
  4. @repoHeaderNameColor: #888;
  5. #repo-wrapper {
  6. padding-bottom: 100px;
  7. }
  8. #repo-header {
  9. height: 69px;
  10. border-bottom: 1px solid@repoHeaderBorderColor;
  11. background-color: @repoHeaderBgColor;
  12. }
  13. #repo-header-name {
  14. line-height: 66px;
  15. color: @repoHeaderNameColor;
  16. font-size: 1.6em;
  17. font-weight: normal;
  18. margin-bottom: 0;
  19. i {
  20. margin-right: 12px;
  21. vertical-align: middle;
  22. }
  23. .divider {
  24. margin: 0 4px;
  25. }
  26. }
  27. #repo-header-meta {
  28. line-height: 66px;
  29. li {
  30. >a {
  31. padding: 0;
  32. &:hover {
  33. background-color: transparent;
  34. }
  35. }
  36. }
  37. a {
  38. &>.btn {
  39. line-height: 16px;
  40. margin-left: 16px;
  41. font-size: 13px;
  42. i {
  43. margin-right: 6px;
  44. }
  45. .num {
  46. margin-left: 6px;
  47. }
  48. }
  49. }
  50. }
  51. #repo-header-download-btn {
  52. >.btn>i {
  53. margin-right: 0 !important;
  54. }
  55. &:hover {
  56. &:after, .btn {
  57. background-color: @btnHoverBlackColor;
  58. color: #FFF;
  59. }
  60. }
  61. &:after {
  62. background-color: @btnBlackColor;
  63. padding: 9px 16px 8px 0;
  64. margin-left: -8px !important;
  65. color: #FFF;
  66. border-top: 1px solid@btnBlackColor;
  67. border-bottom: 1px solid@btnBlackColor;
  68. border-top-right-radius: .25em;
  69. border-bottom-right-radius: .25em;
  70. }
  71. }
  72. #repo-header-download-drop {
  73. line-height: 24px;
  74. width: 440px;
  75. top: 50px;
  76. left: -370px;
  77. padding: 20px;
  78. box-sizing: border-box;
  79. z-index: 1;
  80. .btn>i {
  81. margin-right: 6px;
  82. }
  83. button, input {
  84. font-size: 11px;
  85. }
  86. }
  87. #repo-content {
  88. padding: 18px 0;
  89. }
  90. .repo-wide-wrapper {
  91. padding: 18px 0;
  92. position: relative;
  93. }
  94. #repo-clone-url {
  95. border-right: none;
  96. width: 190px;
  97. border-left: none;
  98. }
  99. #repo-clone-help {
  100. clear: both;
  101. line-height: 48px;
  102. }
  103. #repo-clone-zip {
  104. line-height: 48px;
  105. a {
  106. cursor: pointer;
  107. color: white;
  108. overflow: visible;
  109. padding: .6em 1.2em;
  110. }
  111. .btn {
  112. margin: 0 6px;
  113. }
  114. }
  115. #repo-desc {
  116. font-size: 1.2em;
  117. .no-description{
  118. color: #999;
  119. }
  120. }
  121. #repo-sidebar-nav {
  122. .label {
  123. font-size: 12px;
  124. line-height: 1.4em;
  125. margin-top: 2px;
  126. }
  127. i {
  128. margin-right: 6px;
  129. }
  130. }
  131. #repo-sidebar-mini {
  132. margin-top: 6px;
  133. width: 60px;
  134. li {
  135. margin-bottom: 4px;
  136. }
  137. li > a {
  138. position: relative;
  139. padding-left: 12px;
  140. width: 24px;
  141. text-align: center;
  142. >i.octicon {
  143. font-size: 21px;
  144. }
  145. }
  146. .num {
  147. position: absolute;
  148. font-size: 12px;
  149. top: 0;
  150. left: 36px;
  151. padding: 0 2px;
  152. min-width: 16px;
  153. height: 16px;
  154. text-align: center;
  155. line-height: 16px;
  156. border-radius: 4px;
  157. opacity: 0.7;
  158. -webkit-transform: scale(0.9);
  159. font-weight: bold;
  160. }
  161. }
  162. #repo-file-nav {
  163. padding: .6em 0 1em 0;
  164. >li>a {
  165. padding-left: 0;
  166. &:hover {
  167. background-color: transparent;
  168. }
  169. }
  170. li.repo-jump > a {
  171. padding-right: 0;
  172. .btn {
  173. margin-left: -1px;
  174. }
  175. }
  176. }
  177. #repo-branch-switch {
  178. >a {
  179. .btn {
  180. padding-right: 30px;
  181. }
  182. &:after {
  183. position: absolute;
  184. top: 12px;
  185. right: 30px;
  186. margin-left: 0;
  187. color: @baseFontColor;
  188. }
  189. }
  190. >.drop-down {
  191. top: 40px;
  192. left: 0;
  193. }
  194. }
  195. #repo-branch-filter-ipt {
  196. width: 100%;
  197. border-left: none;
  198. border-right: none;
  199. box-sizing: border-box;
  200. }
  201. #repo-branch-tag {
  202. .tab-nav {
  203. border-bottom: 1px solid #EAEAEA;
  204. a {
  205. padding: .3em .8em;
  206. }
  207. .js-tab-nav-show {
  208. background-color: #EEE;
  209. font-weight: bold;
  210. }
  211. }
  212. .switching-list {
  213. max-height: 300px;
  214. overflow-y: auto;
  215. }
  216. }
  217. #repo-branch-list,
  218. #repo-tag-list {
  219. li {
  220. i {
  221. margin-right: 12px;
  222. opacity: 0;
  223. }
  224. }
  225. li.checked {
  226. i {
  227. opacity: 1;
  228. }
  229. }
  230. }
  231. #repo-bread {
  232. .bread {
  233. padding-right: 0;
  234. font-size: 16px;
  235. font-weight: bold;
  236. }
  237. }
  238. #repo-main {
  239. padding-right: 40px;
  240. box-sizing: border-box;
  241. }
  242. #repo-files-table {
  243. margin-bottom: 20px;
  244. th, td {
  245. text-align: left;
  246. line-height: 32px;
  247. }
  248. td.icon {
  249. width: 16px;
  250. padding-right: .1em;
  251. padding-left: 1em;
  252. }
  253. td.name {
  254. max-width: 120px;
  255. .text-truncate {
  256. max-width: 100%;
  257. }
  258. }
  259. td.age {
  260. max-width: 120px;
  261. text-align: right;
  262. }
  263. td.msg {
  264. max-width: 440px;
  265. .text-truncate {
  266. max-width: 100%;
  267. }
  268. }
  269. td.age,
  270. td.size,
  271. td.msg a {
  272. color: #888;
  273. }
  274. td.msg a:hover {
  275. color: #428BCA;
  276. text-decoration: underline;
  277. }
  278. tbody {
  279. background-color: #FFF;
  280. tr:hover {
  281. background-color: #ffffEE;
  282. }
  283. }
  284. thead {
  285. background-color: #F0F0F0;
  286. .author {
  287. a {
  288. margin: 0 .4em;
  289. }
  290. }
  291. .last-commit {
  292. strong {
  293. color: #444;
  294. }
  295. .text-truncate {
  296. margin-left: .4em;
  297. }
  298. }
  299. .last-commit .text-truncate,
  300. .age {
  301. font-weight: normal;
  302. color: #888;
  303. }
  304. }
  305. }
  306. #repo-readme,
  307. #repo-read-file {
  308. margin-bottom: 80px;
  309. }
  310. #repo-bare-start {
  311. margin-bottom: 100px;
  312. .panel-content {
  313. background-color: #FFF;
  314. }
  315. pre {
  316. margin: 0 40px;
  317. padding: 6px 10px;
  318. border: 1px solid #ddd;
  319. background: #f8f8f8;
  320. }
  321. }
  322. .repo-bare {
  323. #repo-bare-start {
  324. h2 {
  325. margin-top: 30px;
  326. margin-bottom: 24px;
  327. }
  328. }
  329. #repo-header-meta {
  330. display: none;
  331. }
  332. #repo-clone-ssh {
  333. margin-left: 200px;
  334. }
  335. #repo-clone-copy {
  336. margin-right: 200px;
  337. }
  338. #repo-clone-help {
  339. clear: both;
  340. width: 100%;
  341. }
  342. #repo-clone-url {
  343. width: 520px;
  344. }
  345. }
  346. /* repository create */
  347. #team-create-form,
  348. #repo-migrate-form,
  349. #repo-create-form {
  350. width: 800px;
  351. margin: 60px auto auto auto;
  352. background: white;
  353. h2 {
  354. margin: .5em 1em;
  355. }
  356. .field {
  357. margin: 1.2em 0 2em 0;
  358. }
  359. .ipt {
  360. width: 540px;
  361. }
  362. textarea {
  363. height: 120px;
  364. }
  365. .avatar {
  366. vertical-align: middle;
  367. margin-right: .6em;
  368. width: 28px;
  369. height: 28px;
  370. }
  371. &:hover {
  372. box-shadow: 0px 0px 6px #CCC;
  373. }
  374. }
  375. #repo-create-cancel {
  376. margin-left: 4em;
  377. }
  378. #repo-create-owner-list {
  379. top: 30px;
  380. left: 0;
  381. width: auto;
  382. max-width: 300px;
  383. .octicon {
  384. margin-right: 12px;
  385. opacity: 0;
  386. }
  387. .avatar {
  388. width: 20px;
  389. height: 20px;
  390. }
  391. li {
  392. white-space: nowrap;
  393. &.checked {
  394. .octicon {
  395. opacity: 1;
  396. }
  397. }
  398. a {
  399. text-overflow: ellipsis;
  400. -o-text-overflow: ellipsis;
  401. overflow: hidden;
  402. }
  403. }
  404. }
  405. .file-name {
  406. margin-left: 1em;
  407. }
  408. .file-size {
  409. font-size: 13px;
  410. color: #888;
  411. margin-left: 1em;
  412. }
  413. .code-view {
  414. overflow: auto;
  415. overflow-x: auto;
  416. overflow-y: hidden;
  417. background: white;
  418. .view-raw {
  419. min-height: 40px;
  420. text-align: center;
  421. padding-top: 20px;
  422. .btn {
  423. font-size: 1.05em;
  424. line-height: 16px;
  425. padding: 6px 8px;
  426. }
  427. }
  428. table {
  429. width: 100%;
  430. td {
  431. padding: 0;
  432. }
  433. }
  434. .lines-num {
  435. vertical-align: top;
  436. text-align: right;
  437. color: #999;
  438. background: #f5f5f5;
  439. width: 1%;
  440. span {
  441. font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
  442. line-height: 1.6;
  443. padding: 0 10px;
  444. cursor: pointer;
  445. display: block;
  446. }
  447. }
  448. .lines-code > pre {
  449. border: none;
  450. border-left: 1px solid #ddd;
  451. > ol.linenums > li {
  452. padding: 0 10px;
  453. &.active {
  454. background: #ffffdd;
  455. }
  456. }
  457. }
  458. }
  459. .repo-setting-zone {
  460. padding: 30px;
  461. }
  462. #team-repositories-list,
  463. #team-members-list,
  464. #repo-collab-list {
  465. list-style: none;
  466. padding: 10px 0 5px 0;
  467. li.collab {
  468. clear: both;
  469. height: 50px;
  470. padding: 0 15px 0 15px;
  471. }
  472. a.member {
  473. color: #444;
  474. height: 50px;
  475. line-height: 50px;
  476. &:hover {
  477. color: #4183C4;
  478. }
  479. }
  480. .avatar {
  481. margin-right: 1em;
  482. width: 40px;
  483. }
  484. .remove-collab {
  485. color: #DD4B39;
  486. }
  487. }
  488. .repo-user-list-block {
  489. position: relative;
  490. top: 5px;
  491. }
  492. .setting-list {
  493. width: 100%;
  494. list-style: none;
  495. }
  496. #commits-list {
  497. padding-top: 20px;
  498. h4{
  499. line-height: 30px;
  500. margin-bottom: 0;
  501. }
  502. }
  503. .commit-list {
  504. th {
  505. background-color: #FFF;
  506. line-height: 28px !important;
  507. }
  508. .date {
  509. width: 120px;
  510. }
  511. .author {
  512. padding-left: 20px;
  513. min-width: 180px;
  514. img {
  515. margin-top: -4px;
  516. }
  517. }
  518. .sha a {
  519. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  520. font-size: 14px;
  521. }
  522. }
  523. .diff-head-box {
  524. margin-top: 10px;
  525. .panel-body {
  526. padding: 10px 15px 5px 10px;
  527. }
  528. .author {
  529. img {
  530. margin-top: -7px;
  531. }
  532. }
  533. }
  534. .diff-detail-box {
  535. margin: 15px 0;
  536. line-height: 30px;
  537. ol {
  538. clear: both;
  539. padding-left: 0;
  540. margin-bottom: 28px;
  541. li {
  542. list-style: none;
  543. padding-bottom: 4px;
  544. margin-bottom: 4px;
  545. border-bottom: 1px dashed #DDD;
  546. padding-left: 6px;
  547. }
  548. }
  549. span.status{
  550. display: inline-block;
  551. width: 12px;
  552. height: 12px;
  553. margin-right: 8px;
  554. vertical-align: middle;
  555. &.modify {
  556. background-color: #f0db88;
  557. }
  558. &.add {
  559. background-color: #b4e2b4;
  560. }
  561. &.del {
  562. background-color: #e9aeae;
  563. }
  564. &.rename {
  565. background-color: #dad8ff;
  566. }
  567. }
  568. }
  569. .diff-box {
  570. .count {
  571. margin-right: 12px;
  572. .bar {
  573. background-color: #e75316;
  574. height: 12px;
  575. width: 40px;
  576. display: inline-block;
  577. margin: 2px 4px 0 4px;
  578. vertical-align: text-top;
  579. .add {
  580. background-color: #77c64a;
  581. height: 12px;
  582. }
  583. }
  584. }
  585. .file {
  586. color: #888;
  587. }
  588. .panel-header {
  589. font-size: 14px;
  590. }
  591. }
  592. .diff-file-box {
  593. .file-body.file-code {
  594. .lines-num {
  595. text-align: right;
  596. color: #999;
  597. background: #fafafa;
  598. width: 1%;
  599. }
  600. .lines-num-old {
  601. border-right: 1px solid #DDD;
  602. }
  603. }
  604. .code-diff {
  605. tbody {
  606. tr {
  607. &.tag-code {
  608. td, pre {
  609. background-color: #E0E0E0 !important;
  610. border-color: #ADADAD !important;
  611. }
  612. }
  613. &.del-code {
  614. td, pre {
  615. background-color: #ffe2dd !important;
  616. border-color: #e9aeae !important;
  617. }
  618. }
  619. &.add-code {
  620. td, pre {
  621. background-color: #d1ffd6 !important;
  622. border-color: #b4e2b4 !important;
  623. }
  624. }
  625. &:hover {
  626. td, pre {
  627. background-color: #FFF8D2 !important;
  628. border-color: #F0DB88 !important;
  629. }
  630. }
  631. }
  632. }
  633. }
  634. }
  635. .compare-head-box {
  636. margin-top: 10px;
  637. .compare {
  638. padding: 0 15px 15px 15px;
  639. }
  640. }