repository.less 13 KB

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