Added basic Bootstrap elements to templates
This commit is contained in:
14
.gitignore
vendored
14
.gitignore
vendored
@@ -1,13 +1,15 @@
|
|||||||
*.pyc
|
|
||||||
*.log
|
|
||||||
db.sqlite3
|
|
||||||
*.bak
|
|
||||||
.idea/
|
.idea/
|
||||||
.vscode/*
|
.vscode/*
|
||||||
*/migrations/*
|
*/migrations/*
|
||||||
|
media/history/*
|
||||||
|
|
||||||
|
*.pyc
|
||||||
|
*.log
|
||||||
|
*.bak
|
||||||
|
*.txt
|
||||||
|
*.map
|
||||||
|
|
||||||
api-keys.sh
|
api-keys.sh
|
||||||
|
db.sqlite3
|
||||||
Pipfile
|
Pipfile
|
||||||
*.txt
|
|
||||||
scrap.py
|
scrap.py
|
||||||
media/history/*
|
|
||||||
|
|||||||
@@ -8,16 +8,38 @@
|
|||||||
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row ml-1">
|
||||||
<h1>{{ user_id }}'s Graphs</h1>
|
<h1>{{ user_id }}'s Graphs</h1>
|
||||||
<a class="btn btn-primary" href="{% url "graphs:display_audio_features" user_secret %}"
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="btn-toolbar ml-3">
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{% url "graphs:display_audio_features" user_secret %}"
|
||||||
role="button">Audio Features</a>
|
role="button">Audio Features</a>
|
||||||
<a class="btn btn-primary" href="{% url "graphs:display_genre_graph" user_secret %}"
|
</div>
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{% url "graphs:display_genre_graph" user_secret %}"
|
||||||
role="button">Genres</a>
|
role="button">Genres</a>
|
||||||
<a class="btn btn-primary" href="{% url "graphs:display_artist_graph" user_secret %}" role="button">
|
</div>
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{% url "graphs:display_artist_graph" user_secret %}"
|
||||||
|
role="button">
|
||||||
Artists
|
Artists
|
||||||
</a>
|
</a>
|
||||||
<a class="btn btn-primary" href="{% url "graphs:display_history_table" %}" role="button">
|
</div>
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a class="btn btn-primary"
|
||||||
|
href="{% url "graphs:display_history_table" %}"
|
||||||
|
role="button">
|
||||||
History
|
History
|
||||||
</a>
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -9,9 +9,29 @@
|
|||||||
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col text-left">
|
||||||
<h1>{{ user_id }}'s Listening History</h1>
|
<h1>{{ user_id }}'s Listening History</h1>
|
||||||
<p> Found {{ total_history }} songs. </p>
|
</div>
|
||||||
<a class="btn btn-primary " href="{% export_url 'csv' %}" role="button">Export</a>
|
</div>
|
||||||
|
<div class="row mb-2 mt-1">
|
||||||
|
<div class="col text-left">
|
||||||
|
<div class="d-inline mr-3">
|
||||||
|
Found {{ total_history }} songs.
|
||||||
|
</div>
|
||||||
|
<div class="d-inline float-right">
|
||||||
|
<a class="btn btn-primary" href="{% export_url 'csv' %}"
|
||||||
|
role="button">Export</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col">
|
||||||
{% render_table user_history_table %}
|
{% render_table user_history_table %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -6,22 +6,32 @@
|
|||||||
<title>User Login</title>
|
<title>User Login</title>
|
||||||
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
<link rel="stylesheet" href="{% sass_src 'scss/custom.scss' %}">
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
.text-overflow {
|
.text-overflow {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
width: 500px;
|
width: 500px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<div class="container">
|
<div class="container-fluid">
|
||||||
<div id="login">
|
|
||||||
<h1>spotify-lib-vis</h1>
|
<h1>spotify-lib-vis</h1>
|
||||||
<a href="{% url 'login:spotify_login' %}" class="btn btn-primary" role="button">Login</a>
|
<div class="row">
|
||||||
<a href="{% url 'login:admin_graphs' %}" class="btn btn-primary">Admin Graphs</a>
|
<div class="btn-toolbar ml-3">
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a href="{% url 'login:spotify_login' %}" class="btn btn-primary" role="button">
|
||||||
|
Login
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="btn-group mr-2">
|
||||||
|
<a href="{% url 'login:admin_graphs' %}" class="btn btn-primary">
|
||||||
|
Admin Graphs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
{% load sass_tags %}
|
{% load sass_tags %}
|
||||||
|
{% load crispy_forms_tags %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
|
||||||
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
|
||||||
@@ -17,17 +18,31 @@
|
|||||||
<!--[if lt IE 7]>
|
<!--[if lt IE 7]>
|
||||||
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
<div class="container-fluid">
|
||||||
|
<div class="row">
|
||||||
<h1>Logged in as {{ user_id }}</h1>
|
<h1>Logged in as {{ user_id }}</h1>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-4 p-2 d-inline">
|
||||||
<a href="{% url "api:scan_library" user_secret %}" class="btn btn-primary">
|
<a href="{% url "api:scan_library" user_secret %}" class="btn btn-primary">
|
||||||
Scan Library
|
Scan Library
|
||||||
</a>
|
</a>
|
||||||
<a href="{% url "api:scan_history" user_secret %}" class="btn btn-primary">
|
<a href="{% url "api:scan_history" user_secret %}" class="btn btn-primary">
|
||||||
Scan History
|
Scan History
|
||||||
</a>
|
</a>
|
||||||
<form action="{% url 'login:upload_history' %}" method="post" enctype="multipart/form-data">
|
|
||||||
|
<form action="{% url 'login:upload_history' %}" method="post"
|
||||||
|
enctype="multipart/form-data" class="form-inline">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
{{ form.as_p }}
|
{{ form | crispy }}
|
||||||
<input class="btn btn-primary" type="submit" value="Import History">
|
<div class="float-right">
|
||||||
|
<input class="btn btn-primary" type="submit" value="Import
|
||||||
|
History">
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-8"></div>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ certifi==2018.4.16
|
|||||||
chardet==3.0.4
|
chardet==3.0.4
|
||||||
Django==2.0.5
|
Django==2.0.5
|
||||||
django-compressor==2.2
|
django-compressor==2.2
|
||||||
|
django-crispy-forms==1.7.2
|
||||||
django-filter==2.0
|
django-filter==2.0
|
||||||
djangorestframework==3.8.2
|
djangorestframework==3.8.2
|
||||||
django-sass-processor==0.7.2
|
django-sass-processor==0.7.2
|
||||||
|
|||||||
@@ -43,8 +43,11 @@ INSTALLED_APPS = [
|
|||||||
'django_tables2',
|
'django_tables2',
|
||||||
'django_filters',
|
'django_filters',
|
||||||
'sass_processor',
|
'sass_processor',
|
||||||
|
'crispy_forms',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
CRISPY_TEMPLATE_PACK = 'bootstrap4'
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
'django.middleware.security.SecurityMiddleware',
|
'django.middleware.security.SecurityMiddleware',
|
||||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||||
|
|||||||
@@ -6323,6 +6323,9 @@ a.text-dark:hover, a.text-dark:focus {
|
|||||||
.bg-dark.navbar-dark .navbar-nav .active > .nav-link {
|
.bg-dark.navbar-dark .navbar-nav .active > .nav-link {
|
||||||
color: #2A9FD6 !important; }
|
color: #2A9FD6 !important; }
|
||||||
|
|
||||||
|
/* .btn-primary {
|
||||||
|
font-family: $font-family-sans-serif;
|
||||||
|
} */
|
||||||
.blockquote-footer {
|
.blockquote-footer {
|
||||||
color: #999; }
|
color: #999; }
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -27,6 +27,9 @@ $web-font-path: "https://fonts.googleapis.com/css?family=Lato:400,700,400italic"
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Buttons =====================================================================
|
// Buttons =====================================================================
|
||||||
|
/* .btn-primary {
|
||||||
|
font-family: $font-family-sans-serif;
|
||||||
|
} */
|
||||||
|
|
||||||
// Typography ==================================================================
|
// Typography ==================================================================
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user