Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Responsive style corrections #91

Merged
merged 11 commits into from
May 14, 2015
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
<section class="dark-container col-xs-12 col-sm-4">
<h1 class="logo small">Devolio</h1>
<section id="user_profile">
<div class="avatar col-xs-4">
<div class="avatar col-xs-3 col-sm-offset-4 col-sm-4 col-md-offset-0 col-md-4">
<% if (user_github) { %>
<img src='<%= user_github.aviurl %>' alt="avatar">
<% } else { %>
<img src='http://i.imgur.com/i31E9hh.jpg' alt="default-avatar">
<% } %>
</div>
<div class="name col-xs-8">
<div class="name col-xs-8 col-sm-12 col-md-3">
<h2><%= user_settings.name %></h2>
</div>
<p class="col-xs-12"><%= user_settings.description %></p>
<p class="description col-xs-12"><%= user_settings.description %></p>
<ul class="contact-info col-xs-12">
<li class="col-xs-12 col-sm-4">Username</li>
<li class="col-xs-12 col-sm-8"><%= user_settings.username %></li>
Expand Down
12 changes: 6 additions & 6 deletions app/assets/javascripts/application/templates/users/show.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<section class="light-container col-xs-12 col-sm-4">
<h1 class="logo small">Devolio</h1>
<section id="user_profile">
<div class="avatar col-xs-4">
<div class="avatar col-xs-3 col-sm-offset-4 col-sm-4 col-md-offset-0 col-md-4">
<% if (user_github) { %>
<img src='<%= user_github.aviurl %>' alt="avatar">
<% } else { %>
<img src='http://i.imgur.com/i31E9hh.jpg' alt="default-avatar">
<% } %>
</div>
<div class="name col-xs-8">
<div class="name col-xs-8 col-sm-12 col-md-3">
<h2><%= user_settings.name %></h2>
</div>
<p class="col-xs-12"><%= user_settings.description %></p>
Expand Down Expand Up @@ -81,22 +81,22 @@
</div>
<div class="pie-charts print-hide col-xs-12">
<div class="pieID pie">
<div class="col-xs-6 col-md-4 col-lg-3 graph-container">
<div class="col-xs-12 col-md-4 col-lg-3 graph-container">
<div id="js-recentLanguages">
</div>
<h5>Recent Languages</h5>
</div>
<div class="col-xs-6 col-md-4 col-lg-3 graph-container">
<div class="col-xs-12 col-md-4 col-lg-3 graph-container">
<div id="js-allLanguages">
</div>
<h5>Total Languages Overall</h5>
</div>
<div class="col-xs-6 col-md-4 col-lg-3 graph-container">
<div class="col-xs-12 col-md-4 col-lg-3 graph-container">
<div id="js-gitHubActivity">
</div>
<h5>Recent Github Events</h5>
</div>
<div class="col-xs-6 col-md-12 col-lg-3 graph-container">
<div class="col-xs-12 col-lg-3 graph-container">
<ul class="github-stats graph-container">
<li class="print-show core-activity">
<p><%= parseInt(user_github.pushEvents) + parseInt(user_github.pullEvents) + parseInt(user_github.commits) %></p>
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/histogram.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var displayHistogram = function(lineData){
.tickSize(2)
.tickSubdivide(true)
.tickFormat(function(d) { return d3.time.format('%b %d')(new Date(d)); })
.ticks(Math.min(10, lineData.length/2)),
.ticks(Math.min(5, lineData.length/2)),

yAxis = d3.svg.axis()
.scale(yRange)
Expand All @@ -81,7 +81,7 @@ var displayHistogram = function(lineData){
vis.append("svg:g")
.attr("class", "y axis")
.attr("transform", "translate(" + (MARGINS.left) + ",0)")
.attr("fill","#727272")
.attr("fill","transparent")
.style("font-size","0.8em")
.style("font-family", "'Montserrat', sans-serif")
.call(yAxis);
Expand Down
15 changes: 14 additions & 1 deletion app/assets/stylesheets/footer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,35 @@ footer {
color: white;
width: 100%;
background-color: $black;
padding-top: 3em;
border-top: 1px solid #000;
overflow: auto;
p {
margin: 0;
}
.nav {
white-space: nowrap;
text-align: center;
padding: 0;
span {
margin-bottom: 1em;
}
}
.footer-content {
margin-top: 2em;
text-align: center;
width: 100%;
color: $gray;

.footer-title {
font-weight: $font-weight--bold;
}
ul {
list-style-type: none;
padding: 0;
li {
display: inline;
padding: 0 15px;
padding: 0 5px;
a {
color: $green;
&:hover {
Expand Down
7 changes: 5 additions & 2 deletions app/assets/stylesheets/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ hr {
.portfolio, .dashboard {
display: table;
}
.light-container {
.portfolio .light-container,
.dashboard .light-container {
display: table-cell;
float: none;
}
Expand Down Expand Up @@ -267,7 +268,6 @@ header .subtitle span {
.avatar, .name {
display: inline-block;
vertical-align: middle;
margin-bottom: 2em;
}
.avatar {
padding: 0;
Expand All @@ -281,6 +281,9 @@ header .subtitle span {
vertical-align: middle;
text-align: left;
}
.description {
margin-top: 2em;
}

// Contact info
.contact-info {
Expand Down
1 change: 1 addition & 0 deletions app/assets/stylesheets/profile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ $font-weight--bold: 900;
.graph-container {
overflow: visible;
margin: 1em auto;
padding: 0;
}
.graph-container h5 {
text-align: center;
Expand Down
40 changes: 18 additions & 22 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,24 @@
<%= yield %>
</div>
<footer>
<div class="nav">
<section class='col-xs-12'>
<% if user_signed_in? %>
Welcome <%= current_user.username %>!
<%= link_to "Sign out", destroy_user_session_path, :method => :delete, class: "button" %>
<%= link_to "Dashboard", '/dashboard', class: "button" %>
<%= link_to "My DEVOLIO", "/#{current_user.username}", class: "button" %>
<% else %>
<%= link_to "Sign in", new_user_session_path, class: "button" %> or <%= link_to "Sign up", new_user_registration_path, class: "button" %>
<% end %>
</section>
<section class='col-xs-12 footer-content'>
<p>Like open source? Follow <a href="https://github.com/cbus-sea-lions-2015/DEVOLIO"><strong>DEVOLIO on GitHub</strong></a> for information on how to contribute!</p>
<p>This application created and maintained by a team of four:</p>
<ul>
<li><a href="http://www.github.com/jannypie">Jan Dennison</a></li>
<li><a href="http://www.github.com/marycbaylis">Mary Baylis</a></li>
<li><a href="http://www.github.com/jroger2908">Jonathan Roger</a></li>
<li><a href="http://www.github.com/secade">Chris Singer</a></li>
</ul>
</section>
</div>
<section class='nav col-xs-12'>
<% if user_signed_in? %>
<span class="col-xs-12 col-sm-6">Welcome <%= current_user.username %>! <%= link_to "Sign out", destroy_user_session_path, :method => :delete, class: "button" %></span>
<span class="col-xs-12 col-sm-6"><%= link_to "Dashboard", '/dashboard', class: "button" %> <%= link_to "My DEVOLIO", "/#{current_user.username}", class: "button" %></span>
<% else %>
<span><%= link_to "Sign in", new_user_session_path, class: "button" %> or <%= link_to "Sign up", new_user_registration_path, class: "button" %></span>
<% end %>
</section>
<section class='col-xs-12 footer-content'>
<p>Like open source? Follow <a href="https://github.com/cbus-sea-lions-2015/DEVOLIO" class="col-xs-12 col-sm-0"><strong>DEVOLIO on GitHub</strong></a> for information on how to contribute!</p>
<p>Created and maintained by</p>
<ul>
<li><a href="http://www.github.com/jannypie">Jan Dennison</a></li>
<li><a href="http://www.github.com/marycbaylis">Mary Baylis</a></li>
<li><a href="http://www.github.com/jroger2908">Jonathan Roger</a></li>
<li><a href="http://www.github.com/secade">Chris Singer</a></li>
</ul>
</section>
</footer>

</body>
Expand Down