This commit is contained in:
Rushil Umaretiya 2020-08-26 23:58:06 -04:00
parent 9f07b9a920
commit 55d0685833
26 changed files with 426 additions and 102 deletions

View File

@ -39,7 +39,8 @@ INSTALLED_APPS = [
'django.contrib.messages', 'django.contrib.messages',
'django.contrib.staticfiles', 'django.contrib.staticfiles',
'widget_tweaks', 'widget_tweaks',
'django_cleanup' 'django_cleanup',
'profanity'
] ]
MIDDLEWARE = [ MIDDLEWARE = [
@ -108,7 +109,7 @@ AUTH_PASSWORD_VALIDATORS = [
LANGUAGE_CODE = 'en-us' LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'UTC' TIME_ZONE = 'America/New_York'
USE_I18N = True USE_I18N = True

View File

@ -1,16 +1,21 @@
from django import forms from django import forms
from django.contrib.auth.models import User from django.contrib.auth.models import User
import re from profanity.validators import validate_is_profane
from .models import Answer, EMOTION_CHOICES from .models import Answer, EMOTION_CHOICES
class PollForm(forms.ModelForm): class PollForm(forms.ModelForm):
hi = forms.CharField(max_length=200, required=True) hi = forms.CharField(max_length=200, validators=[validate_is_profane], required=False)
lo = forms.CharField(max_length=200, required=True) lo = forms.CharField(max_length=200, validators=[validate_is_profane], required=False)
emotion = forms.ChoiceField(widget=forms.RadioSelect, choices=EMOTION_CHOICES, required=True) emotion = forms.ChoiceField(widget=forms.RadioSelect, choices=EMOTION_CHOICES, required=False)
name = forms.CharField(max_length=100) name = forms.CharField(max_length=100, validators=[validate_is_profane], required=False)
place = forms.CharField(max_length=100) place = forms.CharField(max_length=100, validators=[validate_is_profane], required=False)
question = forms.CharField(max_length=200) 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: class Meta:
model = Answer model = Answer
fields = ['hi', 'lo', 'emotion', 'name', 'place', 'question'] fields = ['hi', 'lo', 'emotion', 'name', 'place','question']

View File

@ -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,
),
]

View File

@ -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'),
),
]

View File

@ -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),
),
]

View File

@ -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',
),
]

View File

@ -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 <span class="hi">Hi</span> 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 <span class="lo">Lo</span> 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),
),
]

View File

@ -1,6 +1,9 @@
from django.db import models from django.db import models
import os import os
from django.utils import timezone
import pytz
from django.core.files import File from django.core.files import File
@ -8,6 +11,7 @@ from django.conf import settings
from django.templatetags.static import static from django.templatetags.static import static
from django.utils.text import slugify from django.utils.text import slugify
from PIL import Image, ImageDraw, ImageFont from PIL import Image, ImageDraw, ImageFont
# Create your models here. # Create your models here.
@ -15,32 +19,52 @@ from PIL import Image, ImageDraw, ImageFont
class Location (models.Model): class Location (models.Model):
name = models.CharField(max_length=20, blank=True, null=True) name = models.CharField(max_length=20, blank=True, null=True)
slug = 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 = models.ImageField(default="hero.png", upload_to='heros')
hero_mobile = models.ImageField(default="hero-mobile.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): def __str__(self):
return self.name return self.name
def save(self, *args, **kwargs): 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.slug = slugify(self.name)
self.hero = f'heros/hero-{self.slug}.png' self.hero = f'heros/hero-{self.slug}.png'
self.hero_mobile = f'heros/hero-{self.slug}-mobile.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) super().save(*args, **kwargs)
output = f'{settings.PROJECT_PATH}/media/heros/hero-{self.slug}.png' output = f'{settings.PROJECT_PATH}/media/heros/hero-{self.slug}.png'
mobile_output = f'{settings.PROJECT_PATH}/media/heros/hero-{self.slug}-mobile.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) 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)
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.save(output)
img = Image.open(settings.PROJECT_PATH + static("css/res/results-mobile-noinsta.png"))
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) img.save(mobile_output)
@ -49,22 +73,22 @@ class Poll (models.Model):
location = models.OneToOneField(Location, on_delete=models.CASCADE) location = models.OneToOneField(Location, on_delete=models.CASCADE)
ask_hi = models.BooleanField(default=True) ask_hi = models.BooleanField(default=True)
hi_text = models.CharField(max_length=50, blank=True, null=True, default='What was the <span class="hi">Hi</span> of this we') hi_text = models.CharField(max_length=100, blank=True, null=True, default='What was the <span class="hi">Hi</span> of this we')
ask_lo = models.BooleanField(default=True) ask_lo = models.BooleanField(default=True)
lo_text = models.CharField(max_length=50, blank=True, null=True, default='What was the <span class="lo">Lo</span> of this we') lo_text = models.CharField(max_length=100, blank=True, null=True, default='What was the <span class="lo">Lo</span> of this we')
ask_emotion = models.BooleanField(default=True) 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) 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) 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) 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') 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) 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) name = models.CharField(max_length=100, blank=True, null=True)
place = 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) 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): def __str__(self):
return self.name return f"{self.name}'s response on {self.poll.location.name} at {self.time.strftime('%m/%d/%Y, %H:%M:%S')}"

View File

@ -0,0 +1 @@
create.html

View File

@ -1,5 +0,0 @@
{% extends 'homepage/base.html' %}
{% load static %}
{% block content %}
{% enblock %}

View File

@ -4,6 +4,17 @@
{% block content %} {% block content %}
<style type="text/css">
.hero {
background-image: url("{{ location.hero.url }}");
}
@media (max-width: 768px) {
.hero {
background-image: url("{{ location.hero_mobile.url }}");
}
}
</style>
<section class="jumbotron hero jumbotron-fluid m-0"> <section class="jumbotron hero jumbotron-fluid m-0">
<div class="container"> <div class="container">
<div class="arrow" id="arrow"></div> <div class="arrow" id="arrow"></div>
@ -52,8 +63,8 @@
</p> </p>
</div> </div>
</div> </div>
<section> <section class="poll-section ">
<div class="jumbotron poll jumbotron-fluid m-0"> <div class="jumbotron poll jumbotron-fluid m-0 border-0">
<div class="container"> <div class="container">
{% if messages %} {% if messages %}
{% for message in messages %} {% for message in messages %}
@ -65,31 +76,41 @@
</div> </div>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<form id='poll' method="POST">
<form id='poll' method="POST" novalidate>
{% csrf_token %} {% csrf_token %}
{% for hidden in form.hidden_fields %} {% for hidden in form.hidden_fields %}
{{ hidden }} {{ hidden }}
{% endfor %} {% endfor %}
{{ form.errors }}
{{ form.non_field_errors }}
<div class="row title pb-3 "> <div class="row title pb-3 ">
<p for="test" class="mx-auto subtitle">NOW IS YOUR TIME TO SHINE</p> <p for="test" class="mx-auto title">NOW IS YOUR TIME TO SHINE</p>
</div> </div>
{% if hi_text %} {% if hi_text %}
<div class="row pb-3 short-answer"> <div class="row pb-3 short-answer">
<label class="mx-auto" for="{{ form.hi.id_for_label }}">{{ hi_text|safe }}</label> <label class="mx-auto" for="{{ form.hi.id_for_label }}">{{ hi_text|safe }}</label>
{{ form.hi|add_class:'w-75 mx-auto rounded' }} {{ form.hi|add_class:'w-80 mx-auto rounded' }}
{% for error in form.hi.errors %} {% for error in form.hi.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{{ form.hi|add_class:'hidden' }}
{% endif %} {% endif %}
{% if lo_text %} {% if lo_text %}
<div class="row pb-3 short-answer"> <div class="row pb-3 short-answer">
<label class="mx-auto" for="{{ form.lo.id_for_label }}">What was the <span class="lo">Lo</span> of this week?</label> <label class="mx-auto" for="{{ form.lo.id_for_label }}">What was the <span class="lo">Lo</span> of this week?</label>
{{ form.lo|add_class:'w-75 mx-auto rounded' }} {{ form.lo|add_class:'w-80 mx-auto rounded' }}
{% for error in form.lo.errors %} {% for error in form.lo.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{{ form.lo|add_class:'hidden' }}
{% endif %} {% endif %}
<div class="row pb-1 subtitle"> <div class="row pb-1 subtitle">
<p class="mx-auto">SOME MORE QUESTIONS FOR THE SOUL</p> <p class="mx-auto">SOME MORE QUESTIONS FOR THE SOUL</p>
@ -109,33 +130,43 @@
</div> </div>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{% for radio in form.emotion %}
{{ radio.tag|add_class:'hidden' }}
{% endfor %}
{% endif %} {% endif %}
{% if name_text %} {% if name_text %}
<div class="row pb-3 short-answer"> <div class="row pb-3 short-answer">
<label class="mx-auto" for="{{ form.name.id_for_label }}">{{ name_text|safe }}</label> <label class="mx-auto" for="{{ form.name.id_for_label }}">{{ name_text|safe }}</label>
{{ form.name|add_class:'w-75 mx-auto rounded' }} {{ form.name|add_class:'w-80 mx-auto rounded' }}
{% for error in form.name.errors %} {% for error in form.name.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{{ form.name|add_class:'hidden' }}
{% endif %} {% endif %}
{% if place_text %} {% if place_text %}
<div class="row pb-3 short-answer"> <div class="row pb-3 short-answer">
<label class="mx-auto" for="{{ form.place.id_for_label }}">{{ place_text|safe }}</label> <label class="mx-auto" for="{{ form.place.id_for_label }}">{{ place_text|safe }}</label>
{{ form.place|add_class:'w-75 mx-auto rounded' }} {{ form.place|add_class:'w-80 mx-auto rounded' }}
{% for error in form.place.errors %} {% for error in form.place.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{{ form.place|add_class:'hidden' }}
{% endif %} {% endif %}
{% if question_text %} {% if question_text %}
<div class="row pb-3 short-answer"> <div class="row pb-3 short-answer">
<label class="mx-auto" for="{{ form.question.id_for_label }}">{{ question_text|safe }}</label> <label class="mx-auto" for="{{ form.question.id_for_label }}">{{ question_text|safe }}</label>
{{ form.question|add_class:'w-75 mx-auto rounded' }} {{ form.question|add_class:'w-80 mx-auto rounded' }}
{% for error in form.question.errors %} {% for error in form.question.errors %}
<span class="help-block">{{ error }}</span> <span class="help-block">{{ error }}</span>
{% endfor %} {% endfor %}
</div> </div>
{% else %}
{{ form.question|add_class:'hidden' }}
{% endif %} {% endif %}
<div class="row"> <div class="row">
<button type="submit" class="mx-auto btn text-uppercase"> <button type="submit" class="mx-auto btn text-uppercase">

View File

@ -0,0 +1,48 @@
{% extends 'homepage/base.html' %}
{% load static %}
{% block content %}
<style type="text/css">
body {
background-color: #353a40;
}
.hero {
background-image: url("{{ location.results.url }}");
}
@media (max-width: 768px) {
.hero {
background-image: url("{{ location.results_mobile.url }}");
}
}
</style>
<section class="jumbotron hero jumbotron-fluid m-0"></section>
{% for answer in answers %}
<div class="card text-white bg-dark mb-3">
<div class="row">
<div class="col">
{% if forloop.first %}
<div class="card-header">
Hey it's you!
</div>
{% endif %}
<div class="card-body">
<h5 class="card-title">{{answer.name}} from {{answer.place}} <small>at {{answer.time}}</small></h5>
<p class="card-text"><b>High of their week:</b> {{answer.hi}}</p>
<p class="card-text"><b>Low of their week:</b> {{answer.lo}}</p>
{% if poll.ask_question %}
<p class="card-text"><b>{{ answer.current_question }}</b>: {{answer.question}}</p>
{% endif %}
</div>
</div>
<div class="col">
<div class="card-body">
<h5 class="card-title mb-2">They were feeling:</h5>
<img class="results-emote" src="{% static 'css/res/'|add:answer.emotion|add:'.svg' %}" alt="">
</div>
</div>
</div>
</div>
{% endfor %}
{% endblock %}

View File

@ -4,5 +4,5 @@ from . import views
urlpatterns = [ urlpatterns = [
path ('', views.homepage, name="homepage"), path ('', views.homepage, name="homepage"),
path ('<slug:slug>/', views.homepage), path ('<slug:slug>/', views.homepage),
path ('finish/', views.finish, name="finish") path ('<slug:slug>/results/', views.results)
] ]

View File

@ -2,9 +2,8 @@ from django.shortcuts import render, redirect
from django.contrib import messages from django.contrib import messages
from django.shortcuts import get_object_or_404 from django.shortcuts import get_object_or_404
from django.http import HttpResponseNotFound from django.http import HttpResponseNotFound
from .forms import PollForm from .forms import PollForm
from .models import Poll, Location from .models import Poll, Location, Answer
# Create your views here. # Create your views here.
@ -54,8 +53,7 @@ def homepage (request, slug="arlington"):
instance = form.save(commit=False) instance = form.save(commit=False)
instance.poll = poll instance.poll = poll
instance.save() instance.save()
print(instance.pk) return redirect(f'/{location.slug}/results')
return redirect('finish')
else: else:
messages.error(request, 'Looks like there were some problems with your form!', extra_tags='danger') messages.error(request, 'Looks like there were some problems with your form!', extra_tags='danger')
print("invalid form!") print("invalid form!")
@ -64,6 +62,8 @@ def homepage (request, slug="arlington"):
context = { context = {
'form': form, 'form': form,
'poll': poll,
'location': location,
'hi_text': hi_text, 'hi_text': hi_text,
'lo_text': lo_text, 'lo_text': lo_text,
'emotion_text': emotion_text, 'emotion_text': emotion_text,
@ -74,6 +74,20 @@ def homepage (request, slug="arlington"):
return render(request, 'homepage/index.html', context=context) return render(request, 'homepage/index.html', context=context)
def finish (request): def results (request, slug="arlington"):
pass 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)

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 698 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 KiB

After

Width:  |  Height:  |  Size: 225 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 165 KiB

BIN
static/css/res/poll.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 97 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 57 KiB

BIN
static/css/res/results.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

View File

@ -17,9 +17,9 @@
src: url("./fonts/FuturaPTHeavy.otf"); src: url("./fonts/FuturaPTHeavy.otf");
font-family: "Futura-Heavy"; } font-family: "Futura-Heavy"; }
html { html {
background-color: #333; background-color: #222;
font-family: "Hanson-Bold", "Arial", sans-serif; font-family: "Futura-Heavy", "Arial", sans-serif;
overflow-x: none; } overflow-x: none !important; }
body { body {
overflow-y: scroll; overflow-y: scroll;
@ -33,8 +33,6 @@ body::-webkit-scrollbar {
display: none; } display: none; }
.hero { .hero {
color: #333 !important;
background-color: #333 !important;
background-image: url("res/hilo-hero-text.png"); background-image: url("res/hilo-hero-text.png");
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -87,26 +85,24 @@ body::-webkit-scrollbar {
background-color: #fff; } background-color: #fff; }
.info-header { .info-header {
color: white; color: #2b5291;
font-family: "Hanson-Bold", "Arial", sans-serif; font-family: "Futura-Heavy", "Arial", sans-serif; }
text-stroke: 3px #305899;
-webkit-text-stroke: 3px #305899; }
@media (max-width: 768px) { @media (max-width: 768px) {
.info-header { .info-header {
font-size: 1.25em; font-size: 1.25em; } }
text-stroke: 2px #305899;
-webkit-text-stroke: 2px #305899; } }
.info { .info {
font-size: .8em; font-size: .8em;
color: #2b5291; color: #2b5291;
font-family: "Hanson-Bold", "Arial", sans-serif; } font-family: "Futura-Heavy", "Arial", sans-serif; }
@media (max-width: 768px) { @media (max-width: 768px) {
.info { .info {
font-size: .75em; } } font-size: .75em; } }
#insta-section { #insta-section {
background-color: #333; } border-bottom: 2px solid white; }
#insta-section div {
background-color: pink; }
.bg-colored:before { .bg-colored:before {
right: -999em; right: -999em;
@ -118,49 +114,50 @@ body::-webkit-scrollbar {
top: 0; top: 0;
bottom: 0; } bottom: 0; }
.poll-section {
text-align: center; }
.poll { .poll {
color: white; color: white;
background-image: url("res/gradient-mobile.png"); background-color: #222;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-attachment: fixed; background-attachment: fixed;
font-family: "Hanson-Bold", "Arial", sans-serif; font-family: "Futura-Heavy", "Arial", sans-serif;
font-weight: lighter; font-weight: lighter;
font-size: .75em; } font-size: .75em; }
@media (max-width: 768px) {
.poll {
background-image: url("res/gradient-mobile.png"); } }
.short-answer { .short-answer {
font-size: 1.2em; } font-size: 1.1em; }
.title { .title {
color: #42b8c7; color: #42b8c7;
font-size: 1.45em; } font-size: 1.20em;
text-align: center; }
@media (min-width: 768px) {
.title {
font-size: 1.45em; } }
.subtitle { .subtitle {
color: #42b8c7; color: #42b8c7;
font-size: 1.15em; } font-size: 1.1em; }
@media (min-width: 768px) {
.subtitle {
font-size: 1.2em; } }
label { label {
font-size: 1.25em; } font-size: 1.25em; }
.emote img {
width: 25vw;
height: auto; }
.btn { .btn {
color: #2b5291; color: #2b5291;
border-image-repeat: none; } border-image-repeat: none; }
.hi { .hi {
color: #48B93E; color: #48B93E; }
font-family: "WildYouth", "Hanson-Bold", "Arial", sans-serif; }
.lo { .lo {
color: #E34848; color: #E34848; }
font-family: "WildYouth", "Hanson-Bold", "Arial", sans-serif; }
[type=radio] { [type=radio] {
position: absolute; position: absolute;
@ -170,10 +167,28 @@ label {
/* IMAGE STYLES */ /* IMAGE STYLES */
[type=radio] + img { [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 */ /* CHECKED STYLES */
[type=radio]:checked + img { [type=radio]:checked + img {
outline: 2px solid #2b5291; } outline: 2px solid #2b5291; }
.hidden {
display: none; }
.w-80 {
width: 80%; }
.results-emote {
width: 150px;
height: auto; }
/*# sourceMappingURL=styles.css.map */ /*# sourceMappingURL=styles.css.map */

View File

@ -12,7 +12,7 @@
} }
// fonts // fonts
$font-stack: 'Hanson-Bold','Arial',sans-serif; $font-stack: 'Futura-Heavy','Arial',sans-serif;
@font-face { @font-face {
src: url("./fonts/Hanson-Bold.ttf"); src: url("./fonts/Hanson-Bold.ttf");
@ -56,6 +56,7 @@ $mobile-width: 768px;
// colors // colors
$dark-grey: #333; $dark-grey: #333;
$darker-grey: #222;
$text: #2b5291; $text: #2b5291;
$text-light: #42b8c7; $text-light: #42b8c7;
$header-stroke: #305899; $header-stroke: #305899;
@ -64,10 +65,10 @@ $green: #48B93E;
$red: #E34848; $red: #E34848;
html { html {
background-color: $dark-grey; background-color: $darker-grey;
font-family: $font-stack; font-family: $font-stack;
overflow-x: none; overflow-x: none!important;
} }
body { body {
@ -81,8 +82,6 @@ body::-webkit-scrollbar {
} }
.hero { .hero {
color: $dark-grey !important;
background-color: $dark-grey !important;
background-image: url("res/hilo-hero-text.png"); background-image: url("res/hilo-hero-text.png");
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
@ -157,15 +156,15 @@ body::-webkit-scrollbar {
} }
.info-header { .info-header {
color: white; color: $text;
font-family: $font-stack; font-family: $font-stack;
text-stroke: 3px $header-stroke; //text-stroke: 3px $header-stroke;
-webkit-text-stroke: 3px $header-stroke; //-webkit-text-stroke: 3px $header-stroke;
@include mobile { @include mobile {
font-size: 1.25em; font-size: 1.25em;
text-stroke: 2px $header-stroke; //text-stroke: 2px $header-stroke;
-webkit-text-stroke: 2px $header-stroke; //-webkit-text-stroke: 2px $header-stroke;
} }
} }
@ -180,7 +179,10 @@ body::-webkit-scrollbar {
} }
#insta-section { #insta-section {
background-color: $dark-grey; border-bottom: 2px solid white;
div {
background-color: pink;
}
} }
.bg-colored:before { .bg-colored:before {
@ -194,9 +196,14 @@ body::-webkit-scrollbar {
bottom: 0; bottom: 0;
} }
.poll-section {
text-align: center;
}
.poll { .poll {
color: white; color: white;
background-image: url("res/gradient-mobile.png"); //background-image: url("res/poll-gradient.png");
background-color: $darker-grey;
background-position: center; background-position: center;
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
@ -205,33 +212,35 @@ body::-webkit-scrollbar {
font-weight: lighter; font-weight: lighter;
font-size: .75em; font-size: .75em;
@include mobile { @include mobile {
background-image: url("res/gradient-mobile.png"); //background-image: url("res/gradient-mobile.png");
}; };
} }
.short-answer { .short-answer {
font-size: 1.2em; font-size: 1.1em;
} }
.title { .title {
color: $text-light; color: $text-light;
font-size: 1.20em;
text-align: center;
@include desktop {
font-size: 1.45em; font-size: 1.45em;
}
} }
.subtitle { .subtitle {
color: $text-light; color: $text-light;
font-size: 1.15em; font-size: 1.1em;
@include desktop {
font-size: 1.2em;
}
} }
label { label {
font-size: 1.25em; font-size: 1.25em;
} }
.emote img {
width: 25vw;
height: auto;
}
.btn { .btn {
color: $text; color: $text;
border-image-repeat: none; border-image-repeat: none;
@ -239,12 +248,10 @@ label {
.hi { .hi {
color: $green; color: $green;
font-family: "WildYouth", $font-stack;
} }
.lo { .lo {
color: $red; color: $red;
font-family: "WildYouth", $font-stack;
} }
[type=radio] { [type=radio] {
@ -257,9 +264,30 @@ label {
/* IMAGE STYLES */ /* IMAGE STYLES */
[type=radio] + img { [type=radio] + img {
cursor: pointer; cursor: pointer;
width: 25vw;
height: auto;
@include desktop {
width: 10vw;
height: auto;
margin: auto;
display: block;
};
} }
/* CHECKED STYLES */ /* CHECKED STYLES */
[type=radio]:checked + img { [type=radio]:checked + img {
outline: 2px solid $text; outline: 2px solid $text;
} }
.hidden {
display: none;
}
.w-80 {
width: 80%;
}
.results-emote {
width: 150px;
height: auto;
}