Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
B
Backend Server
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
SpinShare
Backend Server
Commits
e76f1896
Commit
e76f1896
authored
May 24, 2020
by
SpinShare
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added songdetail 2.0, added placeholder support page
parent
2d38019b
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
55 additions
and
27 deletions
+55
-27
public/assets/css/songdetail.css
public/assets/css/songdetail.css
+6
-2
public/assets/css/songdetail.less
public/assets/css/songdetail.less
+6
-2
public/assets/css/support.css
public/assets/css/support.css
+0
-0
public/assets/css/support.less
public/assets/css/support.less
+0
-0
src/Controller/APIController.php
src/Controller/APIController.php
+2
-0
src/Controller/IndexController.php
src/Controller/IndexController.php
+14
-0
src/Entity/Song.php
src/Entity/Song.php
+0
-17
src/Entity/SongSpinPlay.php
src/Entity/SongSpinPlay.php
+1
-1
templates/base.html.twig
templates/base.html.twig
+1
-1
templates/index/support.html.twig
templates/index/support.html.twig
+25
-0
templates/song/detail.html.twig
templates/song/detail.html.twig
+0
-4
No files found.
public/assets/css/songdetail.css
View file @
e76f1896
...
...
@@ -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
;
}
...
...
public/assets/css/songdetail.less
View file @
e76f1896
...
...
@@ -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;
}
...
...
public/assets/css/support.css
0 → 100644
View file @
e76f1896
public/assets/css/support.less
0 → 100644
View file @
e76f1896
src/Controller/APIController.php
View file @
e76f1896
...
...
@@ -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
();
...
...
src/Controller/IndexController.php
View file @
e76f1896
...
...
@@ -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")
*/
...
...
src/Entity/Song.php
View file @
e76f1896
...
...
@@ -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
;
...
...
src/Entity/SongSpinPlay.php
View file @
e76f1896
...
...
@@ -138,7 +138,7 @@ class SongSpinPlay
'id'
=>
$this
->
id
,
'user'
=>
$this
->
user
->
getJSON
(),
'videoUrl'
=>
$this
->
videoUrl
,
'
t
humbnail'
=>
$this
->
getVideoThumbnail
(),
'
videoT
humbnail'
=>
$this
->
getVideoThumbnail
(),
'submitDate'
=>
$this
->
submitDate
,
'isActive'
=>
$this
->
isActive
);
...
...
templates/base.html.twig
View file @
e76f1896
...
...
@@ -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>
...
...
templates/index/support.html.twig
0 → 100644
View file @
e76f1896
{%
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
templates/song/detail.html.twig
View file @
e76f1896
...
...
@@ -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
"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment