App.vue 31 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741
  1. <template>
  2. <div class="upper-container">
  3. <banned v-if="banned" />
  4. <div v-else class="upper-container">
  5. <router-view
  6. :key="$route.fullPath"
  7. class="main-container"
  8. :class="{ 'main-container-modal-active': aModalIsOpen2 }"
  9. />
  10. <what-is-new v-show="modals.whatIsNew" />
  11. <login-modal v-if="modals.login" />
  12. <register-modal v-if="modals.register" />
  13. <create-playlist-modal v-if="modals.createPlaylist" />
  14. </div>
  15. </div>
  16. </template>
  17. <script>
  18. import { mapState, mapActions, mapGetters } from "vuex";
  19. import Toast from "toasters";
  20. import { defineAsyncComponent } from "vue";
  21. import ws from "./ws";
  22. import aw from "./aw";
  23. import keyboardShortcuts from "./keyboardShortcuts";
  24. export default {
  25. components: {
  26. WhatIsNew: defineAsyncComponent(() =>
  27. import("@/components/modals/WhatIsNew.vue")
  28. ),
  29. LoginModal: defineAsyncComponent(() =>
  30. import("@/components/modals/Login.vue")
  31. ),
  32. RegisterModal: defineAsyncComponent(() =>
  33. import("@/components/modals/Register.vue")
  34. ),
  35. CreatePlaylistModal: defineAsyncComponent(() =>
  36. import("@/components/modals/CreatePlaylist.vue")
  37. ),
  38. Banned: defineAsyncComponent(() => import("@/pages/Banned.vue"))
  39. },
  40. replace: false,
  41. data() {
  42. return {
  43. apiDomain: "",
  44. socketConnected: true,
  45. keyIsDown: false,
  46. scrollPosition: { y: 0, x: 0 },
  47. aModalIsOpen2: false
  48. };
  49. },
  50. computed: {
  51. ...mapState({
  52. loggedIn: state => state.user.auth.loggedIn,
  53. role: state => state.user.auth.role,
  54. username: state => state.user.auth.username,
  55. userId: state => state.user.auth.userId,
  56. banned: state => state.user.auth.banned,
  57. modals: state => state.modalVisibility.modals,
  58. currentlyActive: state => state.modalVisibility.currentlyActive,
  59. nightmode: state => state.user.preferences.nightmode,
  60. activityWatch: state => state.user.preferences.activityWatch
  61. }),
  62. ...mapGetters({
  63. socket: "websockets/getSocket"
  64. }),
  65. aModalIsOpen() {
  66. return Object.keys(this.currentlyActive).length > 0;
  67. }
  68. },
  69. watch: {
  70. socketConnected(connected) {
  71. if (!connected) this.disconnectedMessage.show();
  72. else this.disconnectedMessage.hide();
  73. },
  74. nightmode(nightmode) {
  75. if (nightmode) this.enableNightmode();
  76. else this.disableNightmode();
  77. },
  78. activityWatch(activityWatch) {
  79. if (activityWatch) aw.enable();
  80. else aw.disable();
  81. },
  82. aModalIsOpen(aModalIsOpen) {
  83. if (aModalIsOpen) {
  84. this.scrollPosition = {
  85. x: window.scrollX,
  86. y: window.scrollY
  87. };
  88. this.aModalIsOpen2 = true;
  89. } else {
  90. this.aModalIsOpen2 = false;
  91. setTimeout(() => {
  92. window.scrollTo(
  93. this.scrollPosition.x,
  94. this.scrollPosition.y
  95. );
  96. }, 10);
  97. }
  98. }
  99. },
  100. async mounted() {
  101. window
  102. .matchMedia("(prefers-color-scheme: dark)")
  103. .addEventListener("change", e => {
  104. if (e.matches === !this.nightmode) this.toggleNightMode();
  105. });
  106. document.onkeydown = ev => {
  107. const event = ev || window.event;
  108. const { keyCode } = event;
  109. const shift = event.shiftKey;
  110. const ctrl = event.ctrlKey;
  111. const alt = event.altKey;
  112. const identifier = `${keyCode}.${shift}.${ctrl}`;
  113. if (this.keyIsDown === identifier) return;
  114. this.keyIsDown = identifier;
  115. keyboardShortcuts.handleKeyDown(event, keyCode, shift, ctrl, alt);
  116. };
  117. document.onkeyup = () => {
  118. this.keyIsDown = "";
  119. };
  120. // ctrl + alt + n
  121. keyboardShortcuts.registerShortcut("nightmode", {
  122. keyCode: 78,
  123. ctrl: true,
  124. alt: true,
  125. handler: () => this.toggleNightMode()
  126. });
  127. keyboardShortcuts.registerShortcut("closeModal", {
  128. keyCode: 27,
  129. shift: false,
  130. ctrl: false,
  131. handler: () => {
  132. if (Object.keys(this.currentlyActive).length !== 0)
  133. this.closeCurrentModal();
  134. }
  135. });
  136. this.disconnectedMessage = new Toast({
  137. content: "Could not connect to the server.",
  138. persistent: true,
  139. interactable: false
  140. });
  141. this.disconnectedMessage.hide();
  142. ws.onConnect(() => {
  143. this.socketConnected = true;
  144. this.socket.dispatch("users.getPreferences", res => {
  145. if (res.status === "success") {
  146. const { preferences } = res.data;
  147. this.changeAutoSkipDisliked(preferences.autoSkipDisliked);
  148. this.changeNightmode(preferences.nightmode);
  149. this.changeActivityLogPublic(preferences.activityLogPublic);
  150. this.changeAnonymousSongRequests(
  151. preferences.anonymousSongRequests
  152. );
  153. this.changeActivityWatch(preferences.activityWatch);
  154. if (this.nightmode) this.enableNightmode();
  155. else this.disableNightmode();
  156. }
  157. });
  158. this.socket.on("keep.event:user.session.deleted", () =>
  159. window.location.reload()
  160. );
  161. });
  162. ws.onDisconnect(true, () => {
  163. this.socketConnected = false;
  164. });
  165. this.apiDomain = await lofig.get("backend.apiDomain");
  166. this.$router.isReady().then(() => {
  167. if (this.$route.query.err) {
  168. let { err } = this.$route.query;
  169. err = err
  170. .replace(new RegExp("<", "g"), "&lt;")
  171. .replace(new RegExp(">", "g"), "&gt;");
  172. this.$router.push({ query: {} });
  173. new Toast({ content: err, timeout: 20000 });
  174. }
  175. if (this.$route.query.msg) {
  176. let { msg } = this.$route.query;
  177. msg = msg
  178. .replace(new RegExp("<", "g"), "&lt;")
  179. .replace(new RegExp(">", "g"), "&gt;");
  180. this.$router.push({ query: {} });
  181. new Toast({ content: msg, timeout: 20000 });
  182. }
  183. if (localStorage.getItem("github_redirect")) {
  184. this.$router.push(localStorage.getItem("github_redirect"));
  185. localStorage.removeItem("github_redirect");
  186. }
  187. });
  188. if (localStorage.getItem("nightmode") === "true") {
  189. this.changeNightmode(true);
  190. this.enableNightmode();
  191. }
  192. },
  193. methods: {
  194. toggleNightMode() {
  195. localStorage.setItem("nightmode", !this.nightmode);
  196. if (this.loggedIn) {
  197. this.socket.dispatch(
  198. "users.updatePreferences",
  199. { nightmode: !this.nightmode },
  200. res => {
  201. if (res.status !== "success") new Toast(res.message);
  202. }
  203. );
  204. }
  205. this.changeNightmode(!this.nightmode);
  206. },
  207. enableNightmode: () => {
  208. document
  209. .getElementsByTagName("body")[0]
  210. .classList.add("night-mode");
  211. },
  212. disableNightmode: () => {
  213. document
  214. .getElementsByTagName("body")[0]
  215. .classList.remove("night-mode");
  216. },
  217. ...mapActions("modalVisibility", ["closeCurrentModal"]),
  218. ...mapActions("user/preferences", [
  219. "changeNightmode",
  220. "changeAutoSkipDisliked",
  221. "changeActivityLogPublic",
  222. "changeAnonymousSongRequests",
  223. "changeActivityWatch"
  224. ])
  225. }
  226. };
  227. </script>
  228. <style lang="scss">
  229. @import "normalize.css/normalize.css";
  230. @import "tippy.js/dist/tippy.css";
  231. @import "tippy.js/animations/scale.css";
  232. :root {
  233. --primary-color: var(--blue);
  234. --blue: rgb(2, 166, 242);
  235. --light-blue: rgb(163, 224, 255);
  236. --dark-blue: rgb(0, 102, 244);
  237. --teal: rgb(0, 209, 178);
  238. --purple: rgb(143, 40, 140);
  239. --light-purple: rgb(170, 141, 216);
  240. --yellow: rgb(241, 196, 15);
  241. --light-pink: rgb(228, 155, 166);
  242. --dark-pink: rgb(234, 72, 97);
  243. --orange: rgb(255, 94, 0);
  244. --dark-orange: rgb(250, 50, 0);
  245. --green: rgb(68, 189, 50);
  246. --red: rgb(231, 77, 60);
  247. --white: rgb(255, 255, 255);
  248. --black: rgb(0, 0, 0);
  249. --light-grey: rgb(245, 245, 245);
  250. --light-grey-2: rgb(221, 221, 221);
  251. --light-grey-3: rgb(195, 193, 195);
  252. --grey: rgb(107, 107, 107);
  253. --grey-2: rgb(113, 113, 113);
  254. --grey-3: rgb(126, 126, 126);
  255. --dark-grey: rgb(77, 77, 77);
  256. --dark-grey-2: rgb(51, 51, 51);
  257. --dark-grey-3: rgb(34, 34, 34);
  258. --dark-grey-4: rgb(26, 26, 26);
  259. --youtube: rgb(189, 46, 46);
  260. }
  261. .night-mode {
  262. div {
  263. color: var(--light-grey-2);
  264. }
  265. .input,
  266. .textarea,
  267. .select select {
  268. background-color: var(--dark-grey);
  269. border-color: var(--grey-3);
  270. color: var(--white);
  271. &::placeholder {
  272. color: var(--light-grey-3);
  273. }
  274. }
  275. h1,
  276. h2,
  277. h3,
  278. h4,
  279. h5,
  280. h6 {
  281. color: var(--white) !important;
  282. }
  283. p:not(.help),
  284. label,
  285. .label {
  286. color: var(--light-grey-2) !important;
  287. }
  288. .section,
  289. .content {
  290. background-color: var(--dark-grey-3) !important;
  291. }
  292. .content-box,
  293. .step:not(.selected) {
  294. background-color: var(--dark-grey-3) !important;
  295. }
  296. .tippy-box[data-theme~="songActions"] {
  297. background-color: var(--dark-grey);
  298. }
  299. code {
  300. background-color: var(--dark-grey-2) !important;
  301. }
  302. }
  303. /* inter-regular - latin */
  304. @font-face {
  305. font-family: "Inter";
  306. font-style: normal;
  307. font-weight: 400;
  308. src: url("/fonts/inter-v3-latin-regular.eot"); /* IE9 Compat Modes */
  309. src: local(""),
  310. url("/fonts/inter-v3-latin-regular.eot?#iefix")
  311. format("embedded-opentype"),
  312. /* IE6-IE8 */ url("/fonts/inter-v3-latin-regular.woff2") format("woff2"),
  313. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-regular.woff")
  314. format("woff"),
  315. /* Modern Browsers */ url("/fonts/inter-v3-latin-regular.ttf")
  316. format("truetype"),
  317. /* Safari, Android, iOS */
  318. url("/fonts/inter-v3-latin-regular.svg#Inter") format("svg"); /* Legacy iOS */
  319. }
  320. /* inter-200 - latin */
  321. @font-face {
  322. font-family: "Inter";
  323. font-style: normal;
  324. font-weight: 200;
  325. src: url("/fonts/inter-v3-latin-200.eot"); /* IE9 Compat Modes */
  326. src: local(""),
  327. url("/fonts/inter-v3-latin-200.eot?#iefix") format("embedded-opentype"),
  328. /* IE6-IE8 */ url("/fonts/inter-v3-latin-200.woff2") format("woff2"),
  329. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-200.woff")
  330. format("woff"),
  331. /* Modern Browsers */ url("/fonts/inter-v3-latin-200.ttf")
  332. format("truetype"),
  333. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-200.svg#Inter")
  334. format("svg"); /* Legacy iOS */
  335. }
  336. /* inter-800 - latin */
  337. @font-face {
  338. font-family: "Inter";
  339. font-style: normal;
  340. font-weight: 800;
  341. src: url("/fonts/inter-v3-latin-800.eot"); /* IE9 Compat Modes */
  342. src: local(""),
  343. url("/fonts/inter-v3-latin-800.eot?#iefix") format("embedded-opentype"),
  344. /* IE6-IE8 */ url("/fonts/inter-v3-latin-800.woff2") format("woff2"),
  345. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-800.woff")
  346. format("woff"),
  347. /* Modern Browsers */ url("/fonts/inter-v3-latin-800.ttf")
  348. format("truetype"),
  349. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-800.svg#Inter")
  350. format("svg"); /* Legacy iOS */
  351. }
  352. /* inter-600 - latin */
  353. @font-face {
  354. font-family: "Inter";
  355. font-style: normal;
  356. font-weight: 600;
  357. src: url("/fonts/inter-v3-latin-600.eot"); /* IE9 Compat Modes */
  358. src: local(""),
  359. url("/fonts/inter-v3-latin-600.eot?#iefix") format("embedded-opentype"),
  360. /* IE6-IE8 */ url("/fonts/inter-v3-latin-600.woff2") format("woff2"),
  361. /* Super Modern Browsers */ url("/fonts/inter-v3-latin-600.woff")
  362. format("woff"),
  363. /* Modern Browsers */ url("/fonts/inter-v3-latin-600.ttf")
  364. format("truetype"),
  365. /* Safari, Android, iOS */ url("/fonts/inter-v3-latin-600.svg#Inter")
  366. format("svg"); /* Legacy iOS */
  367. }
  368. /* pacifico-regular - latin */
  369. @font-face {
  370. font-family: "Pacifico";
  371. font-style: normal;
  372. font-weight: 400;
  373. src: url("/fonts/pacifico-v17-latin-regular.eot"); /* IE9 Compat Modes */
  374. src: local(""),
  375. url("/fonts/pacifico-v17-latin-regular.eot?#iefix")
  376. format("embedded-opentype"),
  377. /* IE6-IE8 */ url("/fonts/pacifico-v17-latin-regular.woff2")
  378. format("woff2"),
  379. /* Super Modern Browsers */
  380. url("/fonts/pacifico-v17-latin-regular.woff") format("woff"),
  381. /* Modern Browsers */ url("/fonts/pacifico-v17-latin-regular.ttf")
  382. format("truetype"),
  383. /* Safari, Android, iOS */
  384. url("/fonts/pacifico-v17-latin-regular.svg#Pacifico") format("svg"); /* Legacy iOS */
  385. }
  386. @font-face {
  387. font-family: "Material Icons";
  388. font-style: normal;
  389. font-weight: 400;
  390. src: url(/fonts/MaterialIcons-Regular.ttf); /* For IE6-8 */
  391. src: local("Material Icons"), local("MaterialIcons-Regular"),
  392. url(/fonts/MaterialIcons-Regular.ttf) format("truetype");
  393. }
  394. .material-icons {
  395. font-family: "Material Icons";
  396. font-weight: normal;
  397. font-style: normal;
  398. font-size: 24px; /* Preferred icon size */
  399. display: inline-block;
  400. line-height: 1;
  401. text-transform: none;
  402. letter-spacing: normal;
  403. word-wrap: normal;
  404. white-space: nowrap;
  405. direction: ltr;
  406. /* Support for all WebKit browsers. */
  407. -webkit-font-smoothing: antialiased;
  408. /* Support for Safari and Chrome. */
  409. text-rendering: optimizeLegibility;
  410. /* Support for Firefox. */
  411. -moz-osx-font-smoothing: grayscale;
  412. /* Support for IE. */
  413. font-feature-settings: "liga";
  414. }
  415. code {
  416. background-color: var(--light-grey) !important;
  417. color: var(--red) !important;
  418. }
  419. body.night-mode {
  420. background-color: var(--black) !important;
  421. }
  422. #toasts-container {
  423. z-index: 10000 !important;
  424. .toast {
  425. font-weight: 600;
  426. z-index: 10000 !important;
  427. }
  428. }
  429. html {
  430. overflow: auto !important;
  431. height: 100%;
  432. background-color: inherit;
  433. font-size: 14px;
  434. }
  435. body {
  436. background-color: var(--light-grey);
  437. color: var(--dark-grey);
  438. height: 100%;
  439. line-height: 1.428;
  440. font-size: 1rem;
  441. font-family: "Inter", Helvetica, Arial, sans-serif;
  442. }
  443. .app {
  444. min-height: 100vh;
  445. position: relative;
  446. }
  447. #root {
  448. height: 100%;
  449. }
  450. .content-wrapper {
  451. /* padding: 60px 0 calc(230px + 60px) 0; */
  452. padding-top: 60px;
  453. }
  454. .column {
  455. display: flex;
  456. flex: 1 1 0;
  457. padding: 10px;
  458. }
  459. ul {
  460. list-style: none;
  461. margin: 0;
  462. display: block;
  463. }
  464. ol,
  465. ul {
  466. margin-left: 2em;
  467. }
  468. h1,
  469. h2,
  470. h3,
  471. h4,
  472. h5,
  473. h6 {
  474. font-family: "Inter", Helvetica, Arial, sans-serif;
  475. font-weight: 400;
  476. line-height: 1.1;
  477. a {
  478. font-weight: inherit;
  479. }
  480. }
  481. h1 {
  482. font-size: 4.2rem;
  483. line-height: 110%;
  484. margin: 2.1rem 0 1.68rem 0;
  485. }
  486. h2 {
  487. font-size: 3.56rem;
  488. line-height: 110%;
  489. margin: 1.78rem 0 1.424rem 0;
  490. }
  491. h3 {
  492. font-size: 2.92rem;
  493. line-height: 110%;
  494. margin: 1.46rem 0 1.168rem 0;
  495. }
  496. h4 {
  497. font-size: 2.28rem;
  498. line-height: 110%;
  499. margin: 1.14rem 0 0.912rem 0;
  500. }
  501. h5 {
  502. font-size: 1.64rem;
  503. line-height: 110%;
  504. margin: 0.82rem 0 0.656rem 0;
  505. }
  506. h6 {
  507. font-size: 1rem;
  508. line-height: 110%;
  509. margin: 0.5rem 0 0.4rem 0;
  510. }
  511. .thin {
  512. font-weight: 200;
  513. }
  514. .left {
  515. float: left !important;
  516. }
  517. .right {
  518. float: right !important;
  519. }
  520. .white {
  521. background-color: #ffffff !important;
  522. }
  523. .btn-search {
  524. font-size: 14px;
  525. }
  526. a.nav-item.is-tab {
  527. border-bottom: 1px solid transparent;
  528. border-top: 1px solid transparent;
  529. }
  530. .button.is-info {
  531. border-width: 0;
  532. color: #fff;
  533. }
  534. strong {
  535. color: inherit;
  536. }
  537. hr {
  538. background-color: #dbdbdb;
  539. border: none;
  540. height: 1px;
  541. }
  542. p,
  543. button,
  544. input,
  545. select,
  546. textarea {
  547. font-family: "Inter", Helvetica, Arial, sans-serif;
  548. }
  549. input,
  550. select,
  551. textarea {
  552. outline: none;
  553. }
  554. .label {
  555. display: flex;
  556. font-weight: 700;
  557. &:not(:last-child) {
  558. margin-bottom: 5px;
  559. }
  560. }
  561. #page-title {
  562. margin-top: 0;
  563. font-size: 35px;
  564. text-align: center;
  565. }
  566. @media only screen and (min-width: 700px) {
  567. #page-title {
  568. margin: 0;
  569. margin-bottom: 30px;
  570. font-size: 40px;
  571. }
  572. }
  573. @media screen and (min-width: 980px) {
  574. .container {
  575. max-width: 960px;
  576. margin-left: auto;
  577. margin-right: auto;
  578. }
  579. }
  580. @media screen and (min-width: 1180px) {
  581. .container {
  582. max-width: 1200px;
  583. }
  584. }
  585. .upper-container {
  586. height: 100%;
  587. }
  588. .main-container {
  589. height: 100%;
  590. min-height: 100vh;
  591. display: flex;
  592. flex-direction: column;
  593. &.main-container-modal-active {
  594. height: 100% !important;
  595. overflow: hidden !important;
  596. }
  597. > .container {
  598. position: relative;
  599. flex: 1 0 auto;
  600. margin: 0 auto;
  601. max-width: 1200px;
  602. }
  603. }
  604. a {
  605. color: var(--primary-color);
  606. text-decoration: none;
  607. }
  608. table {
  609. border-collapse: collapse;
  610. width: 100%;
  611. thead {
  612. td {
  613. border-width: 0 0 2px;
  614. }
  615. }
  616. td {
  617. border: 1px solid #dbdbdb;
  618. border-width: 0 0 1px;
  619. padding: 8px 10px;
  620. }
  621. tbody {
  622. tr:last-child {
  623. td {
  624. border-bottom-width: 0;
  625. }
  626. }
  627. }
  628. }
  629. img {
  630. max-width: 100%;
  631. }
  632. .absolute-a {
  633. width: 100%;
  634. height: 100%;
  635. position: absolute;
  636. top: 0;
  637. left: 0;
  638. }
  639. .alert {
  640. padding: 20px;
  641. color: var(--white);
  642. background-color: var(--red);
  643. position: fixed;
  644. top: 50px;
  645. right: 50px;
  646. font-size: 2em;
  647. border-radius: 5px;
  648. z-index: 10000000;
  649. }
  650. .night-mode {
  651. .tippy-box {
  652. border: 1px solid var(--light-grey-3);
  653. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25),
  654. 0 10px 10px rgba(0, 0, 0, 0.22);
  655. background-color: var(--white);
  656. .tippy-content {
  657. color: var(--black);
  658. }
  659. &[data-theme~="songActions"],
  660. &[data-theme~="addToPlaylist"],
  661. &[data-theme~="stationSettings"] {
  662. background-color: var(--dark-grey-2);
  663. border: 0 !important;
  664. }
  665. &[data-theme~="songActions"] {
  666. background-color: var(--dark-grey-2);
  667. border: 0 !important;
  668. i,
  669. a {
  670. color: var(--white);
  671. }
  672. .youtube-icon {
  673. background-color: var(--white);
  674. }
  675. }
  676. &[data-theme~="addToPlaylist"] {
  677. background-color: var(--dark-grey-2);
  678. border: 0 !important;
  679. .nav-dropdown-items {
  680. .nav-item {
  681. background-color: var(--dark-grey);
  682. &:focus {
  683. outline-color: var(--dark-grey);
  684. }
  685. p {
  686. color: var(--white);
  687. }
  688. }
  689. }
  690. }
  691. }
  692. .tippy-box[data-placement^="top"] {
  693. &[data-theme~="songActions"],
  694. &[data-theme~="addToPlaylist"] {
  695. > .tippy-arrow::before {
  696. border-top-color: var(--dark-grey-2);
  697. }
  698. }
  699. }
  700. .tippy-box[data-placement^="bottom"] {
  701. &[data-theme~="songActions"],
  702. &[data-theme~="addToPlaylist"],
  703. &[data-theme~="stationSettings"] {
  704. > .tippy-arrow::before {
  705. border-bottom-color: var(--dark-grey-2);
  706. }
  707. }
  708. }
  709. .tippy-box[data-placement^="left"] {
  710. &[data-theme~="songActions"],
  711. &[data-theme~="addToPlaylist"] {
  712. > .tippy-arrow::before {
  713. border-left-color: var(--dark-grey-2);
  714. }
  715. }
  716. }
  717. .tippy-box[data-placement^="right"] {
  718. &[data-theme~="songActions"],
  719. &[data-theme~="addToPlaylist"] {
  720. > .tippy-arrow::before {
  721. border-right-color: var(--dark-grey-2);
  722. }
  723. }
  724. }
  725. }
  726. .tippy-box[data-theme~="info"] {
  727. font-size: 12px;
  728. letter-spacing: 1px;
  729. }
  730. .tippy-box[data-theme~="confirm"] {
  731. background-color: var(--red);
  732. border: 0;
  733. .tippy-content {
  734. padding: 0;
  735. }
  736. a {
  737. padding: 15px;
  738. line-height: 30px;
  739. color: var(--white);
  740. border-bottom: 0;
  741. font-size: 15px;
  742. font-weight: 600;
  743. &:hover,
  744. &:focus {
  745. filter: brightness(90%);
  746. }
  747. }
  748. }
  749. .tippy-box[data-theme~="songActions"] {
  750. font-size: 15px;
  751. padding: 5px 10px;
  752. border: 1px solid var(--light-grey-3);
  753. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  754. background-color: var(--white);
  755. .button {
  756. width: 146px;
  757. }
  758. i,
  759. a {
  760. display: inline-block;
  761. cursor: pointer;
  762. color: var(--dark-grey);
  763. vertical-align: middle;
  764. &:hover,
  765. &:focus {
  766. filter: brightness(90%);
  767. }
  768. &:not(:first) {
  769. margin-left: 5px;
  770. }
  771. }
  772. .play-icon,
  773. .added-to-playlist-icon {
  774. color: var(--green);
  775. }
  776. .edit-icon,
  777. .view-icon,
  778. .add-to-playlist-icon,
  779. .add-to-queue-icon {
  780. color: var(--primary-color);
  781. }
  782. .hide-icon {
  783. color: var(--light-grey-3);
  784. }
  785. .stop-icon,
  786. .delete-icon {
  787. color: var(--red);
  788. }
  789. .report-icon {
  790. color: var(--yellow);
  791. }
  792. }
  793. .tippy-box[data-placement^="top"] {
  794. &[data-theme~="songActions"],
  795. &[data-theme~="addToPlaylist"] {
  796. > .tippy-arrow::before {
  797. border-top-color: var(--white);
  798. }
  799. }
  800. &[data-theme~="confirm"] > .tippy-arrow::before {
  801. border-top-color: var(--red);
  802. }
  803. }
  804. .tippy-box[data-placement^="bottom"] {
  805. &[data-theme~="songActions"],
  806. &[data-theme~="addToPlaylist"],
  807. &[data-theme~="stationSettings"] {
  808. > .tippy-arrow::before {
  809. border-bottom-color: var(--white);
  810. }
  811. }
  812. &[data-theme~="confirm"] > .tippy-arrow::before {
  813. border-bottom-color: var(--red);
  814. }
  815. }
  816. .tippy-box[data-placement^="left"] {
  817. &[data-theme~="songActions"],
  818. &[data-theme~="addToPlaylist"] {
  819. > .tippy-arrow::before {
  820. border-left-color: var(--white);
  821. }
  822. }
  823. &[data-theme~="confirm"] > .tippy-arrow::before {
  824. border-left-color: var(--red);
  825. }
  826. }
  827. .tippy-box[data-placement^="right"] {
  828. &[data-theme~="songActions"],
  829. &[data-theme~="addToPlaylist"] {
  830. > .tippy-arrow::before {
  831. border-right-color: var(--white);
  832. }
  833. }
  834. &[data-theme~="confirm"] > .tippy-arrow::before {
  835. border-right-color: var(--red);
  836. }
  837. }
  838. .tippy-box[data-theme~="stationSettings"] {
  839. border: 1px solid var(--light-grey-3);
  840. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  841. background-color: var(--white);
  842. button:not(:last-of-type) {
  843. margin-bottom: 5px;
  844. }
  845. }
  846. .tippy-box[data-theme~="addToPlaylist"] {
  847. font-size: 15px;
  848. padding: 0;
  849. border: 1px solid var(--light-grey-3);
  850. box-shadow: 0 14px 28px rgba(0, 0, 0, 0.25), 0 10px 10px rgba(0, 0, 0, 0.22);
  851. background-color: var(--white);
  852. color: var(--dark-grey);
  853. width: 350px;
  854. .tippy-content {
  855. padding: 0;
  856. }
  857. .nav-dropdown-items {
  858. max-height: 220px;
  859. overflow-y: auto;
  860. padding: 10px 10px 0 10px;
  861. .nav-item {
  862. width: 100%;
  863. justify-content: flex-start;
  864. border: 0;
  865. padding: 8px 4px;
  866. font-size: 15.5px;
  867. min-height: 36px;
  868. background: var(--light-grey);
  869. border-radius: 5px;
  870. cursor: pointer;
  871. .checkbox-control {
  872. display: flex;
  873. flex-direction: row;
  874. align-items: center;
  875. overflow-wrap: anywhere;
  876. margin: 0 !important;
  877. p {
  878. margin-left: 10px;
  879. }
  880. .switch {
  881. position: relative;
  882. display: inline-block;
  883. flex-shrink: 0;
  884. width: 40px;
  885. height: 24px;
  886. }
  887. .switch input {
  888. opacity: 0;
  889. width: 0;
  890. height: 0;
  891. }
  892. .slider {
  893. width: 100%;
  894. position: absolute;
  895. cursor: pointer;
  896. top: 0;
  897. left: 0;
  898. right: 0;
  899. bottom: 0;
  900. background-color: #ccc;
  901. transition: 0.2s;
  902. border-radius: 34px;
  903. }
  904. .slider:before {
  905. position: absolute;
  906. content: "";
  907. height: 16px;
  908. width: 16px;
  909. left: 4px;
  910. bottom: 4px;
  911. background-color: white;
  912. transition: 0.2s;
  913. border-radius: 50%;
  914. }
  915. input:checked + .slider {
  916. background-color: var(--primary-color);
  917. }
  918. input:focus + .slider {
  919. box-shadow: 0 0 1px var(--primary-color);
  920. }
  921. input:checked + .slider:before {
  922. transform: translateX(16px);
  923. }
  924. }
  925. &:focus {
  926. outline-color: var(--light-grey-3);
  927. }
  928. &:not(:last-of-type) {
  929. margin-bottom: 5px;
  930. }
  931. }
  932. }
  933. .tippy-content > span {
  934. display: flex;
  935. flex-direction: column;
  936. button.nav-item {
  937. &:not(:last-of-type) {
  938. margin-bottom: 10px;
  939. }
  940. }
  941. }
  942. #create-playlist {
  943. margin: 10px 10px 10px 10px;
  944. width: unset;
  945. }
  946. }
  947. .has-text-centered {
  948. text-align: center;
  949. }
  950. .select {
  951. position: relative;
  952. &:after {
  953. content: " ";
  954. border: 1.5px solid var(--primary-color);
  955. border-right: 0;
  956. border-top: 0;
  957. height: 7px;
  958. pointer-events: none;
  959. position: absolute;
  960. transform: rotate(-45deg);
  961. width: 7px;
  962. margin-top: -6px;
  963. right: 16px;
  964. top: 50%;
  965. }
  966. select {
  967. height: 36px;
  968. background-color: var(--white);
  969. border: 1px solid #dbdbdb;
  970. color: #363636;
  971. appearance: none;
  972. border-radius: 3px;
  973. font-size: 14px;
  974. line-height: 24px;
  975. padding-left: 8px;
  976. position: relative;
  977. padding-right: 36px;
  978. cursor: pointer;
  979. }
  980. }
  981. .button:focus,
  982. .button:active {
  983. border-color: var(--light-grey-2) !important;
  984. }
  985. .input:focus,
  986. .input:active,
  987. .textarea:focus,
  988. .textarea:active,
  989. .select select:focus,
  990. .select select:active {
  991. border-color: var(--primary-color) !important;
  992. }
  993. button.delete:focus {
  994. background-color: rgba(10, 10, 10, 0.3);
  995. }
  996. .tag {
  997. padding-right: 6px !important;
  998. }
  999. .button {
  1000. border: 1px solid #dbdbdb;
  1001. background-color: #fff;
  1002. color: #363636;
  1003. border-radius: 3px;
  1004. line-height: 24px;
  1005. align-items: center;
  1006. display: inline-flex;
  1007. font-size: 14px;
  1008. padding-left: 10px;
  1009. padding-right: 10px;
  1010. justify-content: center;
  1011. cursor: pointer;
  1012. user-select: none;
  1013. &:hover,
  1014. &:focus {
  1015. filter: brightness(95%);
  1016. }
  1017. &.is-success {
  1018. background-color: var(--green) !important;
  1019. border-width: 0;
  1020. color: white;
  1021. }
  1022. &.is-primary {
  1023. background-color: var(--primary-color) !important;
  1024. border-width: 0;
  1025. color: white;
  1026. }
  1027. &.is-danger {
  1028. background-color: var(--red) !important;
  1029. border-width: 0;
  1030. color: white;
  1031. }
  1032. &.is-info {
  1033. background-color: var(--primary-color) !important;
  1034. border-width: 0;
  1035. color: white;
  1036. }
  1037. &.is-warning {
  1038. background-color: var(--yellow) !important;
  1039. border-width: 0;
  1040. color: rgba(0, 0, 0, 0.7);
  1041. }
  1042. }
  1043. .input,
  1044. .textarea {
  1045. width: 100%;
  1046. padding-left: 8px;
  1047. padding-right: 8px;
  1048. line-height: 24px;
  1049. font-size: 14px;
  1050. border-radius: 3px;
  1051. box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);
  1052. border: 1px solid #dbdbdb;
  1053. }
  1054. .input,
  1055. .button {
  1056. height: 36px;
  1057. }
  1058. .textarea {
  1059. display: block;
  1060. line-height: 1.2;
  1061. padding: 10px;
  1062. max-height: 600px;
  1063. min-height: 120px;
  1064. min-width: 100%;
  1065. resize: vertical;
  1066. }
  1067. .icon {
  1068. height: 24px;
  1069. width: 24px;
  1070. line-height: 24px;
  1071. margin-left: 4px;
  1072. margin-right: -2px;
  1073. }
  1074. .fadein-helpbox-enter-active {
  1075. transition-duration: 0.3s;
  1076. transition-timing-function: ease-in;
  1077. }
  1078. .fadein-helpbox-leave-active {
  1079. transition-duration: 0.3s;
  1080. transition-timing-function: cubic-bezier(0, 1, 0.5, 1);
  1081. }
  1082. .fadein-helpbox-enter-to,
  1083. .fadein-helpbox-leave {
  1084. max-height: 100px;
  1085. overflow: hidden;
  1086. }
  1087. .fadein-helpbox-enter,
  1088. .fadein-helpbox-leave-to {
  1089. overflow: hidden;
  1090. max-height: 0;
  1091. }
  1092. .control {
  1093. margin-bottom: 5px !important;
  1094. &.is-grouped {
  1095. display: flex;
  1096. }
  1097. &.is-expanded {
  1098. flex: 1;
  1099. }
  1100. &.has-addons {
  1101. display: flex;
  1102. }
  1103. }
  1104. .input-with-button {
  1105. .control {
  1106. margin-right: 0px !important;
  1107. }
  1108. input,
  1109. select {
  1110. width: 100%;
  1111. height: 36px;
  1112. border-radius: 3px 0 0 3px;
  1113. border-right: 0;
  1114. border-color: var(--light-grey-3);
  1115. }
  1116. .button {
  1117. height: 36px;
  1118. border-radius: 0 3px 3px 0;
  1119. }
  1120. }
  1121. .page-title {
  1122. margin: 0 0 50px 0;
  1123. }
  1124. .material-icons {
  1125. user-select: none;
  1126. -webkit-user-select: none;
  1127. }
  1128. .icon-with-button {
  1129. margin-right: 3px;
  1130. font-size: 18px;
  1131. }
  1132. .verified-song {
  1133. font-size: 17px;
  1134. color: var(--primary-color);
  1135. }
  1136. .section-title,
  1137. h4.section-title {
  1138. font-size: 26px;
  1139. font-weight: 600;
  1140. margin: 0px;
  1141. }
  1142. .section-description {
  1143. font-size: 16px;
  1144. font-weight: 400;
  1145. margin-bottom: 10px !important;
  1146. }
  1147. .section-horizontal-rule {
  1148. margin: 15px 0 30px 0;
  1149. }
  1150. .section-margin-bottom {
  1151. height: 30px;
  1152. }
  1153. .margin-top-zero {
  1154. margin-top: 0 !important;
  1155. }
  1156. .margin-bottom-zero {
  1157. margin-bottom: 0 !important;
  1158. }
  1159. /** Universial items e.g. playlist items, queue items, activity items */
  1160. .item-draggable {
  1161. cursor: move;
  1162. }
  1163. .universal-item {
  1164. display: flex;
  1165. flex-direction: row;
  1166. flex-grow: 1;
  1167. align-items: center;
  1168. justify-content: space-between;
  1169. padding: 7.5px;
  1170. border: 1px solid var(--light-grey-3);
  1171. border-radius: 3px;
  1172. overflow: hidden;
  1173. .item-thumbnail {
  1174. width: 65px;
  1175. height: 65px;
  1176. margin: -7.5px;
  1177. border-radius: 3px 0 0 3px;
  1178. }
  1179. .item-title {
  1180. font-size: 20px;
  1181. overflow: hidden;
  1182. text-overflow: ellipsis;
  1183. white-space: nowrap;
  1184. }
  1185. .item-description {
  1186. font-size: 14px;
  1187. overflow: hidden;
  1188. text-overflow: ellipsis;
  1189. white-space: nowrap;
  1190. }
  1191. .universal-item-actions {
  1192. display: flex;
  1193. flex-direction: row;
  1194. margin-left: 10px;
  1195. justify-content: center;
  1196. @media screen and (max-width: 800px) {
  1197. flex-wrap: wrap;
  1198. }
  1199. .action-dropdown-icon {
  1200. display: flex;
  1201. color: var(--primary-color);
  1202. }
  1203. .icons-group {
  1204. display: flex;
  1205. align-items: center;
  1206. a {
  1207. padding: 0;
  1208. }
  1209. }
  1210. .button {
  1211. width: 146px;
  1212. }
  1213. i,
  1214. span {
  1215. cursor: pointer;
  1216. &:not(:first-child) {
  1217. margin-left: 5px;
  1218. }
  1219. }
  1220. .play-icon,
  1221. .added-to-playlist-icon {
  1222. color: var(--green);
  1223. }
  1224. .edit-icon,
  1225. .view-icon,
  1226. .add-to-playlist-icon,
  1227. .add-to-queue-icon {
  1228. color: var(--primary-color);
  1229. }
  1230. .hide-icon {
  1231. color: var(--light-grey-3);
  1232. }
  1233. .stop-icon,
  1234. .delete-icon {
  1235. color: var(--red);
  1236. }
  1237. .report-icon {
  1238. color: var(--yellow);
  1239. }
  1240. }
  1241. }
  1242. .save-button-mixin {
  1243. min-width: 200px;
  1244. &:disabled {
  1245. background-color: var(--light-grey) !important;
  1246. color: var(--black);
  1247. }
  1248. }
  1249. .save-button-transition-enter-active {
  1250. transition: all 0.1s ease;
  1251. }
  1252. .save-button-transition-enter {
  1253. transform: translateX(20px);
  1254. opacity: 0;
  1255. }
  1256. .youtube-icon {
  1257. margin-right: 3px;
  1258. height: 20px;
  1259. width: 20px;
  1260. -webkit-mask: url("/assets/social/youtube.svg") no-repeat center;
  1261. mask: url("/assets/social/youtube.svg") no-repeat center;
  1262. background-color: var(--youtube);
  1263. }
  1264. #forgot-password {
  1265. display: flex;
  1266. justify-content: flex-start;
  1267. margin: 5px 0;
  1268. }
  1269. .steps-fade-enter-active,
  1270. .steps-fade-leave-active {
  1271. transition: all 0.3s ease;
  1272. }
  1273. .steps-fade-enter-from,
  1274. .steps-fade-leave-to {
  1275. opacity: 0;
  1276. }
  1277. .skip-step {
  1278. background-color: var(--grey-3);
  1279. color: var(--white);
  1280. }
  1281. #steps {
  1282. display: flex;
  1283. align-items: center;
  1284. justify-content: center;
  1285. height: 50px;
  1286. margin-top: 36px;
  1287. @media screen and (max-width: 300px) {
  1288. display: none;
  1289. }
  1290. .step {
  1291. display: flex;
  1292. align-items: center;
  1293. justify-content: center;
  1294. border-radius: 100%;
  1295. border: 1px solid var(--dark-grey);
  1296. min-width: 50px;
  1297. min-height: 50px;
  1298. background-color: var(--white);
  1299. font-size: 30px;
  1300. user-select: none;
  1301. &.selected {
  1302. background-color: var(--primary-color);
  1303. color: var(--white) !important;
  1304. border: 0;
  1305. }
  1306. }
  1307. .divider {
  1308. display: flex;
  1309. justify-content: center;
  1310. width: 180px;
  1311. height: 1px;
  1312. background-color: var(--dark-grey);
  1313. }
  1314. }
  1315. /* This class is used for content-box in ResetPassword, but not in RemoveAccount. This is because ResetPassword uses transitions and RemoveAccount does not */
  1316. .content-box-wrapper {
  1317. position: relative;
  1318. width: 100%;
  1319. display: flex;
  1320. flex-direction: column;
  1321. align-items: center;
  1322. min-height: 200px;
  1323. .content-box {
  1324. position: absolute;
  1325. }
  1326. }
  1327. .content-box {
  1328. margin-top: 90px;
  1329. border-radius: 3px;
  1330. background-color: var(--white);
  1331. border: 1px solid var(--dark-grey);
  1332. max-width: 580px;
  1333. padding: 40px;
  1334. @media screen and (max-width: 300px) {
  1335. margin-top: 30px;
  1336. padding: 30px 20px;
  1337. }
  1338. }
  1339. .content-box-optional-helper {
  1340. margin-top: 15px;
  1341. color: var(--primary-color);
  1342. text-decoration: underline;
  1343. font-size: 16px;
  1344. a {
  1345. color: var(--primary-color);
  1346. }
  1347. }
  1348. .content-box-title {
  1349. font-size: 25px;
  1350. color: var(--black);
  1351. }
  1352. .content-box-description {
  1353. font-size: 14px;
  1354. color: var(--dark-grey);
  1355. }
  1356. .content-box-inputs {
  1357. margin-top: 35px;
  1358. .input-with-button {
  1359. .button {
  1360. width: 105px;
  1361. }
  1362. @media screen and (max-width: 450px) {
  1363. flex-direction: column;
  1364. }
  1365. }
  1366. label {
  1367. font-size: 11px;
  1368. }
  1369. #change-password-button {
  1370. margin-top: 36px;
  1371. width: 175px;
  1372. }
  1373. }
  1374. #password-visibility-container {
  1375. display: flex;
  1376. align-items: center;
  1377. a {
  1378. width: 0;
  1379. margin-left: -30px;
  1380. z-index: 0;
  1381. top: 2px;
  1382. position: relative;
  1383. color: var(--light-grey-1);
  1384. }
  1385. }
  1386. .news-item {
  1387. font-family: "Karla";
  1388. border-radius: 5px;
  1389. padding: 20px;
  1390. border: unset !important;
  1391. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  1392. * {
  1393. font-family: Karla, Arial, sans-serif;
  1394. font-size: 16px;
  1395. }
  1396. h1 {
  1397. font-size: 40px;
  1398. &:first-of-type {
  1399. margin-top: 0;
  1400. }
  1401. }
  1402. h2 {
  1403. font-size: 30px;
  1404. }
  1405. h3 {
  1406. font-size: 25px;
  1407. }
  1408. h4,
  1409. h5,
  1410. h6 {
  1411. font-size: 20px;
  1412. }
  1413. h1,
  1414. h2,
  1415. h3,
  1416. h4,
  1417. h5,
  1418. h6 {
  1419. margin: 10px 0;
  1420. }
  1421. ul {
  1422. list-style: unset;
  1423. }
  1424. li {
  1425. margin-left: 30px;
  1426. }
  1427. blockquote {
  1428. padding: 0px 15px;
  1429. color: #6a737d;
  1430. border-left: 0.25em solid #dfe2e5;
  1431. }
  1432. code {
  1433. font-style: italic;
  1434. }
  1435. }
  1436. .checkbox-control {
  1437. display: flex;
  1438. flex-direction: row;
  1439. align-items: center;
  1440. p {
  1441. margin-left: 10px;
  1442. }
  1443. .switch {
  1444. position: relative;
  1445. display: inline-block;
  1446. flex-shrink: 0;
  1447. width: 40px;
  1448. height: 24px;
  1449. }
  1450. .switch input {
  1451. opacity: 0;
  1452. width: 0;
  1453. height: 0;
  1454. }
  1455. .slider {
  1456. position: absolute;
  1457. cursor: pointer;
  1458. top: 0;
  1459. left: 0;
  1460. right: 0;
  1461. bottom: 0;
  1462. background-color: #ccc;
  1463. transition: 0.2s;
  1464. border-radius: 34px;
  1465. }
  1466. .slider:before {
  1467. position: absolute;
  1468. content: "";
  1469. height: 16px;
  1470. width: 16px;
  1471. left: 4px;
  1472. bottom: 4px;
  1473. background-color: white;
  1474. transition: 0.2s;
  1475. border-radius: 50%;
  1476. }
  1477. input:checked + .slider {
  1478. background-color: var(--primary-color);
  1479. }
  1480. input:focus + .slider {
  1481. box-shadow: 0 0 1px var(--primary-color);
  1482. }
  1483. input:checked + .slider:before {
  1484. transform: translateX(16px);
  1485. }
  1486. }
  1487. </style>