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.9KB

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