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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225
  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. padding: 10px 0;
  108. }
  109. .nav__item {
  110. padding: 5px 10px;
  111. }
  112. /* forms */
  113. .form {
  114. width: 100%;
  115. }
  116. .form__field {
  117. display: flex;
  118. flex-direction: column;
  119. margin: 15px 0;
  120. width: 100%;
  121. }
  122. .form__field--submit {
  123. display: block;
  124. }
  125. .form__field,
  126. .form__label {
  127. margin-bottom: 5px;
  128. }
  129. .form__date-field,
  130. .form__textarea,
  131. .form__text-field {
  132. border: 1px solid $medium-gray;
  133. border-radius: 4px;
  134. font-family: $body-font-family;
  135. font-size: $body-font-size;
  136. padding: 10px;
  137. }
  138. .form__textarea {
  139. resize: vertical;
  140. }
  141. .form__preview {
  142. margin-top: 20px;
  143. }
  144. .button.form__submit {
  145. background: $white;
  146. border: 1px solid $medium-gray;
  147. cursor: pointer;
  148. font-family: $body-font-family;
  149. font-size: $body-font-size;
  150. padding: 10px;
  151. &:hover {
  152. background: $light-gray;
  153. }
  154. @media(max-width: 500px) {
  155. width: 100%;
  156. }
  157. }
  158. /* post listing */
  159. .post-listing {
  160. width: 100%;
  161. }
  162. .post-listing__item {
  163. display: flex;
  164. padding: 10px;
  165. position: relative;
  166. width: 100%;
  167. &:nth-child(even) {
  168. background: white;
  169. }
  170. }
  171. .post-listing__item--changed:before {
  172. color: $red;
  173. content: '•';
  174. display: block;
  175. font-size: $heading-font-size;
  176. left: -15px;
  177. line-height: 16px;
  178. position: absolute;
  179. }
  180. .post-listing__link {
  181. flex: 1;
  182. }