diff --git a/.eslintrc.yaml b/.eslintrc.yaml index 2d21a54b68a..b605c1eaac0 100644 --- a/.eslintrc.yaml +++ b/.eslintrc.yaml @@ -13,3 +13,4 @@ parserOptions: rules: react/jsx-uses-vars: [2] + react/jsx-uses-react: [2] diff --git a/README.md b/README.md index bffb3df5a49..d5943410bd2 100755 --- a/README.md +++ b/README.md @@ -117,7 +117,7 @@ You can run the tests using the following command HTML for the majority of the site is generated from [Pug](https://pugjs.org) templates. -Some templates used by Mezzanine (at the time of writing: Opportunity and Campaign pages) are written as Django templates but extend blocks from a common base template (`network-api/networkapi/templates/pages/base-compiled.html`) that is generated from Pug (see `source/pug/templates/base-for-django.pug`). This allows code sharing for the overall HTML "shell" of the site between Pug and Django templates as we migrate away from Pug. +Some templates used by Mezzanine (at the time of writing: Opportunity, Campaign, and Fellowships pages) are written as Django templates but extend blocks from a common base template (`network-api/networkapi/templates/pages/base-compiled.html`) that is generated from Pug (see `source/pug/templates/base-for-django.pug`). This allows code sharing for the overall HTML "shell" of the site between Pug and Django templates as we migrate away from Pug. Localized strings are pulled from [Java .properties](https://en.wikipedia.org/wiki/.properties) files located in `/locales`. diff --git a/network-api/networkapi/fellows/__init__.py b/network-api/networkapi/fellows/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/network-api/networkapi/fellows/apps.py b/network-api/networkapi/fellows/apps.py new file mode 100644 index 00000000000..a91b9811420 --- /dev/null +++ b/network-api/networkapi/fellows/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class FellowsConfig(AppConfig): + name = 'fellows' diff --git a/network-api/networkapi/fellows/migrations/__init__.py b/network-api/networkapi/fellows/migrations/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/network-api/networkapi/fellows/templates/application_cta_banner.html b/network-api/networkapi/fellows/templates/application_cta_banner.html new file mode 100644 index 00000000000..043b0d9986a --- /dev/null +++ b/network-api/networkapi/fellows/templates/application_cta_banner.html @@ -0,0 +1,13 @@ +
+
+
+ +
+

Applications are open

+

Ready to become a Mozilla fellow? Apply today.

+
+
+ Apply here +
+
+ diff --git a/network-api/networkapi/fellows/templates/contact_banner.html b/network-api/networkapi/fellows/templates/contact_banner.html new file mode 100644 index 00000000000..08d505c53f8 --- /dev/null +++ b/network-api/networkapi/fellows/templates/contact_banner.html @@ -0,0 +1,5 @@ +
+
+

Do you have any questions about this program? Contact us.

+
+
diff --git a/network-api/networkapi/fellows/templates/fellows_apply.html b/network-api/networkapi/fellows/templates/fellows_apply.html new file mode 100644 index 00000000000..33af85fab84 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_apply.html @@ -0,0 +1,36 @@ +{% extends "./pages/fellowships.html" %} + +{% block bodyID %}fellows-apply{% endblock %} + +{% block mainContent %} + + +
+
+
+
+

Be a fellow

+

Mozilla Fellowships provide resources, tools, community and amplification to those building a more ​humane​ ​digital​ ​world. During their tenure, Fellows use their skill sets — in technology, in advocacy, in law — to lay the groundwork for a more open and inclusive internet. Mozilla Fellows hail from a range of disciplines and geographies, and are awarded competitive compensation and benefits.

+

Science

+

Our science-focused fellows are researchers who want to increase the openness of data sharing of science research communities.

+

Open Web

+

Our fellows working on issues to support the growing field of public interest technology are passionate about working increasing transparency, privacy and security in the open web.

+

Tech Policy

+

Our fellows focused on technology policy-related issues around the world that are central to open public policy at the intersection of legal, academic, and governmental action.

+

Media

+

Our fellows in open media are creators and media-makers inspired by the open web to explore the boundaries of technology privacy, politics, public awareness, and surveillance.

+
+ +
+
+
+ {% include 'contact_banner.html' %} +
+
+
+
+ +{% endblock %} + diff --git a/network-api/networkapi/fellows/templates/fellows_directory.html b/network-api/networkapi/fellows/templates/fellows_directory.html new file mode 100644 index 00000000000..9ca0901714a --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_directory.html @@ -0,0 +1,16 @@ +{% extends "./pages/fellowships.html" %} + +{% block bodyID %}fellows-directory{% endblock %} + +{% block mainContent %} +
+
+
+

Fellows Directory

+
+
+
+ + +{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_directory_type.html b/network-api/networkapi/fellows/templates/fellows_directory_type.html new file mode 100644 index 00000000000..3b184286720 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_directory_type.html @@ -0,0 +1,27 @@ +{% extends "./pages/fellowships.html" %} + +{% block bodyID %}fellows-directory-{{type|slugify}}{% endblock %} + +{% block mainContent %} +
+ +
+ +
+
+
+

{{ type }} Fellows

+
+
+
+ +
+
+{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_home.html b/network-api/networkapi/fellows/templates/fellows_home.html new file mode 100644 index 00000000000..5f025151142 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_home.html @@ -0,0 +1,173 @@ +{% extends "./pages/fellowships.html" %} + +{% block bodyID %}fellows-home{% endblock %} + +{% block heroGuts %} +
+
+
+

Mozilla Fellowships

+
+

Mozilla Fellows uphold the internet as a force for good.

+
+
+
+
+ Hang Do Thi Duc
+ Mozilla Media Fellow - 2017 +
+
+
+
+{% endblock %} + +{% block mainContent %} +
+
+
+

What are the Mozilla Fellowship?

+
+
+
+
+

The internet today is pervasive: It shapes economies, influences governments, and is layered into billions of lives.

+

A pervasive internet has the potential to uplift society — it can promote democracy, open markets, and free expression. But it can also promote polarization, mass surveillance, and misinformation.

+

More than ever, we need a movement to ensure the internet remains a force for good. Mozilla Fellows work on the front lines of that movement, developing new thinking on how to address emerging threats and challenges facing a healthy internet. Here’s how:

+
+
+
+
+
+
+

Fellows put individuals in control of their personal data

+

Mozilla Fellow Hang Do Thi Duc created Data Selfie, a browser extension that provides an intimate window into data mining, predictive analytics, and Facebook consumption. Fellow Linet Kwamboka researches policies that guide data collection and dissemination across East Africa. And Fellow Rebecca Ricks works with Human Rights Watch to explore how people use encryption online.

+
+
+ +
+
+
+
+

Fellows help connect the unconnected

+

Mozilla Fellow Amina Fazlullah promotes policies that support broadband connectivity in rural and vulnerable U.S. communities. Fellow Steve Song examines regulatory and policy barriers associated with bringing the next billion online. And Fellow Sarah Kiden researches last-mile connectivity in East Africa.

+
+
+ +
+
+
+
+

Fellows keep artificial intelligence accountable

+

Mozilla Fellow Jason Schultz analyzes the impact of machine learning on civil liberties. Fellow Terah Lyons coordinates international governance of AI. And Fellow Suchana Seth works alongside Data & Society to research biased algorithms.

+
+
+ +
+
+
+
+

Fellows make scientific research more open

+

Mozilla Fellow Amel Ghouila leverages open-source data and tools to bolster biomedical research across the African continent. And Fellow Chris Hartgerink explores how to make scholarly communication more collaborative, accurate, and open.

+
+
+ +
+
+
+
+

Mozilla Fellowships provide resources, tools, community and amplification to those building a more ​humane​ ​digital​ ​world. During their tenure, Fellows use their skill sets — in technology, in advocacy, in law — to design products, run campaigns, influence policy and ultimately lay the groundwork for a more open and inclusive internet.

+

Mozilla Fellows hail from a range of disciplines and geographies: They are policymakers in Kenya, journalists in Brazil, engineers in Germany, privacy activists in the United States, and data scientists in the Netherlands. Fellows work on individual projects, but also collaborate on cross-disciplinary solutions to the internet’s biggest challenges. Fellows are awarded competitive compensation and benefits.

+
+
+
+
+ +
+
+
+
+
+

Meet Some of the Mozilla Fellows

+
+ + + + +
+ See Fellows Directory +
+
+ +
+
+
+
+
+

Why Become a Fellow?

+
+
+
+
+
+
+

Mozilla Fellowships are a transformative experience for emerging leaders. As a Fellow, you will:

+ +
+
+ +
+
+
+
+ +
+
+ {% include 'application_cta_banner.html' %} +
+
+ +
+
+
+
+

Want to support the incredible work Fellows are doing? Either as a host organization or a funder, you can join us to keep the Internet healthy. Find out how to support.

+
+
+
+
+{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_host_org.html b/network-api/networkapi/fellows/templates/fellows_host_org.html new file mode 100644 index 00000000000..4427fc59cb8 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_host_org.html @@ -0,0 +1,10 @@ +
+ + + + + + + + +
diff --git a/network-api/networkapi/fellows/templates/fellows_media.html b/network-api/networkapi/fellows/templates/fellows_media.html new file mode 100644 index 00000000000..65e3cc28818 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_media.html @@ -0,0 +1,35 @@ +{% extends "fellows_type.html" %} + +{% block fellowship_description %} +{% lorem 2 p %} +{% endblock %} + +{% block fellowship_illustration %} + +{% endblock %} + +{% block benefit_illustration %} + +{% endblock %} + +{% block benefit_description %} +{% lorem 2 p %} +{% endblock %} + +{% block benefit_list %} +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +{% endblock %} + +{% block eligibility_list %} +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_open_web.html b/network-api/networkapi/fellows/templates/fellows_open_web.html new file mode 100644 index 00000000000..d36257bac58 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_open_web.html @@ -0,0 +1,55 @@ +{% extends "fellows_type.html" %} + +{% block bodyID %}fellows-open-web{% endblock %} + +{% block fellowship_description %} +{% lorem 2 p %} +{% endblock %} + +{% block fellowship_illustration %} + +{% endblock %} + +{% block benefit_illustration %} + +{% endblock %} + +{% block benefit_description %} +{% lorem 2 p %} +{% endblock %} + +{% block benefit_list %} +
  • a stipend of $60,000 USD*, paid in 10 monthly installments
  • +
  • a one-time health insurance supplement for Fellows and their families, ranging from $3,500 for single Fellows to $7,000 for a couple with two or more children
  • +
  • a one-time childcare allotment of up to $6,000 for families with children
  • +
  • an allowance of up to $3,000 towards the purchase of laptop computer, digital cameras, recorders and computer software; fees for continuing studies or other courses, research fees or payments, to the extent such purchases and fees are related to the fellowship
  • +
  • coverage in full for all approved fellowship trips – domestic and international
  • +{% endblock %} + +{% block eligibility_list %} +
  • be currently based at or affiliated with a research institution
  • +
  • have the ability to accept outside funds for this fellowship directly (i.e., not distributed through the institution)
  • +
  • be an early-career researcher (i.e., graduate students, post-docs, research scientists, lecturers)
  • +
  • specialize in scientific research: physical, life, social, library, or natural sciences
  • +
  • be able to travel
  • +
  • obtain support from their advisors. As fellows will be based at their home institutions, please note that a letter of support from their advisor is mandatory
  • +{% endblock %} + +{% block host_orgs %} +
    +
    +
    +

    Host organizations

    +
    +
    +
    +
    +

    Host organizations are leading policy and advocacy organizations dedicated to safeguarding + the open internet. Mozilla recruits hosts who have a track record of advocating for internet health, public interest technology, and digital rights; these organizations partner with a fellow for 10-months. Current host organizations include:

    +
    +
    + {% include 'fellows_host_org.html' %} +
    +
    +{% endblock %} + diff --git a/network-api/networkapi/fellows/templates/fellows_science.html b/network-api/networkapi/fellows/templates/fellows_science.html new file mode 100644 index 00000000000..7e5791c378b --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_science.html @@ -0,0 +1,39 @@ +{% extends "fellows_type.html" %} + +{% block fellowship_description %} +

    The Mozilla Fellowships for Science present a unique opportunity for researchers who want to influence the future of open science and data sharing within their communities.

    +

    We're looking for researchers with a passion for open source and data sharing, already working to shift research practice to be more collaborative, iterative and open. Fellows will spend 10 months starting September 2017 as community catalysts at their institutions, mentoring the next generation of open data practitioners and researchers and building lasting change in the global open science community.

    +

    Throughout their fellowship term, chosen fellows will receive training and support from Mozilla to hone their skills around open source, data sharing, open science policy and licensing. They will also craft code, curriculum and other learning resources that help their local communities learn open data practices, and teach their institutional peers.

    +{% endblock %} + +{% block fellowship_illustration %} + +{% endblock %} + +{% block benefit_illustration %} + +{% endblock %} + +{% block benefit_description %} +

    The Fellowships are designed to allow for flexibility for both Fellows and their families. The standard fellowship offers a stipend of $60,000 USD*, paid in 10 monthly installments. Fellows are responsible for remitting all applicable taxes and other government payments as required.

    +

    To help offset cost of living, the fellowship also provides supplements for childcare and health insurance, and helps pay for research/equipment and books. The fellowships also covers the costs of required travel for fellowship activities.

    +{% endblock %} + +{% block benefit_list %} +
  • a stipend of $60,000 USD*, paid in 10 monthly installments
  • +
  • a one-time health insurance supplement for Fellows and their families, ranging from $3,500 for single Fellows to $7,000 for a couple with two or more children
  • +
  • a one-time childcare allotment of up to $6,000 for families with children
  • +
  • an allowance of up to $3,000 towards the purchase of laptop computer, digital cameras, recorders and computer software; fees for continuing studies or other courses, research fees or payments, to the extent such purchases and fees are related to the fellowship +
  • +
  • coverage in full for all approved fellowship trips – domestic and international
  • +{% endblock %} + +{% block eligibility_list %} +
  • be currently based at or affiliated with a research institution
  • +
  • have the ability to accept outside funds for this fellowship directly (i.e., not distributed through the institution)
  • +
  • be an early-career researcher (i.e., graduate students, post-docs, research scientists, lecturers)
  • +
  • specialize in scientific research: physical, life, social, library, or natural sciences
  • +
  • be able to travel
  • +
  • obtain support from their advisors. As fellows will be based at their home institutions, please note that a letter of support from their advisor is mandatory for consideration
  • +
  • have experience participating in open communities
  • +{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_support.html b/network-api/networkapi/fellows/templates/fellows_support.html new file mode 100644 index 00000000000..5a0d54bd14c --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_support.html @@ -0,0 +1,61 @@ +{% extends "./pages/fellowships.html" %} + +{% block bodyID %}fellows-support{% endblock %} + +{% block mainContent %} +
    +
    +
    +

    Support the Program

    +
    +
    +
    +

    The Mozilla Fellows are building the next wave of internet health leaders, and the program depends on a large community of collaborators, partners, advisors, civil service organizations and funders.

    +

    There are 2 ways you can help:

    +

    Fund the fellows

    +

    We partner with other foundations and organizations across the globe to support the next wave of internet health leaders. Many funders find the expertise, leadership and passion that fellows bring to the experience to be key to catalyzing progress in the internet health field.

    +
    +
    + +
    +
    +
    + + + + +
    +
    +
    + +
    +
    +
    +

    Engaging Title for Funders

    +

    Please reach out to fellowships@mozillafoundation.org with any inquiries.

    +
    +
    + +
    +
    +
    +
    +

    Host a fellow

    +

    Organizations defending an open and accessible web are the backbone of our fellowship program. They socialize fellows to a global assortment of issues, policies, and technologies and inspire them with meaningful work that impacts how the internet grows and supports community globally.

    +

    In the past four years, the fellowship has partnered with 21 host organizations around the globe, including the American Civil Liberties Union, Amnesty International, Derechos Digitales, European Digital Rights, Freedom of the Press Foundation and many more, across sectors and specialties, united by a shared goal to protect public interaction on the open web.

    +
    +
    +
    +
    + {% include 'fellows_host_org.html' %} +
    +
    + +
    +
    +
    +

    Learn more about how to get involved

    +

    You can apply to be a host organization via this link. Applications are due . When applications are closed, you can reach out to fellowships@mozillafoundation.org with any inquiries.

    +
    +
    +{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_tech_policy.html b/network-api/networkapi/fellows/templates/fellows_tech_policy.html new file mode 100644 index 00000000000..74400226aa9 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_tech_policy.html @@ -0,0 +1,35 @@ +{% extends "fellows_type.html" %} + +{% block fellowship_description %} +{% lorem 2 p %} +{% endblock %} + +{% block fellowship_illustration %} + +{% endblock %} + +{% block benefit_illustration %} + +{% endblock %} + +{% block benefit_description %} +{% lorem 2 p %} +{% endblock %} + +{% block benefit_list %} +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +{% endblock %} + +{% block eligibility_list %} +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +
  • bullet list item
  • +{% endblock %} diff --git a/network-api/networkapi/fellows/templates/fellows_type.html b/network-api/networkapi/fellows/templates/fellows_type.html new file mode 100644 index 00000000000..332ef5d5d72 --- /dev/null +++ b/network-api/networkapi/fellows/templates/fellows_type.html @@ -0,0 +1,89 @@ +{% extends "./pages/fellowships.html" %} + +{% block mainContent %} + +
    + +
    + +
    +
    +

    {{ type }} Fellowship

    +
    +
    + {% block fellowship_description %}{% endblock %} +
    +
    + {% block fellowship_illustration %}{% endblock %} +
    +
    + +
    +
    +
    +

    Stipend and Financial Benefits

    +
    +
    {% block benefit_illustration %}{% endblock %}
    +
    + {% block benefit_description %}{% endblock %} +
    +
    +
    +

    Fellows will receive:

    +
      + {% block benefit_list %} + {% endblock %} +
    +
    +
    +
    + +
    +
    +
    +

    Eligibility Criteria

    +
    +
    +
    +
    +

    Fellows must be:

    +
      + {% block eligibility_list %} + {% endblock %} +
    +
    +
    + +
    +
    +
    +
    + +
    +{% block featured_fellow %} +{% endblock %} +
    + +{% block host_orgs %} +{% endblock %} + +
    +
    + {% include 'application_cta_banner.html' %} +
    +
    + +
    +
    + {% include 'contact_banner.html' %} +
    +
    + +{% endblock %} diff --git a/network-api/networkapi/fellows/urls.py b/network-api/networkapi/fellows/urls.py new file mode 100644 index 00000000000..8ac032a4d07 --- /dev/null +++ b/network-api/networkapi/fellows/urls.py @@ -0,0 +1,17 @@ +from django.conf.urls import url +from networkapi.fellows import views + +urlpatterns = [ + url(r'^$', views.fellows_home, name='fellowships-home'), + url(r'^directory/$', + views.fellows_directory, + name='fellowships-directory'), + url(r'^directory/(?P[-\w]+)/$', + views.fellows_directoy_type, + name='fellowships-directory-type'), + url(r'^support/$', views.fellows_support, name='fellowships-support'), + url(r'^apply/$', views.fellows_apply, name='fellowships-apply'), + url(r'^(?P[-\w]+)/$', + views.fellows_type, + name='fellowships-type'), +] diff --git a/network-api/networkapi/fellows/views.py b/network-api/networkapi/fellows/views.py new file mode 100644 index 00000000000..6f029e09671 --- /dev/null +++ b/network-api/networkapi/fellows/views.py @@ -0,0 +1,36 @@ +from django.conf import settings +from django.shortcuts import render +from django.http import Http404 + + +# Create your views here. +def fellows_home(request): + return render(request, 'fellows_home.html', {'pulse_domain': settings.FRONTEND['PULSE_DOMAIN']}) + + +def fellows_type(request, program_type_slug): + if program_type_slug not in ['science', 'open-web', 'tech-policy', 'media']: + raise Http404 + + template = 'fellows_' + program_type_slug.replace('-', '_') + '.html' + context = {'type': program_type_slug.replace('-', ' ')} + + return render(request, template, context) + + +def fellows_directory(request): + return render(request, 'fellows_directory.html') + + +def fellows_directoy_type(request, program_type_slug): + context = {'type': program_type_slug.replace('-', ' ')} + + return render(request, 'fellows_directory_type.html', context) + + +def fellows_support(request): + return render(request, 'fellows_support.html') + + +def fellows_apply(request): + return render(request, 'fellows_apply.html') diff --git a/network-api/networkapi/settings.py b/network-api/networkapi/settings.py index 915b2893220..c0f5d3f4ddd 100644 --- a/network-api/networkapi/settings.py +++ b/network-api/networkapi/settings.py @@ -158,6 +158,7 @@ 'networkapi.homepage', 'networkapi.people', 'networkapi.news', + 'networkapi.fellows', 'networkapi.utility', 'networkapi.landingpage', 'networkapi.campaign', diff --git a/network-api/networkapi/templates/pages/fellowships.html b/network-api/networkapi/templates/pages/fellowships.html new file mode 100644 index 00000000000..8f896c31b5a --- /dev/null +++ b/network-api/networkapi/templates/pages/fellowships.html @@ -0,0 +1,33 @@ +{% extends "./base-compiled.html" %} + +{% load fellowship_active_nav %} + +{% block content %} +
    +
    +
    +
    +
    +
    +
    + + + +
    + {% block mainContent %} + {% endblock %} +
    +{% endblock %} diff --git a/network-api/networkapi/urls.py b/network-api/networkapi/urls.py index a6421cc4384..8bcfcc1ede1 100644 --- a/network-api/networkapi/urls.py +++ b/network-api/networkapi/urls.py @@ -30,6 +30,9 @@ urlpatterns = list(filter(None, [ url(r'^admin/', include(admin.site.urls)), + url(r'^soc/', include('social_django.urls', namespace='social')) + if settings.SOCIAL_SIGNIN else '', + url(r'^fellowships/', include('networkapi.fellows.urls')), url(r'^cms/', include(wagtailadmin_urls)) if settings.ENABLE_WAGTAIL else None, @@ -38,13 +41,10 @@ url(r'^wagtail/', include(wagtail_urls)) if settings.ENABLE_WAGTAIL else None, - url(r'^soc/', include('social_django.urls', namespace='social')), - - # Don't remove this redirect until Fellowships pages are live - url(r'^fellowships/$', RedirectView.as_view( - url='https://advocacy.mozilla.org/open-web-fellows' - )) - if settings.SOCIAL_SIGNIN else None, + url(r'^fellowship/(?P.*)', RedirectView.as_view( + url='/fellowships/%(path)s', + query_string=True + )), # network-api routes: url(r'^api/people/', include('networkapi.people.urls')), diff --git a/network-api/networkapi/utility/templatetags/fellowship_active_nav.py b/network-api/networkapi/utility/templatetags/fellowship_active_nav.py new file mode 100644 index 00000000000..e1d99490f4e --- /dev/null +++ b/network-api/networkapi/utility/templatetags/fellowship_active_nav.py @@ -0,0 +1,19 @@ +from django import template + +register = template.Library() + + +@register.simple_tag(name='fellowship_active_nav') +def fellowship_active_nav(request, view_name): + + from django.core.urlresolvers import resolve, Resolver404 + path = resolve(request.path_info) + if not request: + return "" + try: + matched = [vn for vn in view_name.split() if path.url_name == vn] + + return "active" if matched else "" + + except Resolver404: + return "" diff --git a/source/images/404.svg b/source/images/404.svg index f12938274dd..a8a22964993 100644 --- a/source/images/404.svg +++ b/source/images/404.svg @@ -1,10 +1,7 @@ - - - - - - + + + + + diff --git a/source/images/about/alfred-p-sloan-foundation.jpg b/source/images/about/alfred-p-sloan-foundation.jpg index af70b67db4e..d6fc3e596ba 100755 Binary files a/source/images/about/alfred-p-sloan-foundation.jpg and b/source/images/about/alfred-p-sloan-foundation.jpg differ diff --git a/source/images/about/altman-foundation.jpg b/source/images/about/altman-foundation.jpg index acd3bda82c7..48b561995b3 100755 Binary files a/source/images/about/altman-foundation.jpg and b/source/images/about/altman-foundation.jpg differ diff --git a/source/images/about/bill-and-melinda-gates-foundation.jpg b/source/images/about/bill-and-melinda-gates-foundation.jpg index 0c8b3739928..0380a0bcb95 100755 Binary files a/source/images/about/bill-and-melinda-gates-foundation.jpg and b/source/images/about/bill-and-melinda-gates-foundation.jpg differ diff --git a/source/images/about/canadian-internet-registration-authority.jpg b/source/images/about/canadian-internet-registration-authority.jpg index 1656cf06e34..c2946c67f51 100755 Binary files a/source/images/about/canadian-internet-registration-authority.jpg and b/source/images/about/canadian-internet-registration-authority.jpg differ diff --git a/source/images/about/chicago-community-trust.jpg b/source/images/about/chicago-community-trust.jpg index e73b23e1186..80a096d430f 100755 Binary files a/source/images/about/chicago-community-trust.jpg and b/source/images/about/chicago-community-trust.jpg differ diff --git a/source/images/about/cs-mott-foundation.jpg b/source/images/about/cs-mott-foundation.jpg index 71aa6d9c0c5..5bcb55559c4 100755 Binary files a/source/images/about/cs-mott-foundation.jpg and b/source/images/about/cs-mott-foundation.jpg differ diff --git a/source/images/about/ford-foundation.jpg b/source/images/about/ford-foundation.jpg index 124f6440b03..c4ef85db8f9 100755 Binary files a/source/images/about/ford-foundation.jpg and b/source/images/about/ford-foundation.jpg differ diff --git a/source/images/about/helmsley-charitable-trust.jpg b/source/images/about/helmsley-charitable-trust.jpg index 2801c7f4d72..75eb3fa3cd5 100755 Binary files a/source/images/about/helmsley-charitable-trust.jpg and b/source/images/about/helmsley-charitable-trust.jpg differ diff --git a/source/images/about/illinois-science-_-energy-foundation.jpg b/source/images/about/illinois-science-_-energy-foundation.jpg index 6316d8ec319..12c9a4c8d9a 100755 Binary files a/source/images/about/illinois-science-_-energy-foundation.jpg and b/source/images/about/illinois-science-_-energy-foundation.jpg differ diff --git a/source/images/about/institute-for-museum-and-library-services.jpg b/source/images/about/institute-for-museum-and-library-services.jpg index 446e2446591..3e450c46a38 100755 Binary files a/source/images/about/institute-for-museum-and-library-services.jpg and b/source/images/about/institute-for-museum-and-library-services.jpg differ diff --git a/source/images/about/irvine-foundation.jpg b/source/images/about/irvine-foundation.jpg index 4ab88c637d0..54092fe01b2 100755 Binary files a/source/images/about/irvine-foundation.jpg and b/source/images/about/irvine-foundation.jpg differ diff --git a/source/images/about/macarthur-foundation.jpg b/source/images/about/macarthur-foundation.jpg index 1cb5c0d845e..2eeadb96be6 100755 Binary files a/source/images/about/macarthur-foundation.jpg and b/source/images/about/macarthur-foundation.jpg differ diff --git a/source/images/about/national-science-foundation.jpg b/source/images/about/national-science-foundation.jpg index ca05f47ffd9..bf91658d8c7 100755 Binary files a/source/images/about/national-science-foundation.jpg and b/source/images/about/national-science-foundation.jpg differ diff --git a/source/images/about/new-york-community-trust.jpg b/source/images/about/new-york-community-trust.jpg index f59fad2a3d7..74e87ae3875 100755 Binary files a/source/images/about/new-york-community-trust.jpg and b/source/images/about/new-york-community-trust.jpg differ diff --git a/source/images/about/ontario-trillium-foundation.jpg b/source/images/about/ontario-trillium-foundation.jpg index 1e77027283d..75ae8e7f9f2 100755 Binary files a/source/images/about/ontario-trillium-foundation.jpg and b/source/images/about/ontario-trillium-foundation.jpg differ diff --git a/source/images/about/open-society-foundations.jpg b/source/images/about/open-society-foundations.jpg index 8a6c1aac9a8..43a4ddbbed6 100755 Binary files a/source/images/about/open-society-foundations.jpg and b/source/images/about/open-society-foundations.jpg differ diff --git a/source/images/about/open-tech-fund.jpg b/source/images/about/open-tech-fund.jpg index eb56736dc34..ea1c92283c6 100755 Binary files a/source/images/about/open-tech-fund.jpg and b/source/images/about/open-tech-fund.jpg differ diff --git a/source/images/about/robert-r-mccormick-foundation.jpg b/source/images/about/robert-r-mccormick-foundation.jpg index d8724cbf091..e369b0cd6ab 100755 Binary files a/source/images/about/robert-r-mccormick-foundation.jpg and b/source/images/about/robert-r-mccormick-foundation.jpg differ diff --git a/source/images/about/rockefeller-foundation.jpg b/source/images/about/rockefeller-foundation.jpg index 9f9b3f6cbb4..27a9b548e51 100755 Binary files a/source/images/about/rockefeller-foundation.jpg and b/source/images/about/rockefeller-foundation.jpg differ diff --git a/source/images/about/siegel-family-endowment.jpg b/source/images/about/siegel-family-endowment.jpg index c8379e2bfcb..fee9a148ea9 100755 Binary files a/source/images/about/siegel-family-endowment.jpg and b/source/images/about/siegel-family-endowment.jpg differ diff --git a/source/images/about/susan-crowne-exchange.jpg b/source/images/about/susan-crowne-exchange.jpg index 9ce33fd3885..9dddab8ccc1 100644 Binary files a/source/images/about/susan-crowne-exchange.jpg and b/source/images/about/susan-crowne-exchange.jpg differ diff --git a/source/images/about/un-women.jpg b/source/images/about/un-women.jpg index 8259c40df9b..baa4c1528f2 100755 Binary files a/source/images/about/un-women.jpg and b/source/images/about/un-women.jpg differ diff --git a/source/images/burst1.svg b/source/images/burst1.svg index e2f79dd4df6..04af17f4398 100644 --- a/source/images/burst1.svg +++ b/source/images/burst1.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/burst2.svg b/source/images/burst2.svg index 14237de9d06..9848ba57f23 100644 --- a/source/images/burst2.svg +++ b/source/images/burst2.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/chevron.svg b/source/images/chevron.svg index d9859a5d1b9..1c5ab042816 100644 --- a/source/images/chevron.svg +++ b/source/images/chevron.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/favicons/apple-touch-icon-180x180@2x.png b/source/images/favicons/apple-touch-icon-180x180@2x.png index a952fafbaa7..3ab043dffd7 100644 Binary files a/source/images/favicons/apple-touch-icon-180x180@2x.png and b/source/images/favicons/apple-touch-icon-180x180@2x.png differ diff --git a/source/images/favicons/favicon-196x196@2x.png b/source/images/favicons/favicon-196x196@2x.png index f22a7144776..603c9ba2c7a 100644 Binary files a/source/images/favicons/favicon-196x196@2x.png and b/source/images/favicons/favicon-196x196@2x.png differ diff --git a/source/images/fellowships/group-fellows-overview-page-cropped@2x.jpg b/source/images/fellowships/group-fellows-overview-page-cropped@2x.jpg new file mode 100644 index 00000000000..94beaa8f086 Binary files /dev/null and b/source/images/fellowships/group-fellows-overview-page-cropped@2x.jpg differ diff --git a/source/images/fellowships/headshot/AmbaKak.jpg b/source/images/fellowships/headshot/AmbaKak.jpg new file mode 100644 index 00000000000..7f8c961a0f8 Binary files /dev/null and b/source/images/fellowships/headshot/AmbaKak.jpg differ diff --git a/source/images/fellowships/headshot/AnMeChung.jpg b/source/images/fellowships/headshot/AnMeChung.jpg new file mode 100644 index 00000000000..24d96239c79 Binary files /dev/null and b/source/images/fellowships/headshot/AnMeChung.jpg differ diff --git a/source/images/fellowships/headshot/LinetKwamboka.jpg b/source/images/fellowships/headshot/LinetKwamboka.jpg new file mode 100644 index 00000000000..f08481ab7da Binary files /dev/null and b/source/images/fellowships/headshot/LinetKwamboka.jpg differ diff --git a/source/images/fellowships/headshot/OrlandoDelAguila.jpg b/source/images/fellowships/headshot/OrlandoDelAguila.jpg new file mode 100644 index 00000000000..a38f21c856e Binary files /dev/null and b/source/images/fellowships/headshot/OrlandoDelAguila.jpg differ diff --git a/source/images/fellowships/headshot/placeholder.jpg b/source/images/fellowships/headshot/placeholder.jpg new file mode 100644 index 00000000000..db06a279f3b Binary files /dev/null and b/source/images/fellowships/headshot/placeholder.jpg differ diff --git a/source/images/fellowships/hero-image@2x.png b/source/images/fellowships/hero-image@2x.png new file mode 100644 index 00000000000..322605a296f Binary files /dev/null and b/source/images/fellowships/hero-image@2x.png differ diff --git a/source/images/fellowships/logo/ford-foundation.png b/source/images/fellowships/logo/ford-foundation.png new file mode 100755 index 00000000000..ac8f6b3434a Binary files /dev/null and b/source/images/fellowships/logo/ford-foundation.png differ diff --git a/source/images/fellowships/logo/logo-cipit@2x.png b/source/images/fellowships/logo/logo-cipit@2x.png new file mode 100755 index 00000000000..c329d7c022c Binary files /dev/null and b/source/images/fellowships/logo/logo-cipit@2x.png differ diff --git a/source/images/fellowships/logo/logo-citizenlab@2x.png b/source/images/fellowships/logo/logo-citizenlab@2x.png new file mode 100755 index 00000000000..5b46f47bf53 Binary files /dev/null and b/source/images/fellowships/logo/logo-citizenlab@2x.png differ diff --git a/source/images/fellowships/logo/logo-colorofchange@2x.png b/source/images/fellowships/logo/logo-colorofchange@2x.png new file mode 100755 index 00000000000..ae1092224ce Binary files /dev/null and b/source/images/fellowships/logo/logo-colorofchange@2x.png differ diff --git a/source/images/fellowships/logo/logo-datasociety@2x.png b/source/images/fellowships/logo/logo-datasociety@2x.png new file mode 100755 index 00000000000..cfea8d9c2ac Binary files /dev/null and b/source/images/fellowships/logo/logo-datasociety@2x.png differ diff --git a/source/images/fellowships/logo/logo-derechos@2x.png b/source/images/fellowships/logo/logo-derechos@2x.png new file mode 100755 index 00000000000..1f5c3da2c69 Binary files /dev/null and b/source/images/fellowships/logo/logo-derechos@2x.png differ diff --git a/source/images/fellowships/logo/logo-edri@2x.png b/source/images/fellowships/logo/logo-edri@2x.png new file mode 100755 index 00000000000..0bbcb046440 Binary files /dev/null and b/source/images/fellowships/logo/logo-edri@2x.png differ diff --git a/source/images/fellowships/logo/logo-ford-foundation@2x.png b/source/images/fellowships/logo/logo-ford-foundation@2x.png new file mode 100755 index 00000000000..b7d33577462 Binary files /dev/null and b/source/images/fellowships/logo/logo-ford-foundation@2x.png differ diff --git a/source/images/fellowships/logo/logo-freedomofthepress@2x.png b/source/images/fellowships/logo/logo-freedomofthepress@2x.png new file mode 100755 index 00000000000..efb32fa369b Binary files /dev/null and b/source/images/fellowships/logo/logo-freedomofthepress@2x.png differ diff --git a/source/images/fellowships/logo/logo-helmsley@2x.jpg b/source/images/fellowships/logo/logo-helmsley@2x.jpg new file mode 100755 index 00000000000..8ec6e442451 Binary files /dev/null and b/source/images/fellowships/logo/logo-helmsley@2x.jpg differ diff --git a/source/images/fellowships/logo/logo-open-society-foundations@2x.jpg b/source/images/fellowships/logo/logo-open-society-foundations@2x.jpg new file mode 100755 index 00000000000..419425628d3 Binary files /dev/null and b/source/images/fellowships/logo/logo-open-society-foundations@2x.jpg differ diff --git a/source/images/fellowships/logo/logo-privacyinternational@2x.png b/source/images/fellowships/logo/logo-privacyinternational@2x.png new file mode 100755 index 00000000000..373665f596a Binary files /dev/null and b/source/images/fellowships/logo/logo-privacyinternational@2x.png differ diff --git a/source/images/fellowships/logo/logo-siegel@2x.jpg b/source/images/fellowships/logo/logo-siegel@2x.jpg new file mode 100755 index 00000000000..fb1404bd864 Binary files /dev/null and b/source/images/fellowships/logo/logo-siegel@2x.jpg differ diff --git a/source/images/fellowships/media-fellows-cropped@2x.jpg b/source/images/fellowships/media-fellows-cropped@2x.jpg new file mode 100755 index 00000000000..cb093e31894 Binary files /dev/null and b/source/images/fellowships/media-fellows-cropped@2x.jpg differ diff --git a/source/images/fellowships/open-web-fellows-cropped@2x.jpg b/source/images/fellowships/open-web-fellows-cropped@2x.jpg new file mode 100755 index 00000000000..ada9706e28f Binary files /dev/null and b/source/images/fellowships/open-web-fellows-cropped@2x.jpg differ diff --git a/source/images/fellowships/science-fellows-cropped@2x.jpg b/source/images/fellowships/science-fellows-cropped@2x.jpg new file mode 100755 index 00000000000..ad8956697a6 Binary files /dev/null and b/source/images/fellowships/science-fellows-cropped@2x.jpg differ diff --git a/source/images/fellowships/svg/applications-open-fellows-optm.svg b/source/images/fellowships/svg/applications-open-fellows-optm.svg new file mode 100755 index 00000000000..54392b89eb8 --- /dev/null +++ b/source/images/fellowships/svg/applications-open-fellows-optm.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/eligibility-criteria-fellows-optim.svg b/source/images/fellowships/svg/eligibility-criteria-fellows-optim.svg new file mode 100755 index 00000000000..8e53af855ba --- /dev/null +++ b/source/images/fellowships/svg/eligibility-criteria-fellows-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/funders-fellowship-optim.svg b/source/images/fellowships/svg/funders-fellowship-optim.svg new file mode 100644 index 00000000000..f0e503aeb9e --- /dev/null +++ b/source/images/fellowships/svg/funders-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/host-orgs-fellowship-optim.svg b/source/images/fellowships/svg/host-orgs-fellowship-optim.svg new file mode 100755 index 00000000000..371cd409e97 --- /dev/null +++ b/source/images/fellowships/svg/host-orgs-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/illustration-artificial-intelligence.svg b/source/images/fellowships/svg/illustration-artificial-intelligence.svg new file mode 100755 index 00000000000..0a58f96b2a0 --- /dev/null +++ b/source/images/fellowships/svg/illustration-artificial-intelligence.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/illustration-connect-unconnected.svg b/source/images/fellowships/svg/illustration-connect-unconnected.svg new file mode 100755 index 00000000000..c4d2370a913 --- /dev/null +++ b/source/images/fellowships/svg/illustration-connect-unconnected.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/illustration-open-scientific-research.svg b/source/images/fellowships/svg/illustration-open-scientific-research.svg new file mode 100755 index 00000000000..e7f92744efc --- /dev/null +++ b/source/images/fellowships/svg/illustration-open-scientific-research.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/illustration-personal-data.svg b/source/images/fellowships/svg/illustration-personal-data.svg new file mode 100755 index 00000000000..cb52bfd32e2 --- /dev/null +++ b/source/images/fellowships/svg/illustration-personal-data.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/info-icon.svg b/source/images/fellowships/svg/info-icon.svg new file mode 100644 index 00000000000..6af15217eed --- /dev/null +++ b/source/images/fellowships/svg/info-icon.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/media-focus-fellowship-optim.svg b/source/images/fellowships/svg/media-focus-fellowship-optim.svg new file mode 100755 index 00000000000..c66158ffa59 --- /dev/null +++ b/source/images/fellowships/svg/media-focus-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/mini_contact_us-fellows-with-gradient.svg b/source/images/fellowships/svg/mini_contact_us-fellows-with-gradient.svg new file mode 100755 index 00000000000..bd9acc9870d --- /dev/null +++ b/source/images/fellowships/svg/mini_contact_us-fellows-with-gradient.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/source/images/fellowships/svg/mini_support_hand-fellows-with-gradient.svg b/source/images/fellowships/svg/mini_support_hand-fellows-with-gradient.svg new file mode 100755 index 00000000000..543499c553e --- /dev/null +++ b/source/images/fellowships/svg/mini_support_hand-fellows-with-gradient.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/source/images/fellowships/svg/open_web-focus-fellowship-optim.svg b/source/images/fellowships/svg/open_web-focus-fellowship-optim.svg new file mode 100755 index 00000000000..02a480131e2 --- /dev/null +++ b/source/images/fellowships/svg/open_web-focus-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/science-focus-fellowship-optim.svg b/source/images/fellowships/svg/science-focus-fellowship-optim.svg new file mode 100755 index 00000000000..19aae6aef35 --- /dev/null +++ b/source/images/fellowships/svg/science-focus-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/support-fellows-optim.svg b/source/images/fellowships/svg/support-fellows-optim.svg new file mode 100755 index 00000000000..b0f29ae0528 --- /dev/null +++ b/source/images/fellowships/svg/support-fellows-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/svg/tech-policy-focus-fellowship-optim.svg b/source/images/fellowships/svg/tech-policy-focus-fellowship-optim.svg new file mode 100755 index 00000000000..cd11303a8fb --- /dev/null +++ b/source/images/fellowships/svg/tech-policy-focus-fellowship-optim.svg @@ -0,0 +1,3 @@ + + + diff --git a/source/images/fellowships/tech-policy-fellows-cropped@2x.jpg b/source/images/fellowships/tech-policy-fellows-cropped@2x.jpg new file mode 100755 index 00000000000..d571f3bc3c7 Binary files /dev/null and b/source/images/fellowships/tech-policy-fellows-cropped@2x.jpg differ diff --git a/source/images/glyphs/chat-circle-active.svg b/source/images/glyphs/chat-circle-active.svg index fc3588a99b1..c440e4e20f2 100644 --- a/source/images/glyphs/chat-circle-active.svg +++ b/source/images/glyphs/chat-circle-active.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/chat-circle.svg b/source/images/glyphs/chat-circle.svg index f914dff7877..ec71d668809 100644 --- a/source/images/glyphs/chat-circle.svg +++ b/source/images/glyphs/chat-circle.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/donate-active.svg b/source/images/glyphs/donate-active.svg index f920f39ad30..614c2a224a0 100644 --- a/source/images/glyphs/donate-active.svg +++ b/source/images/glyphs/donate-active.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/donate.svg b/source/images/glyphs/donate.svg index 7bd24f5f286..0d271844a55 100644 --- a/source/images/glyphs/donate.svg +++ b/source/images/glyphs/donate.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/email-circle-active.svg b/source/images/glyphs/email-circle-active.svg index 1366d3745b8..f8e54a3012f 100644 --- a/source/images/glyphs/email-circle-active.svg +++ b/source/images/glyphs/email-circle-active.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/email-circle.svg b/source/images/glyphs/email-circle.svg index b006e56ab1f..23bf3e239fc 100644 --- a/source/images/glyphs/email-circle.svg +++ b/source/images/glyphs/email-circle.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/external.svg b/source/images/glyphs/external.svg index 5bd740eda12..136ba9a27d6 100644 --- a/source/images/glyphs/external.svg +++ b/source/images/glyphs/external.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/facebook-circle-active.svg b/source/images/glyphs/facebook-circle-active.svg index 442c4942869..402cddbf475 100644 --- a/source/images/glyphs/facebook-circle-active.svg +++ b/source/images/glyphs/facebook-circle-active.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/facebook-circle.svg b/source/images/glyphs/facebook-circle.svg index 98b73142687..f01a6480f00 100644 --- a/source/images/glyphs/facebook-circle.svg +++ b/source/images/glyphs/facebook-circle.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/twitter-circle-active.svg b/source/images/glyphs/twitter-circle-active.svg index c95f385ba15..ce7af05a66e 100644 --- a/source/images/glyphs/twitter-circle-active.svg +++ b/source/images/glyphs/twitter-circle-active.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/glyphs/twitter-circle.svg b/source/images/glyphs/twitter-circle.svg index 699a6f20e5f..ed9b0106de0 100644 --- a/source/images/glyphs/twitter-circle.svg +++ b/source/images/glyphs/twitter-circle.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/green-20.svg b/source/images/green-20.svg index 51111fd2528..d7ea050fce4 100644 --- a/source/images/green-20.svg +++ b/source/images/green-20.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/line-art/internet-health.svg b/source/images/line-art/internet-health.svg index 0f58d41612a..6dc0626545e 100644 --- a/source/images/line-art/internet-health.svg +++ b/source/images/line-art/internet-health.svg @@ -1,8 +1,3 @@ - - - - - + + diff --git a/source/images/line-art/play-icon.svg b/source/images/line-art/play-icon.svg index 97f0e34e488..db3d68a8d63 100644 --- a/source/images/line-art/play-icon.svg +++ b/source/images/line-art/play-icon.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/mozilla.svg b/source/images/mozilla.svg index 505bfdc6d87..4f1667b4f79 100644 --- a/source/images/mozilla.svg +++ b/source/images/mozilla.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/news-icons/cnbc.svg b/source/images/news-icons/cnbc.svg index 03b7677cc7b..aef81e32e99 100644 --- a/source/images/news-icons/cnbc.svg +++ b/source/images/news-icons/cnbc.svg @@ -1,3 +1,3 @@ - + diff --git a/source/images/news-icons/medium.svg b/source/images/news-icons/medium.svg index 7ffe5203b9c..88b611c1fa4 100644 --- a/source/images/news-icons/medium.svg +++ b/source/images/news-icons/medium.svg @@ -1,4 +1,4 @@ - + diff --git a/source/images/news-icons/youtube.svg b/source/images/news-icons/youtube.svg index 6653cfc4421..a13d5f2ef44 100644 --- a/source/images/news-icons/youtube.svg +++ b/source/images/news-icons/youtube.svg @@ -1,8 +1,3 @@ - - - - - + + diff --git a/source/images/programs/internet-of-things.jpg b/source/images/programs/internet-of-things.jpg index bf8cbd25aae..f1bac288319 100755 Binary files a/source/images/programs/internet-of-things.jpg and b/source/images/programs/internet-of-things.jpg differ diff --git a/source/images/programs/learning.jpg b/source/images/programs/learning.jpg index d786a9a9ef3..f9c3d2151b1 100755 Binary files a/source/images/programs/learning.jpg and b/source/images/programs/learning.jpg differ diff --git a/source/images/programs/science.jpg b/source/images/programs/science.jpg index eafb406a240..65f5a2ebc66 100755 Binary files a/source/images/programs/science.jpg and b/source/images/programs/science.jpg differ diff --git a/source/images/x.svg b/source/images/x.svg index 6627df3e8b8..2dc1a26b91d 100644 --- a/source/images/x.svg +++ b/source/images/x.svg @@ -1,4 +1,4 @@ - + diff --git a/source/js/components/join/join.jsx b/source/js/components/join/join.jsx index a7ad4de4445..4b9ee6dc140 100644 --- a/source/js/components/join/join.jsx +++ b/source/js/components/join/join.jsx @@ -67,7 +67,7 @@ export default class JoinUs extends React.Component { }); let signupState = classNames({ - 'row py-5 px-md-2': true, + 'row py-5': true, 'signup-success': this.state.signupSuccess && this.state.userSubmitted, 'signup-fail': !this.state.signupSuccess && this.state.userSubmitted }); @@ -77,7 +77,7 @@ export default class JoinUs extends React.Component {
    -
    +
    diff --git a/source/js/components/join/join.scss b/source/js/components/join/join.scss index 38a1b3e73ff..d1c0852d2e3 100644 --- a/source/js/components/join/join.scss +++ b/source/js/components/join/join.scss @@ -61,8 +61,7 @@ } @media (min-width: $bp-md) { - padding-top: 1em; - padding-bottom: 1em; + padding: 1em 2rem; .join-btn { width: auto; @@ -94,9 +93,6 @@ } &.full-page { - margin-top: 2rem; - margin-bottom: 3rem; - .join-graphic { display: block; @@ -130,21 +126,8 @@ } } - .join-content, - .join-form { - @include make-col-pull(6); - } - } - - @media (min-width: $bp-lg) { - .join-content, - .join-form { - @include make-col-pull(5); - @include make-col(10); - } - - .join-graphic { - @include make-col-push(7); + .join-main-content { + @include make-col-pull(4); } } } diff --git a/source/js/components/loading-indicator/loading-indicator.jsx b/source/js/components/loading-indicator/loading-indicator.jsx new file mode 100644 index 00000000000..dea74608152 --- /dev/null +++ b/source/js/components/loading-indicator/loading-indicator.jsx @@ -0,0 +1,9 @@ +import React from 'react'; + +export default () => { + return
    +
    +
    +
    +
    ; +}; diff --git a/source/js/components/loading-indicator/loading-indicator.scss b/source/js/components/loading-indicator/loading-indicator.scss new file mode 100644 index 00000000000..cccc2eeb9c8 --- /dev/null +++ b/source/js/components/loading-indicator/loading-indicator.scss @@ -0,0 +1,47 @@ +.loading-indicator { + $circle-radius: 30px; + $dot-radius: 5px; + $dot-count: 3; + $icon-color: rgba(183, 212, 63, 1); + + @keyframes rotate-circle { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(360deg); + } + } + + position: relative; + width: $circle-radius * 2; + height: $circle-radius * 2; + margin: $dot-radius * 2; + border-radius: 50%; + border: solid 1px $icon-color; + animation: rotate-circle 2s infinite linear; + + .dot { + display: block; + position: absolute; + top: 50%; + left: 50%; + width: $dot-radius * 2; + height: $dot-radius * 2; + margin: -$dot-radius; + border-radius: 50%; + background: $icon-color; + + $angle: (360 / $dot-count); + $base-rotation: -90; + + @for $i from 1 through $dot-count { + &:nth-of-type(#{$i}) { + transform: rotate($base-rotation * 1deg) translate($circle-radius); + } + + $base-rotation: $base-rotation + $angle; + } + } +} diff --git a/source/js/components/multipage-nav/multipage-nav.jsx b/source/js/components/multipage-nav/multipage-nav.jsx index 9a3a9b12b6c..d5c7391e6d5 100644 --- a/source/js/components/multipage-nav/multipage-nav.jsx +++ b/source/js/components/multipage-nav/multipage-nav.jsx @@ -26,6 +26,10 @@ export default class MultipageNav extends React.Component { activeLinkLabel = {link.label}; } + if (link.isActive) { + activeLinkLabel = {link.label}; + } + return (
    {link.label} diff --git a/source/js/components/multipage-nav/multipage-nav.scss b/source/js/components/multipage-nav/multipage-nav.scss index 2c7f779dc0c..3580646b1d6 100644 --- a/source/js/components/multipage-nav/multipage-nav.scss +++ b/source/js/components/multipage-nav/multipage-nav.scss @@ -1,5 +1,5 @@ #multipage-nav-mobile { - background: #f2f2f2; + background: $off-white; .multipage-nav { .expander { diff --git a/source/js/components/people/people.scss b/source/js/components/people/people.scss index e267165fd22..93cd9af72c4 100644 --- a/source/js/components/people/people.scss +++ b/source/js/components/people/people.scss @@ -1,4 +1,5 @@ -#people { +#people, +.featured-fellow { .headshot { width: 100%; } diff --git a/source/js/components/people/person.jsx b/source/js/components/people/person.jsx index d5868b2edc5..8ba6ad91c7e 100644 --- a/source/js/components/people/person.jsx +++ b/source/js/components/people/person.jsx @@ -1,8 +1,16 @@ import React from 'react'; +import PropTypes from 'prop-types'; -export default class Person extends React.Component { +class Person extends React.Component { constructor(props) { super(props); + + // setting default value for props.metadata.image here + // because PropTypes.defaultProps does not support setting default value + // for object properties + if (!props.metadata.image) { + this.props.metadata.image = `/_images/fellowships/headshot/placeholder.jpg`; + } } render() { @@ -70,12 +78,19 @@ export default class Person extends React.Component {
    -
    {socialLinks}
    + {socialLinks.length > 0 && +
    {socialLinks}
    + } {this.props.metadata.links.interview && } + {this.props.metadata.custom_link && + + }
    @@ -107,7 +122,21 @@ export default class Person extends React.Component {
    }
    - {socialLinks} +
    + {socialLinks.length > 0 && +
    {socialLinks}
    + } + {this.props.metadata.links.interview && + + } + {this.props.metadata.custom_link && + + } +
    @@ -116,3 +145,22 @@ export default class Person extends React.Component { } } } + +Person.propTypes = { + metadata: PropTypes.shape({ + name: PropTypes.string, + location: PropTypes.string, + role: PropTypes.string, + bio: PropTypes.string, + quote: PropTypes.string, + featured: PropTypes.bool, + affiliations: PropTypes.array, + 'internet_health_issues': PropTypes.array, + image: PropTypes.string, + 'partnership_logo': PropTypes.string, + link: PropTypes.object, + 'custom_link': PropTypes.object, + }).isRequired, +}; + +export default Person; diff --git a/source/js/fellowships.js b/source/js/fellowships.js new file mode 100644 index 00000000000..c0e2b79e1c6 --- /dev/null +++ b/source/js/fellowships.js @@ -0,0 +1,183 @@ +/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "React" }] */ + +import React from 'react'; +import ReactDOM from 'react-dom'; + +import Person from './components/people/person.jsx'; +import LoadingIndicator from './components/loading-indicator/loading-indicator.jsx'; + +let pulseApiDomain = ``; +let pulseDomain = ``; +const DIRECTORY_PAGE_FILTER_OPTIONS = {'program_year': `2017`}; +const DIRECTORY_PAGE_TYPE_ORDER = [ `science`, `open web`, `tech policy`, `media`]; + +function getFellows(params, callback) { + Object.assign(params, {'profile_type': `fellow`}); + + let queryString = Object.entries(params).map(pair => pair.map(encodeURIComponent).join(`=`)).join(`&`); + let req = new XMLHttpRequest(); + + req.addEventListener(`load`, () => callback(JSON.parse(req.response))); + + req.open(`GET`, `https://${pulseApiDomain}/api/pulse/profiles/?${queryString}`); + req.send(); +} + +function renderFellowCard(fellow) { + // massage fellow's Pulse profile data and pass it to to render + + let links = {}; + + if ( fellow.twitter ) { + links.twitter = fellow.twitter; + } + + if ( fellow.linkedin ) { + links.linkedIn = fellow.linkedin; + } + + let metadata = { + 'internet_health_issues': fellow.issues, + links: links, + name: fellow.custom_name, + role: `${fellow.program_type}${fellow.program_year ? `, ${fellow.program_year}` : ``}`, + image: fellow.thumbnail, + location: fellow.location, + affiliations: [], // don't show affiliations meta for now + 'custom_link': { text: `See work`, link: `https://${pulseDomain}/profile/${fellow.profile_id}` } + }; + + return ; +} + +function groupFellowsByAttr(attribute, fellows) { + if (!attribute) { + return false; + } + + let fellowsGroup = {}; + + fellows.forEach(fellow => { + let attr = fellow[attribute]; + + if (!attr) { + return; + } + + attr = attr.toLowerCase(); + + if (!fellowsGroup[attr]) { + fellowsGroup[attr] = [fellow]; + } else { + fellowsGroup[attr].push(fellow); + } + }); + + return fellowsGroup; +} + +function renderFellowsOnDirectoryPage() { + const CONTAINER = document.getElementById(`fellows-directory-featured-fellows`); + + let getTypeSlug = function(type) { + return type.toLowerCase().replace(`fellow`,``).trim().replace(/\s/g, `-`); + }; + + let renderFilterOption = function(option) { + return ; + }; + + // show loading indicator + ReactDOM.render(
    , CONTAINER); + + // get fellow info from Pulse + getFellows(DIRECTORY_PAGE_FILTER_OPTIONS, fellows => { + // render filter bar + let filterBar =
    +
    +
    +
    Areas:
    + { DIRECTORY_PAGE_TYPE_ORDER.map(renderFilterOption) } +
    +
    +
    ; + + // render program type sections + let fellowsByType = groupFellowsByAttr(`program_type`, fellows); + let sections = Object.keys(fellowsByType).sort((a, b) => { + let aIndex = DIRECTORY_PAGE_TYPE_ORDER.indexOf(a); + let bIndex = DIRECTORY_PAGE_TYPE_ORDER.indexOf(b); + + return aIndex - bIndex; + }).map(type => { + // don't render any fellow profiles that we don't intend to show + if (DIRECTORY_PAGE_TYPE_ORDER.indexOf(type) < 0) { + return null; + } + + return
    +
    +

    {type} Fellows

    +
    + {fellowsByType[type].map(renderFellowCard)} +
    +
    + +
    ; + }); + + ReactDOM.render(
    {filterBar}
    {sections}
    , CONTAINER); + }); +} + +function renderFellowsOnDirectoryByTypePage() { + const CONTAINER = document.getElementById(`fellows-directory-fellows-by-type`); + + // show loading indicator + ReactDOM.render(
    , CONTAINER); + + // get fellow info from Pulse + getFellows({'program_type': `${CONTAINER.dataset.type}`}, fellows => { + let fellowsByYear = groupFellowsByAttr(`program_year`, fellows); + + let sections = Object.keys(fellowsByYear).sort().reverse().map(year => { + return
    +
    +
    +

    {year}

    +
    +
    + {fellowsByYear[year].map(renderFellowCard)} +
    ; + }); + + ReactDOM.render(
    {sections}
    , CONTAINER); + }); +} + +// Embed various Fellowships pages related React components +function injectReactComponents(env) { + pulseApiDomain = env.PULSE_API_DOMAIN; + pulseDomain = env.PULSE_DOMAIN; + + // Fellows on Fellows Directory page + if (document.getElementById(`fellows-directory-featured-fellows`)) { + renderFellowsOnDirectoryPage(); + } + + // Fellows on individual Directory page (e.g., science directory, open web directory) + if (document.getElementById(`fellows-directory-fellows-by-type`)) { + renderFellowsOnDirectoryByTypePage(); + } +} + +export default { injectReactComponents }; diff --git a/source/js/main.js b/source/js/main.js index 1308df1cd71..e712050f384 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -18,6 +18,8 @@ import HomeNews from './components/home-news/home-news.jsx'; import News from './components/news/news.jsx'; import Upcoming from './components/upcoming/upcoming.jsx'; +import fellowships from './fellowships'; + const SHOW_MEMBER_NOTICE = false; // To be populated via XHR... @@ -243,6 +245,9 @@ let main = { if (document.querySelector(`#news`)) { ReactDOM.render(, document.querySelector(`#news`)); } + + // Fellowships pages related components + fellowships.injectReactComponents(env); } }; diff --git a/source/pug/views/sign-up.pug b/source/pug/views/sign-up.pug index 116d3a88986..99f0c4d6a59 100644 --- a/source/pug/views/sign-up.pug +++ b/source/pug/views/sign-up.pug @@ -6,4 +6,6 @@ block masterParams block content .container - .join-us.full-page + .row.justify-content-center.my-5 + .col-10 + .join-us.full-page diff --git a/source/pug/views/style-guide.pug b/source/pug/views/style-guide.pug index a1c8d344bc6..84bc3546ead 100644 --- a/source/pug/views/style-guide.pug +++ b/source/pug/views/style-guide.pug @@ -52,7 +52,7 @@ block content h3.my-5 Components - h4 jump-bar + h4 .jump-bar ul.jump-bar.mb-3 li.no-link Featured @@ -63,10 +63,19 @@ block content li a(href=`https://www.mozillapulse.org/issues/open-innovation`) Open Innovation - h4 hr-gradient + h4 .hr-gradient hr.hr-gradient + h4 .join-us + .join-us + + h4 .join-us.full-width + .join-us.full-width + + h4 .join-us.full-page + .join-us.full-page + h4 multipage-nav (used as secondary nav ) div#multipage-nav-mobile.hidden-md-up diff --git a/source/sass/global.scss b/source/sass/global.scss index 646370f8e4d..c0065739024 100644 --- a/source/sass/global.scss +++ b/source/sass/global.scss @@ -21,6 +21,23 @@ body { url(../_images/bg-repeat-crop@2x.jpg) center top / auto 100% repeat-x; background-blend-mode: overlay, normal, normal; } + + // Fellowships homepage + &#view-fellows-home .wrapper-2 { + @media (min-width: $bp-lg) { + background-blend-mode: hard-light; + background-image: + url(../_images/fellowships/hero-image@2x.png), + linear-gradient(to left, rgba(61, 254, 253, 1) 0%, rgba(183, 212, 63, 1) 100%); + background-repeat: repeat-x; + background-size: auto 100%; + background-position: 50% top; + } + + @media (min-width: $bp-xl) { + background-position: center top; + } + } } button:hover { diff --git a/source/sass/main.scss b/source/sass/main.scss index cbe4b567aa7..0725da37434 100755 --- a/source/sass/main.scss +++ b/source/sass/main.scss @@ -22,6 +22,7 @@ $bp-xl: #{map-get($grid-breakpoints, xl)}; // >= 1200px @import '../js/components/nav/nav'; @import '../js/components/join/join'; @import '../js/components/takeover/takeover'; +@import '../js/components/loading-indicator/loading-indicator'; @import '../js/components/member-notice/member-notice'; @import '../js/components/multipage-nav/multipage-nav'; @@ -48,3 +49,4 @@ $bp-xl: #{map-get($grid-breakpoints, xl)}; // >= 1200px @import './views/about'; @import './views/contact'; @import './views/projects'; +@import './views/fellowships/shared'; diff --git a/source/sass/utilities.scss b/source/sass/utilities.scss index 10cb95c8fe7..e3407d62362 100644 --- a/source/sass/utilities.scss +++ b/source/sass/utilities.scss @@ -31,3 +31,29 @@ background-repeat: no-repeat; background-size: contain; } + +.breadcrumb { + background: none; + padding: 0; + margin-bottom: 0; + + a { + font-weight: 500; + } +} + +.breadcrumb-item + .breadcrumb-item::before { + padding-left: 5px; + padding-right: 2px; + content: ">"; +} + +.breadcrumb-item { + &.active { + @extend .small-gray; + } + + &:not(.active) { + text-decoration: underline; + } +} diff --git a/source/sass/views/fellowships/shared.scss b/source/sass/views/fellowships/shared.scss new file mode 100644 index 00000000000..fbf048d01ce --- /dev/null +++ b/source/sass/views/fellowships/shared.scss @@ -0,0 +1,105 @@ +#fellowships-nav { + a { + @include yellow-underline-nav-link(".active"); + } +} + +#fellowship-breadcrumb { + margin-top: 1.5rem; + margin-bottom: 1rem; +} + +.eligibility-section { + background: $off-white; +} + +.fellowships-list { + list-style: outside; + + &.benefit-list { + @media (min-width: $bp-md) { + column-count: 2; + column-gap: 2rem; + } + } + + li { + margin-left: 1rem; + padding-left: 1.5rem; + } +} + +.in-page-cta { + padding-top: 10px; + padding-bottom: 10px; + border-top: 1px solid rgba(0, 0, 0, 0.1); + border-bottom: 1px solid rgba(0, 0, 0, 0.1); + + .content::before { + content: ''; + display: flex; + align-self: center; + width: 22px; + height: 22px; + margin-right: 10px; + background: url('../_images/fellowships/svg/info-icon.svg') no-repeat 0 0/contain; + } +} + +#fellowships-directory-filter { + background: $off-white; + + .btn.btn-link { + display: inline-block; + text-align: left; + padding: 0; + border: 0; + font-weight: 500; + color: inherit; + + &:not(:last-child)::after { + content: "|"; + margin-left: 5px; + margin-right: 5px; + } + } +} + +#fellowships-application-cta-banner { + background: $off-white; + + .btn { + width: 100%; + + @media (min-width: $bp-md) { + width: auto; + } + } +} + +[class*="col-"].logo { + display: flex; + justify-content: center; + align-items: center; + margin-top: 1rem; + margin-bottom: 1rem; + + @media (min-width: $bp-md) { + margin-top: 2rem; + margin-bottom: 2rem; + } + + img { + max-width: 75%; + } +} + +.hear-from-funder-line-art { + background: url(../_images/fellowships/svg/funders-fellowship-optim.svg) no-repeat center 0; + min-height: 9rem; +} + +.hear-from-host-org-line-art { + background: url(../_images/fellowships/svg/host-orgs-fellowship-optim.svg) no-repeat center 0; + min-height: 9rem; +} diff --git a/source/sass/views/home.scss b/source/sass/views/home.scss index 39d231580b3..4fbda2b857e 100644 --- a/source/sass/views/home.scss +++ b/source/sass/views/home.scss @@ -34,7 +34,7 @@ } .stay-connected { - background: #f2f2f2; + background: $off-white; a { width: 50%; diff --git a/source/sass/views/landing.scss b/source/sass/views/landing.scss index 948d247b696..4c23c1bd2c6 100644 --- a/source/sass/views/landing.scss +++ b/source/sass/views/landing.scss @@ -1,5 +1,5 @@ .sign-up-box { > * { - background: #f2f2f2; + background: $off-white; } }