django.css 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /*
  2. * Django brand palette, ported from the old Jekyll theme at
  3. * _sass/color_schemes/django.scss
  4. */
  5. /*
  6. * The light palette sits on :root, not on [data-md-color-scheme="default"].
  7. * The theme only puts that attribute on <html> once its JavaScript runs, so a
  8. * scheme-scoped rule leaves the header indigo on the first paint.
  9. */
  10. :root {
  11. --django-green-dark: #0c4b33;
  12. --django-green-mid: #20aa76;
  13. --django-green-light: #44b78b;
  14. --django-green-pale: #e8f5f0;
  15. --django-cream: #f9f7f3;
  16. --md-primary-fg-color: var(--django-green-dark);
  17. --md-primary-fg-color--light: var(--django-green-mid);
  18. --md-primary-fg-color--dark: #072e1f;
  19. --md-primary-bg-color: #ffffff;
  20. --md-primary-bg-color--light: rgba(255, 255, 255, 0.7);
  21. --md-accent-fg-color: var(--django-green-mid);
  22. --md-accent-fg-color--transparent: rgba(32, 170, 118, 0.1);
  23. --md-typeset-a-color: var(--django-green-mid);
  24. --md-code-bg-color: var(--django-cream);
  25. }
  26. /* Dark scheme */
  27. [data-md-color-scheme="slate"] {
  28. --md-primary-fg-color: var(--django-green-dark);
  29. --md-primary-fg-color--light: var(--django-green-light);
  30. --md-primary-fg-color--dark: #051f15;
  31. --md-primary-bg-color: #ffffff;
  32. --md-accent-fg-color: var(--django-green-light);
  33. --md-accent-fg-color--transparent: rgba(68, 183, 139, 0.1);
  34. --md-typeset-a-color: var(--django-green-light);
  35. }
  36. /* Headings use the dark Django green, as they did in the Jekyll theme. */
  37. .md-typeset h1,
  38. .md-typeset h2,
  39. .md-typeset h3,
  40. .md-typeset h4 {
  41. color: var(--django-green-dark);
  42. }
  43. /* Dark green is unreadable on the dark background, so lighten it. */
  44. [data-md-color-scheme="slate"] .md-typeset h1,
  45. [data-md-color-scheme="slate"] .md-typeset h2,
  46. [data-md-color-scheme="slate"] .md-typeset h3,
  47. [data-md-color-scheme="slate"] .md-typeset h4 {
  48. color: var(--django-green-light);
  49. }
  50. /* The Django logo is a wide SVG. Keep it from overflowing on small screens. */
  51. .md-typeset picture img {
  52. max-width: 320px;
  53. height: auto;
  54. }
  55. /* The list is long and mostly one-line entries. Tighten the leading so more
  56. of each category fits on screen. */
  57. .md-typeset ul li {
  58. margin-bottom: 0.2rem;
  59. }
  60. /* Footer additions. These sit inside .md-footer, which has a dark background,
  61. so the text needs the footer foreground colors. */
  62. .awesome-django-footer {
  63. padding: 1.2rem 0.8rem;
  64. color: var(--md-footer-fg-color--light);
  65. font-size: 0.7rem;
  66. line-height: 1.5;
  67. text-align: center;
  68. }
  69. .awesome-django-footer__title {
  70. margin: 0 0 0.3rem;
  71. color: var(--md-footer-fg-color);
  72. font-size: 1rem;
  73. font-weight: 700;
  74. line-height: 1.3;
  75. }
  76. .awesome-django-footer__lede {
  77. font-size: 0.72rem;
  78. }
  79. .awesome-django-footer a {
  80. color: var(--md-footer-fg-color);
  81. text-decoration: underline;
  82. }
  83. .awesome-django-footer a:hover {
  84. color: var(--md-accent-fg-color);
  85. }
  86. /* Capped to match the webring below it, so neither spans the whole footer. */
  87. .awesome-django-newsletter {
  88. margin: 0.9rem auto 0;
  89. max-width: 34rem;
  90. }
  91. .awesome-django-newsletter iframe {
  92. width: 100%;
  93. height: 220px;
  94. border: 1px solid #ccc;
  95. }
  96. /* auto, not 0, for the horizontal margins. This rule outranks the single-class
  97. rules below it, so a 0 here would stop them centering themselves. Every
  98. paragraph shares the 34rem column with the signup form and the webring. */
  99. .awesome-django-footer p {
  100. margin: 0.6rem auto;
  101. max-width: 34rem;
  102. }
  103. /*
  104. * The webring is a custom element with a shadow root. Its :host rule sets
  105. * display: block, so it grows to the full width of the footer. Outer document
  106. * rules beat :host rules, so constrain it here and keep it centered.
  107. */
  108. .awesome-django-webring {
  109. margin: 1rem auto;
  110. max-width: 34rem;
  111. }
  112. .awesome-django-webring webring-css {
  113. display: block;
  114. margin: 0 auto;
  115. max-width: 100%;
  116. }