global.css 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344
  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,
  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 {
  32. height: 38px;
  33. line-height: 30px;
  34. padding: 4px 0.375rem;
  35. }
  36. textarea {
  37. height: 100%;
  38. padding: 0.375rem;
  39. resize: none;
  40. }
  41. button {
  42. box-sizing: border-box;
  43. padding: 6px 12px;
  44. background-color: #fff;
  45. line-height: 16px;
  46. color: #212529;
  47. cursor: pointer;
  48. font-size: 14px;
  49. border: 1px solid #ced4da;
  50. border-radius: 0.375rem;
  51. }
  52. /* Global form styles end */
  53. /* Loading styles start */
  54. /* Loading spin from https://loading.io/css/ */
  55. .pd-loading-cover {
  56. position: fixed;
  57. top: 0;
  58. left: 0;
  59. right: 0;
  60. bottom: 0;
  61. background-color: rgba(0, 0, 0, 0.6);
  62. z-index: 9;
  63. display: flex;
  64. align-items: center;
  65. justify-content: center;
  66. }
  67. .pd-loading-cover .pd-loading-spin {
  68. display: inline-block;
  69. transform: translateZ(1px);
  70. }
  71. .pd-loading-cover .pd-loading-spin .pd-loading-spin-inner {
  72. display: inline-block;
  73. width: 64px;
  74. height: 64px;
  75. margin: 8px;
  76. border-radius: 50%;
  77. background: #fff;
  78. animation: pd-loading-spin 5s cubic-bezier(0, 0.2, 0.8, 1) infinite;
  79. }
  80. @keyframes pd-loading-spin {
  81. 0%,
  82. 100% {
  83. animation-timing-function: cubic-bezier(0.5, 0, 1, 0.5);
  84. }
  85. 0% {
  86. transform: rotateY(0deg);
  87. }
  88. 50% {
  89. transform: rotateY(1800deg);
  90. animation-timing-function: cubic-bezier(0, 0.5, 0.5, 1);
  91. }
  92. 100% {
  93. transform: rotateY(3600deg);
  94. }
  95. }
  96. /* Loading styles end */
  97. /* Login frame styles start */
  98. .pd-login-frame {
  99. width: 375px;
  100. margin-top: 16px;
  101. box-sizing: border-box;
  102. padding: 16px;
  103. color: #212529;
  104. display: flex;
  105. flex-direction: column;
  106. }
  107. .pd-login-frame .pd-login-input {
  108. margin-bottom: 8px;
  109. }
  110. .pd-login-frame .pd-login-input.error {
  111. border-color: #dc3545;
  112. }
  113. .pd-login-frame .pd-login-input-label {
  114. margin-bottom: 4px;
  115. font-size: 14px;
  116. }
  117. .pd-login-frame .pd-login-btn {
  118. background-color: #0d6efd;
  119. margin-top: 8px;
  120. height: 38px;
  121. color: #fff;
  122. }
  123. /* Login frame styles end */
  124. /* TopBar styles start */
  125. .pd-top-bar {
  126. width: 100%;
  127. display: flex;
  128. margin-bottom: 0.75rem;
  129. justify-content: space-between;
  130. box-sizing: border-box;
  131. flex-shrink: 0;
  132. }
  133. .pd-top-bar .pd-top-bar-mode-switcher {
  134. border: 1px solid #ced4da;
  135. border-radius: 0.375rem;
  136. box-sizing: border-box;
  137. font-size: 14px;
  138. }
  139. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn {
  140. border: none;
  141. }
  142. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.active {
  143. background-color: #0d6efd;
  144. color: #fff;
  145. }
  146. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn.disabled {
  147. background-color: #e9ecef;
  148. color: #212529;
  149. cursor: not-allowed;
  150. pointer-events: none;
  151. }
  152. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:first-child {
  153. border-top-right-radius: 0;
  154. border-bottom-right-radius: 0;
  155. }
  156. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:last-child {
  157. border-top-left-radius: 0;
  158. border-bottom-left-radius: 0;
  159. }
  160. .pd-top-bar .pd-top-bar-mode-switcher .pd-top-bar-btn:nth-child(2) {
  161. padding: 6px 10px;
  162. border-left: 1px solid #ced4da;
  163. border-right: 1px solid #ced4da;
  164. border-radius: 0;
  165. }
  166. .pd-top-bar .pd-top-bar-tool-icons {
  167. height: 30px;
  168. line-height: 28px;
  169. box-sizing: border-box;
  170. padding: 0 8px;
  171. border: 1px solid #ced4da;
  172. border-radius: 0.375rem;
  173. }
  174. .pd-top-bar .pd-top-bar-tool-icons i.bi {
  175. margin-right: 16px;
  176. font-size: 16px;
  177. cursor: pointer;
  178. height: 16px;
  179. width: 16px;
  180. }
  181. .pd-top-bar .pd-top-bar-tool-icons i.bi::before {
  182. line-height: unset;
  183. }
  184. .pd-top-bar .pd-top-bar-tool-icons i.bi:hover {
  185. color: #0d6efd;
  186. }
  187. .pd-top-bar .pd-top-bar-tool-icons i.bi:last-child {
  188. margin-right: 0;
  189. }
  190. /* TopBar styles end */
  191. /* Editor styles start */
  192. .pd-editor {
  193. width: 100%;
  194. display: flex;
  195. justify-content: space-between;
  196. box-sizing: border-box;
  197. overflow: hidden;
  198. flex-shrink: 0;
  199. flex-grow: 1;
  200. }
  201. .pd-editor .pd-edit-view,
  202. .pd-editor .pd-read-view {
  203. height: calc(
  204. 100vh - 0.75rem * 3 - 30px
  205. ); /* Exact height to prevent flex height expansion */
  206. border: 1px solid #ced4da;
  207. border-radius: 0.375rem;
  208. box-sizing: border-box;
  209. color: #212529;
  210. overflow: auto;
  211. flex-shrink: 0;
  212. flex-basis: 0;
  213. flex-grow: 1;
  214. }
  215. .pd-editor .pd-edit-view textarea {
  216. border: none;
  217. }
  218. .pd-editor .pd-edit-view textarea::-webkit-scrollbar,
  219. .pd-editor .pd-read-view::-webkit-scrollbar {
  220. width: 8px;
  221. height: 8px;
  222. }
  223. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-track,
  224. .pd-editor .pd-read-view::-webkit-scrollbar-track {
  225. background-color: transparent;
  226. }
  227. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb,
  228. .pd-editor .pd-read-view::-webkit-scrollbar-thumb {
  229. background-color: #d6dee1;
  230. border-radius: 8px;
  231. }
  232. .pd-editor .pd-edit-view textarea::-webkit-scrollbar-thumb:hover,
  233. .pd-editor .pd-read-view::-webkit-scrollbar-thumb:hover {
  234. background-color: #a8bbbf;
  235. }
  236. .pd-editor .pd-read-view {
  237. padding: 0.375rem;
  238. }
  239. .pd-editor.pd-mode-both .pd-edit-view {
  240. margin-right: 0.375rem;
  241. }
  242. .pd-editor.pd-mode-both .pd-read-view {
  243. margin-left: 0.375rem;
  244. }
  245. .pd-editor.pd-mode-edit .pd-read-view {
  246. display: none;
  247. }
  248. .pd-editor.pd-mode-read .pd-edit-view {
  249. display: none;
  250. }
  251. /* Editor styles end */
  252. /* HomeBar styles start */
  253. .pd-home-bar {
  254. display: flex;
  255. align-items: center;
  256. justify-content: space-between;
  257. }
  258. .pd-home-bar button {
  259. width: unset;
  260. }
  261. .pd-home-bar .pd-home-user-info button {
  262. margin-left: 8px;
  263. }
  264. /* HomeBar styles end */
  265. /* PostList styles start */
  266. .pd-post-list {
  267. width: 100%;
  268. display: grid;
  269. row-gap: 16px;
  270. column-gap: 16px;
  271. grid-template-columns: auto auto auto auto;
  272. margin-top: 16px;
  273. padding-bottom: 16px;
  274. overflow: auto;
  275. }
  276. .pd-post-list .pd-post {
  277. width: 100%;
  278. min-width: 180px;
  279. border: 1px solid #dee2e6;
  280. border-radius: 0.375rem;
  281. box-sizing: border-box;
  282. padding: 1rem;
  283. display: flex;
  284. font-size: 16px;
  285. flex-direction: column;
  286. }
  287. .pd-post-list .pd-post:last-child {
  288. margin-right: 0;
  289. }
  290. .pd-post-list .pd-post span {
  291. margin-bottom: 8px;
  292. }
  293. .pd-post-list .pd-post .pd-post-title {
  294. font-weight: 500;
  295. }
  296. /* PostList styles end */