A flat-file CMS written in Python and Flask
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

style.scss 2.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /* variables */
  2. $black: #000000;
  3. $white: #ffffff;
  4. $blue: #496893;
  5. $red: #ff0000;
  6. $light-gray: #f5f5f5;
  7. $medium-gray: #c8c8c8;
  8. $body-font-family: Georgia, serif;
  9. $body-font-size: 18px;
  10. $heading-font-size: 26px;
  11. /* global */
  12. * {
  13. box-sizing: border-box;
  14. margin: 0;
  15. padding: 0;
  16. }
  17. ul {
  18. list-style: none;
  19. }
  20. a {
  21. color: $blue;
  22. text-decoration: none;
  23. &:hover {
  24. text-decoration: underline;
  25. }
  26. }
  27. body {
  28. font-family: $body-font-family;
  29. font-size: $body-font-size;
  30. line-height: 1.5;
  31. min-height: 100vh;
  32. }
  33. .heading {
  34. border-bottom: 1px solid $black;
  35. font-size: $heading-font-size;
  36. margin-bottom: 15px;
  37. }
  38. /* layout */
  39. .container {
  40. border-left: 1px solid $medium-gray;
  41. border-right: 1px solid $medium-gray;
  42. display: flex;
  43. flex-direction: column;
  44. margin: auto;
  45. max-width: 768px;
  46. min-height: 100vh;
  47. }
  48. .main {
  49. background: $light-gray;
  50. display: flex;
  51. flex: 1;
  52. padding: 20px;
  53. width: 100%;
  54. }
  55. /* header */
  56. .header {
  57. background: $blue;
  58. color: $white;
  59. @media(max-width: 1000px) {
  60. min-height: auto;
  61. width: 100%;
  62. }
  63. }
  64. .header__title {
  65. color: $white;
  66. font-size: 24px;
  67. padding: 15px;
  68. }
  69. .nav {
  70. background: $white;
  71. display: flex;
  72. justify-content: space-between;
  73. padding: 10px 0;
  74. }
  75. .nav__item {
  76. padding: 5px 10px;
  77. }
  78. /* forms */
  79. .form {
  80. width: 100%;
  81. }
  82. .form__field {
  83. display: flex;
  84. flex-direction: column;
  85. margin: 15px 0;
  86. width: 100%;
  87. }
  88. .form__field--submit {
  89. display: block;
  90. }
  91. .form__field,
  92. .form__label {
  93. margin-bottom: 5px;
  94. }
  95. .form__date-field,
  96. .form__textarea,
  97. .form__text-field {
  98. border: 1px solid $medium-gray;
  99. font-family: $body-font-family;
  100. font-size: $body-font-size;
  101. padding: 10px;
  102. }
  103. .form__textarea {
  104. resize: vertical;
  105. }
  106. .button.form__submit {
  107. background: $white;
  108. border: 1px solid $medium-gray;
  109. cursor: pointer;
  110. font-family: $body-font-family;
  111. font-size: $body-font-size;
  112. padding: 10px;
  113. &:hover {
  114. background: $light-gray;
  115. }
  116. @media(max-width: 500px) {
  117. width: 100%;
  118. }
  119. }
  120. /* post listing */
  121. .post-listing {
  122. width: 100%;
  123. }
  124. .post-listing__item {
  125. display: flex;
  126. padding: 10px;
  127. position: relative;
  128. width: 100%;
  129. &:nth-child(even) {
  130. background: white;
  131. }
  132. }
  133. .post-listing__item--changed:before {
  134. color: $red;
  135. content: '•';
  136. display: block;
  137. font-size: $heading-font-size;
  138. left: -15px;
  139. line-height: 16px;
  140. position: absolute;
  141. }
  142. .post-listing__link {
  143. flex: 1;
  144. }