Skip to content

Commit

Permalink
initial copies from the odin-recipe repo
Browse files Browse the repository at this point in the history
  • Loading branch information
windoverwater committed Feb 29, 2024
1 parent 79ed059 commit e5b3c2e
Show file tree
Hide file tree
Showing 3 changed files with 694 additions and 0 deletions.
144 changes: 144 additions & 0 deletions blank-ballot.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
const blankBallotJSON = `{
"active_ggos": [
".",
"GGOs/states/Massachusetts",
"GGOs/states/Massachusetts/GGOs/counties/Middlesex",
"GGOs/states/Massachusetts/GGOs/towns/Concord"
],
"ballot_filename": "000,001,002,003,ballot.json",
"ballot_node": "GGOs/states/Massachusetts/GGOs/towns/Concord",
"ballot_subdir": "GGOs/states/Massachusetts/GGOs/towns/Concord",
"contests": {
"GGOs/states/Massachusetts": [
{
"U.S. President": {
"choices": [
{
"name": "Circle Party Ticket",
"ticket_names": [
"Rey Skywalker",
"Obi-Wan Kenobi"
]
},
{
"name": "Square Party Ticket",
"ticket_names": [
"Atticus Finch",
"Hermione Granger"
]
},
{
"name": "Triangle Party Ticket",
"ticket_names": [
"Evelyn Quan Wang",
"Waymond Wang"
]
}
],
"contest_type": "ticket",
"max": 1,
"selection": [
"0: Circle Party Ticket"
],
"tally": "plurality",
"ticket_offices": [
"President",
"Vice President"
],
"uid": "0000"
}
},
{
"U.S. Senate": {
"choices": [
{
"name": "Anthony Alpha",
"party": "Circle Party"
},
{
"name": "Betty Beta",
"party": "Dyad Party"
},
{
"name": "Gloria Gamma",
"party": "Triangle Party"
},
{
"name": "David Delta",
"party": "Square Party"
},
{
"name": "Emily Echo",
"party": "Pentagon Party"
},
{
"name": "Francis Foxtrot",
"party": "Hexagon Party"
}
],
"selection": [
"5: Francis Foxtrot",
"4: Emily Echo",
"3: David Delta"
],
"tally": "rcv",
"uid": "0001"
}
},
{
"Governor": {
"choices": [
{
"name": "Spencer Cogswell",
"party": "Circle Party"
},
{
"name": "Cosmo Spacely",
"party": "Triangle Party"
}
],
"max": 1,
"selection": [
"1: Cosmo Spacely"
],
"tally": "plurality",
"uid": "0002"
}
}
],
"GGOs/states/Massachusetts/GGOs/counties/Middlesex": [
{
"County Clerk": {
"choices": [
"Jean-Luc Picard",
"Katniss Everdeen",
"James T. Kirk"
],
"max": 1,
"selection": [
"0: Jean-Luc Picard"
],
"tally": "plurality",
"uid": "0003"
}
}
],
"GGOs/states/Massachusetts/GGOs/towns/Concord": [
{
"Question 1 - should the starting time of the annual town meeting be moved to 6:30 PM?": {
"choices": [
"yes",
"no"
],
"description": "Should the Town of Concord start the annual Town Meeting at 6:30 PM instead of 7:00 PM?",
"max": 1,
"selection": [
"0: yes"
],
"tally": "plurality",
"uid": "0004"
}
}
]
}
}`;
70 changes: 70 additions & 0 deletions stylesheets/voting.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/* Set the overall styles for the progress bar */
#progressBar {
display: flex;
height: 20px;
width: 100%;
text-align: center;
background-color: #E5E4E2;
}
#youAreHereBar {
display: flex;
height: 20px;
width: 100%;
text-align: center;
}

/* Each section (class) gets an individual black border */
.progSection {
flex: 1; /* Equal distribution of space */
border-right: 1px solid black;
}
.yrhSection {
flex: 1; /* Equal distribution of space */
}

/* when a plurality candidate is selected or not */
.selected {
background-color: #D5F5E3;
}
.unselected {
background-color: #f5f5f5;
}

/* the incoming choices */
#choiceList li {
margin: 10px;
padding: 15px;
border: 1px solid #dfdfdf;
list-style-type: none;
}

/* in RCV the selection is a sortable list - the defaults */
#sortableList {
list-style: none;
padding: 0;
margin: 0;
}

#sortableList li {
margin: 10px;
padding: 15px;
border: 1px solid #dfdfdf;
background: #f5f5f5;
}

#sortableList li.hint {
border: 1px solid #ffc49a;
background: #feffb4;
}

#sortableList li.active {
border: 1px solid #ffa5a5;
background: #ffe7e7;
}

/* bottom section */
.noBullets {
list-style-type: none;
}

</style>
Loading

0 comments on commit e5b3c2e

Please sign in to comment.