A flat-file CMS written in Python and Flask
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

style.scss 2.8KB

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