Skip to content

Commit

Permalink
changed design of front page
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-benoit committed Oct 14, 2016
1 parent 2ed263a commit cd3025e
Show file tree
Hide file tree
Showing 18 changed files with 102 additions and 164 deletions.
Binary file added app/assets/images/placeholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 0 additions & 15 deletions app/assets/stylesheets/components/_alert.scss

This file was deleted.

20 changes: 0 additions & 20 deletions app/assets/stylesheets/components/_avatars.scss

This file was deleted.

38 changes: 0 additions & 38 deletions app/assets/stylesheets/components/_badges.scss

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/components/_body.scss

This file was deleted.

6 changes: 0 additions & 6 deletions app/assets/stylesheets/components/_index.scss
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
@import "alert";
@import "avatars";
@import "badges";
@import "table";
@import "body";
@import "svg";
3 changes: 0 additions & 3 deletions app/assets/stylesheets/components/_svg.scss

This file was deleted.

3 changes: 0 additions & 3 deletions app/assets/stylesheets/components/_table.scss

This file was deleted.

6 changes: 3 additions & 3 deletions app/assets/stylesheets/config/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Fonts
* ------------------------------------- */
// Google fonts
@import url("https://fonts.googleapis.com/css?family=Lato:100,300,400,700|Roboto+Slab:100,300,400,500,700");
$base-font: "Lato", "Helvetica", "sans-serif";
@import url("https://fonts.googleapis.com/css?family=Open+Sans:100,300,400,700|Roboto+Slab:100,300,400,500,700");
$base-font: "Open Sans", "Helvetica", "sans-serif";
$header-font: "Roboto Slab", "Helvetica", "sans-serif";

// Local fonts (uncomment following lines)
Expand All @@ -24,7 +24,7 @@ $base-height: 1.4;
* Colors
* ------------------------------------- */
// Scheme
$brand-color: #D23333;
$brand-color: #CB4F4F;

$red: #EE5F5B;
$blue: #469AE0;
Expand Down
3 changes: 1 addition & 2 deletions app/assets/stylesheets/layout/_footer.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.footer {
z-index: 3;
height: 70px;
position: fixed;
bottom: 0%;
width: 100%;
background-color: $brand-color;
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/layout/_navbar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
position: fixed;
top: 0%;
width: 100%;
background-color: $brand-color;
}
32 changes: 10 additions & 22 deletions app/assets/stylesheets/layout/_utilities.scss
Original file line number Diff line number Diff line change
@@ -1,25 +1,13 @@
/* -------------------------------------
* Utilities classes
* These are examples of utilities classes
* Feel free to change them and create your own
* ------------------------------------- */

// Paddings
.padded {
padding-top: 5em;
padding-bottom: 5em;
body {
background: #F7F7F7;
}

// Backgrounds
.bg-black {
background: #4a4a4a;
}
.bg-grey {
background: #aeaeae;
}
.bg-blue {
background: #00a3e1;
}
.bg-dark-blue {
background: #3b5998;
a {
color: $brand-color;
text-decoration: none;

&:hover {
color: $brand-color;
text-decoration: underline;
}
}
74 changes: 72 additions & 2 deletions app/assets/stylesheets/pages/_home.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,74 @@
.home-top-line {
width: 100%;
min-height: 3px;
background-color: $brand-color;
}

.vertically-align {
min-height: 90vh;
display: flex;
align-items: center;
}
#home {
min-height: calc(100vh - 140px);
padding-top: 150px;
img {
margin-bottom: 30px;
}

.search-box {
display: inline-block;
width: 100%;
border-radius: 3px;
padding: 4px 55px 4px 15px;
position: relative;
background: #fff;
border: 1px solid #ddd;
@include transition(all 200ms ease-in-out);

&.hovered, &:hover, &:active {
border: 1px solid #aaa;
}

input[type=text] {
border: none;
box-shadow: none;
display: inline-block;
padding: 0;
background: white;

&:hover, &:focus, &:active {
box-shadow: none;
}

&:-webkit-autofill {
-webkit-box-shadow: 0 0 0px 1000px white inset;
}
}

.search-btn {
position: absolute;
right: 3px;
top: 3px;
bottom: 3px;
color: #aaa;
border-radius: 3px;
font-size: 21px;
padding: 0px 10px 3px;
@include transition(all 200ms ease-in-out);

&:hover {
color: #fff;
background-color: $brand-color;
}

.fa {
font-size: 21px;
}
}
}

p {
margin-top: 15px;
color: #7B7B7B;
}
}

3 changes: 0 additions & 3 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
<%= stylesheet_link_tag 'application', media: 'all' %>
</head>
<body>
<%= render 'shared/navbar' %>
<%= render 'shared/flashes' %>
<%= yield %>
<%= render 'shared/footer' %>
<%= javascript_include_tag 'application' %>
<%= yield(:after_js) %>
</body>
Expand Down
27 changes: 15 additions & 12 deletions app/views/pages/home.html.erb
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
<div class="container">
<div class="row">
<div id="home" class="col-xs-12 col-md-6 col-md-offset-3 text-center">
<div>
<h1>Github Languages</h1>
<form action="/user" method="get" class="form-inline">
<div class="form-group">
<label for="username">Github Username</label>
<input type="text" name="user" id="username" class="form-control">
</div>
<input type="submit" value="Submit" class="btn btn-default">
</form>
<div class="home-top-line"></div>
<div class="vertically-align">
<div class="container">
<div class="row">
<div id="home" class="col-xs-12 col-md-6 col-md-offset-3 text-center">
<%= image_tag("placeholder.png") %>
<div class='search-box'>
<form class='search-form' action='/user' method='get'>
<input class='form-control' placeholder='Github Username' type='text' name="user">
<button class='btn btn-link search-btn'>
<i class='fa fa-search'></i>
</button>
</form>
</div>
<p>Discover your favorite programming languages. <a href="#">About this page</a>.</p>
</div>
</div>
</div>
Expand Down
12 changes: 0 additions & 12 deletions app/views/shared/_flashes.html.erb

This file was deleted.

10 changes: 0 additions & 10 deletions app/views/shared/_footer.html.erb

This file was deleted.

10 changes: 0 additions & 10 deletions app/views/shared/_navbar.html.erb

This file was deleted.

0 comments on commit cd3025e

Please sign in to comment.