global.css 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422
  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. /* Modal styles end */
  149. /* Login frame styles start */
  150. .pd-login-frame {
  151. width: 375px;
  152. margin-top: 16px;
  153. box-sizing: border-box;
  154. padding: 16px;
  155. color: #212529;
  156. display: flex;
  157. flex-direction: column;
  158. }
  159. .pd-login-frame .pd-login-input {
  160. margin-bottom: 8px;
  161. }
  162. .pd-login-frame .pd-login-input.error {
  163. border-color: #dc3545;
  164. }
  165. .pd-login-frame .pd-login-input-label {
  166. margin-bottom: 4px;
  167. font-size: 14px;
  168. }
  169. .pd-login-frame .pd-login-btn {
  170. background-color: #0d6efd;
  171. margin-top: 8px;
  172. height: 38px;
  173. color: #fff;
  174. }
  175. /* Login frame styles end */
  176. /* TopBar styles start */
  177. .pd-top-bar {
  178. width: 100%;
  179. display: flex;
  180. margin-bottom: 0.75rem;
  181. justify-content: space-between;
  182. box-sizing: border-box;
  183. flex-shrink: 0;
  184. }
  185. .pd-top-bar .pd-top-bar-mode-switcher {
  186. border: 1px solid #ced4da;
  187. border-radius: 0.375rem;
  188. box-sizing: border-box;
  189. font-size: 14px;
  190. }
  191. .pd-top-bar .pd-top-bar-mode-switcher.hidden {
  192. display: none;
  193. }
  194. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn {
  195. border: none;
  196. }
  197. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.active {
  198. background-color: #0d6efd;
  199. color: #fff;
  200. }
  201. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.disabled {
  202. background-color: #e9ecef;
  203. color: #212529;
  204. cursor: not-allowed;
  205. pointer-events: none;
  206. }
  207. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:first-child {
  208. border-top-right-radius: 0;
  209. border-bottom-right-radius: 0;
  210. }
  211. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:last-child {
  212. border-top-left-radius: 0;
  213. border-bottom-left-radius: 0;
  214. }
  215. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:nth-child(2) {
  216. padding: 6px 10px;
  217. border-left: 1px solid #ced4da;
  218. border-right: 1px solid #ced4da;
  219. border-radius: 0;
  220. }
  221. .pd-top-bar .pd-top-bar-title {
  222. line-height: 30px;
  223. font-size: 24px;
  224. font-weight: 500;
  225. text-align: center;
  226. width: 100%;
  227. }
  228. .pd-top-bar .pd-top-bar-tool-icons {
  229. height: 30px;
  230. line-height: 28px;
  231. box-sizing: border-box;
  232. padding: 0 8px;
  233. border: 1px solid #ced4da;
  234. border-radius: 0.375rem;
  235. }
  236. .pd-top-bar .pd-top-bar-tool-icons i.bi {
  237. margin-right: 16px;
  238. font-size: 16px;
  239. cursor: pointer;
  240. height: 16px;
  241. width: 16px;
  242. }
  243. .pd-top-bar .pd-top-bar-tool-icons i.bi::before {
  244. line-height: unset;
  245. }
  246. .pd-top-bar .pd-top-bar-tool-icons i.bi:hover {
  247. color: #0d6efd;
  248. }
  249. .pd-top-bar .pd-top-bar-tool-icons i.bi:last-child {
  250. margin-right: 0;
  251. }
  252. /* TopBar styles end */
  253. /* Editor styles start */
  254. .pd-editor {
  255. width: 100%;
  256. display: flex;
  257. justify-content: space-between;
  258. box-sizing: border-box;
  259. overflow: hidden;
  260. flex-shrink: 0;
  261. flex-grow: 1;
  262. }
  263. .pd-editor .pd-edit-view,
  264. .pd-editor .pd-read-view {
  265. height: calc(
  266. 100vh - 0.75rem * 3 - 30px
  267. ); /* Exact height to prevent flex height expansion */
  268. border: 1px solid #ced4da;
  269. border-radius: 0.375rem;
  270. box-sizing: border-box;
  271. color: #212529;
  272. overflow: auto;
  273. flex-shrink: 0;
  274. flex-basis: 0;
  275. flex-grow: 1;
  276. }
  277. .pd-editor .pd-edit-view textarea {
  278. border: none;
  279. }
  280. .pd-editor .pd-edit-view textarea::-webkit-scrollbar,
  281. .pd-editor .pd-read-view::-webkit-scrollbar {
  282. width: 8px;
  283. height: 8px;
  284. }
  285. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-track,
  286. .pd-editor .pd-read-view::-webkit-scrollbar-track {
  287. background-color: transparent;
  288. }
  289. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb,
  290. .pd-editor .pd-read-view::-webkit-scrollbar-thumb {
  291. background-color: #d6dee1;
  292. border-radius: 8px;
  293. }
  294. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb:hover,
  295. .pd-editor .pd-read-view::-webkit-scrollbar-thumb:hover {
  296. background-color: #a8bbbf;
  297. }
  298. .pd-editor .pd-read-view {
  299. padding: 0.375rem;
  300. }
  301. .pd-editor.pd-mode-both .pd-edit-view {
  302. margin-right: 0.375rem;
  303. }
  304. .pd-editor.pd-mode-both .pd-read-view {
  305. margin-left: 0.375rem;
  306. }
  307. .pd-editor.pd-mode-edit .pd-read-view {
  308. display: none;
  309. }
  310. .pd-editor.pd-mode-read .pd-edit-view {
  311. display: none;
  312. }
  313. /* Editor styles end */
  314. /* HomeBar styles start */
  315. .pd-home-bar {
  316. display: flex;
  317. align-items: center;
  318. justify-content: space-between;
  319. }
  320. .pd-home-bar button {
  321. width: unset;
  322. }
  323. .pd-home-bar .pd-home-user-info button {
  324. margin-left: 8px;
  325. }
  326. /* HomeBar styles end */
  327. /* PostList styles start */
  328. .pd-post-list {
  329. width: 100%;
  330. display: grid;
  331. row-gap: 16px;
  332. column-gap: 16px;
  333. grid-template-columns: 1fr 1fr 1fr 1fr;
  334. margin-top: 16px;
  335. padding-bottom: 16px;
  336. overflow: auto;
  337. }
  338. .pd-post-list .pd-post {
  339. width: 100%;
  340. min-width: 180px;
  341. border: 1px solid #dee2e6;
  342. border-radius: 0.375rem;
  343. box-sizing: border-box;
  344. padding: 1rem;
  345. display: flex;
  346. font-size: 16px;
  347. flex-direction: column;
  348. }
  349. .pd-post-list .pd-post:last-child {
  350. margin-right: 0;
  351. }
  352. .pd-post-list .pd-post span {
  353. margin-bottom: 8px;
  354. }
  355. .pd-post-list .pd-post .pd-post-title {
  356. font-weight: 500;
  357. }
  358. .pd-post-list .pd-post .pd-post-digest {
  359. overflow: hidden;
  360. text-overflow: ellipsis;
  361. white-space: nowrap;
  362. }
  363. /* PostList styles end */