Skip to content

Commit

Permalink
LinkedIn stuff (#2367)
Browse files Browse the repository at this point in the history
* Adds linkedin to socialize
* Adds linkedin to sponsor profile

Closes #2365
  • Loading branch information
ewdurbin committed Feb 9, 2024
1 parent cde08ed commit 096ac33
Show file tree
Hide file tree
Showing 8 changed files with 92 additions and 3 deletions.
6 changes: 6 additions & 0 deletions sponsors/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ class SponsorshipApplicationForm(forms.Form):
help_text="For promotion of your sponsorship on social media.",
required=False,
)
linked_in_page_url = forms.URLField(
label="LinkedIn page URL",
help_text="URL for your LinkedIn page.",
required=False,
)
web_logo = forms.ImageField(
label="Sponsor web logo",
help_text="For display on our sponsor webpage. High resolution PNG or JPG, smallest dimension no less than 256px",
Expand Down Expand Up @@ -379,6 +384,7 @@ def save(self):
description=self.cleaned_data.get("description", ""),
landing_page_url=self.cleaned_data.get("landing_page_url", ""),
twitter_handle=self.cleaned_data["twitter_handle"],
linked_in_page_url=self.cleaned_data["linked_in_page_url"],
print_logo=self.cleaned_data.get("print_logo"),
country_of_incorporation=self.cleaned_data.get("country_of_incorporation", ""),
state_of_incorporation=self.cleaned_data.get("state_of_incorporation", ""),
Expand Down
18 changes: 18 additions & 0 deletions sponsors/migrations/0101_sponsor_linked_in_page_url.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 2.2.24 on 2024-02-09 13:30

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('sponsors', '0100_auto_20240107_1054'),
]

operations = [
migrations.AddField(
model_name='sponsor',
name='linked_in_page_url',
field=models.URLField(blank=True, help_text='URL for your LinkedIn page.', null=True, verbose_name='LinkedIn page URL'),
),
]
6 changes: 6 additions & 0 deletions sponsors/models/sponsors.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ class Sponsor(ContentManageable):
null=True,
verbose_name="Twitter handle",
)
linked_in_page_url = models.URLField(
blank=True,
null=True,
verbose_name="LinkedIn page URL",
help_text="URL for your LinkedIn page."
)
web_logo = models.ImageField(
upload_to="sponsor_web_logos",
verbose_name="Web logo",
Expand Down
17 changes: 17 additions & 0 deletions static/sass/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -3405,6 +3405,23 @@ span.highlighted {
.icon-megaphone span, .icon-python-alt span, .icon-pypi span, .icon-news span, .icon-moderate span, .icon-mercurial span, .icon-jobs span, .icon-help span, .icon-download span, .icon-documentation span, .icon-community span, .icon-code span, .icon-close span, .icon-calendar span, .icon-beginner span, .icon-advanced span, .icon-sitemap span, .icon-search span, .icon-search-alt span, .icon-python span, .icon-github span, .icon-get-started span, .icon-feed span, .icon-facebook span, .icon-email span, .icon-arrow-up span, .icon-arrow-right span, .icon-arrow-left span, .icon-arrow-down span, .errorlist:before span, .icon-freenode span, .icon-alert span, .icon-versions span, .icon-twitter span, .icon-thumbs-up span, .icon-thumbs-down span, .icon-text-resize span, .icon-success-stories span, .icon-statistics span, .icon-stack-overflow span, .icon-mastodon span {
display: none; }

.fa {
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
margin-right: .5em;
/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
/* Hide a unicode fallback character when we supply it by default.
* In fonts.scss, we hide the icon and show the fallback when other conditions are not met
*/ }
.fa {
display: none; }

/* Keep this at the bottom since it will create a huge set of data */
/*
* Would have liked to use Compass' built-in font-face mixin with the inline-font-files() helper, but it seems to be BROKEN in older versions!
Expand Down
18 changes: 18 additions & 0 deletions static/sass/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2426,6 +2426,24 @@ span.highlighted {
*/
span { display: none; }
}
.fa {
speak: none;
font-style: normal;
font-weight: normal;
font-variant: normal;
text-transform: none;
line-height: 1;
margin-right: .5em;

/* Better Font Rendering =========== */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

/* Hide a unicode fallback character when we supply it by default.
* In fonts.scss, we hide the icon and show the fallback when other conditions are not met
*/
span { display: none; }
}

/* Keep this at the bottom since it will create a huge set of data */
@import "fonts";
Expand Down
7 changes: 4 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@

{% stylesheet 'style' %}
{% stylesheet 'mq' %}
{% stylesheet 'font-awesome' %}
{% comment %}
{# equivalent to: #}
<link rel="stylesheet" href="{{ STATIC_URL }}stylesheets/style.css" title="default">
Expand Down Expand Up @@ -235,10 +236,10 @@ <h1 class="site-headline">
<li class="tier-1 last" aria-haspopup="true">
<a href="#" class="action-trigger">Socialize</a>
<ul class="subnav menu">
<li class="tier-2 element-1" role="treeitem"><a href="https://www.facebook.com/pythonlang?fref=ts"><span aria-hidden="true" class="icon-facebook"></span>Facebook</a></li>
<li class="tier-2 element-1" role="treeitem"><a href="https://www.linkedin.com/company/python-software-foundation/"><i aria-hidden="true" class="fa fa-linkedin-square"></i></span>LinkedIn</a></li>
<li class="tier-2 element-2" role="treeitem"><a href="https://fosstodon.org/@ThePSF"><span aria-hidden="true" class="icon-mastodon"></span>Mastodon</a></li>
<li class="tier-2 element-3" role="treeitem"><a href="https://twitter.com/ThePSF"><span aria-hidden="true" class="icon-twitter"></span>Twitter</a></li>
<li class="tier-2 element-4" role="treeitem"><a href="/community/irc/"><span aria-hidden="true" class="icon-freenode"></span>Chat on IRC</a></li>
<li class="tier-2 element-3" role="treeitem"><a href="/community/irc/"><span aria-hidden="true" class="icon-freenode"></span>Chat on IRC</a></li>
<li class="tier-2 element-4" role="treeitem"><a href="https://twitter.com/ThePSF"><span aria-hidden="true" class="icon-twitter"></span>Twitter</a></li>
</ul>
</li>
</ul>
Expand Down
11 changes: 11 additions & 0 deletions templates/sponsors/new_sponsorship_application_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ <h2>Basics</h2>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.linked_in_page_url.label }} <span class="error-message">{% if form.linked_in_page_url.errors %}{{ form.linked_in_page_url.errors.as_text }}</span>{% endif %}</label>
{% render_field form.linked_in_page_url%}
{% if form.linked_in_page_url.help_text %}
<br/>
<span class="helptext">{{ form.linked_in_page_url.help_text }}</span>
{% endif %}
</p>
</div>
</div>

<div class="inline_fields">
Expand Down
12 changes: 12 additions & 0 deletions templates/users/sponsor_info_update.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,18 @@ <h2>Sponsor Information</h2>
{% endif %}
</p>
</div>

<div>
<p class="form_field">
<label>{{ form.linked_in_page_url.label }} <span class="error-message">{% if form.linked_in_page_url.errors %}
{{ form.linked_in_page_url.errors.as_text }}</span>{% endif %}</label>
{% render_field form.linked_in_page_url%}
{% if form.linked_in_page_url.help_text %}
<br/>
<span class="helptext">{{ form.linked_in_page_url.help_text }}</span>
{% endif %}
</p>
</div>
</div>
<div class="inline_fields">
<div>
Expand Down

0 comments on commit 096ac33

Please sign in to comment.