style.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. /*
  2. _ _ ____ _
  3. _| || |_/ ___| ___ _ __ _ __ ___ | |
  4. |_ .. _\___ \ / _ \ '_ \| '_ \ / _ \| |
  5. |_ _|___) | __/ |_) | |_) | (_) |_|
  6. |_||_| |____/ \___| .__/| .__/ \___/(_)
  7. |_| |_|
  8. Personal Social Web.
  9. Copyright (C) The #Seppo contributors. All rights reserved.
  10. This program is free software: you can redistribute it and/or modify
  11. it under the terms of the GNU General Public License as published by
  12. the Free Software Foundation, either version 3 of the License, or
  13. (at your option) any later version.
  14. This program is distributed in the hope that it will be useful,
  15. but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. GNU General Public License for more details.
  18. You should have received a copy of the GNU General Public License
  19. along with this program. If not, see <http://www.gnu.org/licenses/>.
  20. */
  21. /* maybe mitigate the white flash via https://www.w3.org/Style/styling-XML.en.html */
  22. :root {
  23. color-scheme: light dark;
  24. --bgRough: hsl(30,0%,93%);
  25. --bgFairway: hsl(30, 45%, 91%);
  26. --bg-color-entry: hsl(30, 45%, 88%);
  27. --btn-color: var(--bgRough);
  28. --text-color: hsl(30, 50%, 44%);
  29. --link-color: hsl(200, 50%, 44%);
  30. --link-color: hsl(206, 62%, 48%); /* https://css.land/lch/ from text-color -> blue*/
  31. --GW-dotted-underline-background-image: url('data:image/gif;base64,R0lGODlhBAACAPAAMYiIiP///ywAAAAABAACAAACBAQShgUAOw==');
  32. --GW-link-underline-gradient-line-color: var(--link-color);
  33. }
  34. @media (prefers-color-scheme: dark) {
  35. :root {
  36. --bgRough: #111;
  37. --bgFairway: #111;
  38. --bg-color-entry: #222;
  39. --btn-color: var(--bg-color-entry);
  40. --text-color: hsl(30, 35%, 59%);
  41. }
  42. }
  43. .script-active .noscript {
  44. display: none;
  45. }
  46. html {
  47. font-family: sans-serif;
  48. line-height: 1.5;
  49. font-size: 1rem;
  50. }
  51. html, input, textarea, .awesomplete > ul, .awesomplete > ul > li {
  52. background: var(--bgRough);
  53. color: var(--text-color);
  54. }
  55. body, .awesomplete > ul > li:hover {
  56. background: var(--bgFairway);
  57. }
  58. h1, .h1 {
  59. font-size: 2rem;
  60. font-weight: bold;
  61. line-height: 4rem;
  62. }
  63. h2, .h2 {
  64. font-size: 1.8rem;
  65. font-weight: bold;
  66. margin: 0;
  67. }
  68. body {
  69. margin: auto;
  70. max-width: 704px;
  71. min-height: 500px;
  72. padding: 8px;
  73. }
  74. #header {
  75. }
  76. div#banner {
  77. /* background-size: 100% 100%; */
  78. background-color: darkgrey;
  79. border-radius: 1ex;
  80. height: 240px;
  81. margin: -8px -8px 0px -8px;
  82. max-width: 720px;
  83. }
  84. #banner #banner-img {
  85. height: 240px;
  86. position: relative;
  87. }
  88. /* img rather than background because 3rd paty actors bring the url late */
  89. #banner #banner-img img {
  90. border-radius: 8px;
  91. height: 240px;
  92. position: absolute;
  93. width: 720px;
  94. }
  95. div#title {
  96. }
  97. div#avatar {
  98. position: relative;
  99. top: -.5em;
  100. }
  101. #avatar img {
  102. background-color: darkgrey;
  103. border-radius: 48px;
  104. border: 3px solid var(--bgRough);
  105. float: right;
  106. height: 96px;
  107. position: relative;
  108. width: 96px;
  109. }
  110. form {
  111. /* margin: .5rem 0; */
  112. }
  113. #footer {
  114. margin-top: 2rem;
  115. }
  116. #footer, .footer {
  117. margin-bottom: 0;
  118. }
  119. #footer > a > img {
  120. border: none;
  121. height: 27px;
  122. opacity: 0.6;
  123. }
  124. .manytags body {
  125. max-width: initial;
  126. }
  127. a:any-link {
  128. /* gentle underlines https://www.gwern.net/Design */
  129. /* background-image: linear-gradient(var(--GW-link-underline-gradient-line-color), var(--GW-link-underline-gradient-line-color)); */
  130. /* background-image: var(--GW-dotted-underline-background-image); */
  131. /* background-position: 0% 100%;
  132. background-repeat: repeat-x;
  133. background-size: 1px 0.1ex; */
  134. border-bottom: 0.125em dotted var(--GW-link-underline-gradient-line-color);
  135. text-decoration: none;
  136. }
  137. a:any-link, label, button, input[type="checkbox"], input[type="submit"] {
  138. color: var(--link-color);
  139. cursor: pointer;
  140. }
  141. button, input, textarea, a[role="button"], label[role="button"] {
  142. background: var(--btn-color);
  143. border-radius: .6em;
  144. border: 1px solid darkgrey;
  145. display: inline-block;
  146. font: inherit;
  147. margin: .25em;
  148. opacity: 99%; /* workaround disappering in dark mode */
  149. padding: .4em .6em;
  150. }
  151. button {
  152. min-width: 10em;
  153. }
  154. input, textarea {
  155. width: calc(100% - 2 * .5em - .75em); /* also makes the subscribe button line wrap */
  156. }
  157. textarea {
  158. height: initial;
  159. }
  160. button[name='delete_edit'] {
  161. background: hsla(0, 99%, 50%, 0.75);
  162. }
  163. form[name=loginform] > a, #link_login, #link_logout {
  164. float: right;
  165. }
  166. #link_logout > span {
  167. display: inline-block;
  168. text-align: center;
  169. width: calc(7.5em - 2.5em);
  170. }
  171. form.combined input {
  172. border-bottom-right-radius: 0;
  173. border-top-right-radius: 0;
  174. float: left;
  175. margin-right: 0;
  176. position: relative;
  177. width: calc(100% - 2 * .5em - .75em - 2px - 7.5em);
  178. z-index: 1; /* focussed border above the button */
  179. }
  180. form.combined > button {
  181. border-bottom-left-radius: 0;
  182. border-top-left-radius: 0;
  183. border-left: none;
  184. float: left;
  185. margin-left: 0;
  186. width: 7.5em;
  187. min-width: initial;
  188. }
  189. input.is-invalid {
  190. border: 3px solid red;
  191. }
  192. p#tags.categories > a.tag[data-count="1"] {
  193. display:none;
  194. }
  195. p#tags {
  196. display:none;
  197. }
  198. #do-post {
  199. margin-top: -1rem;
  200. }
  201. #notifyme {
  202. padding: .25rem;
  203. }
  204. #entries, .nobullet {
  205. list-style: none;
  206. padding: 0;
  207. }
  208. #entries > li {
  209. clear: both;
  210. background: var(--bg-color-entry);
  211. border-radius: 0.5em;
  212. margin: 1.5em 0;
  213. padding: 0.35em;
  214. }
  215. #entries > li > h3 {
  216. margin: 0;
  217. }
  218. #entries > li > h3 img {
  219. display: none;
  220. border: 1px dotted black;
  221. float: right;
  222. max-height: 120px;
  223. max-width: 120px;
  224. }
  225. p {
  226. hyphens: auto;
  227. -moz-hyphens: auto;
  228. overflow: hidden;
  229. overflow-wrap: break-word;
  230. padding: 0.1em;
  231. -webkit-hyphens: auto;
  232. word-break: break-word;
  233. word-wrap: break-word;
  234. }
  235. p#tags {
  236. line-height: 1;
  237. }
  238. #snippets button {
  239. border: none;
  240. min-width: 1.5em;
  241. padding: .2em;
  242. margin: .05em;
  243. background: initial;
  244. }
  245. #snippets button:hover {
  246. background: rgba(255,255,255,0.5);
  247. }
  248. #snippets button.border {
  249. border: thin solid lightgrey;
  250. }
  251. /* a[data-count="1"] { display: none } */
  252. img.qrcode {
  253. background: hsl(115, 100%, 35%);
  254. height: 27px;
  255. width: 27px;
  256. }
  257. #banner form {
  258. padding: .25em;
  259. margin-top: -240px;
  260. }
  261. label {
  262. text-transform: capitalize;
  263. }
  264. ol[aria-label="pagination"] {
  265. align-items: baseline;
  266. display: flex;
  267. justify-content: space-between;
  268. list-style: none;
  269. padding-left: 0;
  270. width: 100%;
  271. }
  272. /* https://www.w3schools.com/Css/css_float.asp */
  273. .clearfix::after {
  274. clear: both;
  275. content: "";
  276. display: table;
  277. }
  278. p.whitespace {
  279. margin-bottom: 4em;
  280. }
  281. @media only screen and (max-width: 600px) {
  282. .hidden-xs { display: none; }
  283. }
  284. div.awesomplete {
  285. display: block;
  286. }
  287. .awesomplete > ul > li[aria-selected="true"] {
  288. background: hsl(30, 60%, 83%);
  289. }
  290. .awesomplete mark, .awesomplete li:hover mark, .awesomplete li[aria-selected="true"] mark {
  291. background: inherit;
  292. color: inherit;
  293. text-decoration: underline;
  294. }
  295. @media (prefers-color-scheme: dark) {
  296. .awesomplete > ul > li[aria-selected="true"] {
  297. background: hsl(30, 60%, 23%);
  298. }
  299. img {
  300. filter: grayscale(20%);
  301. }
  302. }
  303. [aria-disabled="true"], a[role="button"][aria-disabled="true"], [disabled], a[role="button"][disabled] {
  304. filter: grayscale(100%);
  305. opacity: 60%;
  306. pointer-events: none;
  307. }
  308. #head-grid {
  309. margin-bottom: calc(8.5rem - 4px);
  310. margin-top: calc(-15.5rem + 4px);
  311. padding: .5rem .25rem;
  312. }
  313. #head-grid a {
  314. height: 1.6em;
  315. }
  316. #form_notifyme {
  317. display: inline;
  318. }
  319. .logged-in #form_notifyme {
  320. display: none;
  321. }
  322. #form_notifyme input {
  323. width: initial;
  324. }
  325. #subscribers ol {
  326. list-style: none;
  327. padding: 0;
  328. }
  329. #subscribers li {
  330. padding: .25em;
  331. }
  332. #subscribers input {
  333. /* display: inline; */
  334. height: initial;
  335. min-height: initial;
  336. width: initial;
  337. }
  338. #subscribers input[type="submit"] {
  339. }
  340. #subscribers li img {
  341. border-radius: 1rem;
  342. height: 2rem;
  343. margin-bottom: -.5rem;
  344. margin-left: .5rem;
  345. margin-right: .5rem;
  346. width: 2rem;
  347. }
  348. *.shaded *.noshade {
  349. display: none;
  350. }
  351. *.shaded *.noshade.highlight {
  352. display: initial;
  353. }
  354. li iframe {
  355. display: none;
  356. width: calc(100% - 2px);
  357. }
  358. li.highlight iframe {
  359. display: initial;
  360. }
  361. .hidden-logged-in { display:initial; }
  362. .visible-logged-in { display:none; }
  363. .logged-in .hidden-logged-in { display:none; }
  364. .logged-in .visible-logged-in { display:initial; }
  365. .hidden-logged-out { display:initial; }
  366. .visible-logged-out { display:none; }
  367. .logged-out .hidden-logged-out { display:none; }
  368. .logged-out .visible-logged-out { display:initial; }
  369. /* This is a workaround for Browsers that insert additional br tags.
  370. * See http://purl.mro.name/safari-xslt-br-bug */
  371. .rendered.type-text br { display:none; }
  372. .rendered.type-text br.br { display:inline; }