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

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