global.css 8.0 KB

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