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