Commit e76f1896 authored by SpinShare's avatar SpinShare

added songdetail 2.0, added placeholder support page

parent 2d38019b
......@@ -12,8 +12,12 @@
overflow: hidden;
}
.section-song-detail .song-detail .song-meta .cover {
height: 100%;
width: 50px;
margin-left: 10px;
align-self: center;
justify-self: center;
height: 64px;
width: 64px;
border-radius: 4px;
background-position: center;
background-size: cover;
}
......
......@@ -13,8 +13,12 @@
overflow: hidden;
& .cover {
height: 100%;
width: 50px;
margin-left: 10px;
align-self: center;
justify-self: center;
height: 64px;
width: 64px;
border-radius: 4px;
background-position: center;
background-size: cover;
}
......
......@@ -231,10 +231,12 @@ class APIController extends AbstractController
$data['hasExtremeDifficulty'] = $result->getHasExtremeDifficulty();
$data['hasXDDifficulty'] = $result->getHasXDDifficulty();
$data['uploader'] = $result->getUploader();
$data['uploadDate'] = $result->getUploadDate();
$data['tags'] = explode(",", $result->getTags());
$data['paths']['ogg'] = $baseUrl."/uploads/audio/".$result->getFileReference()."_0.ogg";
$data['paths']['cover'] = $baseUrl."/uploads/cover/".$result->getFileReference().".png";
$data['paths']['zip'] = $this->generateUrl('api.songs.download', array('id' => $result->getId()), UrlGeneratorInterface::ABSOLUTE_URL);
$data['description'] = $result->getDescription();
$data['views'] = $result->getViews();
$data['downloads'] = $result->getDownloads();
......
......@@ -40,6 +40,20 @@ class IndexController extends AbstractController
return $this->render('index/index.html.twig', $data);
}
/**
* @Route("/support", name="index.support")
*/
public function support(Request $request)
{
$em = $this->getDoctrine()->getManager();
$data = [];
$patreons = $em->getRepository(User::class)->findBy(array('isPatreon' => true), array('id' => 'DESC'));
$data['patreons'] = $patreons;
return $this->render('index/support.html.twig', $data);
}
/**
* @Route("/discord", name="index.discord")
*/
......
......@@ -93,11 +93,6 @@ class Song
*/
private $hasXDDifficulty;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $previewStart;
/**
* @ORM\Column(type="datetime")
*/
......@@ -309,18 +304,6 @@ class Song
return $this;
}
public function getPreviewStart(): ?bool
{
return $this->previewStart;
}
public function setPreviewStart(bool $previewStart): self
{
$this->previewStart = $previewStart;
return $this;
}
public function getUploadDate(): ?\DateTimeInterface
{
return $this->uploadDate;
......
......@@ -138,7 +138,7 @@ class SongSpinPlay
'id' => $this->id,
'user' => $this->user->getJSON(),
'videoUrl' => $this->videoUrl,
'thumbnail' => $this->getVideoThumbnail(),
'videoThumbnail' => $this->getVideoThumbnail(),
'submitDate' => $this->submitDate,
'isActive' => $this->isActive
);
......
......@@ -26,7 +26,7 @@
<a class="item {% if app.request.attributes.get('_route') == 'index.index' %}active{% endif %}" href="{{ path('index.index') }}" title="Home"><i class="mdi mdi-home-outline"></i></a>
<a class="item {% if app.request.attributes.get('_route') == 'search.index' %}active{% endif %}" href="{{ path('search.index') }}" title="Search"><i class="mdi mdi-magnify"></i></a>
<a class="item {% if app.request.attributes.get('_route') == 'index.client' %}active{% endif %}" href="{{ path('index.client') }}" title="Download Client"><i class="mdi mdi-microsoft-windows"></i></a>
<a class="item" href="https://www.patreon.com/spinshare" target="_blank" title="Patreon" data-tooltipPosition="right"><i class="mdi mdi-patreon"></i></a>
<a class="item {% if app.request.attributes.get('_route') == 'index.support' %}active{% endif %}" href="{{ path('index.support') }}" title="Support"><i class="mdi mdi-hand-heart"></i></a>
<a class="item {% if app.request.attributes.get('_route') == 'index.legal' %}active{% endif %}" href="{{ path('index.legal') }}" title="Legal"><i class="mdi mdi-gavel"></i></a>
</nav>
......
{% extends 'base.html.twig' %}
{% block title %}Patreon{% endblock %}
{% block content %}
<section class="section-support">
<h1>Why you should support us!</h1>
Website funding, prize money for charting competitions and tournaments
<hr />
<h1>Support methods</h1>
Spread the word, Twitch Subscriber, Patreon
<hr />
<h1>Patreons</h1>
{{ dump(patreons) }}
</section>
{% endblock %}
{% block styles %}
<link rel="stylesheet" href="{{ asset('assets/css/support.css') }}" />
{% endblock %}
\ No newline at end of file
......@@ -295,10 +295,6 @@
{% block scripts %}
<script>
// Make Cover 1by1
let cover = document.querySelector(".song-meta .cover");
cover.style.width = cover.clientHeight + "px";
// Song Preview
let songActions = document.querySelector(".song-actions");
let playerToggle = document.querySelector(".song-actions .action-player .icon");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment