global.css 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471
  1. * {
  2. margin: 0;
  3. padding: 0;
  4. }
  5. .pd-page {
  6. width: 100vw;
  7. min-width: 375px;
  8. height: 100vh;
  9. padding: 0.75rem;
  10. display: flex;
  11. flex-direction: column;
  12. box-sizing: border-box;
  13. overflow: hidden;
  14. }
  15. .pd-page.pd-page-centered {
  16. display: flex;
  17. align-items: center;
  18. justify-content: center;
  19. }
  20. /* Global form styles start */
  21. input:not([type="radio"]):not([type="checkbox"]),
  22. textarea {
  23. width: 100%;
  24. display: block;
  25. box-sizing: border-box;
  26. border-radius: 0.375rem;
  27. border: 1px solid #ced4da;
  28. font-size: 14px;
  29. outline: none;
  30. }
  31. input:not([type="radio"]):not([type="checkbox"]) {
  32. height: 38px;
  33. line-height: 30px;
  34. padding: 4px 0.375rem;
  35. }
  36. input[type="checkbox"] {
  37. width: 16px;
  38. height: 16px;
  39. }
  40. textarea {
  41. height: 100%;
  42. padding: 0.375rem;
  43. resize: none;
  44. }
  45. button {
  46. box-sizing: border-box;
  47. padding: 6px 12px;
  48. background-color: #fff;
  49. line-height: 16px;
  50. color: #212529;
  51. cursor: pointer;
  52. font-size: 14px;
  53. border: 1px solid #ced4da;
  54. border-radius: 0.375rem;
  55. }
  56. /* Global form styles end */
  57. /* Loading styles start */
  58. /* Loading spin from https://loading.io/css/ */
  59. .pd-loading-cover {
  60. position: fixed;
  61. top: 0;
  62. left: 0;
  63. right: 0;
  64. bottom: 0;
  65. background-color: rgba(0, 0, 0, 0.6);
  66. z-index: 9;
  67. display: flex;
  68. align-items: center;
  69. justify-content: center;
  70. }
  71. .pd-loading-cover .pd-loading-spin {
  72. display: inline-block;
  73. transform: translateZ(1px);
  74. }
  75. .pd-loading-cover .pd-loading-spin .pd-loading-spin-inner {
  76. display: inline-block;
  77. width: 64px;
  78. height: 64px;
  79. margin: 8px;
  80. border-radius: 50%;
  81. background: #fff;
  82. animation: pd-loading-spin 5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  83. }
  84. @keyframes pd-loading-spin {
  85. 0%,
  86. 100% {
  87. animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
  88. }
  89. 0% {
  90. transform: rotateY(0deg);
  91. }
  92. 50% {
  93. transform: rotateY(1800deg);
  94. animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
  95. }
  96. 100% {
  97. transform: rotateY(3600deg);
  98. }
  99. }
  100. /* Loading styles end */
  101. /* Modal styles start */
  102. .pd-modal {
  103. position: fixed;
  104. left: 0;
  105. right: 0;
  106. bottom: 0;
  107. top: 0;
  108. background-color: rgba(0, 0, 0, 0.6);
  109. z-index: 8;
  110. display: flex;
  111. align-items: center;
  112. justify-content: center;
  113. }
  114. .pd-modal.pd-modal-hidden {
  115. display: none;
  116. }
  117. .pd-modal .pd-modal-content {
  118. background-color: #fff;
  119. border: 1px solid #dee2e6;
  120. border-radius: 0.5rem;
  121. width: 500px;
  122. max-width: 90%;
  123. max-height: 60%;
  124. position: relative;
  125. font-size: 16px;
  126. cursor: pointer;
  127. }
  128. .pd-modal .pd-modal-content .pd-modal-close {
  129. position: absolute;
  130. right: 1rem;
  131. top: 0.75rem;
  132. font-size: 1.5rem;
  133. }
  134. .pd-modal .pd-modal-content .pd-modal-title {
  135. padding: 1rem;
  136. border-bottom: 1px solid #dee2e6;
  137. font-weight: 500;
  138. }
  139. .pd-modal .pd-modal-content .pd-modal-body {
  140. padding: 1rem;
  141. }
  142. .pd-modal .pd-modal-content .pd-modal-footer {
  143. display: flex;
  144. justify-content: flex-end;
  145. border-top: 1px solid #dee2e6;
  146. padding: 1rem;
  147. }
  148. .pd-modal .pd-modal-content .pd-modal-footer button:not(:last-child) {
  149. margin-right: 0.5rem;
  150. }
  151. /* Modal styles end */
  152. /* Welcome frame styles start */
  153. .pd-welcome-frame {
  154. display: flex;
  155. align-items: center;
  156. justify-content: center;
  157. flex-direction: column;
  158. width: 100%;
  159. height: 100%;
  160. }
  161. .pd-welcome-frame .pd-welcome-title {
  162. display: flex;
  163. align-items: center;
  164. }
  165. .pd-welcome-frame .pd-welcome-title .pd-logo {
  166. width: 128px;
  167. height: 128px;
  168. margin-right: 8px;
  169. }
  170. .pd-welcome-frame .pd-welcome-intro {
  171. font-size: 1.25rem;
  172. margin-bottom: 32px;
  173. }
  174. .pd-welcome-frame .pd-welcome-actions button {
  175. width: 128px;
  176. margin: 0 8px;
  177. }
  178. /* Welcome frame styles end */
  179. /* Login frame styles start */
  180. .pd-login-frame {
  181. width: 375px;
  182. margin-top: 16px;
  183. box-sizing: border-box;
  184. padding: 16px;
  185. color: #212529;
  186. display: flex;
  187. flex-direction: column;
  188. }
  189. .pd-login-frame .pd-login-input {
  190. margin-bottom: 8px;
  191. }
  192. .pd-login-frame .pd-login-input.error {
  193. border-color: #dc3545;
  194. }
  195. .pd-login-frame .pd-login-input-label {
  196. margin-bottom: 4px;
  197. font-size: 14px;
  198. }
  199. .pd-login-frame .pd-login-btn {
  200. background-color: #0d6efd;
  201. margin-top: 8px;
  202. height: 38px;
  203. color: #fff;
  204. }
  205. /* Login frame styles end */
  206. /* TopBar styles start */
  207. .pd-top-bar {
  208. width: 100%;
  209. display: flex;
  210. margin-bottom: 0.75rem;
  211. justify-content: space-between;
  212. box-sizing: border-box;
  213. flex-shrink: 0;
  214. }
  215. .pd-top-bar .pd-top-bar-mode-switcher {
  216. border: 1px solid #ced4da;
  217. border-radius: 0.375rem;
  218. box-sizing: border-box;
  219. font-size: 14px;
  220. }
  221. .pd-top-bar .pd-top-bar-mode-switcher.hidden {
  222. display: none;
  223. }
  224. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn {
  225. border: none;
  226. }
  227. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.active {
  228. background-color: #0d6efd;
  229. color: #fff;
  230. }
  231. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.disabled {
  232. background-color: #e9ecef;
  233. color: #212529;
  234. cursor: not-allowed;
  235. pointer-events: none;
  236. }
  237. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:first-child {
  238. border-top-right-radius: 0;
  239. border-bottom-right-radius: 0;
  240. }
  241. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:last-child {
  242. border-top-left-radius: 0;
  243. border-bottom-left-radius: 0;
  244. }
  245. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:nth-child(2) {
  246. padding: 6px 10px;
  247. border-left: 1px solid #ced4da;
  248. border-right: 1px solid #ced4da;
  249. border-radius: 0;
  250. }
  251. .pd-top-bar .pd-top-bar-title {
  252. line-height: 30px;
  253. font-size: 24px;
  254. font-weight: 500;
  255. text-align: center;
  256. width: 100%;
  257. }
  258. .pd-top-bar .pd-top-bar-tool-icons {
  259. height: 30px;
  260. line-height: 28px;
  261. box-sizing: border-box;
  262. padding: 0 8px;
  263. border: 1px solid #ced4da;
  264. border-radius: 0.375rem;
  265. }
  266. .pd-top-bar .pd-top-bar-tool-icons i.bi {
  267. margin-right: 16px;
  268. font-size: 16px;
  269. cursor: pointer;
  270. height: 16px;
  271. width: 16px;
  272. }
  273. .pd-top-bar .pd-top-bar-tool-icons i.bi::before {
  274. line-height: unset;
  275. }
  276. .pd-top-bar .pd-top-bar-tool-icons i.bi:hover {
  277. color: #0d6efd;
  278. }
  279. .pd-top-bar .pd-top-bar-tool-icons i.bi:last-child {
  280. margin-right: 0;
  281. }
  282. /* TopBar styles end */
  283. /* Editor styles start */
  284. .pd-editor {
  285. width: 100%;
  286. display: flex;
  287. justify-content: space-between;
  288. box-sizing: border-box;
  289. overflow: hidden;
  290. flex-shrink: 0;
  291. flex-grow: 1;
  292. }
  293. .pd-editor .pd-edit-view,
  294. .pd-editor .pd-read-view {
  295. height: calc(
  296. 100vh - 0.75rem * 3 - 30px
  297. ); /* Exact height to prevent flex height expansion */
  298. border: 1px solid #ced4da;
  299. border-radius: 0.375rem;
  300. box-sizing: border-box;
  301. color: #212529;
  302. overflow: auto;
  303. flex-shrink: 0;
  304. flex-basis: 0;
  305. flex-grow: 1;
  306. }
  307. .pd-editor .pd-edit-view textarea {
  308. border: none;
  309. }
  310. .pd-editor .pd-edit-view textarea::-webkit-scrollbar,
  311. .pd-editor .pd-read-view::-webkit-scrollbar {
  312. width: 8px;
  313. height: 8px;
  314. }
  315. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-track,
  316. .pd-editor .pd-read-view::-webkit-scrollbar-track {
  317. background-color: transparent;
  318. }
  319. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb,
  320. .pd-editor .pd-read-view::-webkit-scrollbar-thumb {
  321. background-color: #d6dee1;
  322. border-radius: 8px;
  323. }
  324. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb:hover,
  325. .pd-editor .pd-read-view::-webkit-scrollbar-thumb:hover {
  326. background-color: #a8bbbf;
  327. }
  328. .pd-editor .pd-read-view {
  329. padding: 0.375rem;
  330. }
  331. .pd-editor.pd-mode-both .pd-edit-view {
  332. margin-right: 0.375rem;
  333. }
  334. .pd-editor.pd-mode-both .pd-read-view {
  335. margin-left: 0.375rem;
  336. }
  337. .pd-editor.pd-mode-edit .pd-read-view {
  338. display: none;
  339. }
  340. .pd-editor.pd-mode-read .pd-edit-view {
  341. display: none;
  342. }
  343. /* Editor styles end */
  344. /* HomeBar styles start */
  345. .pd-home-bar {
  346. display: flex;
  347. align-items: center;
  348. justify-content: space-between;
  349. }
  350. .pd-home-bar button {
  351. width: unset;
  352. }
  353. .pd-home-bar .pd-home-user-info button {
  354. margin-left: 8px;
  355. }
  356. /* HomeBar styles end */
  357. /* PostList styles start */
  358. .pd-post-list {
  359. width: 100%;
  360. display: grid;
  361. row-gap: 16px;
  362. column-gap: 16px;
  363. grid-template-columns: 1fr 1fr 1fr 1fr;
  364. margin-top: 16px;
  365. padding-bottom: 16px;
  366. overflow: auto;
  367. }
  368. .pd-post-list .pd-post {
  369. width: 100%;
  370. min-width: 180px;
  371. border: 1px solid #dee2e6;
  372. border-radius: 0.375rem;
  373. box-sizing: border-box;
  374. position: relative;
  375. padding: 1rem;
  376. display: flex;
  377. font-size: 16px;
  378. flex-direction: column;
  379. }
  380. .pd-post-list .pd-post:last-child {
  381. margin-right: 0;
  382. }
  383. .pd-post-list .pd-post span {
  384. margin-bottom: 8px;
  385. }
  386. .pd-post-list .pd-post .pd-post-title {
  387. font-weight: 500;
  388. }
  389. .pd-post-list .pd-post .pd-post-action {
  390. position: absolute;
  391. right: 1rem;
  392. top: 0.75rem;
  393. font-size: 1.5rem;
  394. z-index: 1;
  395. }
  396. .pd-post-list .pd-post .pd-post-action i {
  397. cursor: pointer;
  398. }
  399. .pd-post-list .pd-post .pd-post-digest {
  400. overflow: hidden;
  401. text-overflow: ellipsis;
  402. white-space: nowrap;
  403. }
  404. /* PostList styles end */