STYLING & FORMAT GUIDE

ALL PAGES:
- Every <a href=""> needs to be changed to <a class="link" href=""> to have the red link style apply.

---------------------------------------------

UPDATES TO SWDB
- All of the updates are in updates.php
- To add a new update, add the following to the beginning of the body code!
	Format: array_push($updates, newUpdate("month/day", "year", "update"))
	MAKE SURE THE FOLLOWING IS SATISFIED:
	1. in <a href>, the quotations for the css class and link should be singular ''! If double quotations are used, then it will end the previous double quote and will make the homepage ERROR.
	2. <a href> should have class='link'! ex. <a class='link' href='http://statewidedatabase.org/path'>

---------------------------------------------

REDISTRICTING/ELECTIONS DATA PAGES
- In the top <?php> tag, add the following for related links (good practice is to copy and paste the previous year's and just change the election years and update the links to direct to the right link)
	$pageHasRelatedLinks = True;
	$relatedLinks = array(
		array("name" => "Precinct File Descriptions", "link" => "{$pathToRoot}info/metadata/precinct_data.html", "desc" => "Available Precinct data files (SOV, REG, ABS, MAIL, POLLV and VOTE.) &amp; file content descriptions."),
		array("name" => "Precinct Type Descriptions", "link" => "{$pathToRoot}diagrams.html", "desc" => "Precinct type (rgprec, rrprec, srprec, ssprec, svprec, mprec etc.) descriptions."),
		array("name" => "Latest Updates", "link" => "{$pathToRoot}updates.html", "desc" => "Access the latest versions of data files."),
		array("name" => "Geographic Data", "link" => "p16_geo_conv.html", "desc" => "2016 Primary Election geographic data, including the precinct boundary files.")
	);

	$electionType = "primary";
	$electionYear = "16";
	$hasSpecial = False; //has a special election
	$onlySpecial = False; //has only special, no primary/general
- Add a subnavigation right before the table declaration according to what type of elections data it is:
	- <?php require_once("{$path}include/election_sub_nav.html"); ?>
	- <?php require_once("{$path}include/redistricting_sub_nav.html"); ?>
	- <?php require_once("{$path}include/geo_conv_sub_nav.html"); ?>
	- <?php require_once("{$path}include/geo_conv_sub_nav_redistricting.html"); ?>
- Table declaration: <table class="table table-bordered table-condensed" cellspacing="0">
- County FIPS: echo "<tr><th><a class='county-num'>COUNTY $fipsNum</a><br />" . $FIPS[$fipsNum] . "</th>";

---------------------------------------------

HEADER & FOOTER NAVIGATION
- Copy and paste the group of code from a similar section

---------------------------------------------

CONTACT
- Footer contact form sends emails to statewidedatabase@gmail.com
- Configurations for which email can be set in /var/www/html/.htaccess

---------------------------------------------

Created by: Hanna Lee
Questions? Contact hanna@cain.berkeley.edu