background cover
This commit is contained in:
@@ -20,6 +20,7 @@ class Background(models.Model):
|
|||||||
name = models.CharField(max_length=128)
|
name = models.CharField(max_length=128)
|
||||||
image = models.ImageField(upload_to="wallpapers/", null=True, blank=True)
|
image = models.ImageField(upload_to="wallpapers/", null=True, blank=True)
|
||||||
repeat = models.BooleanField(default=False)
|
repeat = models.BooleanField(default=False)
|
||||||
|
cover = models.BooleanField(default=False)
|
||||||
color = models.CharField(max_length=32, blank=True)
|
color = models.CharField(max_length=32, blank=True)
|
||||||
|
|
||||||
class Profile(models.Model):
|
class Profile(models.Model):
|
||||||
|
|||||||
@@ -7,6 +7,9 @@ body {
|
|||||||
{% if not background.repeat %}
|
{% if not background.repeat %}
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% if background.cover %}
|
||||||
|
background-size: cover;
|
||||||
|
{% endif %}
|
||||||
{% if background.color %}
|
{% if background.color %}
|
||||||
background-color: {{background.color}} !important;
|
background-color: {{background.color}} !important;
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user