fixed navigation styles. destroyed inline styles.

parent ad8d587b
...@@ -89,7 +89,6 @@ GEM ...@@ -89,7 +89,6 @@ GEM
mini_portile2 (~> 2.1.0) mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7) pkg-config (~> 1.1.7)
orm_adapter (0.5.0) orm_adapter (0.5.0)
pg (0.18.4)
pkg-config (1.1.7) pkg-config (1.1.7)
puma (3.4.0) puma (3.4.0)
rack (2.0.1) rack (2.0.1)
...@@ -177,7 +176,6 @@ DEPENDENCIES ...@@ -177,7 +176,6 @@ DEPENDENCIES
jbuilder (~> 2.5) jbuilder (~> 2.5)
jquery-rails jquery-rails
listen (~> 3.0.5) listen (~> 3.0.5)
pg
puma (~> 3.0) puma (~> 3.0)
rails (~> 5.0.0) rails (~> 5.0.0)
sass-rails (~> 5.0) sass-rails (~> 5.0)
......
/* CSS Reset */
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
color: #5E6B7F;
font-family: 'Roboto' !important;
font-weight: 300;
}
/* User defined styles */
.logo-container {
display: flex;
align-items: center;
}
.logo {
padding: 20px;
}
.nav { .nav {
position:fixed; position:relative;
top:-2px; display: flex;
left:-2px; align-items: center;
width: calc(100vw + 2px); width: 100%;
list-style-type: none; list-style-type: none;
margin: 0; margin: 0px;
padding:0px; padding:1em;
overflow: hidden;
border: 1px solid #e7e7e7; border: 1px solid #e7e7e7;
z-index:20;
background-color: #f3f3f3;
} }
.nav-item
{
color:black; .nav a {
text-decoration: none; position: relative;
margin:0px; margin-right: 1em;
display:inline-block; }
padding:5px 25px;
transition:ease-out 0.1s;
font-size:18px;
.navigation-buttons {
margin-left: 20px;
} }
.nav-item:hover
{ .button-primary {
background-color:#004e7e; background: #32B68D;
color:white; padding: 10px 40px;
border-radius: 3px;
color: white;
transition: 0.1s ease-in-out;
font-weight: 300;
} }
.nohover:hover
{ .button-primary:hover {
background:none; background: #37D0A0;
color:black; color: white;
} }
.right
{ .actions {
float:right; margin-left: auto;
margin-right: 20px;
} }
thead { thead {
font-weight: bold; font-weight: bold;
} }
......
...@@ -5,27 +5,63 @@ ...@@ -5,27 +5,63 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %> <%= csrf_meta_tags %>
<link href='https://fonts.googleapis.com/css?family=Roboto:300,100,400' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
</head> </head>
<body style="padding:30px;"> <body>
<nav class="nav"> <nav class="nav">
<h6 class="nav-item nohover"></h6> <div class="logo-container">
<a class="nav-item active" href="/">Home</a>
<%= link_to "Candidates", admin_candidates_path,{ :class=>" nav-item"} %> <svg width="99px" height="47px" viewBox="229 160 99 47" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<%= link_to "Positions", admin_positions_path,{ :class=>" nav-item"} %> <!-- Generator: Sketch 3.8.3 (29802) - http://www.bohemiancoding.com/sketch -->
<a class="nav-item" href="/voting/votes">Vote now</a> <desc>Created with Sketch.</desc>
<%if user_signed_in?%> <defs></defs>
<g id="Group" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" transform="translate(229.000000, 160.000000)" font-size="30.9446928" font-family="Roboto-Bold, Roboto" letter-spacing="0.8" font-weight="bold">
<text id="xVotes">
<tspan x="0" y="32" fill="#72DBBA">x</tspan>
<tspan x="16.6047601" y="32" font-family="Chalkduster" font-weight="normal" letter-spacing="-0.400000006" fill="#262626">V</tspan>
<tspan x="39.1824768" y="32" font-family="Roboto-Medium, Roboto" font-weight="400" letter-spacing="-0.400000006" fill="#262626">otes</tspan>
</text>
</g>
</svg>
<%= link_to "Logout", destroy_user_session_path,{ method: :delete,:class=>" nav-item right"} %> </div>
<div class="nav-item nohover right"> Hello <%= current_user.first_name%></div> <div class="navigation-buttons">
<a href="/">Home</a>
<%= link_to "Candidates", admin_candidates_path,{ :class=>""} %>
<%= link_to "Positions", admin_positions_path,{ :class=>""} %>
</div>
<div class="actions">
<a class="button-primary" href="/voting/votes">Vote Now <span class="ion-ios-arrow-thin-right"></span></a>
<%if user_signed_in?%>
<%= link_to "Logout", destroy_user_session_path,{ method: :delete,:class=>""} %>
<span class=""> Hello <%= current_user.first_name%></span>
<a href="/profile" class="nav-item right">My Profile</a> <a href="/profile" class="nav-item right">My Profile</a>
<%else%> <%else%>
<%= link_to "Log-in", new_user_session_path, {:class =>"nav-item right"}%> <%= link_to "Log-in", new_user_session_path, {:class =>""}%>
<%= link_to "Register", new_user_registration_path, {:class =>"nav-item right"}%> <%= link_to "Register", new_user_registration_path, {:class =>""}%>
<%end%> <%end%>
</div>
</nav> </nav>
......
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