The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

953 rader
16 KiB

  1. $no-columns-breakpoint: 600px;
  2. code {
  3. font-family: $font-monospace, monospace;
  4. font-weight: 400;
  5. }
  6. .form-container {
  7. max-width: 400px;
  8. padding: 20px;
  9. margin: 0 auto;
  10. }
  11. .simple_form {
  12. .input {
  13. margin-bottom: 15px;
  14. overflow: hidden;
  15. &.hidden {
  16. margin: 0;
  17. }
  18. &.radio_buttons {
  19. .radio {
  20. margin-bottom: 15px;
  21. &:last-child {
  22. margin-bottom: 0;
  23. }
  24. }
  25. .radio > label {
  26. position: relative;
  27. padding-left: 28px;
  28. input {
  29. position: absolute;
  30. top: -2px;
  31. left: 0;
  32. }
  33. }
  34. }
  35. &.boolean {
  36. position: relative;
  37. margin-bottom: 0;
  38. .label_input > label {
  39. font-family: inherit;
  40. font-size: 14px;
  41. padding-top: 5px;
  42. color: $primary-text-color;
  43. display: block;
  44. width: auto;
  45. }
  46. .label_input,
  47. .hint {
  48. padding-left: 28px;
  49. }
  50. .label_input__wrapper {
  51. position: static;
  52. }
  53. label.checkbox {
  54. position: absolute;
  55. top: 2px;
  56. left: 0;
  57. }
  58. label a {
  59. color: $highlight-text-color;
  60. text-decoration: underline;
  61. &:hover,
  62. &:active,
  63. &:focus {
  64. text-decoration: none;
  65. }
  66. }
  67. .recommended {
  68. position: absolute;
  69. margin: 0 4px;
  70. margin-top: -2px;
  71. }
  72. }
  73. }
  74. .row {
  75. display: flex;
  76. margin: 0 -5px;
  77. .input {
  78. box-sizing: border-box;
  79. flex: 1 1 auto;
  80. width: 50%;
  81. padding: 0 5px;
  82. }
  83. }
  84. .hint {
  85. color: $darker-text-color;
  86. a {
  87. color: $highlight-text-color;
  88. }
  89. code {
  90. border-radius: 3px;
  91. padding: 0.2em 0.4em;
  92. background: darken($ui-base-color, 12%);
  93. }
  94. li {
  95. list-style: disc;
  96. margin-left: 18px;
  97. }
  98. }
  99. ul.hint {
  100. margin-bottom: 15px;
  101. }
  102. span.hint {
  103. display: block;
  104. font-size: 12px;
  105. margin-top: 4px;
  106. }
  107. p.hint {
  108. margin-bottom: 15px;
  109. color: $darker-text-color;
  110. &.subtle-hint {
  111. text-align: center;
  112. font-size: 12px;
  113. line-height: 18px;
  114. margin-top: 15px;
  115. margin-bottom: 0;
  116. }
  117. }
  118. .card {
  119. margin-bottom: 15px;
  120. }
  121. strong {
  122. font-weight: 500;
  123. @each $lang in $cjk-langs {
  124. &:lang(#{$lang}) {
  125. font-weight: 700;
  126. }
  127. }
  128. }
  129. .input.with_floating_label {
  130. .label_input {
  131. display: flex;
  132. & > label {
  133. font-family: inherit;
  134. font-size: 14px;
  135. color: $primary-text-color;
  136. font-weight: 500;
  137. min-width: 150px;
  138. flex: 0 0 auto;
  139. }
  140. input,
  141. select {
  142. flex: 1 1 auto;
  143. }
  144. }
  145. &.select .hint {
  146. margin-top: 6px;
  147. margin-left: 150px;
  148. }
  149. }
  150. .input.with_label {
  151. .label_input > label {
  152. font-family: inherit;
  153. font-size: 14px;
  154. color: $primary-text-color;
  155. display: block;
  156. margin-bottom: 8px;
  157. word-wrap: break-word;
  158. font-weight: 500;
  159. }
  160. .hint {
  161. margin-top: 6px;
  162. }
  163. ul {
  164. flex: 390px;
  165. }
  166. }
  167. .input.with_block_label {
  168. max-width: none;
  169. & > label {
  170. font-family: inherit;
  171. font-size: 16px;
  172. color: $primary-text-color;
  173. display: block;
  174. font-weight: 500;
  175. padding-top: 5px;
  176. }
  177. .hint {
  178. margin-bottom: 15px;
  179. }
  180. ul {
  181. columns: 2;
  182. }
  183. }
  184. .required abbr {
  185. text-decoration: none;
  186. color: lighten($error-value-color, 12%);
  187. }
  188. .fields-group {
  189. margin-bottom: 25px;
  190. .input:last-child {
  191. margin-bottom: 0;
  192. }
  193. }
  194. .fields-row {
  195. display: flex;
  196. margin: 0 -10px;
  197. padding-top: 5px;
  198. margin-bottom: 25px;
  199. .input {
  200. max-width: none;
  201. }
  202. &__column {
  203. box-sizing: border-box;
  204. padding: 0 10px;
  205. flex: 1 1 auto;
  206. min-height: 1px;
  207. &-6 {
  208. max-width: 50%;
  209. }
  210. .actions {
  211. margin-top: 27px;
  212. }
  213. }
  214. .fields-group:last-child,
  215. .fields-row__column.fields-group {
  216. margin-bottom: 0;
  217. }
  218. @media screen and (max-width: $no-columns-breakpoint) {
  219. display: block;
  220. margin-bottom: 0;
  221. &__column {
  222. max-width: none;
  223. }
  224. .fields-group:last-child,
  225. .fields-row__column.fields-group,
  226. .fields-row__column {
  227. margin-bottom: 25px;
  228. }
  229. }
  230. }
  231. .input.radio_buttons .radio label {
  232. margin-bottom: 5px;
  233. font-family: inherit;
  234. font-size: 14px;
  235. color: $primary-text-color;
  236. display: block;
  237. width: auto;
  238. }
  239. .check_boxes {
  240. .checkbox {
  241. label {
  242. font-family: inherit;
  243. font-size: 14px;
  244. color: $primary-text-color;
  245. display: inline-block;
  246. width: auto;
  247. position: relative;
  248. padding-top: 5px;
  249. padding-left: 25px;
  250. flex: 1 1 auto;
  251. }
  252. input[type=checkbox] {
  253. position: absolute;
  254. left: 0;
  255. top: 5px;
  256. margin: 0;
  257. }
  258. }
  259. }
  260. .input.static .label_input__wrapper {
  261. font-size: 16px;
  262. padding: 10px;
  263. border: 1px solid $dark-text-color;
  264. border-radius: 4px;
  265. }
  266. input[type=text],
  267. input[type=number],
  268. input[type=email],
  269. input[type=password],
  270. textarea {
  271. box-sizing: border-box;
  272. font-size: 16px;
  273. color: $primary-text-color;
  274. display: block;
  275. width: 100%;
  276. outline: 0;
  277. font-family: inherit;
  278. resize: vertical;
  279. background: darken($ui-base-color, 10%);
  280. border: 1px solid darken($ui-base-color, 14%);
  281. border-radius: 4px;
  282. padding: 10px;
  283. &::placeholder {
  284. color: lighten($darker-text-color, 4%);
  285. }
  286. &:invalid {
  287. box-shadow: none;
  288. }
  289. &:focus:invalid:not(:placeholder-shown) {
  290. border-color: lighten($error-red, 12%);
  291. }
  292. &:required:valid {
  293. border-color: $valid-value-color;
  294. }
  295. &:hover {
  296. border-color: darken($ui-base-color, 20%);
  297. }
  298. &:active,
  299. &:focus {
  300. border-color: $highlight-text-color;
  301. background: darken($ui-base-color, 8%);
  302. }
  303. }
  304. .input.field_with_errors {
  305. label {
  306. color: lighten($error-red, 12%);
  307. }
  308. input[type=text],
  309. input[type=number],
  310. input[type=email],
  311. input[type=password],
  312. textarea,
  313. select {
  314. border-color: lighten($error-red, 12%);
  315. }
  316. .error {
  317. display: block;
  318. font-weight: 500;
  319. color: lighten($error-red, 12%);
  320. margin-top: 4px;
  321. }
  322. }
  323. .input.disabled {
  324. opacity: 0.5;
  325. }
  326. .actions {
  327. margin-top: 30px;
  328. display: flex;
  329. &.actions--top {
  330. margin-top: 0;
  331. margin-bottom: 30px;
  332. }
  333. }
  334. button,
  335. .button,
  336. .block-button {
  337. display: block;
  338. width: 100%;
  339. border: 0;
  340. border-radius: 4px;
  341. background: $ui-highlight-color;
  342. color: $primary-text-color;
  343. font-size: 18px;
  344. line-height: inherit;
  345. height: auto;
  346. padding: 10px;
  347. text-transform: uppercase;
  348. text-decoration: none;
  349. text-align: center;
  350. box-sizing: border-box;
  351. cursor: pointer;
  352. font-weight: 500;
  353. outline: 0;
  354. margin-bottom: 10px;
  355. margin-right: 10px;
  356. &:last-child {
  357. margin-right: 0;
  358. }
  359. &:hover {
  360. background-color: lighten($ui-highlight-color, 5%);
  361. }
  362. &:active,
  363. &:focus {
  364. background-color: darken($ui-highlight-color, 5%);
  365. }
  366. &:disabled:hover {
  367. background-color: $ui-primary-color;
  368. }
  369. &.negative {
  370. background: $error-value-color;
  371. &:hover {
  372. background-color: lighten($error-value-color, 5%);
  373. }
  374. &:active,
  375. &:focus {
  376. background-color: darken($error-value-color, 5%);
  377. }
  378. }
  379. }
  380. select {
  381. appearance: none;
  382. box-sizing: border-box;
  383. font-size: 16px;
  384. color: $primary-text-color;
  385. display: block;
  386. width: 100%;
  387. outline: 0;
  388. font-family: inherit;
  389. resize: vertical;
  390. background: darken($ui-base-color, 10%) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14.933 18.467' height='19.698' width='15.929'><path d='M3.467 14.967l-3.393-3.5H14.86l-3.392 3.5c-1.866 1.925-3.666 3.5-4 3.5-.335 0-2.135-1.575-4-3.5zm.266-11.234L7.467 0 11.2 3.733l3.733 3.734H0l3.733-3.734z' fill='#{hex-color(lighten($ui-base-color, 12%))}'/></svg>") no-repeat right 8px center / auto 16px;
  391. border: 1px solid darken($ui-base-color, 14%);
  392. border-radius: 4px;
  393. padding-left: 10px;
  394. padding-right: 30px;
  395. height: 41px;
  396. }
  397. h4 {
  398. margin-bottom: 15px !important;
  399. }
  400. .label_input {
  401. &__wrapper {
  402. position: relative;
  403. }
  404. &__append {
  405. position: absolute;
  406. right: 3px;
  407. top: 1px;
  408. padding: 10px;
  409. padding-bottom: 9px;
  410. font-size: 16px;
  411. color: $dark-text-color;
  412. font-family: inherit;
  413. pointer-events: none;
  414. cursor: default;
  415. max-width: 140px;
  416. white-space: nowrap;
  417. overflow: hidden;
  418. &::after {
  419. content: '';
  420. display: block;
  421. position: absolute;
  422. top: 0;
  423. right: 0;
  424. bottom: 1px;
  425. width: 5px;
  426. background-image: linear-gradient(to right, rgba(darken($ui-base-color, 10%), 0), darken($ui-base-color, 10%));
  427. }
  428. }
  429. }
  430. &__overlay-area {
  431. position: relative;
  432. &__blurred form {
  433. filter: blur(2px);
  434. }
  435. &__overlay {
  436. position: absolute;
  437. top: 0;
  438. left: 0;
  439. width: 100%;
  440. height: 100%;
  441. display: flex;
  442. justify-content: center;
  443. align-items: center;
  444. background: rgba($ui-base-color, 0.65);
  445. border-radius: 4px;
  446. margin-left: -4px;
  447. margin-top: -4px;
  448. padding: 4px;
  449. &__content {
  450. text-align: center;
  451. &.rich-formatting {
  452. &,
  453. p {
  454. color: $primary-text-color;
  455. }
  456. }
  457. }
  458. }
  459. }
  460. }
  461. .block-icon {
  462. display: block;
  463. margin: 0 auto;
  464. margin-bottom: 10px;
  465. font-size: 24px;
  466. }
  467. .flash-message {
  468. background: lighten($ui-base-color, 8%);
  469. color: $darker-text-color;
  470. border-radius: 4px;
  471. padding: 15px 10px;
  472. margin-bottom: 30px;
  473. text-align: center;
  474. &.notice {
  475. border: 1px solid rgba($valid-value-color, 0.5);
  476. background: rgba($valid-value-color, 0.25);
  477. color: $valid-value-color;
  478. }
  479. &.alert {
  480. border: 1px solid rgba($error-value-color, 0.5);
  481. background: rgba($error-value-color, 0.25);
  482. color: $error-value-color;
  483. }
  484. a {
  485. display: inline-block;
  486. color: $darker-text-color;
  487. text-decoration: none;
  488. &:hover {
  489. color: $primary-text-color;
  490. text-decoration: underline;
  491. }
  492. }
  493. p {
  494. margin-bottom: 15px;
  495. }
  496. .oauth-code {
  497. outline: 0;
  498. box-sizing: border-box;
  499. display: block;
  500. width: 100%;
  501. border: 0;
  502. padding: 10px;
  503. font-family: $font-monospace, monospace;
  504. background: $ui-base-color;
  505. color: $primary-text-color;
  506. font-size: 14px;
  507. margin: 0;
  508. &::-moz-focus-inner {
  509. border: 0;
  510. }
  511. &::-moz-focus-inner,
  512. &:focus,
  513. &:active {
  514. outline: 0 !important;
  515. }
  516. &:focus {
  517. background: lighten($ui-base-color, 4%);
  518. }
  519. }
  520. strong {
  521. font-weight: 500;
  522. @each $lang in $cjk-langs {
  523. &:lang(#{$lang}) {
  524. font-weight: 700;
  525. }
  526. }
  527. }
  528. @media screen and (max-width: 740px) and (min-width: 441px) {
  529. margin-top: 40px;
  530. }
  531. }
  532. .form-footer {
  533. margin-top: 30px;
  534. text-align: center;
  535. a {
  536. color: $darker-text-color;
  537. text-decoration: none;
  538. &:hover {
  539. text-decoration: underline;
  540. }
  541. }
  542. }
  543. .quick-nav {
  544. list-style: none;
  545. margin-bottom: 25px;
  546. font-size: 14px;
  547. li {
  548. display: inline-block;
  549. margin-right: 10px;
  550. }
  551. a {
  552. color: $highlight-text-color;
  553. text-transform: uppercase;
  554. text-decoration: none;
  555. font-weight: 700;
  556. &:hover,
  557. &:focus,
  558. &:active {
  559. color: lighten($highlight-text-color, 8%);
  560. }
  561. }
  562. }
  563. .oauth-prompt,
  564. .follow-prompt {
  565. margin-bottom: 30px;
  566. color: $darker-text-color;
  567. h2 {
  568. font-size: 16px;
  569. margin-bottom: 30px;
  570. text-align: center;
  571. }
  572. strong {
  573. color: $secondary-text-color;
  574. font-weight: 500;
  575. @each $lang in $cjk-langs {
  576. &:lang(#{$lang}) {
  577. font-weight: 700;
  578. }
  579. }
  580. }
  581. @media screen and (max-width: 740px) and (min-width: 441px) {
  582. margin-top: 40px;
  583. }
  584. }
  585. .qr-wrapper {
  586. display: flex;
  587. flex-wrap: wrap;
  588. align-items: flex-start;
  589. }
  590. .qr-code {
  591. flex: 0 0 auto;
  592. background: $simple-background-color;
  593. padding: 4px;
  594. margin: 0 10px 20px 0;
  595. box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
  596. display: inline-block;
  597. svg {
  598. display: block;
  599. margin: 0;
  600. }
  601. }
  602. .qr-alternative {
  603. margin-bottom: 20px;
  604. color: $secondary-text-color;
  605. flex: 150px;
  606. samp {
  607. display: block;
  608. font-size: 14px;
  609. }
  610. }
  611. .table-form {
  612. p {
  613. margin-bottom: 15px;
  614. strong {
  615. font-weight: 500;
  616. @each $lang in $cjk-langs {
  617. &:lang(#{$lang}) {
  618. font-weight: 700;
  619. }
  620. }
  621. }
  622. }
  623. }
  624. .simple_form,
  625. .table-form {
  626. .warning {
  627. box-sizing: border-box;
  628. background: rgba($error-value-color, 0.5);
  629. color: $primary-text-color;
  630. text-shadow: 1px 1px 0 rgba($base-shadow-color, 0.3);
  631. box-shadow: 0 2px 6px rgba($base-shadow-color, 0.4);
  632. border-radius: 4px;
  633. padding: 10px;
  634. margin-bottom: 15px;
  635. a {
  636. color: $primary-text-color;
  637. text-decoration: underline;
  638. &:hover,
  639. &:focus,
  640. &:active {
  641. text-decoration: none;
  642. }
  643. }
  644. strong {
  645. font-weight: 600;
  646. display: block;
  647. margin-bottom: 5px;
  648. @each $lang in $cjk-langs {
  649. &:lang(#{$lang}) {
  650. font-weight: 700;
  651. }
  652. }
  653. .fa {
  654. font-weight: 400;
  655. }
  656. }
  657. }
  658. }
  659. .action-pagination {
  660. display: flex;
  661. flex-wrap: wrap;
  662. align-items: center;
  663. .actions,
  664. .pagination {
  665. flex: 1 1 auto;
  666. }
  667. .actions {
  668. padding: 30px 0;
  669. padding-right: 20px;
  670. flex: 0 0 auto;
  671. }
  672. }
  673. .post-follow-actions {
  674. text-align: center;
  675. color: $darker-text-color;
  676. div {
  677. margin-bottom: 4px;
  678. }
  679. }
  680. .alternative-login {
  681. margin-top: 20px;
  682. margin-bottom: 20px;
  683. h4 {
  684. font-size: 16px;
  685. color: $primary-text-color;
  686. text-align: center;
  687. margin-bottom: 20px;
  688. border: 0;
  689. padding: 0;
  690. }
  691. .button {
  692. display: block;
  693. }
  694. }
  695. .scope-danger {
  696. color: $warning-red;
  697. }
  698. .form_admin_settings_site_short_description,
  699. .form_admin_settings_site_description,
  700. .form_admin_settings_site_extended_description,
  701. .form_admin_settings_site_terms,
  702. .form_admin_settings_custom_css,
  703. .form_admin_settings_closed_registrations_message {
  704. textarea {
  705. font-family: $font-monospace, monospace;
  706. }
  707. }
  708. .input-copy {
  709. background: darken($ui-base-color, 10%);
  710. border: 1px solid darken($ui-base-color, 14%);
  711. border-radius: 4px;
  712. display: flex;
  713. align-items: center;
  714. padding-right: 4px;
  715. position: relative;
  716. top: 1px;
  717. transition: border-color 300ms linear;
  718. &__wrapper {
  719. flex: 1 1 auto;
  720. }
  721. input[type=text] {
  722. background: transparent;
  723. border: 0;
  724. padding: 10px;
  725. font-size: 14px;
  726. font-family: $font-monospace, monospace;
  727. }
  728. button {
  729. flex: 0 0 auto;
  730. margin: 4px;
  731. text-transform: none;
  732. font-weight: 400;
  733. font-size: 14px;
  734. padding: 7px 18px;
  735. padding-bottom: 6px;
  736. width: auto;
  737. transition: background 300ms linear;
  738. }
  739. &.copied {
  740. border-color: $valid-value-color;
  741. transition: none;
  742. button {
  743. background: $valid-value-color;
  744. transition: none;
  745. }
  746. }
  747. }
  748. .connection-prompt {
  749. margin-bottom: 25px;
  750. .fa-link {
  751. background-color: darken($ui-base-color, 4%);
  752. border-radius: 100%;
  753. font-size: 24px;
  754. padding: 10px;
  755. }
  756. &__column {
  757. align-items: center;
  758. display: flex;
  759. flex: 1;
  760. flex-direction: column;
  761. flex-shrink: 1;
  762. max-width: 50%;
  763. &-sep {
  764. align-self: center;
  765. flex-grow: 0;
  766. overflow: visible;
  767. position: relative;
  768. z-index: 1;
  769. }
  770. p {
  771. word-break: break-word;
  772. }
  773. }
  774. .account__avatar {
  775. margin-bottom: 20px;
  776. }
  777. &__connection {
  778. background-color: lighten($ui-base-color, 8%);
  779. box-shadow: 0 0 15px rgba($base-shadow-color, 0.2);
  780. border-radius: 4px;
  781. padding: 25px 10px;
  782. position: relative;
  783. text-align: center;
  784. &::after {
  785. background-color: darken($ui-base-color, 4%);
  786. content: '';
  787. display: block;
  788. height: 100%;
  789. left: 50%;
  790. position: absolute;
  791. top: 0;
  792. width: 1px;
  793. }
  794. }
  795. &__row {
  796. align-items: flex-start;
  797. display: flex;
  798. flex-direction: row;
  799. }
  800. }