django.css 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  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. margin: 0 auto 0.9rem;
  78. max-width: 34rem;
  79. font-size: 0.72rem;
  80. }
  81. .awesome-django-footer a {
  82. color: var(--md-footer-fg-color);
  83. text-decoration: underline;
  84. }
  85. .awesome-django-footer a:hover {
  86. color: var(--md-accent-fg-color);
  87. }
  88. /* Capped to match the webring below it, so neither spans the whole footer. */
  89. .awesome-django-newsletter {
  90. margin: 0 auto;
  91. max-width: 34rem;
  92. }
  93. .awesome-django-newsletter iframe {
  94. width: 100%;
  95. height: 220px;
  96. border: 1px solid #ccc;
  97. }
  98. .awesome-django-footer p {
  99. margin: 0.6rem 0;
  100. }
  101. /*
  102. * The webring is a custom element with a shadow root. Its :host rule sets
  103. * display: block, so it grows to the full width of the footer. Outer document
  104. * rules beat :host rules, so constrain it here and keep it centered.
  105. */
  106. .awesome-django-webring {
  107. margin: 1rem auto;
  108. max-width: 34rem;
  109. }
  110. .awesome-django-webring webring-css {
  111. display: block;
  112. margin: 0 auto;
  113. max-width: 100%;
  114. }