Commit 0b6422b3 authored by royce-matthew's avatar royce-matthew

Alexis: fixed more styles for vote module, consistency of style

parent ca426a99
This diff is collapsed.
......@@ -21,6 +21,8 @@ a {
color: #0070d2;
font-size: 16px;
}
h1, h2, h3, h4, h5, h6 {
color: #16325c !important;
font-weight: 100;
......@@ -140,7 +142,7 @@ thead {
display: flex;
justify-content: space-between;
align-items: center;
background: whitesmoke;
background: #f6f9fb;
box-sizing: border-box;
padding: 1em 3em;
}
......@@ -195,6 +197,28 @@ thead {
.position-container {
display: block;
margin-top: 40px;
margin-bottom: 40px;
}
.vote-container {
display: flex;
flex-direction: column;
box-sizing: border-box;
padding-bottom: 40px;
}
.vote-item {
display: flex;
justify-content: space-between;
background: #f2f2f2;
min-width: 350px;
margin-top: 10px;
padding: 3em 2em;
border-right: 1px solid white;
}
.vote-item a {
text-decoration: underline;
}
.position-container a {
......
<div class="overlay"><div class="row-image" style="height: 400px; background: url(<%= asset_path 'image1.JPG' %>) center center"></div></div>
<div class="row-image" style="height: 400px; background: url(<%= asset_path 'image1.JPG' %>) center center"></div>
<%if user_signed_in?%>
<h6 style="text-align: left; color: #8e8e8e !important; margin: 0px;">Hi, <%= current_user.first_name%>, you can view the candidates here.</h6>
<h6 style="text-align: left; color: #8e8e8e !important; margin: 0px;">Hi, <%= current_user.first_name%>, you can add or view the candidates here.</h6>
<% end %>
<h4>Roster of Candidates</h4>
......
<div class="row-image" style="height: 400px; background: url(<%= asset_path 'image2.JPG' %>) center center"></div>
<%if user_signed_in?%>
<h6 style="text-align: left; color: #8e8e8e !important; margin: 0px;">What position would you like to add or view, <%= current_user.first_name%>?</h6>
......
......@@ -38,7 +38,7 @@
<div class="navigation-buttons">
<a href="/"><span class="ion-home">&nbsp;</span>Home</a>
<a href="/"><span class="ion-home">&nbsp;&nbsp;</span>Home</a>
<%= link_to "Candidates", admin_candidates_path,{ :class=>""} %>
<%= link_to "Positions", admin_positions_path,{ :class=>""} %>
......@@ -53,7 +53,7 @@
<%if user_signed_in?%>
<%= link_to "Logout", destroy_user_session_path,{ method: :delete,:class=>""} %>
<a href="/profile" class="nav-item right">My Profile</a>
<a href="/profile" class="nav-item right"><span class="ion-person">&nbsp;&nbsp;</span><%= current_user.first_name%></a>
<%else%>
<%= link_to "Log-in", new_user_session_path, {:class =>""}%>
<%= link_to "Register", new_user_registration_path, {:class =>""}%>
......
<%= image_tag "image0.png", {:style =>"width: 300px; display:block;margin: 0 auto; margin-bottom: 20px"}%>
<%if user_signed_in?%>
<h6 style="text-align: center; color: #8e8e8e !important; margin: 0px;">Welcome to the results page, <%= current_user.first_name%>.</h6>
......
<h1>Votes</h1>
<h6 style="text-align: left; color: #8e8e8e !important; margin: 0px;">Hi, <%= current_user.first_name%>, you can vote for your candidate here.</h6>
<h4>Vote Now</h4>
<!--
<%= link_to("New Vote", new_voting_vote_path) %>
<%= link_to "Logout", destroy_user_session_path, method: :delete %>
-->
<br>
<td>Hello <%= current_user.full_name %></td>
<br>
<br>
<ul>
<div class="vote-container">
<%@positions.each do |p|%>
<li> <%=p.name%><br>
<div class="vote-item"> <strong> <span class="ion-person"></span>&nbsp;&nbsp;<%=p.name%></strong>
<%voted_for = false%>
<% p.candidates.each do |c|%>
<%c.votes.each do |v|%>
<%if v.user_id == current_user.id%>
You have already voted for <%= v.candidate.full_name%>
You voted for <%= v.candidate.full_name%>
<%voted_for = true%>
<% end %>
<%end%>
<% end %>
</ol>
<%if !voted_for%>
<%=link_to "Vote for a #{p.name}", "/voting/new/#{p.id}" %>
<%else%>
<%end%>
</div>
</li>
<%end%>
</ul>
<hr>
<br>
</div>
\ 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