repository.less 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  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: 460px;
  75. top: 50px;
  76. left: -390px;
  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. #repo-clone-copy {
  87. width: 85px;
  88. text-overflow: clip;
  89. }
  90. }
  91. #repo-content {
  92. padding-top: 18px;
  93. padding-bottom: 18px;
  94. }
  95. .repo-wide-wrapper {
  96. padding: 18px;
  97. position: relative;
  98. }
  99. #repo-clone-url {
  100. border-right: none;
  101. width: 190px;
  102. border-left: none;
  103. }
  104. #repo-clone-help {
  105. clear: both;
  106. line-height: 48px;
  107. }
  108. #repo-clone-zip {
  109. line-height: 48px;
  110. a {
  111. cursor: pointer;
  112. color: white;
  113. overflow: visible;
  114. padding: .6em 1.2em;
  115. }
  116. .btn {
  117. margin: 0 6px;
  118. }
  119. }
  120. #repo-desc {
  121. font-size: 1.2em;
  122. .no-description{
  123. color: #999;
  124. }
  125. }
  126. #repo-sidebar-nav {
  127. .label {
  128. font-size: 12px;
  129. line-height: 1.4em;
  130. margin-top: 2px;
  131. }
  132. i {
  133. margin-right: 6px;
  134. }
  135. }
  136. #repo-sidebar-mini {
  137. margin-top: 6px;
  138. width: 60px;
  139. li {
  140. margin-bottom: 4px;
  141. }
  142. li > a {
  143. position: relative;
  144. padding-left: 12px;
  145. width: 24px;
  146. text-align: center;
  147. >i.octicon {
  148. font-size: 21px;
  149. }
  150. }
  151. .num {
  152. position: absolute;
  153. font-size: 12px;
  154. top: 0;
  155. left: 36px;
  156. padding: 0 2px;
  157. min-width: 16px;
  158. height: 16px;
  159. text-align: center;
  160. line-height: 16px;
  161. border-radius: 4px;
  162. opacity: 0.7;
  163. -webkit-transform: scale(0.9);
  164. font-weight: bold;
  165. }
  166. }
  167. #repo-file-nav {
  168. padding: .6em 0 1em 0;
  169. >li>a {
  170. padding-left: 0;
  171. &:hover {
  172. background-color: transparent;
  173. }
  174. }
  175. li.repo-jump > a {
  176. padding-right: 0;
  177. .btn {
  178. margin-left: -1px;
  179. }
  180. }
  181. }
  182. #repo-branch-switch {
  183. >a {
  184. .btn {
  185. padding-right: 30px;
  186. }
  187. &:after {
  188. position: absolute;
  189. top: 12px;
  190. right: 30px;
  191. margin-left: 0;
  192. color: @baseFontColor;
  193. }
  194. }
  195. >.drop-down {
  196. top: 40px;
  197. left: 0;
  198. }
  199. }
  200. #repo-branch-filter-ipt {
  201. width: 100%;
  202. border-left: none;
  203. border-right: none;
  204. box-sizing: border-box;
  205. }
  206. #repo-branch-tag {
  207. .tab-nav {
  208. border-bottom: 1px solid #EAEAEA;
  209. a {
  210. padding: .3em .8em;
  211. }
  212. .js-tab-nav-show {
  213. background-color: #EEE;
  214. font-weight: bold;
  215. }
  216. }
  217. .switching-list {
  218. max-height: 300px;
  219. overflow-y: auto;
  220. }
  221. }
  222. #repo-branch-list,
  223. #repo-tag-list {
  224. li {
  225. i {
  226. margin-right: 12px;
  227. opacity: 0;
  228. }
  229. }
  230. li.checked {
  231. i {
  232. opacity: 1;
  233. }
  234. }
  235. }
  236. #repo-bread {
  237. .bread {
  238. padding-right: 0;
  239. font-size: 16px;
  240. font-weight: bold;
  241. }
  242. }
  243. #repo-main {
  244. padding-right: 40px;
  245. box-sizing: border-box;
  246. }
  247. #repo-files-table {
  248. margin-bottom: 20px;
  249. .sha .label {
  250. font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
  251. }
  252. th, td {
  253. text-align: left;
  254. line-height: 32px;
  255. }
  256. td.icon {
  257. width: 16px;
  258. padding-right: .1em;
  259. padding-left: 1em;
  260. }
  261. td.name {
  262. max-width: 120px;
  263. .text-truncate {
  264. max-width: 100%;
  265. }
  266. }
  267. td.age {
  268. max-width: 120px;
  269. text-align: right;
  270. }
  271. td.msg {
  272. max-width: 440px;
  273. .text-truncate {
  274. max-width: 100%;
  275. }
  276. }
  277. td.age,
  278. td.size,
  279. td.msg a {
  280. color: #888;
  281. }
  282. td.msg a:hover {
  283. color: #428BCA;
  284. text-decoration: underline;
  285. }
  286. td.message {
  287. .text-truncate {
  288. max-width: 360px;
  289. }
  290. }
  291. tbody {
  292. background-color: #FFF;
  293. tr:hover {
  294. background-color: #ffffEE;
  295. }
  296. }
  297. thead {
  298. background-color: #F0F0F0;
  299. .author {
  300. a {
  301. margin: 0 .4em;
  302. }
  303. }
  304. .last-commit {
  305. strong {
  306. color: #444;
  307. }
  308. .text-truncate {
  309. max-width: 440px;
  310. margin-left: .4em;
  311. }
  312. }
  313. .last-commit .text-truncate,
  314. .age {
  315. font-weight: normal;
  316. color: #888;
  317. }
  318. }
  319. }
  320. #repo-readme,
  321. #repo-read-file {
  322. margin-bottom: 80px;
  323. }
  324. #repo-bare-start {
  325. margin-bottom: 100px;
  326. .panel-content {
  327. background-color: #FFF;
  328. }
  329. pre {
  330. margin: 0 40px;
  331. padding: 6px 10px;
  332. border: 1px solid #ddd;
  333. background: #f8f8f8;
  334. }
  335. }
  336. .repo-bare {
  337. #repo-bare-start {
  338. h2 {
  339. margin-top: 30px;
  340. margin-bottom: 24px;
  341. }
  342. }
  343. #repo-header-meta {
  344. display: none;
  345. }
  346. #repo-clone-ssh {
  347. margin-left: 200px;
  348. }
  349. #repo-clone-copy {
  350. margin-right: 200px;
  351. }
  352. #repo-clone-help {
  353. clear: both;
  354. width: 100%;
  355. }
  356. #repo-clone-url {
  357. width: 520px;
  358. }
  359. }
  360. /* repository create */
  361. #team-create-form,
  362. #repo-migrate-form,
  363. #repo-create-form {
  364. width: 800px;
  365. margin: 60px auto auto auto;
  366. background: white;
  367. h2 {
  368. margin: .5em 1em;
  369. }
  370. .field {
  371. margin: 1.2em 0 2em 0;
  372. }
  373. .ipt {
  374. width: 540px;
  375. }
  376. textarea {
  377. height: 120px;
  378. }
  379. .avatar {
  380. vertical-align: middle;
  381. margin-right: .6em;
  382. width: 28px;
  383. height: 28px;
  384. }
  385. &:hover {
  386. box-shadow: 0px 0px 6px #CCC;
  387. }
  388. }
  389. #repo-create-cancel {
  390. margin-left: 4em;
  391. }
  392. #release-new-target-branch-list,
  393. #repo-create-owner-list {
  394. top: 30px;
  395. left: 0;
  396. width: auto;
  397. max-width: 300px;
  398. .octicon {
  399. margin-right: 12px;
  400. opacity: 0;
  401. }
  402. .avatar {
  403. width: 20px;
  404. height: 20px;
  405. }
  406. li {
  407. white-space: nowrap;
  408. &.checked {
  409. .octicon {
  410. opacity: 1;
  411. }
  412. }
  413. a {
  414. text-overflow: ellipsis;
  415. -o-text-overflow: ellipsis;
  416. overflow: hidden;
  417. }
  418. }
  419. }
  420. #release-new-target-branch-list {
  421. margin-top: -1px;
  422. min-width: 150px;
  423. }
  424. #release-new-title {
  425. margin-top: 10px;
  426. }
  427. #release-new-content {
  428. width: 100%;
  429. }
  430. #release-preview-btn .btn {
  431. border-left: 0;
  432. }
  433. #release-preview.markdown {
  434. margin-top: 5px;
  435. background-color: transparent;
  436. }
  437. .file-name {
  438. margin-left: 1em;
  439. }
  440. .file-size {
  441. font-size: 13px;
  442. color: #888;
  443. margin-left: 1em;
  444. }
  445. .code-view {
  446. overflow: auto;
  447. overflow-x: auto;
  448. overflow-y: hidden;
  449. background: white;
  450. .view-raw {
  451. min-height: 40px;
  452. text-align: center;
  453. padding-top: 20px;
  454. .btn {
  455. font-size: 1.05em;
  456. line-height: 16px;
  457. padding: 6px 8px;
  458. }
  459. }
  460. table {
  461. width: 100%;
  462. td {
  463. padding: 0;
  464. }
  465. }
  466. .lines-num {
  467. vertical-align: top;
  468. text-align: right;
  469. color: #999;
  470. background: #f5f5f5;
  471. width: 1%;
  472. span {
  473. font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
  474. line-height: 20px;
  475. padding: 0 10px;
  476. cursor: pointer;
  477. display: block;
  478. }
  479. }
  480. .lines-code > pre {
  481. border: none;
  482. border-left: 1px solid #ddd;
  483. > ol.linenums > li {
  484. padding: 0 10px;
  485. line-height: 20px;
  486. &.active {
  487. background: #ffffdd;
  488. }
  489. }
  490. }
  491. }
  492. .repo-setting-zone {
  493. padding: 30px;
  494. }
  495. #team-repositories-list,
  496. #team-members-list,
  497. #repo-collab-list {
  498. list-style: none;
  499. padding: 10px 0 5px 0;
  500. li.collab {
  501. clear: both;
  502. height: 50px;
  503. padding: 0 15px 0 15px;
  504. }
  505. a.member {
  506. color: #444;
  507. height: 50px;
  508. line-height: 50px;
  509. &:hover {
  510. color: #4183C4;
  511. }
  512. }
  513. .avatar {
  514. margin-right: 1em;
  515. width: 40px;
  516. }
  517. .remove-collab {
  518. color: #DD4B39;
  519. }
  520. }
  521. .repo-user-list-block {
  522. position: relative;
  523. top: 5px;
  524. }
  525. .setting-list {
  526. width: 100%;
  527. list-style: none;
  528. }
  529. #commits-list {
  530. padding-top: 20px;
  531. h4{
  532. line-height: 30px;
  533. margin-bottom: 0;
  534. }
  535. }
  536. .commit-list {
  537. th {
  538. background-color: #FFF;
  539. line-height: 28px !important;
  540. }
  541. .date {
  542. width: 120px;
  543. }
  544. .author {
  545. padding-left: 20px;
  546. min-width: 180px;
  547. img {
  548. margin-top: -4px;
  549. }
  550. }
  551. .sha a {
  552. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  553. font-size: 14px;
  554. }
  555. .message {
  556. width: 60%;
  557. span {
  558. max-width: 500px;
  559. }
  560. }
  561. }
  562. .commit-message {
  563. white-space: pre-wrap;
  564. }
  565. .diff-head-box {
  566. margin-top: 10px;
  567. .panel-body {
  568. padding: 10px 15px 5px 10px;
  569. }
  570. .author {
  571. img {
  572. margin-top: -7px;
  573. }
  574. }
  575. }
  576. .diff-detail-box {
  577. margin: 15px 0;
  578. line-height: 30px;
  579. ol {
  580. clear: both;
  581. padding-left: 0;
  582. margin-bottom: 28px;
  583. li {
  584. list-style: none;
  585. padding-bottom: 4px;
  586. margin-bottom: 4px;
  587. border-bottom: 1px dashed #DDD;
  588. padding-left: 6px;
  589. }
  590. }
  591. span.status{
  592. display: inline-block;
  593. width: 12px;
  594. height: 12px;
  595. margin-right: 8px;
  596. vertical-align: middle;
  597. &.modify {
  598. background-color: #f0db88;
  599. }
  600. &.add {
  601. background-color: #b4e2b4;
  602. }
  603. &.del {
  604. background-color: #e9aeae;
  605. }
  606. &.rename {
  607. background-color: #dad8ff;
  608. }
  609. }
  610. }
  611. .diff-box {
  612. .count {
  613. margin-right: 12px;
  614. .bar {
  615. background-color: #e75316;
  616. height: 12px;
  617. width: 40px;
  618. display: inline-block;
  619. margin: 2px 4px 0 4px;
  620. vertical-align: text-top;
  621. .add {
  622. background-color: #77c64a;
  623. height: 12px;
  624. }
  625. }
  626. }
  627. .file {
  628. color: #888;
  629. }
  630. .panel-header {
  631. font-size: 14px;
  632. }
  633. }
  634. .diff-file-box {
  635. .file-body.file-code {
  636. .lines-num {
  637. text-align: right;
  638. color: #999;
  639. background: #fafafa;
  640. width: 1%;
  641. }
  642. .lines-num-old {
  643. border-right: 1px solid #DDD;
  644. }
  645. }
  646. .code-diff {
  647. tbody {
  648. tr {
  649. &.tag-code {
  650. td, pre {
  651. background-color: #E0E0E0 !important;
  652. border-color: #ADADAD !important;
  653. }
  654. td.selected-line, td.selected-line pre {
  655. background-color: #ffffdd !important;
  656. }
  657. }
  658. &.same-code {
  659. td.selected-line, td.selected-line pre {
  660. background-color: #ffffdd !important;
  661. }
  662. }
  663. &.del-code {
  664. td, pre {
  665. background-color: #ffe2dd !important;
  666. border-color: #e9aeae !important;
  667. }
  668. td.selected-line, td.selected-line pre {
  669. background-color: #ffffdd !important;
  670. }
  671. }
  672. &.add-code {
  673. td, pre {
  674. background-color: #d1ffd6 !important;
  675. border-color: #b4e2b4 !important;
  676. }
  677. td.selected-line, td.selected-line pre {
  678. background-color: #ffffdd !important;
  679. }
  680. }
  681. &:hover {
  682. td, pre {
  683. background-color: #FFF8D2 !important;
  684. border-color: #F0DB88 !important;
  685. }
  686. }
  687. }
  688. }
  689. }
  690. }
  691. .compare-head-box {
  692. margin-top: 10px;
  693. .compare {
  694. padding: 0 15px 15px 15px;
  695. }
  696. }
  697. .fork-flag {
  698. display: block;
  699. font-size: 11px;
  700. line-height: 10px;
  701. white-space: nowrap;
  702. margin-left: 44px;
  703. margin-top: -15px;
  704. }
  705. #release {
  706. h4 {
  707. font-size: 18px;
  708. small {
  709. font-weight: 400;
  710. line-height: 1;
  711. color: #999;
  712. }
  713. }
  714. #release-head {
  715. margin-top: 0;
  716. margin-bottom: 0;
  717. padding-bottom: 20px;
  718. border-bottom: 1px solid #DDD;
  719. .btn {
  720. margin-left: 10px;
  721. }
  722. }
  723. .release-item {
  724. &>div {
  725. padding-top: 20px;
  726. padding-bottom: 20px;
  727. }
  728. .label-green:hover {
  729. background-color: @labelGreenColor;
  730. }
  731. .release-meta {
  732. position: relative;
  733. float: left;
  734. padding-right: 15px;
  735. }
  736. .tag,
  737. .commit {
  738. display: block;
  739. margin-top: 12px;
  740. line-height: 20px;
  741. }
  742. .release-detail {
  743. margin-top: -1px;
  744. border-left: 1px solid #DDD;
  745. position: relative;
  746. float: left;
  747. padding-left: 15px;
  748. }
  749. .title {
  750. line-height: 25px;
  751. margin-top: 0;
  752. }
  753. p.info {
  754. line-height: 20px;
  755. color: #666;
  756. margin-bottom: 15px;
  757. >* {
  758. margin-right: 10px;
  759. }
  760. }
  761. .author {
  762. img {
  763. margin-top: -3px;
  764. }
  765. }
  766. div.desc {
  767. margin-bottom: 25px;
  768. &.markdown {
  769. background-color: transparent;
  770. }
  771. }
  772. .download a {
  773. margin-right: 10px;
  774. }
  775. .dot {
  776. width: 9px;
  777. height: 9px;
  778. background-color: #ccc;
  779. z-index: 999;
  780. position: absolute;
  781. display: block;
  782. left: -6px;
  783. top: 27px;
  784. border-radius: 6px;
  785. border: 1px solid #FFF;
  786. }
  787. }
  788. #release-new-form {
  789. padding-top: 15px;
  790. }
  791. }