Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mymusiclist
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Brian Guadalupe
mymusiclist
Commits
85388946
Commit
85388946
authored
Nov 05, 2017
by
Brian Guadalupe
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'searchnav' into 'playlistwip'
Searchnav See merge request brian/mymusiclist!8
parents
8d60a783
898b869e
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
418 additions
and
43 deletions
+418
-43
0001_initial.py
core/migrations/0001_initial.py
+98
-0
0002_auto_20171105_1339.py
core/migrations/0002_auto_20171105_1339.py
+48
-0
0003_auto_20171105_1339.py
core/migrations/0003_auto_20171105_1339.py
+36
-0
0004_auto_20171105_1350.py
core/migrations/0004_auto_20171105_1350.py
+36
-0
0005_auto_20171105_1352.py
core/migrations/0005_auto_20171105_1352.py
+36
-0
0006_auto_20171105_1453.py
core/migrations/0006_auto_20171105_1453.py
+36
-0
mymusiclist.css
files/css/mymusiclist.css
+75
-5
background.jpg
files/images/background.jpg
+0
-0
base.html
templates/base.html
+53
-38
No files found.
core/migrations/0001_initial.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-04 13:55
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
initial
=
True
dependencies
=
[
]
operations
=
[
migrations
.
CreateModel
(
name
=
'Album'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'album_name'
,
models
.
CharField
(
max_length
=
64
)),
(
'year'
,
models
.
DecimalField
(
decimal_places
=
0
,
max_digits
=
4
)),
],
),
migrations
.
CreateModel
(
name
=
'Artist'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'name'
,
models
.
CharField
(
max_length
=
64
)),
(
'description'
,
models
.
TextField
()),
],
),
migrations
.
CreateModel
(
name
=
'MusicEntry'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'order_in_playlist'
,
models
.
PositiveSmallIntegerField
()),
(
'rating'
,
models
.
DecimalField
(
choices
=
[(
0
,
'1'
),
(
1
,
'2'
),
(
2
,
'3'
),
(
3
,
'4'
),
(
4
,
'5'
),
(
5
,
'6'
),
(
6
,
'7'
),
(
7
,
'8'
),
(
8
,
'9'
),
(
9
,
'10'
)],
decimal_places
=
0
,
max_digits
=
1
)),
],
),
migrations
.
CreateModel
(
name
=
'MusicPlaylist'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'playlist_name'
,
models
.
CharField
(
max_length
=
32
)),
(
'is_public'
,
models
.
BooleanField
(
default
=
False
)),
],
),
migrations
.
CreateModel
(
name
=
'Song'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'song_name'
,
models
.
TextField
()),
(
'genre'
,
models
.
CharField
(
max_length
=
128
)),
(
'song_length'
,
models
.
PositiveIntegerField
(
default
=
0
,
null
=
True
)),
(
'lyrics'
,
models
.
TextField
(
null
=
True
)),
(
'album'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.Album'
)),
(
'artist'
,
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.Artist'
)),
],
),
migrations
.
CreateModel
(
name
=
'Tag'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'name'
,
models
.
CharField
(
max_length
=
32
)),
(
'tag'
,
models
.
ManyToManyField
(
to
=
'core.MusicEntry'
)),
],
),
migrations
.
CreateModel
(
name
=
'UserAccount'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
primary_key
=
True
,
serialize
=
False
)),
(
'first_name'
,
models
.
CharField
(
max_length
=
64
)),
(
'last_name'
,
models
.
CharField
(
max_length
=
64
)),
(
'email'
,
models
.
CharField
(
max_length
=
64
)),
],
),
migrations
.
AddField
(
model_name
=
'musicplaylist'
,
name
=
'user'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.UserAccount'
),
),
migrations
.
AddField
(
model_name
=
'musicentry'
,
name
=
'playlist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.MusicPlaylist'
),
),
migrations
.
AddField
(
model_name
=
'musicentry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.Song'
),
),
migrations
.
AddField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.Artist'
),
),
]
core/migrations/0002_auto_20171105_1339.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 05:39
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0001_initial'
),
]
operations
=
[
migrations
.
RenameModel
(
old_name
=
'MusicEntry'
,
new_name
=
'music_entry'
,
),
migrations
.
RenameModel
(
old_name
=
'MusicPlaylist'
,
new_name
=
'music_playlist'
,
),
migrations
.
RenameModel
(
old_name
=
'UserAccount'
,
new_name
=
'user_account'
,
),
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
migrations
.
AlterField
(
model_name
=
'music_entry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.song'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
]
core/migrations/0003_auto_20171105_1339.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 05:39
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0002_auto_20171105_1339'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
migrations
.
AlterField
(
model_name
=
'music_entry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.song'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
]
core/migrations/0004_auto_20171105_1350.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 05:50
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0003_auto_20171105_1339'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
migrations
.
AlterField
(
model_name
=
'music_entry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.song'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
]
core/migrations/0005_auto_20171105_1352.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 05:52
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0004_auto_20171105_1350'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
migrations
.
AlterField
(
model_name
=
'music_entry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.song'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
]
core/migrations/0006_auto_20171105_1453.py
0 → 100644
View file @
85388946
# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-11-05 06:53
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'core'
,
'0005_auto_20171105_1352'
),
]
operations
=
[
migrations
.
AlterField
(
model_name
=
'album'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
migrations
.
AlterField
(
model_name
=
'music_entry'
,
name
=
'song'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.song'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'album'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.album'
),
),
migrations
.
AlterField
(
model_name
=
'song'
,
name
=
'artist'
,
field
=
models
.
ForeignKey
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
'core.artist'
),
),
]
files/css/mymusiclist.css
View file @
85388946
...
@@ -27,6 +27,78 @@ body {
...
@@ -27,6 +27,78 @@ body {
text-align
:
center
;
text-align
:
center
;
}
}
/*for dropdown thing */
li
a
,
.dropbtn
{
display
:
inline-block
;
color
:
white
;
text-align
:
center
;
text-decoration
:
none
;
}
li
a
:hover
,
.dropdown
:hover
.dropbtn
{
background-color
:
red
;
}
li
.dropdown
{
display
:
inline-block
;
}
.dropdown-content
{
display
:
none
;
position
:
absolute
;
background-color
:
blue
;
min-width
:
160px
;
box-shadow
:
0px
8px
16px
0px
rgba
(
0
,
0
,
0
,
0.2
);
z-index
:
1
;
}
.dropdown-content
a
{
color
:
black
;
text-decoration
:
none
;
display
:
block
;
text-align
:
left
;
}
.dropdown-content
a
:hover
{
background-color
:
#f1f1f1
}
.dropdown
:hover
.dropdown-content
{
display
:
block
;
}
/*searchbar*/
/*form {
width:500px;
margin:50px auto;
}*/
.search_nav
{
padding
:
15px
;
}
.searchbar
{
padding
:
8px
15px
;
background
:
rgba
(
50
,
50
,
50
,
0.2
);
border
:
0px
solid
#dbdbdb
;
color
:
white
;
}
.button
{
position
:
relative
;
padding
:
6px
15px
;
left
:
-8px
;
border
:
2px
solid
#207cca
;
background-color
:
#207cca
;
color
:
#fafafa
;
}
.button
:hover
{
background-color
:
#fafafa
;
color
:
#207cca
;
}
/* Generic style for clickable shit*/
/* Generic style for clickable shit*/
.buttoned
{
.buttoned
{
...
@@ -38,7 +110,7 @@ body {
...
@@ -38,7 +110,7 @@ body {
/* Generic style for wrapping stuff in a box*/
/* Generic style for wrapping stuff in a box*/
.boxified
{
.boxified
{
background-color
:
rgba
(
0
,
0
,
0
,
0.6
);
background-color
:
rgba
(
20
,
100
,
100
,
0.3
);
border-radius
:
10px
;
border-radius
:
10px
;
padding
:
3vw
;
padding
:
3vw
;
text-align
:
center
;
text-align
:
center
;
...
@@ -59,7 +131,7 @@ body {
...
@@ -59,7 +131,7 @@ body {
position
:
fixed
;
position
:
fixed
;
width
:
100vw
;
width
:
100vw
;
list-style-type
:
none
;
list-style-type
:
none
;
background-color
:
#
282525
;
background-color
:
#
000
;
overflow
:
hidden
;
overflow
:
hidden
;
margin
:
-15px
;
margin
:
-15px
;
margin-top
:
-70px
;
margin-top
:
-70px
;
...
@@ -87,7 +159,7 @@ body {
...
@@ -87,7 +159,7 @@ body {
.nav_bar_tab
{
.nav_bar_tab
{
float
:
left
;
float
:
left
;
display
:
block
;
display
:
inline-
block
;
color
:
white
;
color
:
white
;
font-size
:
20px
;
font-size
:
20px
;
font-family
:
PalanquinDark
;
font-family
:
PalanquinDark
;
...
@@ -138,5 +210,3 @@ a, .link{
...
@@ -138,5 +210,3 @@ a, .link{
font-family
:
'PalanquinDark'
;
font-family
:
'PalanquinDark'
;
src
:
url('/files/fonts/palanquindark/PalanquinDark-Regular.ttf')
;
src
:
url('/files/fonts/palanquindark/PalanquinDark-Regular.ttf')
;
}
}
files/images/background.jpg
View replaced file @
8d60a783
View file @
85388946
288 KB
|
W:
|
H:
30.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
templates/base.html
View file @
85388946
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<title>
{% block title %}MyMusicList{% endblock %}
</title>
<title>
{% block title %}MyMusicList{% endblock %}
</title>
<link
rel=
"stylesheet"
href=
"/files/css/mymusiclist.css"
>
<link
rel=
"stylesheet"
href=
"/files/css/mymusiclist.css"
>
<link
rel=
"stylesheet"
href=
"
/files/css/font-awesome
.css"
>
<link
rel=
"stylesheet"
href=
"
https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min
.css"
>
</head>
</head>
<body>
<body>
<header>
<header>
...
@@ -19,9 +19,38 @@
...
@@ -19,9 +19,38 @@
<li><a
class=
"nav_bar_home"
href=
"/"
>
MyMusicList
</a></li>
<li><a
class=
"nav_bar_home"
href=
"/"
>
MyMusicList
</a></li>
<li><a
class=
"nav_bar_tab"
href=
"{% url 'login' %}"
>
LOGIN
</a></li>
<li><a
class=
"nav_bar_tab"
href=
"{% url 'login' %}"
>
LOGIN
</a></li>
<li><a
class=
"nav_bar_tab"
href=
"{% url 'signup' %}"
>
SIGN UP
</a></li>
<li><a
class=
"nav_bar_tab"
href=
"{% url 'signup' %}"
>
SIGN UP
</a></li>
<li>
<div
class=
"search_nav"
>
<form
action=
"{% url 'search' %}"
method=
"get"
>
<div
class=
"wrap"
>
<div
class=
"search"
>
<input
class=
"searchbar"
type=
"text"
name=
"search"
placeholder=
"Search.."
>
<input
id=
"searchbytype"
type=
"hidden"
name=
"searchtype"
value=
"album"
>
<button
class=
"button"
>
<i
class=
"fa fa-search"
aria-hidden=
"true"
></i></button>
</div>
</div>
</form>
</div>
</li>
<li
class=
"dropdown nav_bar_tab"
>
<a
id=
search_type
href=
#
class=
"dropbtn"
>
SEARCH
<i
class=
"fa fa-caret-down"
></i></a>
<div
class=
"dropdown-content"
>
<a
href=
"#"
onclick=
"mainA()"
>
Album
</a>
<a
href=
"#"
onclick=
"mainB()"
>
Artist
</a>
<a
href=
"#"
onclick=
"mainC()"
>
Song
</a>
</div>
</li>
<li
style=
"float:right"
><button
class=
"nav_bar_tab"
type=
"button"
onclick=
"toggleWallpaper()"
></button></li>
<li
style=
"float:right"
><button
class=
"nav_bar_tab"
type=
"button"
onclick=
"toggleWallpaper()"
></button></li>
</ul>
</ul>
{% endif %}
{% endif %}
<div
class=
"boxified sidebar"
>
<div
class=
"boxified sidebar"
>
{% block sidebar %}
{% block sidebar %}
<h2>
Featured Songs
</h2>
<h2>
Featured Songs
</h2>
...
@@ -43,36 +72,22 @@
...
@@ -43,36 +72,22 @@
<script>
<script>
function
mainA
(){
function
mainA
(){
document
.
getElementById
(
"
demo
"
).
innerHTML
=
"Album Search"
;
document
.
getElementById
(
"
search_type
"
).
innerHTML
=
"Album Search"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"album"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"album"
;
}
}
function
mainB
(){
function
mainB
(){
document
.
getElementById
(
"
demo
"
).
innerHTML
=
"Artist Search"
;
document
.
getElementById
(
"
search_type
"
).
innerHTML
=
"Artist Search"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"artist"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"artist"
;
}
}
function
mainC
(){
function
mainC
(){
document
.
getElementById
(
"
demo
"
).
innerHTML
=
"Song Search"
;
document
.
getElementById
(
"
search_type
"
).
innerHTML
=
"Song Search"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"song"
;
document
.
getElementById
(
"searchbytype"
).
value
=
"song"
;
}
}
</script>
</script>
<form
action=
"{% url 'search' %}"
method=
"get"
>
<div
class=
"wrap"
>
<div
class=
"search"
>
<input
type=
"text"
name=
"search"
placeholder=
"Search.."
>
<input
id=
"searchbytype"
type=
"hidden"
name=
"searchtype"
value=
"album"
>
<p
id=
"demo"
>
Album Search
</p></input>
<button>
Search
</button>
</div>
</div>
</form>
<div>
<a><button
onclick=
"mainA()"
>
By Album
</button></a>
<a><button
onclick=
"mainB()"
>
By Artist
</button></a>
<a><button
onclick=
"mainC()"
>
By Song
</button></a>
</div>
...
...
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