start of adding sources interface
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
from django.conf import settings
|
||||
from youtube_dl import version as yt_version
|
||||
|
||||
|
||||
def app_details(request):
|
||||
return {
|
||||
'app_version': str(settings.VERSION)
|
||||
'app_version': str(settings.VERSION),
|
||||
'youtube_dl_version': str(yt_version.__version__)
|
||||
}
|
||||
|
||||
@@ -16,6 +16,21 @@ $nav-background-colour: $colour-near-black;
|
||||
$nav-text-colour: $colour-near-white;
|
||||
$nav-link-background-hover-colour: $colour-orange;
|
||||
|
||||
$main-button-background-colour: $colour-light-blue;
|
||||
$main-button-background-hover-colour: $colour-orange;
|
||||
$main-button-text-colour: $colour-white;
|
||||
|
||||
$footer-background-colour: $colour-red;
|
||||
$footer-text-colour: $colour-white;
|
||||
$footer-link-colour: $colour-near-black;
|
||||
$footer-link-colour: $colour-near-black;
|
||||
$footer-link-hover-colour: $colour-orange;
|
||||
|
||||
$form-label-text-colour: $colour-near-black;
|
||||
$form-input-border-colour: $colour-light-blue;
|
||||
$form-input-border-active-colour: $colour-orange;
|
||||
$form-select-border-colour: $colour-light-blue;
|
||||
$form-error-background-colour: $colour-red;
|
||||
$form-error-text-colour: $colour-near-white;
|
||||
|
||||
$box-error-background-colour: $colour-red;
|
||||
$box-error-text-colour: $colour-white;
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
.simpleform {
|
||||
.row {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
label {
|
||||
text-transform: uppercase;
|
||||
display: block;
|
||||
font-size: 0.9rem;
|
||||
position: relative;
|
||||
transition: none;
|
||||
top: initial;
|
||||
left: initial !important;
|
||||
transform: none;
|
||||
color: $form-label-text-colour;
|
||||
}
|
||||
input {
|
||||
width: 100%;
|
||||
padding: 5px 8px 5px 8px;
|
||||
font-size: 1.1rem;
|
||||
border: 2px $form-input-border-colour solid;
|
||||
border-radius: 2px;
|
||||
outline: none;
|
||||
&:focus {
|
||||
outline: none;
|
||||
border: 2px $form-input-border-active-colour solid;
|
||||
}
|
||||
}
|
||||
textarea {
|
||||
min-height: 150px;
|
||||
}
|
||||
}
|
||||
|
||||
select {
|
||||
display: initial !important;
|
||||
border: 2px $form-select-border-colour solid;
|
||||
height: initial !important;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.nowrap {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.no-margin-bottom {
|
||||
margin-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.errors {
|
||||
background-color: $box-error-background-colour;
|
||||
border-radius: 2px;
|
||||
padding: 10px 0 5px 0;
|
||||
}
|
||||
|
||||
.errorlist {
|
||||
li {
|
||||
color: $box-error-text-colour;
|
||||
padding: 0 10px 5px 10px;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,6 +62,24 @@ main {
|
||||
|
||||
padding: 2rem 0 2rem 0;
|
||||
|
||||
h1 {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 100%;
|
||||
background-color: $main-button-background-colour !important;
|
||||
color: $main-button-text-colour !important;
|
||||
i {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
&:hover {
|
||||
background-color: $main-button-background-hover-colour !important;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
footer {
|
||||
@@ -89,7 +107,8 @@ footer {
|
||||
color: $footer-link-colour;
|
||||
text-decoration: none;
|
||||
&:hover {
|
||||
text-decoration: underline;
|
||||
color: $footer-link-hover-colour;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
|
||||
@import "fonts";
|
||||
@import "variables";
|
||||
@import "helpers";
|
||||
@import "colours";
|
||||
@import "helpers";
|
||||
@import "forms";
|
||||
@import "template";
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<header>
|
||||
<div class="container">
|
||||
<a href="{% url 'sync:index' %}">
|
||||
<a href="{% url 'sync:dashboard' %}">
|
||||
{% include 'tubesync.svg' with width='3rem' height='3rem' %}
|
||||
<h1>TubeSync</h1>
|
||||
</a>
|
||||
@@ -28,10 +28,11 @@
|
||||
<nav>
|
||||
<div class="container">
|
||||
<ul>
|
||||
<li><a href=""><i class="fas fa-fw fa-th-large"></i><span class="hide-on-med-and-down"> Dashboard</span></a></li>
|
||||
<li><a href=""><i class="fas fa-fw fa-play"></i><span class="hide-on-med-and-down"> Sources</span></a></li>
|
||||
<li><a href=""><i class="fas fa-fw fa-film"></i><span class="hide-on-med-and-down"> Media</span></a></li>
|
||||
<li><a href=""><i class="fas fa-fw fa-clock"></i><span class="hide-on-med-and-down"> Tasks</span></a></li>
|
||||
<li><a href="{% url 'sync:dashboard' %}"><i class="fas fa-fw fa-th-large"></i><span class="hide-on-med-and-down"> Dashboard</span></a></li>
|
||||
<li><a href="{% url 'sync:sources' %}"><i class="fas fa-fw fa-play"></i><span class="hide-on-med-and-down"> Sources</span></a></li>
|
||||
<li><a href="{% url 'sync:media' %}"><i class="fas fa-fw fa-film"></i><span class="hide-on-med-and-down"> Media</span></a></li>
|
||||
<li><a href="{% url 'sync:tasks' %}"><i class="fas fa-fw fa-clock"></i><span class="hide-on-med-and-down"> Tasks</span></a></li>
|
||||
<li><a href="{% url 'sync:logs' %}"><i class="fas fa-fw fa-list"></i><span class="hide-on-med-and-down"> Logs</span></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
@@ -45,13 +46,12 @@
|
||||
<footer>
|
||||
<div class="container">
|
||||
<p>
|
||||
<a href="{% url 'sync:index' %}">{% include 'tubesync.svg' with width='0.8rem' height='0.8rem' %} TubeSync</a>
|
||||
is an open source synchronisation tool to automatically download videos from online video platforms.
|
||||
<br>
|
||||
The original code under a GPLv3 licence is available at
|
||||
<a href="https://github.com/meeb/tubesync"><i class="fab fa-github"></i> https://github.com/meeb/tubesync</a>.
|
||||
<a href="{% url 'sync:dashboard' %}" class="nowrap">{% include 'tubesync.svg' with width='0.8rem' height='0.8rem' %} TubeSync</a>
|
||||
is an open source synchronisation tool to automatically download videos from online video platforms. The
|
||||
original code under a GPLv3 licence is available at
|
||||
<a href="https://github.com/meeb/tubesync" class="nowrap"><i class="fab fa-github"></i> https://github.com/meeb/tubesync</a>.
|
||||
</p>
|
||||
<p>Version {{ app_version }}.</p>
|
||||
<p>TubeSync version {{ app_version }} with embedded <a href="https://yt-dl.org/"><i class="fas fa-link"></i> youtube-dl</a> version {{ youtube_dl_version }}.</p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
19
app/common/templates/simpleform.html
Normal file
19
app/common/templates/simpleform.html
Normal file
@@ -0,0 +1,19 @@
|
||||
{% if form %}
|
||||
{% if form.errors %}
|
||||
<ul class="errors">
|
||||
{% for _, error in form.errors.items %}
|
||||
<li>{{ error }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% for field in form %}
|
||||
{% if field.field.widget.input_type == 'hidden' %}{{ field }}{% else %}
|
||||
<div class="row">
|
||||
<div class="input-field col s12">
|
||||
{{ field.label_tag }}
|
||||
{{ field }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user