index.vue 25 KB

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