Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
D
Desktop Client
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
Desktop Client
Commits
b67f82f5
Commit
b67f82f5
authored
Apr 05, 2020
by
Andreas Heimann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
renamed ad to promos because frick AdBlock
parent
4351ee9c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
54 additions
and
54 deletions
+54
-54
src/app.htm
src/app.htm
+3
-3
src/assets/css/startup.css
src/assets/css/startup.css
+10
-10
src/assets/css/startup.less
src/assets/css/startup.less
+8
-8
src/assets/js/module.api.js
src/assets/js/module.api.js
+2
-2
src/assets/js/section.startup.js
src/assets/js/section.startup.js
+31
-31
No files found.
src/app.htm
View file @
b67f82f5
...
@@ -37,9 +37,9 @@
...
@@ -37,9 +37,9 @@
</nav>
</nav>
</aside>
</aside>
<section
class=
"section-startup"
>
<section
class=
"section-startup"
>
<div
class=
"staff-
ad
s"
>
<div
class=
"staff-
promo
s"
>
<div
class=
"staff-
ad ad
-loading"
></div>
<div
class=
"staff-
promo promo
-loading"
></div>
<div
class=
"staff-
ad ad
-loading"
></div>
<div
class=
"staff-
promo promo
-loading"
></div>
</div>
</div>
<div
class=
"song-row song-row-new"
>
<div
class=
"song-row song-row-new"
>
<div
class=
"song-header"
>
<div
class=
"song-header"
>
...
...
src/assets/css/startup.css
View file @
b67f82f5
.staff-
ad
s
{
.staff-
promo
s
{
display
:
grid
;
display
:
grid
;
grid-template-columns
:
1
fr
1
fr
;
grid-template-columns
:
1
fr
1
fr
;
grid-gap
:
25px
;
grid-gap
:
25px
;
width
:
1114px
;
width
:
1114px
;
margin
:
0
auto
;
margin
:
0
auto
;
}
}
.staff-
ad
s
:empty
{
.staff-
promo
s
:empty
{
display
:
none
;
display
:
none
;
}
}
.staff-
ads
.staff-ad
{
.staff-
promos
.staff-promo
{
background
:
#fff
;
background
:
#fff
;
border-radius
:
6px
;
border-radius
:
6px
;
padding
:
50px
;
padding
:
50px
;
...
@@ -17,14 +17,14 @@
...
@@ -17,14 +17,14 @@
transition
:
0.2s
ease
all
;
transition
:
0.2s
ease
all
;
grid-template-rows
:
auto
100px
auto
;
grid-template-rows
:
auto
100px
auto
;
}
}
.staff-
ads
.staff-ad
.ad
-type
{
.staff-
promos
.staff-promo
.promo
-type
{
color
:
#aaa
;
color
:
#aaa
;
justify-self
:
left
;
justify-self
:
left
;
font-size
:
12px
;
font-size
:
12px
;
font-weight
:
bold
;
font-weight
:
bold
;
letter-spacing
:
0.3em
;
letter-spacing
:
0.3em
;
}
}
.staff-
ads
.staff-ad
.ad
-title
{
.staff-
promos
.staff-promo
.promo
-title
{
font-weight
:
bold
;
font-weight
:
bold
;
font-size
:
34px
;
font-size
:
34px
;
justify-self
:
left
;
justify-self
:
left
;
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
letter-spacing
:
-0.025em
;
letter-spacing
:
-0.025em
;
color
:
#222
;
color
:
#222
;
}
}
.staff-
ads
.staff-ad
.ad
-button
{
.staff-
promos
.staff-promo
.promo
-button
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
bold
;
font-weight
:
bold
;
text-transform
:
uppercase
;
text-transform
:
uppercase
;
...
@@ -43,19 +43,19 @@
...
@@ -43,19 +43,19 @@
border-radius
:
6px
;
border-radius
:
6px
;
transition
:
0.2s
ease-in-out
all
;
transition
:
0.2s
ease-in-out
all
;
}
}
.staff-
ads
.staff-ad
.ad
-button
:hover
{
.staff-
promos
.staff-promo
.promo
-button
:hover
{
cursor
:
pointer
;
cursor
:
pointer
;
opacity
:
0.6
;
opacity
:
0.6
;
}
}
.staff-
ads
.staff-ad.ad
-loading
{
.staff-
promos
.staff-promo.promo
-loading
{
background
:
linear-gradient
(
to
right
,
rgba
(
255
,
255
,
255
,
0.1
),
rgba
(
255
,
255
,
255
,
0.2
),
rgba
(
255
,
255
,
255
,
0.1
));
background
:
linear-gradient
(
to
right
,
rgba
(
255
,
255
,
255
,
0.1
),
rgba
(
255
,
255
,
255
,
0.2
),
rgba
(
255
,
255
,
255
,
0.1
));
animation-name
:
ad
LoadingShimmer
;
animation-name
:
promo
LoadingShimmer
;
animation-fill-mode
:
forwards
;
animation-fill-mode
:
forwards
;
animation-timing-function
:
linear
;
animation-timing-function
:
linear
;
animation-iteration-count
:
infinite
;
animation-iteration-count
:
infinite
;
animation-duration
:
1s
;
animation-duration
:
1s
;
}
}
@keyframes
ad
LoadingShimmer
{
@keyframes
promo
LoadingShimmer
{
from
{
from
{
background-position
:
0px
0px
;
background-position
:
0px
0px
;
}
}
...
...
src/assets/css/startup.less
View file @
b67f82f5
.staff-
ad
s {
.staff-
promo
s {
display: grid;
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-columns: 1fr 1fr;
grid-gap: 25px;
grid-gap: 25px;
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
display: none;
display: none;
}
}
& .staff-
ad
{
& .staff-
promo
{
background: #fff;
background: #fff;
border-radius: 6px;
border-radius: 6px;
padding: 50px;
padding: 50px;
...
@@ -18,14 +18,14 @@
...
@@ -18,14 +18,14 @@
transition: 0.2s ease all;
transition: 0.2s ease all;
grid-template-rows: auto 100px auto;
grid-template-rows: auto 100px auto;
& .
ad
-type {
& .
promo
-type {
color: #aaa;
color: #aaa;
justify-self: left;
justify-self: left;
font-size: 12px;
font-size: 12px;
font-weight: bold;
font-weight: bold;
letter-spacing: 0.3em;
letter-spacing: 0.3em;
}
}
& .
ad
-title {
& .
promo
-title {
font-weight: bold;
font-weight: bold;
font-size: 34px;
font-size: 34px;
justify-self: left;
justify-self: left;
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
letter-spacing: -0.025em;
letter-spacing: -0.025em;
color: #222;
color: #222;
}
}
& .
ad
-button {
& .
promo
-button {
font-size: 14px;
font-size: 14px;
font-weight: bold;
font-weight: bold;
text-transform: uppercase;
text-transform: uppercase;
...
@@ -50,9 +50,9 @@
...
@@ -50,9 +50,9 @@
}
}
}
}
&.
ad
-loading {
&.
promo
-loading {
background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.2), rgba(255,255,255,0.1));
background: linear-gradient(to right, rgba(255,255,255,0.1), rgba(255,255,255,0.2), rgba(255,255,255,0.1));
animation-name:
ad
LoadingShimmer;
animation-name:
promo
LoadingShimmer;
animation-fill-mode: forwards;
animation-fill-mode: forwards;
animation-timing-function: linear;
animation-timing-function: linear;
animation-iteration-count: infinite;
animation-iteration-count: infinite;
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
}
}
}
}
@keyframes
ad
LoadingShimmer {
@keyframes
promo
LoadingShimmer {
from {
from {
background-position: 0px 0px;
background-position: 0px 0px;
}
}
...
...
src/assets/js/module.api.js
View file @
b67f82f5
...
@@ -26,8 +26,8 @@ class SHAPI {
...
@@ -26,8 +26,8 @@ class SHAPI {
});
});
}
}
async
get
Ad
s
()
{
async
get
Promo
s
()
{
let
apiPath
=
this
.
apiBase
+
"
ad
s
"
;
let
apiPath
=
this
.
apiBase
+
"
promo
s
"
;
let
supportedVersion
=
this
.
supportedVersion
;
let
supportedVersion
=
this
.
supportedVersion
;
return
axios
.
get
(
apiPath
)
return
axios
.
get
(
apiPath
)
...
...
src/assets/js/section.startup.js
View file @
b67f82f5
const
DOMStaff
Ads
=
document
.
querySelector
(
"
.staff-ad
s
"
);
const
DOMStaff
Promos
=
document
.
querySelector
(
"
.staff-promo
s
"
);
const
DOMNewSongsList
=
document
.
querySelector
(
"
.song-row-new .song-list
"
);
const
DOMNewSongsList
=
document
.
querySelector
(
"
.song-row-new .song-list
"
);
const
DOMPopularSongsList
=
document
.
querySelector
(
"
.song-row-popular .song-list
"
);
const
DOMPopularSongsList
=
document
.
querySelector
(
"
.song-row-popular .song-list
"
);
...
@@ -16,11 +16,11 @@ function InitStartup() {
...
@@ -16,11 +16,11 @@ function InitStartup() {
console
.
log
(
"
Refreshing Startup
"
);
console
.
log
(
"
Refreshing Startup
"
);
// Loading Ads
// Loading Ads
api
.
get
Ads
().
then
(
function
(
ad
s
)
{
api
.
get
Promos
().
then
(
function
(
promo
s
)
{
DOMStaff
Ad
s
.
innerHTML
=
""
;
DOMStaff
Promo
s
.
innerHTML
=
""
;
ads
.
forEach
(
function
(
ad
)
{
promos
.
forEach
(
function
(
promo
)
{
DOMStaff
Ads
.
appendChild
(
BuildAdDOM
(
ad
));
DOMStaff
Promos
.
appendChild
(
BuildPromoDOM
(
promo
));
});
});
}).
catch
(
function
(
error
)
{
}).
catch
(
function
(
error
)
{
NavigateToSection
(
6
);
NavigateToSection
(
6
);
...
@@ -102,37 +102,37 @@ function LoadPopularSongs() {
...
@@ -102,37 +102,37 @@ function LoadPopularSongs() {
});
});
}
}
function
Build
AdDOM
(
ad
Item
)
{
function
Build
PromoDOM
(
promo
Item
)
{
// Holder
// Holder
let
ad
Container
=
document
.
createElement
(
"
div
"
);
let
promo
Container
=
document
.
createElement
(
"
div
"
);
adContainer
.
classList
.
add
(
"
staff-ad
"
);
promoContainer
.
classList
.
add
(
"
staff-promo
"
);
adContainer
.
style
.
backgroundImage
=
"
url('
"
+
ad
Item
.
image_path
+
"
')
"
;
promoContainer
.
style
.
backgroundImage
=
"
url('
"
+
promo
Item
.
image_path
+
"
')
"
;
// Type
// Type
let
ad
Type
=
document
.
createElement
(
"
div
"
);
let
promo
Type
=
document
.
createElement
(
"
div
"
);
adType
.
classList
.
add
(
"
ad
-type
"
);
promoType
.
classList
.
add
(
"
promo
-type
"
);
adType
.
style
.
color
=
ad
Item
.
color
;
promoType
.
style
.
color
=
promo
Item
.
color
;
adType
.
innerText
=
ad
Item
.
type
;
promoType
.
innerText
=
promo
Item
.
type
;
adContainer
.
appendChild
(
ad
Type
);
promoContainer
.
appendChild
(
promo
Type
);
// Title
// Title
let
ad
Title
=
document
.
createElement
(
"
div
"
);
let
promo
Title
=
document
.
createElement
(
"
div
"
);
adTitle
.
classList
.
add
(
"
ad
-title
"
);
promoTitle
.
classList
.
add
(
"
promo
-title
"
);
adTitle
.
innerHTML
=
ad
Item
.
title
;
promoTitle
.
innerHTML
=
promo
Item
.
title
;
adTitle
.
style
.
color
=
ad
Item
.
textColor
;
promoTitle
.
style
.
color
=
promo
Item
.
textColor
;
adContainer
.
appendChild
(
ad
Title
);
promoContainer
.
appendChild
(
promo
Title
);
// Button
// Button
let
ad
Button
=
document
.
createElement
(
"
div
"
);
let
promo
Button
=
document
.
createElement
(
"
div
"
);
adButton
.
classList
.
add
(
"
ad
-button
"
);
promoButton
.
classList
.
add
(
"
promo
-button
"
);
adButton
.
style
.
backgroundColor
=
ad
Item
.
color
;
promoButton
.
style
.
backgroundColor
=
promo
Item
.
color
;
ad
Button
.
innerText
=
"
CHECK IT OUT
"
;
promo
Button
.
innerText
=
"
CHECK IT OUT
"
;
switch
(
ad
Item
.
button
.
type
)
{
switch
(
promo
Item
.
button
.
type
)
{
case
0
:
case
0
:
// Song
// Song
ad
Button
.
addEventListener
(
'
click
'
,
function
()
{
promo
Button
.
addEventListener
(
'
click
'
,
function
()
{
NavigateToSongDetail
(
ad
Item
.
button
.
data
);
NavigateToSongDetail
(
promo
Item
.
button
.
data
);
});
});
break
;
break
;
case
1
:
case
1
:
...
@@ -142,18 +142,18 @@ function BuildAdDOM(adItem) {
...
@@ -142,18 +142,18 @@ function BuildAdDOM(adItem) {
case
2
:
case
2
:
// Search Query
// Search Query
NavigateToSection
(
1
);
NavigateToSection
(
1
);
SearchQuery
(
ad
Item
.
button
.
data
);
SearchQuery
(
promo
Item
.
button
.
data
);
break
;
break
;
case
3
:
case
3
:
// External
// External
ad
Button
.
addEventListener
(
'
click
'
,
function
()
{
promo
Button
.
addEventListener
(
'
click
'
,
function
()
{
shell
.
openExternal
(
ad
Item
.
button
.
data
);
shell
.
openExternal
(
promo
Item
.
button
.
data
);
});
});
}
}
adContainer
.
appendChild
(
ad
Button
);
promoContainer
.
appendChild
(
promo
Button
);
return
ad
Container
;
return
promo
Container
;
}
}
function
BuildSongDOM
(
songItem
)
{
function
BuildSongDOM
(
songItem
)
{
...
...
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