diff --git a/app/static/css/partials/_layout.scss b/app/static/css/partials/_layout.scss index a014708..75bc5b5 100644 --- a/app/static/css/partials/_layout.scss +++ b/app/static/css/partials/_layout.scss @@ -1,3 +1,10 @@ +:root { + --bg-color-1: #6666ff; + --bg-color-2: #0099ff; + --bg-color-3: #ffff00; + --bg-color-4: #ff3399; +} + @keyframes background_animation { 0%,100% { background-position: 0 0; @@ -10,7 +17,7 @@ } } body { - background: linear-gradient(to right, #6666ff, #0099ff , #ffff00, #ff3399); + background: linear-gradient(to right, var(--bg-color-1), var(--bg-color-2) , var(--bg-color-3), var(--bg-color-4)); animation: background_animation 60s ease-in-out infinite; background-size: 400% 100%; color: #ddd; diff --git a/app/templates/film.html b/app/templates/film.html index e3a5d1f..c34e7d4 100644 --- a/app/templates/film.html +++ b/app/templates/film.html @@ -2,10 +2,10 @@ {% block main %} diff --git a/app/video/models.py b/app/video/models.py index 12ca2bd..2b5c5b0 100644 --- a/app/video/models.py +++ b/app/video/models.py @@ -37,13 +37,34 @@ class Film(models.Model): def duration(self): return ox.format_timecode(self.data['duration'])[:-4] - def color(self): + def color_1(self): hue = self.data['hue'] saturation = self.data['saturation'] * 100 saturation = 70 lightness = self.data['lightness'] * 100 return "hsl({}, {}%, {}%)".format(hue, saturation, lightness) + def color_2(self): + hue = self.data['hue'] + saturation = self.data['saturation'] * 100 + saturation = 70 + lightness = self.data['lightness'] * 50 + return "hsl({}, {}%, {}%)".format(hue, saturation, lightness) + + def color_3(self): + hue = self.data['hue'] + saturation = self.data['saturation'] * 100 + saturation = 70 + lightness = self.data['lightness'] * 110 + return "hsl({}, {}%, {}%)".format(hue, saturation, lightness) + + def color_4(self): + hue = self.data['hue'] + saturation = self.data['saturation'] * 100 + saturation = 70 + lightness = self.data['lightness'] * 80 + return "hsl({}, {}%, {}%)".format(hue, saturation, lightness) + def json(self): data = {} data['id'] = self.padma_id