Giter VIP home page Giter VIP logo

repyourblock's People

Contributors

bryce-sampson avatar isaiahstjohn avatar

Watchers

 avatar  avatar

repyourblock's Issues

Voter information lookup

Use https://developers.google.com/places/web-service/autocomplete and https://developers.google.com/maps/documentation/geocoding to get the user's address with an autocomplete input field. Also ask for the voter's name. Transform the Google address by, for example, 8th --> EIGHTH to match the voterfile address format. Then look for similar addresses in the voterfile (http://boelcd.franklincountyohio.gov/). Transform the name by removing all characters except A-Z and spaces. Filter out any voterfile records with dissimilar name fields. Finally, check the remaining addresses with Google's geocoding service to see if the latitude and longitude fields match that of the address provided by the user. If multiple records pass through all of these filters, provide them all to the user. Show the user their polling location and #RepYourBlock2020 candidate.

Replace hand-coded forms with Action Network drop-ins

After some more digging, it looks like our best option for integrating with Action Network is to use their custom embed codes and style them with CSS. That way we don't need to pay extra for an API key. Unfortunately, that means taking out the custom html forms @bryce-sampson wrote yesterday.

The following is the code for the email sign-up:

<link href='https://actionnetwork.org/css/style-embed-whitelabel-v3.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/v3/form/join-repyourblock2020?format=js&source=widget'></script><div id='can-form-area-join-repyourblock2020' style='width: 100%'><!-- this div is the target for our HTML insertion --></div>

And this is the code for the volunteer sign-up:

<link href='https://actionnetwork.org/css/style-embed-whitelabel-v3.css' rel='stylesheet' type='text/css' /><script src='https://actionnetwork.org/widgets/v3/form/volunteer-w-repyourblock2020?format=js&source=widget'></script><div id='can-form-area-volunteer-w-repyourblock2020' style='width: 100%'><!-- this div is the target for our HTML insertion --></div>

We'll want to change the style='width: 100%' part in each embed code. Don't forget to style the 'Thank You' code that Action Network dynamically swaps in after the form is submitted!

Make "Values" section flexbox maintain even rows

Petrik suggested yesterday that it would be nice if the values boxes on the home page ("https://repyourblock2020.org/") displayed with the same number of boxes on every line. I suggest we fix this after the website is launched. I don't think it's a high priority issue and we have lots of other important stuff to get done before launch.

Currently, on a large screen, you may see this:

5 and 1 flexbox flow example

Or this:
4 and 2 flexbox flow example

We want the values boxes to always display on one or more lines such that each line has the same number of items. Since we have six items, they could be displayed in any of the following configurations:

| 1 | 2 | 3 | 4 | 5 | 6 |
--
| 1 | 2 | 3 |
| 4 | 5 | 6 |
--
| 1 | 2 |
| 3 | 4 |
| 5 | 6 |
--
| 1 |
| 2 |
| 3 |
| 4 |
| 5 |
| 6 |

Probably the easiest solution would be to change to a CSS grid (as @bryce-sampson suggested) and use media queries to change the grid layout according to screen width.

The only downside with using media queries is that it will break if we change the width or number of value boxes, but that shouldn't happen too often.

A more general solution could be created with JavaScript, but I feel like that would be overkill, here.

Let people use a custom URL to get credit for raising money

Use URL's like repyourblock2020.org/donate?ref=isaiah to allow donations to be credited to Isaiah. To implement the feature, use:
let params = (new URL(window.location.href)).searchParams; let ref = params.get('ref');
Check that ref is in a list of valid refs hardcoded in the page source. This check could be bypassed by a determined person, but that would just let them donate money under an invalid referral code, which would not be a problem.
Then if the ref is determined to be valid, set a hidden ref field in the Action Network form to the value of ref.

Organize html files to eliminate ".html" from public site URL's

Instead of https://repyourblock2020.org/volunteer.html, I'd like to have https://repyourblock2020.org/volunteer/. It's just a little prettier with out the .html. Nginx is set up on the server to automatically do that, we just need to move www/volunteer.html and friends to www/volunteer/index.html, www/how-we-win/index.html, etc. Of course, we will then need to go through each page's source code and change the .html's to /'s. To check that everything is correct, search each page's source for '.html'. Their should be no occurrences--at least not in internal links.

Also, change "/index.html" to "/", e.g., in the #repyourblock2020 logo href attributes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.