diff --git a/config/settings.py b/config/settings.py index df967cb..e8d929b 100755 --- a/config/settings.py +++ b/config/settings.py @@ -39,7 +39,8 @@ INSTALLED_APPS = [ 'django.contrib.messages', 'django.contrib.staticfiles', 'widget_tweaks', - 'django_cleanup' + 'django_cleanup', + 'profanity' ] MIDDLEWARE = [ @@ -108,7 +109,7 @@ AUTH_PASSWORD_VALIDATORS = [ LANGUAGE_CODE = 'en-us' -TIME_ZONE = 'UTC' +TIME_ZONE = 'America/New_York' USE_I18N = True diff --git a/homepage/forms.py b/homepage/forms.py index a55987a..11af0b8 100644 --- a/homepage/forms.py +++ b/homepage/forms.py @@ -1,16 +1,21 @@ from django import forms from django.contrib.auth.models import User -import re +from profanity.validators import validate_is_profane from .models import Answer, EMOTION_CHOICES class PollForm(forms.ModelForm): - hi = forms.CharField(max_length=200, required=True) - lo = forms.CharField(max_length=200, required=True) - emotion = forms.ChoiceField(widget=forms.RadioSelect, choices=EMOTION_CHOICES, required=True) - name = forms.CharField(max_length=100) - place = forms.CharField(max_length=100) - question = forms.CharField(max_length=200) + hi = forms.CharField(max_length=200, validators=[validate_is_profane], required=False) + lo = forms.CharField(max_length=200, validators=[validate_is_profane], required=False) + emotion = forms.ChoiceField(widget=forms.RadioSelect, choices=EMOTION_CHOICES, required=False) + name = forms.CharField(max_length=100, validators=[validate_is_profane], required=False) + place = forms.CharField(max_length=100, validators=[validate_is_profane], required=False) + question = forms.CharField(max_length=200, validators=[validate_is_profane], required=False) + + def __init__(self, *args, **kwargs): + super(PollForm, self).__init__(*args, **kwargs) + self.initial['emotion'] = 'meh' + self.fields['emotion'] = forms.ChoiceField(widget=forms.RadioSelect, choices=EMOTION_CHOICES) class Meta: model = Answer - fields = ['hi', 'lo', 'emotion', 'name', 'place', 'question'] \ No newline at end of file + fields = ['hi', 'lo', 'emotion', 'name', 'place','question'] \ No newline at end of file diff --git a/homepage/migrations/0008_answer_time.py b/homepage/migrations/0008_answer_time.py new file mode 100644 index 0000000..64489cc --- /dev/null +++ b/homepage/migrations/0008_answer_time.py @@ -0,0 +1,20 @@ +# Generated by Django 3.1 on 2020-08-26 20:11 + +from django.db import migrations, models +import django.utils.timezone + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0007_location_hero_mobile'), + ] + + operations = [ + migrations.AddField( + model_name='answer', + name='time', + field=models.DateTimeField(default=django.utils.timezone.now, verbose_name='time answered'), + preserve_default=False, + ), + ] diff --git a/homepage/migrations/0009_auto_20200826_2331.py b/homepage/migrations/0009_auto_20200826_2331.py new file mode 100644 index 0000000..fa2565e --- /dev/null +++ b/homepage/migrations/0009_auto_20200826_2331.py @@ -0,0 +1,33 @@ +# Generated by Django 3.1 on 2020-08-26 23:31 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0008_answer_time'), + ] + + operations = [ + migrations.AddField( + model_name='location', + name='insta', + field=models.CharField(blank=True, max_length=20, null=True), + ), + migrations.AddField( + model_name='location', + name='results', + field=models.ImageField(default='results.png', upload_to='results'), + ), + migrations.AddField( + model_name='location', + name='results_mobile', + field=models.ImageField(default='results-mobile.png', upload_to='results'), + ), + migrations.AlterField( + model_name='answer', + name='time', + field=models.DateTimeField(blank=True, null=True, verbose_name='time answered'), + ), + ] diff --git a/homepage/migrations/0010_answer_question_text.py b/homepage/migrations/0010_answer_question_text.py new file mode 100644 index 0000000..9806a75 --- /dev/null +++ b/homepage/migrations/0010_answer_question_text.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-08-26 23:55 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0009_auto_20200826_2331'), + ] + + operations = [ + migrations.AddField( + model_name='answer', + name='question_text', + field=models.CharField(blank=True, max_length=50, null=True), + ), + ] diff --git a/homepage/migrations/0011_auto_20200826_2014.py b/homepage/migrations/0011_auto_20200826_2014.py new file mode 100644 index 0000000..f6158f5 --- /dev/null +++ b/homepage/migrations/0011_auto_20200826_2014.py @@ -0,0 +1,18 @@ +# Generated by Django 3.1 on 2020-08-27 00:14 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0010_answer_question_text'), + ] + + operations = [ + migrations.RenameField( + model_name='answer', + old_name='question_text', + new_name='current_question', + ), + ] diff --git a/homepage/migrations/0012_auto_20200826_2354.py b/homepage/migrations/0012_auto_20200826_2354.py new file mode 100644 index 0000000..7b5fcb7 --- /dev/null +++ b/homepage/migrations/0012_auto_20200826_2354.py @@ -0,0 +1,48 @@ +# Generated by Django 3.1 on 2020-08-27 03:54 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0011_auto_20200826_2014'), + ] + + operations = [ + migrations.AlterField( + model_name='answer', + name='current_question', + field=models.CharField(blank=True, max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='emotion_text', + field=models.CharField(blank=True, default='how are you feeling today?', max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='hi_text', + field=models.CharField(blank=True, default='What was the Hi of this we', max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='lo_text', + field=models.CharField(blank=True, default='What was the Lo of this we', max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='name_text', + field=models.CharField(blank=True, default="what's your name?", max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='place_text', + field=models.CharField(blank=True, default='where are you from?', max_length=100, null=True), + ), + migrations.AlterField( + model_name='poll', + name='question_text', + field=models.CharField(blank=True, max_length=100, null=True), + ), + ] diff --git a/homepage/models.py b/homepage/models.py index aeef0a8..e718dfc 100755 --- a/homepage/models.py +++ b/homepage/models.py @@ -1,6 +1,9 @@ from django.db import models import os +from django.utils import timezone +import pytz + from django.core.files import File @@ -8,6 +11,7 @@ from django.conf import settings from django.templatetags.static import static from django.utils.text import slugify + from PIL import Image, ImageDraw, ImageFont # Create your models here. @@ -15,33 +19,53 @@ from PIL import Image, ImageDraw, ImageFont class Location (models.Model): name = models.CharField(max_length=20, blank=True, null=True) slug = models.CharField(max_length=20, blank=True, null=True) + insta = models.CharField(max_length=20, blank=True, null=True) hero = models.ImageField(default="hero.png", upload_to='heros') hero_mobile = models.ImageField(default="hero-mobile.png", upload_to='heros') + results = models.ImageField(default="results.png", upload_to='results') + results_mobile = models.ImageField(default="results-mobile.png", upload_to='results') + def __str__(self): return self.name def save(self, *args, **kwargs): + def drawPic (input, output, font, x, y, text): + img = Image.open(input) + draw = ImageDraw.Draw(img) + draw.text((x,y), text, (255,255,255), font=font) + img.save(output) + self.slug = slugify(self.name) self.hero = f'heros/hero-{self.slug}.png' self.hero_mobile = f'heros/hero-{self.slug}-mobile.png' + if self.insta is not None and self.insta is not '' and self.insta[0] is not '@': + self.insta = '@' + self.insta + + self.results = f'results/results-{self.slug}.png' + self.results_mobile = f'results/results-{self.slug}-mobile.png' super().save(*args, **kwargs) output = f'{settings.PROJECT_PATH}/media/heros/hero-{self.slug}.png' mobile_output = f'{settings.PROJECT_PATH}/media/heros/hero-{self.slug}-mobile.png' - - img = Image.open(settings.PROJECT_PATH + static("css/res/hero.png")) - draw = ImageDraw.Draw(img) font = ImageFont.truetype(settings.PROJECT_PATH + static("css/fonts/Shorelines-Script-Bold.otf"), 80) - draw.text((1050,450), self.slug, (255,255,255), font=font) - img.save(output) - img = Image.open(settings.PROJECT_PATH + static("css/res/hero-mobile.png")) - draw = ImageDraw.Draw(img) - font = ImageFont.truetype(settings.PROJECT_PATH + static("css/fonts/Shorelines-Script-Bold.otf"), 80) - draw.text((420,860), self.slug, (255,255,255), font=font) - img.save(mobile_output) + drawPic (settings.PROJECT_PATH + static("css/res/hero.png"), output, font, 1050, 450, self.slug) + drawPic (settings.PROJECT_PATH + static("css/res/hero-mobile.png"), mobile_output, font, 420, 860, self.slug) + + output = f'{settings.PROJECT_PATH}/media/results/results-{self.slug}.png' + mobile_output = f'{settings.PROJECT_PATH}/media/results/results-{self.slug}-mobile.png' + font = ImageFont.truetype(settings.PROJECT_PATH + static("css/fonts/FuturaPTMedium.otf"), 60) + + if self.insta is not None and self.insta is not '': + drawPic (settings.PROJECT_PATH + static("css/res/results.png"), output, font, 735, 805, self.insta) + drawPic (settings.PROJECT_PATH + static("css/res/results-mobile.png"), mobile_output, font, 360, 1380, self.insta) + else: + img = Image.open(settings.PROJECT_PATH + static("css/res/results-noinsta.png")) + img.save(output) + img = Image.open(settings.PROJECT_PATH + static("css/res/results-mobile-noinsta.png")) + img.save(mobile_output) @@ -49,22 +73,22 @@ class Poll (models.Model): location = models.OneToOneField(Location, on_delete=models.CASCADE) ask_hi = models.BooleanField(default=True) - hi_text = models.CharField(max_length=50, blank=True, null=True, default='What was the Hi of this we') + hi_text = models.CharField(max_length=100, blank=True, null=True, default='What was the Hi of this we') ask_lo = models.BooleanField(default=True) - lo_text = models.CharField(max_length=50, blank=True, null=True, default='What was the Lo of this we') + lo_text = models.CharField(max_length=100, blank=True, null=True, default='What was the Lo of this we') ask_emotion = models.BooleanField(default=True) - emotion_text = models.CharField(max_length=50, blank=True, null=True, default="how are you feeling today?") + emotion_text = models.CharField(max_length=100, blank=True, null=True, default="how are you feeling today?") ask_name = models.BooleanField(default=True) - name_text = models.CharField(max_length=50, blank=True, null=True, default="what's your name?") + name_text = models.CharField(max_length=100, blank=True, null=True, default="what's your name?") ask_place = models.BooleanField(default=True) - place_text = models.CharField(max_length=50, blank=True, null=True, default="where are you from?") + place_text = models.CharField(max_length=100, blank=True, null=True, default="where are you from?") ask_question = models.BooleanField(default=False) - question_text = models.CharField(max_length=50, blank=True, null=True) + question_text = models.CharField(max_length=100, blank=True, null=True) pub_date = models.DateTimeField('date published') @@ -86,7 +110,32 @@ class Answer (models.Model): emotion = models.CharField(max_length=8, default='meh', choices=EMOTION_CHOICES, blank=True, null=True) name = models.CharField(max_length=100, blank=True, null=True) place = models.CharField(max_length=100, blank=True, null=True) + current_question = models.CharField(max_length=100, blank=True, null=True) question = models.CharField(max_length=200, blank=True, null=True) + time = models.DateTimeField('time answered', blank=True, null=True) + + def save(self, *args, **kwargs): + self.time = timezone.now() + if self.hi is '': + self.hi = "Not stated" + + if self.lo is '': + self.lo = "Not stated" + + if self.name is '': + self.name = "Anonymous" + + if self.place is '': + self.place = "Somewhere" + + if self.question is '': + self.question = "Not stated" + + if self.current_question is '': + self.current_question = self.poll.question_text + + super().save(self, *args, **kwargs) + def __str__(self): - return self.name \ No newline at end of file + return f"{self.name}'s response on {self.poll.location.name} at {self.time.strftime('%m/%d/%Y, %H:%M:%S')}" \ No newline at end of file diff --git a/homepage/templates/homepage/create.html b/homepage/templates/homepage/create.html new file mode 100644 index 0000000..a16aec7 --- /dev/null +++ b/homepage/templates/homepage/create.html @@ -0,0 +1 @@ +create.html diff --git a/homepage/templates/homepage/finish.html b/homepage/templates/homepage/finish.html deleted file mode 100644 index e8fc68c..0000000 --- a/homepage/templates/homepage/finish.html +++ /dev/null @@ -1,5 +0,0 @@ -{% extends 'homepage/base.html' %} -{% load static %} - -{% block content %} -{% enblock %} \ No newline at end of file diff --git a/homepage/templates/homepage/index.html b/homepage/templates/homepage/index.html index 3d9ddf7..9173ef1 100755 --- a/homepage/templates/homepage/index.html +++ b/homepage/templates/homepage/index.html @@ -4,6 +4,17 @@ {% block content %} + @@ -52,8 +63,8 @@ - - + + {% if messages %} {% for message in messages %} @@ -65,31 +76,41 @@ {% endfor %} {% endif %} - + + {% csrf_token %} {% for hidden in form.hidden_fields %} {{ hidden }} {% endfor %} + + + {{ form.errors }} + {{ form.non_field_errors }} + - NOW IS YOUR TIME TO SHINE + NOW IS YOUR TIME TO SHINE {% if hi_text %} {{ hi_text|safe }} - {{ form.hi|add_class:'w-75 mx-auto rounded' }} + {{ form.hi|add_class:'w-80 mx-auto rounded' }} {% for error in form.hi.errors %} {{ error }} {% endfor %} + {% else %} + {{ form.hi|add_class:'hidden' }} {% endif %} {% if lo_text %} What was the Lo of this week? - {{ form.lo|add_class:'w-75 mx-auto rounded' }} + {{ form.lo|add_class:'w-80 mx-auto rounded' }} {% for error in form.lo.errors %} {{ error }} {% endfor %} + {% else %} + {{ form.lo|add_class:'hidden' }} {% endif %} SOME MORE QUESTIONS FOR THE SOUL @@ -109,33 +130,43 @@ {% endfor %} + {% else %} + {% for radio in form.emotion %} + {{ radio.tag|add_class:'hidden' }} + {% endfor %} {% endif %} {% if name_text %} {{ name_text|safe }} - {{ form.name|add_class:'w-75 mx-auto rounded' }} + {{ form.name|add_class:'w-80 mx-auto rounded' }} {% for error in form.name.errors %} {{ error }} {% endfor %} + {% else %} + {{ form.name|add_class:'hidden' }} {% endif %} {% if place_text %} {{ place_text|safe }} - {{ form.place|add_class:'w-75 mx-auto rounded' }} + {{ form.place|add_class:'w-80 mx-auto rounded' }} {% for error in form.place.errors %} {{ error }} {% endfor %} + {% else %} + {{ form.place|add_class:'hidden' }} {% endif %} {% if question_text %} {{ question_text|safe }} - {{ form.question|add_class:'w-75 mx-auto rounded' }} + {{ form.question|add_class:'w-80 mx-auto rounded' }} {% for error in form.question.errors %} {{ error }} {% endfor %} + {% else %} + {{ form.question|add_class:'hidden' }} {% endif %} diff --git a/homepage/templates/homepage/results.html b/homepage/templates/homepage/results.html new file mode 100644 index 0000000..7c5a833 --- /dev/null +++ b/homepage/templates/homepage/results.html @@ -0,0 +1,48 @@ +{% extends 'homepage/base.html' %} +{% load static %} + +{% block content %} + + +{% for answer in answers %} + + + + {% if forloop.first %} + + Hey it's you! + + {% endif %} + + {{answer.name}} from {{answer.place}} at {{answer.time}} + High of their week: {{answer.hi}} + Low of their week: {{answer.lo}} + {% if poll.ask_question %} + {{ answer.current_question }}: {{answer.question}} + {% endif %} + + + + + They were feeling: + + + + + +{% endfor %} +{% endblock %} \ No newline at end of file diff --git a/homepage/urls.py b/homepage/urls.py index d4e6659..32be859 100755 --- a/homepage/urls.py +++ b/homepage/urls.py @@ -4,5 +4,5 @@ from . import views urlpatterns = [ path ('', views.homepage, name="homepage"), path ('/', views.homepage), - path ('finish/', views.finish, name="finish") + path ('/results/', views.results) ] diff --git a/homepage/views.py b/homepage/views.py index aeb72dd..8134868 100755 --- a/homepage/views.py +++ b/homepage/views.py @@ -2,9 +2,8 @@ from django.shortcuts import render, redirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.http import HttpResponseNotFound - from .forms import PollForm -from .models import Poll, Location +from .models import Poll, Location, Answer # Create your views here. @@ -54,8 +53,7 @@ def homepage (request, slug="arlington"): instance = form.save(commit=False) instance.poll = poll instance.save() - print(instance.pk) - return redirect('finish') + return redirect(f'/{location.slug}/results') else: messages.error(request, 'Looks like there were some problems with your form!', extra_tags='danger') print("invalid form!") @@ -64,6 +62,8 @@ def homepage (request, slug="arlington"): context = { 'form': form, + 'poll': poll, + 'location': location, 'hi_text': hi_text, 'lo_text': lo_text, 'emotion_text': emotion_text, @@ -74,6 +74,20 @@ def homepage (request, slug="arlington"): return render(request, 'homepage/index.html', context=context) -def finish (request): - pass +def results (request, slug="arlington"): + location = get_object_or_404(Location, slug=slug) + try: + poll = location.poll + except: + return HttpResponseNotFound(f'404: No poll was found for {location}!') + + answers = Answer.objects.filter(poll=poll) + + context = { + 'location':location, + 'poll':poll, + 'answers':answers, + } + + return render(request, 'homepage/results.html', context=context) \ No newline at end of file diff --git a/static/css/res/FuturaPTMedium.otf b/static/css/res/FuturaPTMedium.otf new file mode 100644 index 0000000..5226bca Binary files /dev/null and b/static/css/res/FuturaPTMedium.otf differ diff --git a/static/css/res/banner-wys.png b/static/css/res/banner-wys.png new file mode 100644 index 0000000..e75fc52 Binary files /dev/null and b/static/css/res/banner-wys.png differ diff --git a/static/css/res/banner.png b/static/css/res/banner.png index e75fc52..4ef2877 100755 Binary files a/static/css/res/banner.png and b/static/css/res/banner.png differ diff --git a/static/css/res/hilo-hero.png b/static/css/res/hilo-hero.png new file mode 100644 index 0000000..3308b5a Binary files /dev/null and b/static/css/res/hilo-hero.png differ diff --git a/static/css/res/poll-mobile.png b/static/css/res/poll-mobile.png new file mode 100644 index 0000000..6484ee9 Binary files /dev/null and b/static/css/res/poll-mobile.png differ diff --git a/static/css/res/poll.png b/static/css/res/poll.png new file mode 100644 index 0000000..6018d2e Binary files /dev/null and b/static/css/res/poll.png differ diff --git a/static/css/res/results-mobile-noinsta.png b/static/css/res/results-mobile-noinsta.png new file mode 100644 index 0000000..ac651ed Binary files /dev/null and b/static/css/res/results-mobile-noinsta.png differ diff --git a/static/css/res/results-mobile.png b/static/css/res/results-mobile.png new file mode 100644 index 0000000..cb1af36 Binary files /dev/null and b/static/css/res/results-mobile.png differ diff --git a/static/css/res/results-noinsta.png b/static/css/res/results-noinsta.png new file mode 100644 index 0000000..5b2f28c Binary files /dev/null and b/static/css/res/results-noinsta.png differ diff --git a/static/css/res/results.png b/static/css/res/results.png new file mode 100644 index 0000000..cf68a51 Binary files /dev/null and b/static/css/res/results.png differ diff --git a/static/css/styles.css b/static/css/styles.css index fa72606..07e5078 100644 --- a/static/css/styles.css +++ b/static/css/styles.css @@ -17,9 +17,9 @@ src: url("./fonts/FuturaPTHeavy.otf"); font-family: "Futura-Heavy"; } html { - background-color: #333; - font-family: "Hanson-Bold", "Arial", sans-serif; - overflow-x: none; } + background-color: #222; + font-family: "Futura-Heavy", "Arial", sans-serif; + overflow-x: none !important; } body { overflow-y: scroll; @@ -33,8 +33,6 @@ body::-webkit-scrollbar { display: none; } .hero { - color: #333 !important; - background-color: #333 !important; background-image: url("res/hilo-hero-text.png"); background-position: center; background-repeat: no-repeat; @@ -87,26 +85,24 @@ body::-webkit-scrollbar { background-color: #fff; } .info-header { - color: white; - font-family: "Hanson-Bold", "Arial", sans-serif; - text-stroke: 3px #305899; - -webkit-text-stroke: 3px #305899; } + color: #2b5291; + font-family: "Futura-Heavy", "Arial", sans-serif; } @media (max-width: 768px) { .info-header { - font-size: 1.25em; - text-stroke: 2px #305899; - -webkit-text-stroke: 2px #305899; } } + font-size: 1.25em; } } .info { font-size: .8em; color: #2b5291; - font-family: "Hanson-Bold", "Arial", sans-serif; } + font-family: "Futura-Heavy", "Arial", sans-serif; } @media (max-width: 768px) { .info { font-size: .75em; } } #insta-section { - background-color: #333; } + border-bottom: 2px solid white; } + #insta-section div { + background-color: pink; } .bg-colored:before { right: -999em; @@ -118,49 +114,50 @@ body::-webkit-scrollbar { top: 0; bottom: 0; } +.poll-section { + text-align: center; } + .poll { color: white; - background-image: url("res/gradient-mobile.png"); + background-color: #222; background-position: center; background-repeat: no-repeat; background-size: cover; background-attachment: fixed; - font-family: "Hanson-Bold", "Arial", sans-serif; + font-family: "Futura-Heavy", "Arial", sans-serif; font-weight: lighter; font-size: .75em; } - @media (max-width: 768px) { - .poll { - background-image: url("res/gradient-mobile.png"); } } .short-answer { - font-size: 1.2em; } + font-size: 1.1em; } .title { color: #42b8c7; - font-size: 1.45em; } + font-size: 1.20em; + text-align: center; } + @media (min-width: 768px) { + .title { + font-size: 1.45em; } } .subtitle { color: #42b8c7; - font-size: 1.15em; } + font-size: 1.1em; } + @media (min-width: 768px) { + .subtitle { + font-size: 1.2em; } } label { font-size: 1.25em; } -.emote img { - width: 25vw; - height: auto; } - .btn { color: #2b5291; border-image-repeat: none; } .hi { - color: #48B93E; - font-family: "WildYouth", "Hanson-Bold", "Arial", sans-serif; } + color: #48B93E; } .lo { - color: #E34848; - font-family: "WildYouth", "Hanson-Bold", "Arial", sans-serif; } + color: #E34848; } [type=radio] { position: absolute; @@ -170,10 +167,28 @@ label { /* IMAGE STYLES */ [type=radio] + img { - cursor: pointer; } + cursor: pointer; + width: 25vw; + height: auto; } + @media (min-width: 768px) { + [type=radio] + img { + width: 10vw; + height: auto; + margin: auto; + display: block; } } /* CHECKED STYLES */ [type=radio]:checked + img { outline: 2px solid #2b5291; } +.hidden { + display: none; } + +.w-80 { + width: 80%; } + +.results-emote { + width: 150px; + height: auto; } + /*# sourceMappingURL=styles.css.map */ diff --git a/static/css/styles.scss b/static/css/styles.scss index 6492c03..582668c 100755 --- a/static/css/styles.scss +++ b/static/css/styles.scss @@ -12,7 +12,7 @@ } // fonts -$font-stack: 'Hanson-Bold','Arial',sans-serif; +$font-stack: 'Futura-Heavy','Arial',sans-serif; @font-face { src: url("./fonts/Hanson-Bold.ttf"); @@ -56,6 +56,7 @@ $mobile-width: 768px; // colors $dark-grey: #333; +$darker-grey: #222; $text: #2b5291; $text-light: #42b8c7; $header-stroke: #305899; @@ -64,10 +65,10 @@ $green: #48B93E; $red: #E34848; html { - background-color: $dark-grey; + background-color: $darker-grey; font-family: $font-stack; - overflow-x: none; + overflow-x: none!important; } body { @@ -81,8 +82,6 @@ body::-webkit-scrollbar { } .hero { - color: $dark-grey !important; - background-color: $dark-grey !important; background-image: url("res/hilo-hero-text.png"); background-position: center; background-repeat: no-repeat; @@ -157,15 +156,15 @@ body::-webkit-scrollbar { } .info-header { - color: white; + color: $text; font-family: $font-stack; - text-stroke: 3px $header-stroke; - -webkit-text-stroke: 3px $header-stroke; + //text-stroke: 3px $header-stroke; + //-webkit-text-stroke: 3px $header-stroke; @include mobile { font-size: 1.25em; - text-stroke: 2px $header-stroke; - -webkit-text-stroke: 2px $header-stroke; + //text-stroke: 2px $header-stroke; + //-webkit-text-stroke: 2px $header-stroke; } } @@ -180,7 +179,10 @@ body::-webkit-scrollbar { } #insta-section { - background-color: $dark-grey; + border-bottom: 2px solid white; + div { + background-color: pink; + } } .bg-colored:before { @@ -194,9 +196,14 @@ body::-webkit-scrollbar { bottom: 0; } +.poll-section { + text-align: center; +} + .poll { color: white; - background-image: url("res/gradient-mobile.png"); + //background-image: url("res/poll-gradient.png"); + background-color: $darker-grey; background-position: center; background-repeat: no-repeat; background-size: cover; @@ -205,33 +212,35 @@ body::-webkit-scrollbar { font-weight: lighter; font-size: .75em; @include mobile { - background-image: url("res/gradient-mobile.png"); + //background-image: url("res/gradient-mobile.png"); }; } .short-answer { - font-size: 1.2em; + font-size: 1.1em; } .title { color: $text-light; - font-size: 1.45em; + font-size: 1.20em; + text-align: center; + @include desktop { + font-size: 1.45em; + } } .subtitle { color: $text-light; - font-size: 1.15em; + font-size: 1.1em; + @include desktop { + font-size: 1.2em; + } } label { font-size: 1.25em; } -.emote img { - width: 25vw; - height: auto; -} - .btn { color: $text; border-image-repeat: none; @@ -239,12 +248,10 @@ label { .hi { color: $green; - font-family: "WildYouth", $font-stack; } .lo { color: $red; - font-family: "WildYouth", $font-stack; } [type=radio] { @@ -257,9 +264,30 @@ label { /* IMAGE STYLES */ [type=radio] + img { cursor: pointer; + width: 25vw; + height: auto; + @include desktop { + width: 10vw; + height: auto; + margin: auto; + display: block; + }; } /* CHECKED STYLES */ [type=radio]:checked + img { outline: 2px solid $text; +} + +.hidden { + display: none; +} + +.w-80 { + width: 80%; +} + +.results-emote { + width: 150px; + height: auto; } \ No newline at end of file
NOW IS YOUR TIME TO SHINE
SOME MORE QUESTIONS FOR THE SOUL
High of their week: {{answer.hi}}
Low of their week: {{answer.lo}}
{{ answer.current_question }}: {{answer.question}}