Commit 769802c8 authored by Robert Martin-Legene's avatar Robert Martin-Legene

Front-end from Otto Zaiser

parent 620af200
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
<svg id="Capa_1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><style>.st0{fill:#e7f5fb}.st1{fill:#f04e44;stroke:#46245e;stroke-width:2.1041;stroke-miterlimit:10}</style><title>ICONOS</title><circle class="st0" cx="100.1" cy="99.6" r="47.8"/><path class="st1" d="M110.2 100l11.2-11.2c2.8-2.8 2.8-7.4 0-10.2-2.8-2.8-7.4-2.8-10.2 0L100 89.8 88.8 78.6c-2.8-2.8-7.4-2.8-10.2 0-2.8 2.8-2.8 7.4 0 10.2L89.8 100l-11.2 11.2c-2.8 2.8-2.8 7.4 0 10.2 2.8 2.8 7.4 2.8 10.2 0l11.2-11.2 11.2 11.2c2.8 2.8 7.4 2.8 10.2 0s2.8-7.4 0-10.2L110.2 100z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17.71 20.45" width="25" height="30"><title>Bullet</title><path fill="#b9cc2e" d="M8.86 0L0 5.11l8.86 5.11 8.85-5.11L8.86 0z"/><path fill="#d9e264" d="M8.86 10.22v10.23l8.85-5.11V5.11l-8.85 5.11z"/><path fill="#9da811" d="M8.86 10.22L0 5.11v10.23l8.86 5.11V10.22z"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><defs><style>.c{stroke-width:3px;fill:none;stroke:#e4b349;stroke-linecap:round;stroke-linejoin:round}</style></defs><title>ICONOS</title><circle cx="100.09" cy="99.61" r="47.77" fill="#e7f5fb"/><path fill="#b9cc2e" stroke="#46245e" stroke-miterlimit="10" stroke-width="3" d="M98.92 124.17a7 7 0 0 1-4.69-1.81l-17.06-15.51a7 7 0 0 1 9.39-10.33l11.93 10.85 37.57-40.67a7 7 0 0 1 10.26 9.47l-42.27 45.76a7 7 0 0 1-5.13 2.24z"/><path d="M38.16 43.83v7.38m-3.69-3.69h7.38m19-17.5v7.38m-3.69-3.69h7.38m91.38 130.81v7.38m-3.69-3.69h7.38m-33.45-17.96v7.38m-3.69-3.69h7.38" class="c"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><style>.st6,.st7{stroke-width:3;stroke-miterlimit:10}.st6{stroke-linecap:round;stroke-linejoin:round;fill:none;stroke:#e4b349}.st7{fill:#b9cc2e;stroke:#46245e}</style><g id="Capa_2"><circle cx="100.1" cy="99.6" r="47.8" fill="#e7f5fb"/><path d="M45.2 64.8v7.4m-3.7-3.7h7.4m12-24.5v-6.6m-3.7 3.3h7.3m86.4 98.8v7.4m-3.7-3.7h7.4m-28.4 13.1v7.3m-3.7-3.7h7.3" class="st6"/><path fill="#e6e6e6" stroke="#46245e" stroke-miterlimit="10" stroke-width="3" d="M126.9 125H73.1c-6.6 0-12-5.4-12-12V87c0-6.6 5.4-12 12-12h53.8c6.6 0 12 5.4 12 12v26c0 6.6-5.4 12-12 12z"/><path fill="none" stroke="#46245e" stroke-miterlimit="10" stroke-width="3" d="M63.5 78.3l33.4 26.8c1.8 1.5 4.4 1.4 6.2 0l33.1-26.8"/><path d="M61.1 115.5l28.5-16.3m49.2 16.3l-28.5-16.3" class="st7"/></g></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 139.31 100"><defs><style>.c{fill:#5c5c60}</style><radialGradient id="a" cx="69.48" cy="64.25" r="48.74" gradientTransform="matrix(1.39 0 0 1.39 -27.38 -19.65)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#84d0d0"/><stop offset="1" stop-color="#6a9ad1"/></radialGradient></defs><title>Blockchain Federal Argentina</title><path fill="#e5b449" d="M69.65 53.63a14.47 14.47 0 0 0-14.47 14.48h28.95a14.48 14.48 0 0 0-14.48-14.48z"/><path fill="url(#a)" d="M1.61 68.11V55.32l22.14 12.79L45.9 55.32v12.79h1.61V54.39l22.14-12.78L91.8 54.39v13.72h1.61V54.39L104.48 48l10.27-5.93v26h1.61v-26l21.34 12.32v13.72h1.61V53.47l-23-13.25v-26.5L92.6 0 69.65 13.25 46.7 0 23 13.72v26.5L0 53.47v14.64zm91.8-65.79l21.34 12.32v24.65L93.41 27zm20.53 38.36l-10.26 5.93L92.6 53 71.26 40.68 92.6 28.36zm-43.48-26L91.8 2.32V27L70.46 39.29zm-1.61 25.54L47.51 52.54V27.89l21.34-12.32zM46.7 1.86L68 14.18 46.7 26.5 25.36 14.18zM24.56 15.57L45.9 27.89v24.65l-10.27-5.93-11.07-6.39zm-.81 26L34.83 48l10.27 5.93-21.35 12.32L2.41 53.93z"/><path d="M.09 73.53H5.6c2.66 0 4.58 1.47 4.58 4a3.68 3.68 0 0 1-2 3.39 3.79 3.79 0 0 1 2.59 3.81c0 3-2.3 4.48-5.06 4.48H.09zm5.51 6.62a2.23 2.23 0 0 0 2.32-2.39 2.16 2.16 0 0 0-2.36-2.32H2.3v4.71zm.25 7.21a2.5 2.5 0 0 0 2.7-2.68A2.56 2.56 0 0 0 5.83 82H2.3v5.38zm8.58-13.83h2.21v13.83h7.05v1.91h-9.26zm18.82-.27a7.93 7.93 0 0 1 8.07 8 8.09 8.09 0 1 1-16.17 0 8 8 0 0 1 8.1-8zm0 14.25a6 6 0 0 0 5.8-6.22 5.82 5.82 0 1 0-11.63 0 6 6 0 0 0 5.83 6.22zm18.22-14.25a8.11 8.11 0 0 1 5.73 2.07L56.11 77a7.2 7.2 0 0 0-4.55-1.71 5.71 5.71 0 0 0-5.82 6 5.91 5.91 0 0 0 5.84 6.22 7.11 7.11 0 0 0 4.86-2.05L57.63 87a8.47 8.47 0 0 1-6.12 2.5 8.14 8.14 0 0 1 0-16.28zm9.53.27h2.21v6.62l6.32-6.62H72L65.06 81l7.21 8.23h-2.5l-6.54-7.22v7.22H61zm19.9-.2a8 8 0 0 1 5.65 2l-.83 1.13A7.37 7.37 0 0 0 81 74.75a6.27 6.27 0 0 0-6.31 6.56c0 3.75 2.63 6.8 6.35 6.8A7.35 7.35 0 0 0 86.08 86l.92 1.11a8.36 8.36 0 0 1-6 2.43 7.89 7.89 0 0 1-8-8.21 7.77 7.77 0 0 1 7.9-8zm9.42.26h1.54v7.14H101v-7.14h1.54v15.68H101v-7.16h-9.1v7.16h-1.58zm24.47 10.69h-6.32l-1.78 5h-1.63l5.75-15.68h1.66l5.75 15.68h-1.63zm-3.17-9.06s-.34 1.3-.6 2l-2.1 5.69h5.4l-2.06-5.69c-.26-.73-.6-2-.6-2zm9.16-1.63h1.54v15.68h-1.54zm6.09 0h1.5l8 11.29c.53.78 1.29 2.12 1.29 2.12s-.13-1.29-.13-2.12V73.59h1.54v15.68h-1.49l-8-11.28c-.54-.78-1.3-2.12-1.3-2.12s.13 1.29.13 2.12v11.28h-1.54zM0 94.19h3v.5H.58v2.15h2.1v.5H.58v2.56H0zm7.88 0h3.22v.5H8.44v2.08h2.17v.51H8.44v2.12h2.81v.5H7.88zm8.33 0h1.84a2.86 2.86 0 1 1 0 5.71h-1.84zM18 99.4a2.36 2.36 0 0 0 0-4.71h-1.23v4.71zm7.91-5.21h3.22v.5h-2.66v2.08h2.17v.51h-2.17v2.12h2.8v.5h-3.36zm8.32 0h1.69a2.73 2.73 0 0 1 1.08.15 1.67 1.67 0 0 1-.22 3l.14.23 1.25 2.3h-.65l-1.29-2.4h-1.44v2.4h-.56zM36.15 97a1.18 1.18 0 0 0 .61-2.16 1.61 1.61 0 0 0-.81-.14h-1.16V97zm9.69 1.08h-2.3l-.65 1.82h-.59l2.09-5.71H45l2.09 5.71h-.59zm-1.15-3.3l-.22.74-.77 2.07h2l-.75-2.07a9.7 9.7 0 0 1-.22-.74zm7.02-.59h.56v5.21h2.65v.5h-3.21zm16.58 3.89H66l-.66 1.82h-.59l2.1-5.71h.6l2.1 5.71H69zm-1.15-3.3s-.12.47-.22.74l-.76 2.07h2l-.74-2.07a9.7 9.7 0 0 1-.22-.74zm7.03-.59h1.69a2.7 2.7 0 0 1 1.07.15 1.67 1.67 0 0 1-.22 3l.15.23 1.24 2.3h-.64l-1.29-2.4h-1.44v2.4h-.56zM76.08 97a1.06 1.06 0 0 0 1.13-1.16 1.05 1.05 0 0 0-.52-1 1.61 1.61 0 0 0-.81-.14h-1.15V97zm9.37-2.91a3.08 3.08 0 0 1 2 .67l-.3.42a2.82 2.82 0 0 0-1.71-.57 2.44 2.44 0 0 0 0 4.87 2.49 2.49 0 0 0 1.8-.84v-1h-1v-.51h1.51v2.77h-.52v-.67a2.56 2.56 0 0 1-1.86.77 2.83 2.83 0 0 1-2.8-3 2.87 2.87 0 0 1 2.88-2.91zm7.35.1H96v.5h-2.64v2.08h2.17v.51h-2.17v2.12h2.8v.5H92.8zm8.32 0h.55l2.92 4.11c.19.29.47.77.47.77v-4.88h.56v5.71H105l-2.92-4.11c-.19-.28-.47-.77-.47-.77v4.88h-.57zm11.09.5h-2v-.5h4.66v.5h-2v5.21h-.56zm7.18-.5h.61v5.71h-.56zm5.9 0h.55l2.92 4.11c.19.29.47.77.47.77s-.05-.47-.05-.77v-4.11h.57v5.71h-.55l-2.92-4.11c-.19-.28-.47-.77-.47-.77v4.88h-.56zm12.63 3.89h-2.3L135 99.9h-.59l2.09-5.71h.6l2.1 5.71h-.59zm-1.16-3.3s-.12.47-.21.74l-.77 2.07h2l-.78-2.07a9.7 9.7 0 0 1-.22-.74z" class="c"/></svg>
\ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><path fill="#E00" d="M0 7.562l1.114-3.438c2.565.906 4.43 1.688 5.59 2.35-.306-2.921-.467-4.93-.484-6.027h3.511c-.05 1.597-.234 3.6-.558 6.003 1.664-.838 3.566-1.613 5.714-2.325L16 7.562c-2.05.678-4.06 1.131-6.028 1.356.984.856 2.372 2.381 4.166 4.575l-2.906 2.059c-.935-1.274-2.041-3.009-3.316-5.206-1.194 2.275-2.244 4.013-3.147 5.206l-2.856-2.059c1.872-2.307 3.211-3.832 4.017-4.575A86.77 86.77 0 0 1 0 7.562"/></svg>
\ No newline at end of file
!function(o){function a(){o(this).scrollTop()>110?o("#navbar").addClass("navbar-fondo"):o("#navbar").removeClass("navbar-fondo")}o(".bt-top").hide(),o(window).scroll(function(){a()}),a(),o("#toggle-password").on("click",function(a){a.preventDefault(),"text"==o("#pwd").attr("type")?(o("#pwd").attr("type","password"),o("#toggle-password .toggle-icon").removeClass("fa-eye-slash"),o("#toggle-password .toggle-icon").addClass("fa-eye")):"password"==o("#pwd").attr("type")&&(o("#pwd").attr("type","text"),o("#toggle-password .toggle-icon").addClass("fa-eye-slash"),o("#toggle-password .toggle-icon").removeClass("fa-eye"))})}(jQuery);
\ No newline at end of file
// $ solc --abi src/Ballot.sol | head -4 | tail -1 | jq
var abiBallot = [
{
"name": "vote",
"type": "function",
"payable": false,
"constant": false,
"stateMutability": "nonpayable",
"inputs": [
{
"name": "proposal",
"type": "uint256"
}
],
"outputs": []
},
{
"name": "ballotPercentOfRegisteredVotersReqToBeValid",
"type": "function",
"payable": false,
"constant": true,
"inputs": [],
"stateMutability": "view",
"outputs": [
{
"name": "",
"type": "uint256"
}
]
},
{
"name": "voterMap",
"type": "function",
"payable": false,
"constant": true,
"stateMutability": "view",
"inputs": [
{
"name": "",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "uint256"
}
]
},
{
"name": "getVoterIdx",
"type": "function",
"payable": false,
"constant": true,
"stateMutability": "view",
"inputs": [
{
"name": "voter",
"type": "address"
}
],
"outputs": [
{
"name": "",
"type": "int256"
}
]
},
{
"name": "uncreate",
"type": "function",
"payable": false,
"constant": false,
"stateMutability": "nonpayable",
"inputs": [],
"outputs": []
},
{
"name": "voterList",
"type": "function",
"payable": false,
"constant": true,
"stateMutability": "view",
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"outputs": [
{
"name": "voter",
"type": "address"
},
{
"name": "votesLeft",
"type": "uint256"
}
]
},
{
"name": "ballotCountNonvotesAsBlanks",
"type": "function",
"payable": false,
"constant": true,
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "bool"
}
]
},
{
"name": "ballotVoteBefore",
"type": "function",
"payable": false,
"constant": true,
"stateMutability": "view",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
]
},
{
"constant": false,
"inputs": [
{
"name": "voters",
"type": "address[]"
}
],
"name": "giveRightToVote",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotVoteStarts",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotMaxVotesPerProposal",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotMaxVotesPerVoter",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotTitle",
"outputs": [
{
"name": "",
"type": "string"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "",
"type": "uint256"
}
],
"name": "proposalList",
"outputs": [
{
"name": "",
"type": "bytes32"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotPercentOfVotesCastToWin",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "ballotChairman",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"name": "title",
"type": "string"
},
{
"name": "voteStarts",
"type": "uint256"
},
{
"name": "voteBefore",
"type": "uint256"
},
{
"name": "percentOfRegisteredVotersReqToBeValid",
"type": "uint256"
},
{
"name": "percentOfVotesCastToWin",
"type": "uint256"
},
{
"name": "countNonvotesAsBlanks",
"type": "bool"
},
{
"name": "maxVotesPerVoter",
"type": "uint256"
},
{
"name": "maxVotesPerProposal",
"type": "uint256"
},
{
"name": "proposalNames",
"type": "bytes32[]"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
];
// $ solc --abi src/Ballot.sol | tail -1 | jq
var abiNew = [
{
"constant": false,
"inputs": [
{
"name": "title",
"type": "string"
},
{
"name": "voteStarts",
"type": "uint256"
},
{
"name": "voteBefore",
"type": "uint256"
},
{
"name": "percentOfRegisteredVotersReqToBeValid",
"type": "uint256"
},
{
"name": "percentOfVotesCastToWin",
"type": "uint256"
},
{
"name": "countNonvotesAsBlanks",
"type": "bool"
},
{
"name": "maxVotesPerVoter",
"type": "uint256"
},
{
"name": "maxVotesPerProposal",
"type": "uint256"
},
{
"name": "proposalNames",
"type": "bytes32[]"
}
],
"name": "newBallot",
"outputs": [
{
"name": "newaddr",
"type": "address"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
}
];
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="es-AR">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Votación | Blockchain Federal Argentina</title>
<link rel="shortcut icon" href="favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<link rel="stylesheet" type="text/css" media="screen" href="css/vendor.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/main.css" />
</head>
<body>
<a href="#main-content" class="visually-hidden focusable skip-link">Pasar al contenido principal</a>
<nav id="navbar" role="banner" class="navbar navbar-default navbar-fixed-top navbar-content navbar-vote">
<div class="container">
<div class="navbar-header">
<div class="region region-navigation">
<a class="logo navbar-btn pull-left" href="https://bfa.ar/" rel="home">
<img id="logo" src="./images/logo.svg" alt="Blockchain Federal Argentina">
</a>
<div class="vote-status hide" id="status"></div>
</div>
</div>
</div>
</nav>
<div class="diagonal-header"></div>
<main class="container vote" id="main-content">
<div id="alert-wrapper"></div>
<div id="voterow" class="row hide">
<section>
<h1 class="page-header">Votación</h1>
<a class="btn-default btn btn-lg btn-header btn-new" aria-label="Crear nueva votación" href="smartNewvote.html">
<span class="hidden-xs">Crear nueva votación</span>
<span class="visible-xs">
<i class="fas fa-plus" aria-hidden="true"></i>
</span>
</a>
<form action="">
<div class="alert alert-danger" role="alert" id="errorForm">
<p>Comprobá los siguientes errores del formulario:</p>
<ul></ul>
</div>
<div class="form-group form-group-lg col-sm-12">
<label for="input_address" class="form-required">Dirección de la votación</label>
<input class="form-control" type="text" id="input_address" name="input_address" value="" size="40"
minlength="40" maxlength="40" required="required" aria-required="true" placeholder="40 caracteres hex (puede empezar con 0x)">
</div>
<div class="form-group col-sm-6 col-sm-push-6">
<button class="btn-primary btn btn-block" type="submit" id="submit">Ver votación</button>
</div>
</form>
</section>
</div>
</main>
<footer role="contentinfo">
<div class="container">
<div class="row">
<div class="col col-xs-12">
<div class="region region-footer">
<section>
<h2>Redes Sociales</h2>
<div class="field field--name-body field--type-text-with-summary field--label-hidden field--item">
<ul>
<li><a href="https://www.facebook.com/bfa.ar" target="_blank"><i class="fab fa-facebook-f fa-2x"
aria-hidden="true"></i><span class="sr-only">Facebook</span></a></li>
<li><a href="https://www.twitter.com/bfa_ar" target="_blank"><i class="fab fa-twitter fa-2x"
aria-hidden="true"></i><span class="sr-only">Twitter</span></a></li>
<li><a href="https://www.instagram.com/bfa_ar" target="_blank"><i class="fab fa-instagram fa-2x"
aria-hidden="true"></i><span class="sr-only">Instagram</span></a></li>
<li><a href="https://www.linkedin.com/company/bfar/" target="_blank"><i class="fab fa-linkedin-in fa-2x"
aria-hidden="true"></i><span class="sr-only">Linkedin</span></a></li>
</ul>
<p class="font_small">Blockchain Federal Argentina</p>
</div>
</section>
</div>
</div>
</div>
</div>
</footer>
<!-- Placed at the end of the document so the pages load faster -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<script src="js/vendor/font-awesome531.js"></script>
<script src="js/vendor/jquery.validate.js"></script>
<script src="js/main.js"></script>
<script src="js/vendor/web3.js"></script>
<script src="js/vendor/abi.js"></script>
<script src="js/vendor/ballot.js"></script>
<script>
var container = $('#errorForm');
$("form").validate({
focusInvalid: false,
errorContainer: container,
errorLabelContainer: $("ul", container),
wrapper: 'li',
highlight: function (element) {
$(element).closest('.form-group').addClass('has-error');
},
unhighlight: function (element) {
$(element).closest('.form-group').removeClass('has-error');
},
submitHandler: function (form) {
// do other things for a valid form
//form.submit();
ver_votacion('');
},
messages: {
input_address: {
required: "Ingresá una dirección válida",
minlength: "La dirección debe tener 40 caractéres incluidos el 0x.",
maxlength: "La dirección debe tener 40 caractéres incluidos el 0x."
}
},
rules: {
input_address: {
required: true,
minlength: 40,
maxlength: 40
}
}
});
</script>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment