Skip to content

Commit 95e3a94

Browse files
author
Kátia Nakamura
authored
Sponsoring Page (#110)
* Add sponsoring page * sponsors: move sponsoring to sponsors app * sponsors: add sponsoring page * Sponsoring card fix * Sponsoring cards stying
1 parent d7d01a1 commit 95e3a94

25 files changed

+617
-140
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Generated by Django 2.0.5 on 2018-08-04 21:48
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('conference', '0004_auto_20180802_2008'),
10+
]
11+
12+
operations = [
13+
migrations.AddField(
14+
model_name='conference',
15+
name='contact_email',
16+
field=models.EmailField(blank=True, max_length=254, null=True),
17+
),
18+
migrations.AddField(
19+
model_name='conference',
20+
name='sponsor_email',
21+
field=models.EmailField(blank=True, max_length=254, null=True),
22+
),
23+
]

pyconbalkan/conference/models.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class Conference(SingleActiveModel, ModelMeta):
2525
to_date = models.DateField(null=True, blank=True)
2626
max_attendees = models.PositiveIntegerField(null=True, blank=True)
2727
type = models.IntegerField(choices=CONF_TYPE)
28+
sponsor_email = models.EmailField(null=True, blank=True)
29+
contact_email = models.EmailField(null=True, blank=True)
2830

2931
# Links
3032
tickets = models.URLField(blank=True, null=True)

pyconbalkan/contact/forms.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
from django import forms
2+
from django.forms import ModelForm
3+
4+
from pyconbalkan.contact.models import Contact
5+
6+
7+
class ContactForm(ModelForm):
8+
name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Name', 'class': 'form-control'}),
9+
max_length=256, error_messages={'required': 'Please, enter your name.'}, label='')
10+
company = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Company', 'class': 'form-control'}),
11+
max_length=100, required=False, label='')
12+
email = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Email', 'class': 'form-control'}),
13+
error_messages={'required': 'Please, enter a valid email address.',
14+
'invalid': 'Please enter a valid email address.'}, label='')
15+
message = forms.CharField(widget=forms.Textarea(attrs={'placeholder': 'Message', 'class': 'form-control'}),
16+
error_messages={'required': 'Please, enter your message.'}, label='')
17+
18+
class Meta:
19+
model = Contact
20+
fields = '__all__'

pyconbalkan/contact/models.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
from django.db import models
2-
from django import forms
3-
from django.forms import ModelForm
42

53

64
class Contact(models.Model):
@@ -15,18 +13,3 @@ def __str__(self):
1513
return '{} | {}'.format(contact_str, self.company)
1614
return contact_str
1715

18-
19-
class ContactForm(ModelForm):
20-
name = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Name', 'class': 'form-control'}),
21-
max_length=256, error_messages={'required': 'Please, enter your name.'}, label='')
22-
company = forms.CharField(widget=forms.TextInput(attrs={'placeholder': 'Company', 'class': 'form-control'}),
23-
max_length=100, required=False, label='')
24-
email = forms.EmailField(widget=forms.TextInput(attrs={'placeholder': 'Email', 'class': 'form-control'}),
25-
error_messages={'required': 'Please, enter a valid email address.',
26-
'invalid': 'Please enter a valid email address.'}, label='')
27-
message = forms.CharField(widget=forms.Textarea(attrs={'placeholder': 'Message', 'class': 'form-control'}),
28-
error_messages={'required': 'Please, enter your message.'}, label='')
29-
30-
class Meta:
31-
model = Contact
32-
fields = '__all__'

pyconbalkan/contact/views.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from pyconbalkan.contact.models import Contact
77
from pyconbalkan.contact.serializers import ContactSerializer
8-
from .models import ContactForm
8+
from .forms import ContactForm
99

1010

1111
class ContactViewSet(viewsets.ModelViewSet):

pyconbalkan/core/static/css/components/card.css

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,43 @@
5757
font-size: 1.8rem;
5858
text-align: center;
5959
}
60+
61+
.sponsoring {
62+
display: flex;
63+
flex-flow: row wrap;
64+
justify-content: flex-start;
65+
align-content: center;
66+
}
67+
68+
.sponsoring__item {
69+
flex: 0 0 30%;
70+
padding: 40px;
71+
margin: 0 40px 40px 0;
72+
background-color: #f3d66c;
73+
color: #32383A;
74+
border-radius: 20px;
75+
}
76+
77+
.sponsoring__item:hover {
78+
background-color: #22A4D9;
79+
color: white;
80+
}
81+
82+
.sponsoring__item:hover h1,
83+
.sponsoring__item:hover .package__description {
84+
color: white;
85+
}
86+
87+
.sponsoring__item h1,
88+
.sponsoring__item .package__description {
89+
margin-top: 0;
90+
color: #32383A;
91+
}
92+
93+
.sponsoring__item h1 span.sponsoring--limit {
94+
font-weight: normal;
95+
}
96+
97+
.sponsoring__item h1 span.sponsoring--amount {
98+
font-size: 22px;
99+
}

pyconbalkan/core/static/css/components/form.css

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,22 @@
2020
justify-content: flex-start;
2121
align-items: flex-start;
2222
}
23+
24+
.form-group p label {
25+
display: block;
26+
margin-top: 20px;
27+
font-size: 18px;
28+
font-weight: bold;
29+
line-height: 20px;
30+
}
31+
32+
.form-group input[type=radio] {
33+
display: inline-block;
34+
vertical-align: middle;
35+
width: 20px;
36+
height: 20px;
37+
margin-right: 10px;
38+
}
2339

2440
@media (max-width: 1280px) {
2541
.form-group {
@@ -30,7 +46,6 @@
3046

3147
@media (max-width: 1280px) {
3248
.form .form-group .button--fullwidth {
33-
width: 80%;
3449
align-self: center;
3550
}
3651
}
@@ -44,10 +59,22 @@
4459
@media (max-width: 1280px) {
4560
.form p {
4661
flex: 1;
47-
width: 80%;
4862
}
4963
}
5064

65+
.form ul,
66+
.form li {
67+
padding: 0;
68+
margin: 0;
69+
list-style: none;
70+
text-align: left;
71+
width: 100%;
72+
}
73+
74+
.form-group li {
75+
height: 25px;
76+
}
77+
5178
.form .form-control {
5279
display: block;
5380
width: 100%;

pyconbalkan/core/static/css/components/person.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,14 @@
1212
align-content: flex-start;
1313
}
1414

15+
@media (max-width: 1024px) {
16+
.speaker,
17+
.organizer,
18+
.sponsor {
19+
flex-flow: column wrap;
20+
}
21+
}
22+
1523
.speaker__image,
1624
.organizer__image,
1725
.sponsor__image {

pyconbalkan/core/static/css/components/sponsors.css

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@
3232
}
3333

3434
.sponsor {
35-
width: 350px;
36-
height: 300px;
3735
color: #F3D66C;
38-
margin: 5px 10px;
3936
}
4037

41-
.sponsor p {
42-
padding: 10px;
38+
@media (max-width: 1024px) {
39+
.sponsor {
40+
width: 350px;
41+
height: 300px;
42+
}
4343
}
4444

4545
.sponsor img {
@@ -65,6 +65,6 @@
6565
@media (max-width: 767px) {
6666
.card__info {
6767
top: -170px;
68-
left: 160px;
68+
left: 160px;
6969
}
7070
}
9.22 MB
Binary file not shown.

0 commit comments

Comments
 (0)