repository.less 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  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. th, td {
  250. text-align: left;
  251. line-height: 32px;
  252. }
  253. td.icon {
  254. width: 16px;
  255. padding-right: .1em;
  256. padding-left: 1em;
  257. }
  258. td.name {
  259. max-width: 120px;
  260. .text-truncate {
  261. max-width: 100%;
  262. }
  263. }
  264. td.age {
  265. max-width: 120px;
  266. text-align: right;
  267. }
  268. td.msg {
  269. max-width: 440px;
  270. .text-truncate {
  271. max-width: 100%;
  272. }
  273. }
  274. td.age,
  275. td.size,
  276. td.msg a {
  277. color: #888;
  278. }
  279. td.msg a:hover {
  280. color: #428BCA;
  281. text-decoration: underline;
  282. }
  283. td.message {
  284. .text-truncate {
  285. max-width: 360px;
  286. }
  287. }
  288. tbody {
  289. background-color: #FFF;
  290. tr:hover {
  291. background-color: #ffffEE;
  292. }
  293. }
  294. thead {
  295. background-color: #F0F0F0;
  296. .author {
  297. a {
  298. margin: 0 .4em;
  299. }
  300. }
  301. .last-commit {
  302. strong {
  303. color: #444;
  304. }
  305. .text-truncate {
  306. max-width: 440px;
  307. margin-left: .4em;
  308. }
  309. }
  310. .last-commit .text-truncate,
  311. .age {
  312. font-weight: normal;
  313. color: #888;
  314. }
  315. }
  316. }
  317. #repo-readme,
  318. #repo-read-file {
  319. margin-bottom: 80px;
  320. }
  321. #repo-bare-start {
  322. margin-bottom: 100px;
  323. .panel-content {
  324. background-color: #FFF;
  325. }
  326. pre {
  327. margin: 0 40px;
  328. padding: 6px 10px;
  329. border: 1px solid #ddd;
  330. background: #f8f8f8;
  331. }
  332. }
  333. .repo-bare {
  334. #repo-bare-start {
  335. h2 {
  336. margin-top: 30px;
  337. margin-bottom: 24px;
  338. }
  339. }
  340. #repo-header-meta {
  341. display: none;
  342. }
  343. #repo-clone-ssh {
  344. margin-left: 200px;
  345. }
  346. #repo-clone-copy {
  347. margin-right: 200px;
  348. }
  349. #repo-clone-help {
  350. clear: both;
  351. width: 100%;
  352. }
  353. #repo-clone-url {
  354. width: 520px;
  355. }
  356. }
  357. /* repository create */
  358. #team-create-form,
  359. #repo-migrate-form,
  360. #repo-create-form {
  361. width: 800px;
  362. margin: 60px auto auto auto;
  363. background: white;
  364. h2 {
  365. margin: .5em 1em;
  366. }
  367. .field {
  368. margin: 1.2em 0 2em 0;
  369. }
  370. .ipt {
  371. width: 540px;
  372. }
  373. textarea {
  374. height: 120px;
  375. }
  376. .avatar {
  377. vertical-align: middle;
  378. margin-right: .6em;
  379. width: 28px;
  380. height: 28px;
  381. }
  382. &:hover {
  383. box-shadow: 0px 0px 6px #CCC;
  384. }
  385. }
  386. #repo-create-cancel {
  387. margin-left: 4em;
  388. }
  389. #release-new-target-branch-list,
  390. #repo-create-owner-list {
  391. top: 30px;
  392. left: 0;
  393. width: auto;
  394. max-width: 300px;
  395. .octicon {
  396. margin-right: 12px;
  397. opacity: 0;
  398. }
  399. .avatar {
  400. width: 20px;
  401. height: 20px;
  402. }
  403. li {
  404. white-space: nowrap;
  405. &.checked {
  406. .octicon {
  407. opacity: 1;
  408. }
  409. }
  410. a {
  411. text-overflow: ellipsis;
  412. -o-text-overflow: ellipsis;
  413. overflow: hidden;
  414. }
  415. }
  416. }
  417. #release-new-target-branch-list {
  418. margin-top: -1px;
  419. min-width: 150px;
  420. }
  421. #release-new-title {
  422. margin-top: 10px;
  423. }
  424. #release-new-content {
  425. width: 100%;
  426. }
  427. #release-preview-btn .btn {
  428. border-left: 0;
  429. }
  430. #release-preview.markdown {
  431. margin-top: 5px;
  432. background-color: transparent;
  433. }
  434. .file-name {
  435. margin-left: 1em;
  436. }
  437. .file-size {
  438. font-size: 13px;
  439. color: #888;
  440. margin-left: 1em;
  441. }
  442. .code-view {
  443. overflow: auto;
  444. overflow-x: auto;
  445. overflow-y: hidden;
  446. background: white;
  447. .view-raw {
  448. min-height: 40px;
  449. text-align: center;
  450. padding-top: 20px;
  451. .btn {
  452. font-size: 1.05em;
  453. line-height: 16px;
  454. padding: 6px 8px;
  455. }
  456. }
  457. table {
  458. width: 100%;
  459. td {
  460. padding: 0;
  461. }
  462. }
  463. .lines-num {
  464. vertical-align: top;
  465. text-align: right;
  466. color: #999;
  467. background: #f5f5f5;
  468. width: 1%;
  469. span {
  470. font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
  471. line-height: 20px;
  472. padding: 0 10px;
  473. cursor: pointer;
  474. display: block;
  475. }
  476. }
  477. .lines-code > pre {
  478. border: none;
  479. border-left: 1px solid #ddd;
  480. > ol.linenums > li {
  481. padding: 0 10px;
  482. line-height: 20px;
  483. &.active {
  484. background: #ffffdd;
  485. }
  486. }
  487. }
  488. }
  489. .repo-setting-zone {
  490. padding: 30px;
  491. }
  492. #team-repositories-list,
  493. #team-members-list,
  494. #repo-collab-list {
  495. list-style: none;
  496. padding: 10px 0 5px 0;
  497. li.collab {
  498. clear: both;
  499. height: 50px;
  500. padding: 0 15px 0 15px;
  501. }
  502. a.member {
  503. color: #444;
  504. height: 50px;
  505. line-height: 50px;
  506. &:hover {
  507. color: #4183C4;
  508. }
  509. }
  510. .avatar {
  511. margin-right: 1em;
  512. width: 40px;
  513. }
  514. .remove-collab {
  515. color: #DD4B39;
  516. }
  517. }
  518. .repo-user-list-block {
  519. position: relative;
  520. top: 5px;
  521. }
  522. .setting-list {
  523. width: 100%;
  524. list-style: none;
  525. }
  526. #commits-list {
  527. padding-top: 20px;
  528. h4{
  529. line-height: 30px;
  530. margin-bottom: 0;
  531. }
  532. }
  533. .commit-list {
  534. th {
  535. background-color: #FFF;
  536. line-height: 28px !important;
  537. }
  538. .date {
  539. width: 120px;
  540. }
  541. .author {
  542. padding-left: 20px;
  543. min-width: 180px;
  544. img {
  545. margin-top: -4px;
  546. }
  547. }
  548. .sha a {
  549. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  550. font-size: 14px;
  551. }
  552. .message {
  553. width: 60%;
  554. span {
  555. max-width: 500px;
  556. }
  557. }
  558. }
  559. .commit-message {
  560. white-space: pre-wrap;
  561. }
  562. .diff-head-box {
  563. margin-top: 10px;
  564. .panel-body {
  565. padding: 10px 15px 5px 10px;
  566. }
  567. .author {
  568. img {
  569. margin-top: -7px;
  570. }
  571. }
  572. }
  573. .diff-detail-box {
  574. margin: 15px 0;
  575. line-height: 30px;
  576. ol {
  577. clear: both;
  578. padding-left: 0;
  579. margin-bottom: 28px;
  580. li {
  581. list-style: none;
  582. padding-bottom: 4px;
  583. margin-bottom: 4px;
  584. border-bottom: 1px dashed #DDD;
  585. padding-left: 6px;
  586. }
  587. }
  588. span.status{
  589. display: inline-block;
  590. width: 12px;
  591. height: 12px;
  592. margin-right: 8px;
  593. vertical-align: middle;
  594. &.modify {
  595. background-color: #f0db88;
  596. }
  597. &.add {
  598. background-color: #b4e2b4;
  599. }
  600. &.del {
  601. background-color: #e9aeae;
  602. }
  603. &.rename {
  604. background-color: #dad8ff;
  605. }
  606. }
  607. }
  608. .diff-box {
  609. .count {
  610. margin-right: 12px;
  611. .bar {
  612. background-color: #e75316;
  613. height: 12px;
  614. width: 40px;
  615. display: inline-block;
  616. margin: 2px 4px 0 4px;
  617. vertical-align: text-top;
  618. .add {
  619. background-color: #77c64a;
  620. height: 12px;
  621. }
  622. }
  623. }
  624. .file {
  625. color: #888;
  626. }
  627. .panel-header {
  628. font-size: 14px;
  629. }
  630. }
  631. .diff-file-box {
  632. .file-body.file-code {
  633. .lines-num {
  634. text-align: right;
  635. color: #999;
  636. background: #fafafa;
  637. width: 1%;
  638. }
  639. .lines-num-old {
  640. border-right: 1px solid #DDD;
  641. }
  642. }
  643. .code-diff {
  644. tbody {
  645. tr {
  646. &.tag-code {
  647. td, pre {
  648. background-color: #E0E0E0 !important;
  649. border-color: #ADADAD !important;
  650. }
  651. td.selected-line, td.selected-line pre {
  652. background-color: #ffffdd !important;
  653. }
  654. }
  655. &.same-code {
  656. td.selected-line, td.selected-line pre {
  657. background-color: #ffffdd !important;
  658. }
  659. }
  660. &.del-code {
  661. td, pre {
  662. background-color: #ffe2dd !important;
  663. border-color: #e9aeae !important;
  664. }
  665. td.selected-line, td.selected-line pre {
  666. background-color: #ffffdd !important;
  667. }
  668. }
  669. &.add-code {
  670. td, pre {
  671. background-color: #d1ffd6 !important;
  672. border-color: #b4e2b4 !important;
  673. }
  674. td.selected-line, td.selected-line pre {
  675. background-color: #ffffdd !important;
  676. }
  677. }
  678. &:hover {
  679. td, pre {
  680. background-color: #FFF8D2 !important;
  681. border-color: #F0DB88 !important;
  682. }
  683. }
  684. }
  685. }
  686. }
  687. }
  688. .compare-head-box {
  689. margin-top: 10px;
  690. .compare {
  691. padding: 0 15px 15px 15px;
  692. }
  693. }
  694. .fork-flag {
  695. display: block;
  696. font-size: 11px;
  697. line-height: 10px;
  698. white-space: nowrap;
  699. margin-left: 44px;
  700. margin-top: -15px;
  701. }
  702. #release {
  703. h4 {
  704. font-size: 18px;
  705. small {
  706. font-weight: 400;
  707. line-height: 1;
  708. color: #999;
  709. }
  710. }
  711. #release-head {
  712. margin-top: 0;
  713. margin-bottom: 0;
  714. padding-bottom: 20px;
  715. border-bottom: 1px solid #DDD;
  716. .btn {
  717. margin-left: 10px;
  718. }
  719. }
  720. .release-item {
  721. &>div {
  722. padding-top: 20px;
  723. padding-bottom: 20px;
  724. }
  725. .label-green:hover {
  726. background-color: @labelGreenColor;
  727. }
  728. .release-meta {
  729. position: relative;
  730. float: left;
  731. padding-right: 15px;
  732. }
  733. .tag,
  734. .commit {
  735. display: block;
  736. margin-top: 12px;
  737. line-height: 20px;
  738. }
  739. .release-detail {
  740. margin-top: -1px;
  741. border-left: 1px solid #DDD;
  742. position: relative;
  743. float: left;
  744. padding-left: 15px;
  745. }
  746. .title {
  747. line-height: 25px;
  748. margin-top: 0;
  749. }
  750. p.info {
  751. line-height: 20px;
  752. color: #666;
  753. margin-bottom: 15px;
  754. >* {
  755. margin-right: 10px;
  756. }
  757. }
  758. .author {
  759. img {
  760. margin-top: -3px;
  761. }
  762. }
  763. div.desc {
  764. margin-bottom: 25px;
  765. &.markdown {
  766. background-color: transparent;
  767. }
  768. }
  769. .download a {
  770. margin-right: 10px;
  771. }
  772. .dot {
  773. width: 9px;
  774. height: 9px;
  775. background-color: #ccc;
  776. z-index: 999;
  777. position: absolute;
  778. display: block;
  779. left: -6px;
  780. top: 27px;
  781. border-radius: 6px;
  782. border: 1px solid #FFF;
  783. }
  784. }
  785. #release-new-form {
  786. padding-top: 15px;
  787. }
  788. }