A tiny self-hostable "microjournaling" web app. Helps fill the void when abstaining from social media by encouraging journaling small thoughts throughout the day. # Requirements - web host with PHP
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

journal.css 4.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244
  1. /* Colors */
  2. :root {
  3. --page-background: #fff;
  4. --text-color: #000;
  5. --secondary-text-color: #888;
  6. --nav-background: #fff;
  7. --menu-background: #eee;
  8. --menu-border: #ccc;
  9. --highlight: #d83;
  10. --error-text: #d00;
  11. --error-background: #fcc;
  12. --error-border: #400;
  13. --callout-text: #000;
  14. --callout-background: #ffc;
  15. --callout-border: #886;
  16. --destructive: #e00;
  17. --destructive-contrast: #fff;
  18. }
  19. @media(prefers-color-scheme: dark) {
  20. :root {
  21. --page-background: #222;
  22. --text-color: #fff;
  23. --secondary-text-color: #888;
  24. --nav-background: #444;
  25. --menu-background: #444;
  26. --menu-border: #000;
  27. }
  28. }
  29. /* Base */
  30. :root, input, textarea {
  31. font-family: Garamond, Times New Roman, serif;
  32. line-height: 1.25;
  33. font-size: 12pt;
  34. }
  35. body, textarea, input, select {
  36. background-color: var(--page-background);
  37. color: var(--text-color);
  38. }
  39. body {
  40. margin: 0;
  41. padding: 0;
  42. }
  43. a {
  44. color: var(--highlight);
  45. text-decoration: none;
  46. }
  47. summary {
  48. -webkit-user-select: none;
  49. user-select: none;
  50. }
  51. summary.no-indicator {
  52. list-style-type: none;
  53. }
  54. summary.no-indicator::-webkit-details-marker {
  55. display: none;
  56. }
  57. .secondary-text {
  58. color: var(--secondary-text-color);
  59. font-size: 0.8rem;
  60. }
  61. details.menu ul {
  62. position: relative;
  63. z-index: 1;
  64. margin: 0;
  65. padding: 0;
  66. list-style-type: none;
  67. border: 1px solid var(--menu-border);
  68. background-color: var(--menu-background);
  69. box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25);
  70. text-align: start;
  71. }
  72. details.menu li a {
  73. color: var(--highlight);
  74. }
  75. details.menu li a:hover {
  76. background-color: var(--highlight);
  77. color: black;
  78. }
  79. details.menu li {
  80. }
  81. details.menu li a {
  82. padding: 0.4em 1em;
  83. display: inline-block;
  84. position: relative;
  85. width: 10ch;
  86. }
  87. details.menu li + li {
  88. border-top: 1px solid var(--menu-border);
  89. }
  90. details.menu li.menu-divider {
  91. padding-top: 0.75em;
  92. }
  93. details.menu li.destructive a {
  94. color: var(--destructive);
  95. }
  96. details.menu li.destructive a:hover {
  97. background-color: var(--destructive);
  98. color: var(--destructive-contrast);
  99. }
  100. summary.menu-button:hover {
  101. color: var(--highlight);
  102. }
  103. summary.menu-button > span:first-child {
  104. display: inline-block;
  105. line-height: 1em;
  106. padding: 0.5rem 0.7em;
  107. margin: 0;
  108. border-radius: 0.5em;
  109. }
  110. details[open] summary.menu-button > span:first-child {
  111. background-color: var(--highlight);
  112. color: white;
  113. }
  114. /* Navigation */
  115. .top-nav {
  116. position: fixed;
  117. top: 0;
  118. inset-inline-start: 0;
  119. inset-inline-end: 0;
  120. height: 2em;
  121. text-align: center;
  122. background-color: var(--nav-background);
  123. box-shadow: 0 0.25rem 0.25rem rgba(0, 0, 0, 0.25);
  124. }
  125. .title {
  126. display: inline-block;
  127. font-size: 1.2rem;
  128. line-height: 1.2rem;
  129. font-weight: bold;
  130. padding-top: 0.4rem;
  131. }
  132. .menu-container {
  133. position: absolute;
  134. top: 0;
  135. right: 0;
  136. }
  137. .menu-container summary {
  138. text-align: right;
  139. }
  140. /* Content container */
  141. .content {
  142. max-width: 66ch;
  143. margin: 2.5em auto 2em auto;
  144. padding: 0.5em;
  145. }
  146. /* Errors and alerts */
  147. .error {
  148. padding: 1em;
  149. border: 1px solid var(--error-border);
  150. background-color: var(--error-background);
  151. color: var(--error-text);
  152. font-weight: bold;
  153. margin-bottom: 1em;
  154. }
  155. .important {
  156. padding: 1em;
  157. border: 1px solid var(--callout-border);
  158. background-color: var(--callout-background);
  159. color: var(--callout-text);
  160. margin-bottom: 1em;
  161. }
  162. /* Post form */
  163. textarea {
  164. width: 100%;
  165. height: 8em;
  166. font-family: inherit;
  167. font-size: 1rem;
  168. margin: 0;
  169. box-sizing: border-box;
  170. }
  171. textarea::placeholder {
  172. font-size: 1rem;
  173. }
  174. .submit-post {
  175. text-align: right;
  176. }
  177. input[type="submit"] {
  178. margin-top: 0.5em;
  179. min-width: 15ch;
  180. }
  181. /* Posts */
  182. .post-container {
  183. margin-top: 1.5rem;
  184. }
  185. .post {
  186. margin-top: 0.5em;
  187. margin-bottom: 1em;
  188. }
  189. .post p {
  190. margin: 0 0 1em 0;
  191. }
  192. .post p:last-child {
  193. margin: 0;
  194. }
  195. .post-date {
  196. margin-top: 0.5em;
  197. }
  198. .post-footer {
  199. position: relative;
  200. }
  201. .post-actions {
  202. position: absolute;
  203. top: 0;
  204. inset-inline-end: 0;
  205. }
  206. .post-actions summary {
  207. text-align: end;
  208. }
  209. .post-actions summary > span:first-child {
  210. padding-top: 0;
  211. padding-bottom: 0;
  212. }
  213. details.menu li.post-action-delete a {
  214. color: var(--destructive);
  215. }
  216. details.menu li.post-action-delete a:hover {
  217. background-color: var(--destructive);
  218. color: var(--destructive-contrast);
  219. }
  220. /* Mobile */
  221. @media screen and (max-width: 450px) {
  222. :root {
  223. font-size: 16pt;
  224. }
  225. }