repository.less 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  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;
  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. max-width: 440px;
  297. margin-left: .4em;
  298. }
  299. }
  300. .last-commit .text-truncate,
  301. .age {
  302. font-weight: normal;
  303. color: #888;
  304. }
  305. }
  306. }
  307. #repo-readme,
  308. #repo-read-file {
  309. margin-bottom: 80px;
  310. }
  311. #repo-bare-start {
  312. margin-bottom: 100px;
  313. .panel-content {
  314. background-color: #FFF;
  315. }
  316. pre {
  317. margin: 0 40px;
  318. padding: 6px 10px;
  319. border: 1px solid #ddd;
  320. background: #f8f8f8;
  321. }
  322. }
  323. .repo-bare {
  324. #repo-bare-start {
  325. h2 {
  326. margin-top: 30px;
  327. margin-bottom: 24px;
  328. }
  329. }
  330. #repo-header-meta {
  331. display: none;
  332. }
  333. #repo-clone-ssh {
  334. margin-left: 200px;
  335. }
  336. #repo-clone-copy {
  337. margin-right: 200px;
  338. }
  339. #repo-clone-help {
  340. clear: both;
  341. width: 100%;
  342. }
  343. #repo-clone-url {
  344. width: 520px;
  345. }
  346. }
  347. /* repository create */
  348. #team-create-form,
  349. #repo-migrate-form,
  350. #repo-create-form {
  351. width: 800px;
  352. margin: 60px auto auto auto;
  353. background: white;
  354. h2 {
  355. margin: .5em 1em;
  356. }
  357. .field {
  358. margin: 1.2em 0 2em 0;
  359. }
  360. .ipt {
  361. width: 540px;
  362. }
  363. textarea {
  364. height: 120px;
  365. }
  366. .avatar {
  367. vertical-align: middle;
  368. margin-right: .6em;
  369. width: 28px;
  370. height: 28px;
  371. }
  372. &:hover {
  373. box-shadow: 0px 0px 6px #CCC;
  374. }
  375. }
  376. #repo-create-cancel {
  377. margin-left: 4em;
  378. }
  379. #repo-create-owner-list {
  380. top: 30px;
  381. left: 0;
  382. width: auto;
  383. max-width: 300px;
  384. .octicon {
  385. margin-right: 12px;
  386. opacity: 0;
  387. }
  388. .avatar {
  389. width: 20px;
  390. height: 20px;
  391. }
  392. li {
  393. white-space: nowrap;
  394. &.checked {
  395. .octicon {
  396. opacity: 1;
  397. }
  398. }
  399. a {
  400. text-overflow: ellipsis;
  401. -o-text-overflow: ellipsis;
  402. overflow: hidden;
  403. }
  404. }
  405. }
  406. .file-name {
  407. margin-left: 1em;
  408. }
  409. .file-size {
  410. font-size: 13px;
  411. color: #888;
  412. margin-left: 1em;
  413. }
  414. .code-view {
  415. overflow: auto;
  416. overflow-x: auto;
  417. overflow-y: hidden;
  418. background: white;
  419. .view-raw {
  420. min-height: 40px;
  421. text-align: center;
  422. padding-top: 20px;
  423. .btn {
  424. font-size: 1.05em;
  425. line-height: 16px;
  426. padding: 6px 8px;
  427. }
  428. }
  429. table {
  430. width: 100%;
  431. td {
  432. padding: 0;
  433. }
  434. }
  435. .lines-num {
  436. vertical-align: top;
  437. text-align: right;
  438. color: #999;
  439. background: #f5f5f5;
  440. width: 1%;
  441. span {
  442. font-family: Monaco,Menlo,Consolas,"Courier New",monospace;
  443. line-height: 1.6;
  444. padding: 0 10px;
  445. cursor: pointer;
  446. display: block;
  447. }
  448. }
  449. .lines-code > pre {
  450. border: none;
  451. border-left: 1px solid #ddd;
  452. > ol.linenums > li {
  453. padding: 0 10px;
  454. &.active {
  455. background: #ffffdd;
  456. }
  457. }
  458. }
  459. }
  460. .repo-setting-zone {
  461. padding: 30px;
  462. }
  463. #team-repositories-list,
  464. #team-members-list,
  465. #repo-collab-list {
  466. list-style: none;
  467. padding: 10px 0 5px 0;
  468. li.collab {
  469. clear: both;
  470. height: 50px;
  471. padding: 0 15px 0 15px;
  472. }
  473. a.member {
  474. color: #444;
  475. height: 50px;
  476. line-height: 50px;
  477. &:hover {
  478. color: #4183C4;
  479. }
  480. }
  481. .avatar {
  482. margin-right: 1em;
  483. width: 40px;
  484. }
  485. .remove-collab {
  486. color: #DD4B39;
  487. }
  488. }
  489. .repo-user-list-block {
  490. position: relative;
  491. top: 5px;
  492. }
  493. .setting-list {
  494. width: 100%;
  495. list-style: none;
  496. }
  497. #commits-list {
  498. padding-top: 20px;
  499. h4{
  500. line-height: 30px;
  501. margin-bottom: 0;
  502. }
  503. }
  504. .commit-list {
  505. th {
  506. background-color: #FFF;
  507. line-height: 28px !important;
  508. }
  509. .date {
  510. width: 120px;
  511. }
  512. .author {
  513. padding-left: 20px;
  514. min-width: 180px;
  515. img {
  516. margin-top: -4px;
  517. }
  518. }
  519. .sha a {
  520. font-family: Consolas, Menlo, Monaco, "Lucida Console", monospace;
  521. font-size: 14px;
  522. }
  523. .message {
  524. width: 60%;
  525. span {
  526. max-width: 500px;
  527. }
  528. }
  529. }
  530. .diff-head-box {
  531. margin-top: 10px;
  532. .panel-body {
  533. padding: 10px 15px 5px 10px;
  534. }
  535. .author {
  536. img {
  537. margin-top: -7px;
  538. }
  539. }
  540. }
  541. .diff-detail-box {
  542. margin: 15px 0;
  543. line-height: 30px;
  544. ol {
  545. clear: both;
  546. padding-left: 0;
  547. margin-bottom: 28px;
  548. li {
  549. list-style: none;
  550. padding-bottom: 4px;
  551. margin-bottom: 4px;
  552. border-bottom: 1px dashed #DDD;
  553. padding-left: 6px;
  554. }
  555. }
  556. span.status{
  557. display: inline-block;
  558. width: 12px;
  559. height: 12px;
  560. margin-right: 8px;
  561. vertical-align: middle;
  562. &.modify {
  563. background-color: #f0db88;
  564. }
  565. &.add {
  566. background-color: #b4e2b4;
  567. }
  568. &.del {
  569. background-color: #e9aeae;
  570. }
  571. &.rename {
  572. background-color: #dad8ff;
  573. }
  574. }
  575. }
  576. .diff-box {
  577. .count {
  578. margin-right: 12px;
  579. .bar {
  580. background-color: #e75316;
  581. height: 12px;
  582. width: 40px;
  583. display: inline-block;
  584. margin: 2px 4px 0 4px;
  585. vertical-align: text-top;
  586. .add {
  587. background-color: #77c64a;
  588. height: 12px;
  589. }
  590. }
  591. }
  592. .file {
  593. color: #888;
  594. }
  595. .panel-header {
  596. font-size: 14px;
  597. }
  598. }
  599. .diff-file-box {
  600. .file-body.file-code {
  601. .lines-num {
  602. text-align: right;
  603. color: #999;
  604. background: #fafafa;
  605. width: 1%;
  606. }
  607. .lines-num-old {
  608. border-right: 1px solid #DDD;
  609. }
  610. }
  611. .code-diff {
  612. tbody {
  613. tr {
  614. &.tag-code {
  615. td, pre {
  616. background-color: #E0E0E0 !important;
  617. border-color: #ADADAD !important;
  618. }
  619. }
  620. &.del-code {
  621. td, pre {
  622. background-color: #ffe2dd !important;
  623. border-color: #e9aeae !important;
  624. }
  625. }
  626. &.add-code {
  627. td, pre {
  628. background-color: #d1ffd6 !important;
  629. border-color: #b4e2b4 !important;
  630. }
  631. }
  632. &:hover {
  633. td, pre {
  634. background-color: #FFF8D2 !important;
  635. border-color: #F0DB88 !important;
  636. }
  637. }
  638. }
  639. }
  640. }
  641. }
  642. .compare-head-box {
  643. margin-top: 10px;
  644. .compare {
  645. padding: 0 15px 15px 15px;
  646. }
  647. }
  648. .fork-flag {
  649. display: block;
  650. font-size: 11px;
  651. line-height: 10px;
  652. white-space: nowrap;
  653. margin-left: 44px;
  654. margin-top: -15px;
  655. }