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

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