Home.vue 26 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246
  1. <template>
  2. <div>
  3. <metadata title="Home" />
  4. <div class="app">
  5. <main-header
  6. :hide-logo="true"
  7. :transparent="true"
  8. :hide-logged-out="true"
  9. />
  10. <div class="header" :class="{ loggedIn }">
  11. <img class="background" src="/assets/homebg.jpeg" />
  12. <div class="overlay"></div>
  13. <div class="content-container">
  14. <div class="content">
  15. <img
  16. class="logo"
  17. src="/assets/white_wordmark.png"
  18. :alt="`${this.siteName}` || `Musare`"
  19. />
  20. <div v-if="!loggedIn" class="buttons">
  21. <button
  22. class="button login"
  23. @click="
  24. openModal({
  25. sector: 'header',
  26. modal: 'login'
  27. })
  28. "
  29. >
  30. Login
  31. </button>
  32. <button
  33. class="button register"
  34. @click="
  35. openModal({
  36. sector: 'header',
  37. modal: 'register'
  38. })
  39. "
  40. >
  41. Register
  42. </button>
  43. </div>
  44. </div>
  45. </div>
  46. </div>
  47. <div v-if="favoriteStations.length > 0" class="group">
  48. <div class="group-title">
  49. <div>
  50. <h2>My Favorites</h2>
  51. </div>
  52. </div>
  53. <draggable
  54. class="scrollable-list"
  55. v-model="favoriteStations"
  56. v-bind="dragOptions"
  57. @start="drag = true"
  58. @end="drag = false"
  59. @change="changeFavoriteOrder"
  60. >
  61. <transition-group
  62. type="transition"
  63. :name="!drag ? 'draggable-list-transition' : null"
  64. >
  65. <router-link
  66. v-for="(station, index) in favoriteStations"
  67. :key="`key-${index}`"
  68. :to="{
  69. name: 'station',
  70. params: { id: station.name }
  71. }"
  72. :class="{
  73. card: true,
  74. 'station-card': true,
  75. 'item-draggable': true,
  76. isPrivate: station.privacy === 'private',
  77. isMine: isOwner(station)
  78. }"
  79. :style="
  80. '--primary-color: var(--' + station.theme + ')'
  81. "
  82. >
  83. <song-thumbnail
  84. class="card-image"
  85. :song="station.currentSong"
  86. />
  87. <div class="card-content">
  88. <div class="media">
  89. <div class="media-left displayName">
  90. <i
  91. v-if="
  92. loggedIn && !station.isFavorited
  93. "
  94. @click.prevent="
  95. favoriteStation(station)
  96. "
  97. class="favorite material-icons"
  98. content="Favorite Station"
  99. v-tippy
  100. >star_border</i
  101. >
  102. <i
  103. v-if="
  104. loggedIn && station.isFavorited
  105. "
  106. @click.prevent="
  107. unfavoriteStation(station)
  108. "
  109. class="favorite material-icons"
  110. content="Unfavorite Station"
  111. v-tippy
  112. >star</i
  113. >
  114. <h5>{{ station.displayName }}</h5>
  115. <i
  116. v-if="station.type === 'official'"
  117. class="material-icons verified-station"
  118. content="Verified Station"
  119. v-tippy
  120. >
  121. check_circle
  122. </i>
  123. </div>
  124. </div>
  125. <div class="content">
  126. {{ station.description }}
  127. </div>
  128. <div class="under-content">
  129. <p class="hostedBy">
  130. Hosted by
  131. <span class="host">
  132. <span
  133. v-if="
  134. station.type === 'official'
  135. "
  136. title="Musare"
  137. >Musare</span
  138. >
  139. <user-id-to-username
  140. v-else
  141. :user-id="station.owner"
  142. :link="true"
  143. />
  144. </span>
  145. </p>
  146. <div class="icons">
  147. <i
  148. v-if="
  149. station.type === 'community' &&
  150. isOwner(station)
  151. "
  152. class="homeIcon material-icons"
  153. content="This is your station."
  154. v-tippy
  155. >home</i
  156. >
  157. <i
  158. v-if="station.privacy === 'private'"
  159. class="privateIcon material-icons"
  160. content="This station is not visible to other users."
  161. v-tippy
  162. >lock</i
  163. >
  164. <i
  165. v-if="
  166. station.privacy === 'unlisted'
  167. "
  168. class="unlistedIcon material-icons"
  169. content="Unlisted Station"
  170. v-tippy
  171. >link</i
  172. >
  173. </div>
  174. </div>
  175. </div>
  176. <div class="bottomBar">
  177. <i
  178. v-if="
  179. station.paused &&
  180. station.currentSong.title
  181. "
  182. class="material-icons"
  183. content="Station Paused"
  184. v-tippy
  185. >pause</i
  186. >
  187. <i
  188. v-else-if="station.currentSong.title"
  189. class="material-icons"
  190. >music_note</i
  191. >
  192. <i v-else class="material-icons">music_off</i>
  193. <span
  194. v-if="station.currentSong.title"
  195. class="songTitle"
  196. :title="
  197. station.currentSong.artists.length > 0
  198. ? 'Now Playing: ' +
  199. station.currentSong.title +
  200. ' by ' +
  201. station.currentSong.artists.join(
  202. ','
  203. )
  204. : 'Now Playing: ' +
  205. station.currentSong.title
  206. "
  207. >{{ station.currentSong.title }}
  208. {{
  209. station.currentSong.artists.length > 0
  210. ? " by " +
  211. station.currentSong.artists.join(
  212. ","
  213. )
  214. : ""
  215. }}</span
  216. >
  217. <span v-else class="songTitle"
  218. >No Songs Playing</span
  219. >
  220. <i
  221. class="material-icons stationMode"
  222. :content="
  223. station.partyMode
  224. ? 'Station in Party mode'
  225. : 'Station in Playlist mode'
  226. "
  227. v-tippy
  228. >{{
  229. station.partyMode
  230. ? "emoji_people"
  231. : "playlist_play"
  232. }}</i
  233. >
  234. </div>
  235. </router-link>
  236. </transition-group>
  237. </draggable>
  238. </div>
  239. <div class="group bottom">
  240. <div class="group-title">
  241. <div>
  242. <h1>Stations</h1>
  243. </div>
  244. </div>
  245. <a
  246. v-if="loggedIn"
  247. @click="
  248. openModal({
  249. sector: 'home',
  250. modal: 'createCommunityStation'
  251. })
  252. "
  253. class="card station-card createStation"
  254. >
  255. <div class="card-image">
  256. <figure class="image is-square">
  257. <i class="material-icons">radio</i>
  258. </figure>
  259. </div>
  260. <div class="card-content">
  261. <div class="media">
  262. <div class="media-left displayName">
  263. <h5>Create Station</h5>
  264. </div>
  265. </div>
  266. <div class="content">
  267. Click here to create your own station!
  268. </div>
  269. </div>
  270. <div class="bottomBar"></div>
  271. </a>
  272. <a
  273. v-else
  274. @click="
  275. openModal({
  276. sector: 'header',
  277. modal: 'login'
  278. })
  279. "
  280. class="card station-card createStation"
  281. >
  282. <div class="card-image">
  283. <figure class="image is-square">
  284. <i class="material-icons">radio</i>
  285. </figure>
  286. </div>
  287. <div class="card-content">
  288. <div class="media">
  289. <div class="media-left displayName">
  290. <h5>Create Station</h5>
  291. </div>
  292. </div>
  293. <div class="content">Login to create a station!</div>
  294. </div>
  295. <div class="bottomBar"></div>
  296. </a>
  297. <router-link
  298. v-for="(station, index) in filteredStations"
  299. :key="index"
  300. :to="{
  301. name: 'station',
  302. params: { id: station.name }
  303. }"
  304. class="card station-card"
  305. :class="{
  306. isPrivate: station.privacy === 'private',
  307. isMine: isOwner(station)
  308. }"
  309. :style="'--primary-color: var(--' + station.theme + ')'"
  310. >
  311. <song-thumbnail
  312. class="card-image"
  313. :song="station.currentSong"
  314. />
  315. <div class="card-content">
  316. <div class="media">
  317. <div class="media-left displayName">
  318. <i
  319. v-if="loggedIn && !station.isFavorited"
  320. @click.prevent="favoriteStation(station)"
  321. class="favorite material-icons"
  322. content="Favorite Station"
  323. v-tippy
  324. >star_border</i
  325. >
  326. <i
  327. v-if="loggedIn && station.isFavorited"
  328. @click.prevent="unfavoriteStation(station)"
  329. class="favorite material-icons"
  330. content="Unfavorite Station"
  331. v-tippy
  332. >star</i
  333. >
  334. <h5>{{ station.displayName }}</h5>
  335. <i
  336. v-if="station.type === 'official'"
  337. class="material-icons verified-station"
  338. content="Verified Station"
  339. v-tippy
  340. >
  341. check_circle
  342. </i>
  343. </div>
  344. </div>
  345. <div class="content">
  346. {{ station.description }}
  347. </div>
  348. <div class="under-content">
  349. <p class="hostedBy">
  350. Hosted by
  351. <span class="host">
  352. <span
  353. v-if="station.type === 'official'"
  354. title="Musare"
  355. >Musare</span
  356. >
  357. <user-id-to-username
  358. v-else
  359. :user-id="station.owner"
  360. :link="true"
  361. />
  362. </span>
  363. </p>
  364. <div class="icons">
  365. <i
  366. v-if="
  367. station.type === 'community' &&
  368. isOwner(station)
  369. "
  370. class="homeIcon material-icons"
  371. content="This is your station."
  372. v-tippy
  373. >home</i
  374. >
  375. <i
  376. v-if="station.privacy === 'private'"
  377. class="privateIcon material-icons"
  378. content="This station is not visible to other users."
  379. v-tippy
  380. >lock</i
  381. >
  382. <i
  383. v-if="station.privacy === 'unlisted'"
  384. class="unlistedIcon material-icons"
  385. content="Unlisted Station"
  386. v-tippy
  387. >link</i
  388. >
  389. </div>
  390. </div>
  391. </div>
  392. <div class="bottomBar">
  393. <i
  394. v-if="station.paused && station.currentSong.title"
  395. class="material-icons"
  396. content="Station Paused"
  397. v-tippy
  398. >pause</i
  399. >
  400. <i
  401. v-else-if="station.currentSong.title"
  402. class="material-icons"
  403. >music_note</i
  404. >
  405. <i v-else class="material-icons">music_off</i>
  406. <span
  407. v-if="station.currentSong.title"
  408. class="songTitle"
  409. :title="
  410. station.currentSong.artists.length > 0
  411. ? 'Now Playing: ' +
  412. station.currentSong.title +
  413. ' by ' +
  414. station.currentSong.artists.join(',')
  415. : 'Now Playing: ' +
  416. station.currentSong.title
  417. "
  418. >{{ station.currentSong.title }}
  419. {{
  420. station.currentSong.artists.length > 0
  421. ? " by " +
  422. station.currentSong.artists.join(",")
  423. : ""
  424. }}</span
  425. >
  426. <span v-else class="songTitle">No Songs Playing</span>
  427. <i
  428. class="material-icons stationMode"
  429. :content="
  430. station.partyMode
  431. ? 'Station in Party mode'
  432. : 'Station in Playlist mode'
  433. "
  434. v-tippy
  435. >{{
  436. station.partyMode
  437. ? "emoji_people"
  438. : "playlist_play"
  439. }}</i
  440. >
  441. </div>
  442. </router-link>
  443. <h4 v-if="stations.length === 0">
  444. There are no stations to display
  445. </h4>
  446. </div>
  447. <main-footer />
  448. </div>
  449. <create-community-station v-if="modals.createCommunityStation" />
  450. </div>
  451. </template>
  452. <script>
  453. import { mapState, mapGetters, mapActions } from "vuex";
  454. import draggable from "vuedraggable";
  455. import Toast from "toasters";
  456. import MainHeader from "@/components/layout/MainHeader.vue";
  457. import MainFooter from "@/components/layout/MainFooter.vue";
  458. import SongThumbnail from "@/components/SongThumbnail.vue";
  459. import UserIdToUsername from "@/components/UserIdToUsername.vue";
  460. import ws from "@/ws";
  461. export default {
  462. components: {
  463. MainHeader,
  464. MainFooter,
  465. SongThumbnail,
  466. CreateCommunityStation: () =>
  467. import("@/components/modals/CreateCommunityStation.vue"),
  468. UserIdToUsername,
  469. draggable
  470. },
  471. data() {
  472. return {
  473. recaptcha: { key: "" },
  474. stations: [],
  475. favoriteStations: [],
  476. searchQuery: "",
  477. siteName: "Musare",
  478. orderOfFavoriteStations: [],
  479. drag: false
  480. };
  481. },
  482. computed: {
  483. ...mapState({
  484. loggedIn: state => state.user.auth.loggedIn,
  485. userId: state => state.user.auth.userId,
  486. modals: state => state.modalVisibility.modals.home
  487. }),
  488. ...mapGetters({
  489. socket: "websockets/getSocket"
  490. }),
  491. filteredStations() {
  492. const privacyOrder = ["public", "unlisted", "private"];
  493. return this.stations
  494. .filter(
  495. station =>
  496. JSON.stringify(Object.values(station)).indexOf(
  497. this.searchQuery
  498. ) !== -1
  499. )
  500. .sort(
  501. (a, b) =>
  502. this.isOwner(b) - this.isOwner(a) ||
  503. this.isPlaying(b) - this.isPlaying(a) ||
  504. a.paused - b.paused ||
  505. privacyOrder.indexOf(a.privacy) -
  506. privacyOrder.indexOf(b.privacy) ||
  507. b.userCount - a.userCount
  508. );
  509. },
  510. dragOptions() {
  511. return {
  512. animation: 200,
  513. group: "favoriteStations",
  514. disabled: false,
  515. ghostClass: "draggable-list-ghost"
  516. };
  517. }
  518. },
  519. watch: {
  520. orderOfFavoriteStations() {
  521. this.calculateFavoriteStations();
  522. }
  523. },
  524. async mounted() {
  525. this.siteName = await lofig.get("siteSettings.siteName");
  526. if (this.socket.readyState === 1) this.init();
  527. ws.onConnect(() => this.init());
  528. this.socket.on("event:stations.created", res => {
  529. const station = res.data;
  530. if (this.stations.find(_station => _station._id === station._id)) {
  531. this.stations.forEach(s => {
  532. const _station = s;
  533. if (_station._id === station._id) {
  534. _station.privacy = station.privacy;
  535. }
  536. });
  537. } else {
  538. if (!station.currentSong)
  539. station.currentSong = {
  540. thumbnail: "/assets/notes-transparent.png"
  541. };
  542. if (station.currentSong && !station.currentSong.thumbnail)
  543. station.currentSong.ytThumbnail = `https://img.youtube.com/vi/${station.currentSong.youtubeId}/mqdefault.jpg`;
  544. this.stations.push(station);
  545. }
  546. });
  547. this.socket.on("event:station.removed", res => {
  548. const { stationId } = res.data;
  549. const station = this.stations.find(
  550. station => station._id === stationId
  551. );
  552. if (station) {
  553. const stationIndex = this.stations.indexOf(station);
  554. this.stations.splice(stationIndex, 1);
  555. if (station.isFavorited)
  556. this.orderOfFavoriteStations.filter(
  557. favoritedId => favoritedId !== stationId
  558. );
  559. }
  560. });
  561. this.socket.on("event:userCount.updated", res => {
  562. const station = this.stations.find(
  563. station => station._id === res.data.stationId
  564. );
  565. if (station) station.userCount = res.data.userCount;
  566. });
  567. this.socket.on("event:station.updatePrivacy", res => {
  568. const station = this.stations.find(
  569. station => station._id === res.data.stationId
  570. );
  571. if (station) station.privacy = res.data.privacy;
  572. });
  573. this.socket.on("event:station.updateName", res => {
  574. const station = this.stations.find(
  575. station => station._id === res.data.stationId
  576. );
  577. if (station) station.name = res.data.name;
  578. });
  579. this.socket.on("event:station.updateDisplayName", res => {
  580. const station = this.stations.find(
  581. station => station._id === res.data.stationId
  582. );
  583. if (station) station.displayName = res.data.displayName;
  584. });
  585. this.socket.on("event:station.updateDescription", res => {
  586. const station = this.stations.find(
  587. station => station._id === res.data.stationId
  588. );
  589. if (station) station.description = res.data.description;
  590. });
  591. this.socket.on("event:station.updateTheme", res => {
  592. const station = this.stations.find(
  593. station => station._id === res.stationId
  594. );
  595. if (station) station.theme = res.theme;
  596. });
  597. this.socket.on("event:station.nextSong", res => {
  598. const station = this.stations.find(
  599. station => station._id === res.data.stationId
  600. );
  601. if (station) {
  602. let newSong = res.data.song;
  603. if (!newSong)
  604. newSong = {
  605. thumbnail: "/assets/notes-transparent.png"
  606. };
  607. station.currentSong = newSong;
  608. }
  609. });
  610. this.socket.on("event:station.pause", res => {
  611. const station = this.stations.find(
  612. station => station._id === res.data.stationId
  613. );
  614. if (station) station.paused = true;
  615. });
  616. this.socket.on("event:station.resume", res => {
  617. const station = this.stations.find(
  618. station => station._id === res.data.stationId
  619. );
  620. if (station) station.paused = false;
  621. });
  622. this.socket.on("event:user.favoritedStation", res => {
  623. const { stationId } = res.data;
  624. const station = this.stations.find(
  625. station => station._id === stationId
  626. );
  627. if (station) {
  628. station.isFavorited = true;
  629. this.orderOfFavoriteStations.push(stationId);
  630. }
  631. });
  632. this.socket.on("event:user.unfavoritedStation", res => {
  633. const { stationId } = res.data;
  634. const station = this.stations.find(
  635. station => station._id === stationId
  636. );
  637. if (station) {
  638. station.isFavorited = false;
  639. this.orderOfFavoriteStations = this.orderOfFavoriteStations.filter(
  640. favoritedId => favoritedId !== stationId
  641. );
  642. }
  643. });
  644. this.socket.on("event:user.orderOfFavoriteStations.changed", res => {
  645. this.orderOfFavoriteStations = res.data.order;
  646. });
  647. },
  648. methods: {
  649. init() {
  650. this.socket.dispatch("stations.index", res => {
  651. this.stations = [];
  652. if (res.status === "success") {
  653. res.data.stations.forEach(station => {
  654. const modifiableStation = station;
  655. if (!modifiableStation.currentSong)
  656. modifiableStation.currentSong = {
  657. thumbnail: "/assets/notes-transparent.png"
  658. };
  659. if (
  660. modifiableStation.currentSong &&
  661. !modifiableStation.currentSong.thumbnail
  662. )
  663. modifiableStation.currentSong.ytThumbnail = `https://img.youtube.com/vi/${station.currentSong.youtubeId}/mqdefault.jpg`;
  664. this.stations.push(modifiableStation);
  665. });
  666. this.orderOfFavoriteStations = res.data.favorited;
  667. }
  668. });
  669. this.socket.dispatch("apis.joinRoom", "home", () => {});
  670. },
  671. isOwner(station) {
  672. return station.owner === this.userId;
  673. },
  674. isPlaying(station) {
  675. return typeof station.currentSong.title !== "undefined";
  676. },
  677. favoriteStation(station) {
  678. this.socket.dispatch(
  679. "stations.favoriteStation",
  680. station._id,
  681. res => {
  682. if (res.status === "success") {
  683. new Toast("Successfully favorited station.");
  684. } else new Toast(res.message);
  685. }
  686. );
  687. },
  688. unfavoriteStation(station) {
  689. this.socket.dispatch(
  690. "stations.unfavoriteStation",
  691. station._id,
  692. res => {
  693. if (res.status === "success") {
  694. new Toast("Successfully unfavorited station.");
  695. } else new Toast(res.message);
  696. }
  697. );
  698. },
  699. calculateFavoriteStations() {
  700. this.favoriteStations = this.filteredStations
  701. .filter(station => station.isFavorited === true)
  702. .sort(
  703. (a, b) =>
  704. this.orderOfFavoriteStations.indexOf(a._id) -
  705. this.orderOfFavoriteStations.indexOf(b._id)
  706. );
  707. },
  708. changeFavoriteOrder() {
  709. const recalculatedOrder = [];
  710. this.favoriteStations.forEach(station =>
  711. recalculatedOrder.push(station._id)
  712. );
  713. this.socket.dispatch(
  714. "users.updateOrderOfFavoriteStations",
  715. recalculatedOrder,
  716. res => {
  717. return new Toast(res.message);
  718. }
  719. );
  720. },
  721. ...mapActions("modalVisibility", ["openModal"]),
  722. ...mapActions("station", ["updateIfStationIsFavorited"])
  723. }
  724. };
  725. </script>
  726. <style lang="scss">
  727. * {
  728. box-sizing: border-box;
  729. }
  730. html {
  731. width: 100%;
  732. height: 100%;
  733. color: rgba(0, 0, 0, 0.87);
  734. body {
  735. width: 100%;
  736. height: 100%;
  737. margin: 0;
  738. padding: 0;
  739. }
  740. }
  741. .night-mode {
  742. .header .overlay {
  743. background: linear-gradient(
  744. 180deg,
  745. rgba(34, 34, 34, 0.8) 0%,
  746. rgba(34, 34, 34, 0.95) 31.25%,
  747. rgba(34, 34, 34, 0.9) 54.17%,
  748. rgba(34, 34, 34, 0.8) 100%
  749. );
  750. }
  751. .card,
  752. .card-content,
  753. .card-content div {
  754. background-color: var(--dark-grey-3);
  755. }
  756. .card-content .icons i,
  757. .group-title i {
  758. color: var(--light-grey-2);
  759. }
  760. .card-image.thumbnail {
  761. background-color: var(--dark-grey-2);
  762. }
  763. .card-content .under-content .hostedBy {
  764. color: var(--light-grey-2);
  765. }
  766. }
  767. @media only screen and (min-width: 1200px) {
  768. html {
  769. font-size: 15px;
  770. }
  771. }
  772. @media only screen and (min-width: 992px) {
  773. html {
  774. font-size: 14.5px;
  775. }
  776. }
  777. @media only screen and (min-width: 0) {
  778. html {
  779. font-size: 14px;
  780. }
  781. }
  782. .header {
  783. display: flex;
  784. height: 35vh;
  785. margin-top: -64px;
  786. border-radius: 0% 0% 33% 33% / 0% 0% 7% 7%;
  787. img.background {
  788. height: 35vh;
  789. width: 100%;
  790. object-fit: cover;
  791. object-position: center;
  792. filter: blur(1px);
  793. border-radius: 0% 0% 33% 33% / 0% 0% 7% 7%;
  794. overflow: hidden;
  795. }
  796. .overlay {
  797. background: linear-gradient(
  798. 180deg,
  799. rgba(3, 169, 244, 0.8) 0%,
  800. rgba(3, 169, 244, 0.95) 31.25%,
  801. rgba(3, 169, 244, 0.9) 54.17%,
  802. rgba(3, 169, 244, 0.8) 100%
  803. );
  804. position: absolute;
  805. height: 35vh;
  806. width: 100%;
  807. border-radius: 0% 0% 33% 33% / 0% 0% 7% 7%;
  808. overflow: hidden;
  809. }
  810. .content-container {
  811. position: absolute;
  812. left: 0;
  813. right: 0;
  814. margin-left: auto;
  815. margin-right: auto;
  816. text-align: center;
  817. height: 100%;
  818. height: 35vh;
  819. .content {
  820. position: absolute;
  821. top: 50%;
  822. left: 0;
  823. right: 0;
  824. transform: translateY(-50%);
  825. background-color: transparent !important;
  826. img.logo {
  827. max-height: 90px;
  828. font-size: 40px;
  829. color: var(--white);
  830. font-family: Pacifico, cursive;
  831. }
  832. .buttons {
  833. display: flex;
  834. justify-content: center;
  835. margin-top: 20px;
  836. flex-wrap: wrap;
  837. .login,
  838. .register {
  839. margin: 5px 10px;
  840. padding: 10px 15px;
  841. border-radius: 5px;
  842. font-size: 18px;
  843. width: 100%;
  844. max-width: 250px;
  845. font-weight: 600;
  846. border: 0;
  847. height: inherit;
  848. }
  849. .login {
  850. background: var(--white);
  851. color: var(--primary-color);
  852. }
  853. .register {
  854. background: var(--purple);
  855. color: var(--white);
  856. }
  857. }
  858. }
  859. }
  860. &.loggedIn {
  861. height: 20vh;
  862. .overlay,
  863. .content-container,
  864. img.background {
  865. height: 20vh;
  866. }
  867. }
  868. }
  869. @media only screen and (max-width: 550px) {
  870. .header {
  871. height: 45vh;
  872. .overlay,
  873. .content-container,
  874. img.background {
  875. height: 45vh;
  876. }
  877. }
  878. }
  879. .under-content {
  880. height: 20px;
  881. position: relative;
  882. line-height: 1;
  883. font-size: 24px;
  884. display: flex;
  885. align-items: center;
  886. text-align: left;
  887. margin-top: 10px;
  888. p {
  889. font-size: 15px;
  890. line-height: 15px;
  891. display: inline;
  892. }
  893. i {
  894. font-size: 20px;
  895. }
  896. * {
  897. z-index: 10;
  898. position: relative;
  899. }
  900. .icons {
  901. position: absolute;
  902. right: 0;
  903. .material-icons {
  904. font-size: 22px;
  905. }
  906. .material-icons:first-child {
  907. margin-left: 5px;
  908. }
  909. .unlistedIcon {
  910. color: var(--orange);
  911. }
  912. .privateIcon {
  913. color: var(--dark-pink);
  914. }
  915. .homeIcon {
  916. color: var(--light-purple);
  917. }
  918. }
  919. .hostedBy {
  920. font-weight: 400;
  921. font-size: 12px;
  922. color: var(--black);
  923. .host,
  924. .host a {
  925. font-weight: 400;
  926. color: var(--primary-color);
  927. &:hover,
  928. &:focus {
  929. filter: brightness(90%);
  930. }
  931. }
  932. }
  933. }
  934. .app {
  935. display: flex;
  936. flex-direction: column;
  937. }
  938. .users-count {
  939. font-size: 20px;
  940. position: relative;
  941. top: -4px;
  942. }
  943. .group {
  944. min-height: 64px;
  945. flex: 1 0 auto;
  946. }
  947. .station-card {
  948. display: inline-flex;
  949. flex-direction: row;
  950. overflow: hidden;
  951. margin: 10px;
  952. cursor: pointer;
  953. height: 150px;
  954. width: calc(100% - 30px);
  955. max-width: 400px;
  956. flex-wrap: wrap;
  957. border-radius: 5px;
  958. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  959. transition: all ease-in-out 0.2s;
  960. .card-content {
  961. padding: 10px 10px 10px 15px;
  962. display: flex;
  963. flex-direction: column;
  964. flex-grow: 1;
  965. -webkit-line-clamp: 2;
  966. .media {
  967. display: flex;
  968. align-items: center;
  969. margin-bottom: 0;
  970. .displayName {
  971. display: flex;
  972. align-items: center;
  973. width: 100%;
  974. overflow: hidden;
  975. text-overflow: ellipsis;
  976. display: flex;
  977. line-height: 30px;
  978. max-height: 30px;
  979. .favorite {
  980. position: absolute;
  981. color: var(--yellow);
  982. right: 10px;
  983. top: 10px;
  984. font-size: 28px;
  985. }
  986. h5 {
  987. font-size: 20px;
  988. font-weight: 400;
  989. margin: 0;
  990. display: inline;
  991. margin-right: 6px;
  992. line-height: 30px;
  993. text-overflow: ellipsis;
  994. overflow: hidden;
  995. white-space: nowrap;
  996. max-width: 200px;
  997. }
  998. i {
  999. font-size: 22px;
  1000. }
  1001. .verified-station {
  1002. color: var(--primary-color);
  1003. }
  1004. }
  1005. }
  1006. .content {
  1007. word-wrap: break-word;
  1008. overflow: hidden;
  1009. text-overflow: ellipsis;
  1010. display: -webkit-box;
  1011. -webkit-box-orient: vertical;
  1012. -webkit-line-clamp: 3;
  1013. line-height: 20px;
  1014. flex-grow: 1;
  1015. text-align: left;
  1016. word-wrap: break-word;
  1017. margin-bottom: 0;
  1018. }
  1019. }
  1020. .card-image.thumbnail {
  1021. min-width: 120px;
  1022. width: 120px;
  1023. height: 120px;
  1024. margin: 0;
  1025. }
  1026. .bottomBar {
  1027. position: relative;
  1028. display: flex;
  1029. align-items: center;
  1030. background: var(--primary-color);
  1031. // box-shadow: inset 0px 2px 4px rgba(100, 100, 100, 0.3);
  1032. width: 100%;
  1033. height: 30px;
  1034. line-height: 30px;
  1035. color: var(--white);
  1036. font-weight: 400;
  1037. font-size: 12px;
  1038. padding: 0 5px;
  1039. flex-basis: 100%;
  1040. i.material-icons {
  1041. vertical-align: middle;
  1042. margin-left: 5px;
  1043. font-size: 22px;
  1044. }
  1045. .songTitle {
  1046. text-align: left;
  1047. vertical-align: middle;
  1048. margin-left: 5px;
  1049. line-height: 30px;
  1050. flex: 2 1 0;
  1051. overflow: hidden;
  1052. text-overflow: ellipsis;
  1053. white-space: nowrap;
  1054. }
  1055. }
  1056. &.createStation {
  1057. height: auto;
  1058. .card-image {
  1059. .image.is-square {
  1060. width: 120px;
  1061. @media screen and (max-width: 330px) {
  1062. width: 50px;
  1063. .material-icons {
  1064. font-size: 35px !important;
  1065. }
  1066. }
  1067. .material-icons {
  1068. position: absolute;
  1069. top: 25px;
  1070. bottom: 25px;
  1071. left: 0;
  1072. right: 0;
  1073. text-align: center;
  1074. font-size: 70px;
  1075. color: var(--primary-color);
  1076. }
  1077. }
  1078. }
  1079. .card-content {
  1080. width: min-content;
  1081. .media {
  1082. margin-top: auto;
  1083. .displayName h5 {
  1084. font-weight: 600;
  1085. }
  1086. }
  1087. .content {
  1088. flex-grow: unset;
  1089. margin-bottom: auto;
  1090. }
  1091. }
  1092. }
  1093. }
  1094. .station-card:hover {
  1095. box-shadow: 0 2px 3px rgba(10, 10, 10, 0.3), 0 0 10px rgba(10, 10, 10, 0.3);
  1096. transition: all ease-in-out 0.2s;
  1097. }
  1098. .community-button {
  1099. cursor: pointer;
  1100. transition: 0.25s ease color;
  1101. font-size: 30px;
  1102. color: var(--dark-grey);
  1103. }
  1104. .community-button:hover {
  1105. color: var(--primary-color);
  1106. }
  1107. .station-privacy {
  1108. text-transform: capitalize;
  1109. }
  1110. .label {
  1111. display: flex;
  1112. }
  1113. .g-recaptcha {
  1114. display: flex;
  1115. justify-content: center;
  1116. margin-top: 20px;
  1117. }
  1118. .group {
  1119. text-align: center;
  1120. width: 100%;
  1121. margin: 10px 0;
  1122. .group-title {
  1123. display: flex;
  1124. align-items: center;
  1125. justify-content: center;
  1126. margin: 25px 0;
  1127. h1 {
  1128. display: inline-block;
  1129. font-size: 45px;
  1130. margin: 0;
  1131. }
  1132. h2 {
  1133. font-size: 35px;
  1134. margin: 0;
  1135. }
  1136. a {
  1137. display: flex;
  1138. margin-left: 8px;
  1139. }
  1140. }
  1141. &.bottom {
  1142. margin-bottom: 40px;
  1143. }
  1144. }
  1145. </style>