Skip to content

Commit

Permalink
Merge pull request #282 from TheDesignExchange/fix/navbar/#279
Browse files Browse the repository at this point in the history
Fix/navbar/#279
  • Loading branch information
jschnapper authored Nov 28, 2018
2 parents 9783625 + 895b565 commit 325134c
Show file tree
Hide file tree
Showing 10 changed files with 356 additions and 71 deletions.
18 changes: 14 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,20 @@ A few manual steps are required:
As of Aug 2015, this would be: `rvm install ruby-2.1.3`
(If you have a nonstandard security setup, install rvm without autolibs.)

3. **Bundler**. `gem install bundler`, then `bundle install`
3. `cd` into the repo and then `cd app` to get to the root of the project directory

4. **Bundler**. `gem install bundler`, then `bundle install`
Ubuntu: You might have to `sudo apt-get install openjdk-6-jdk` for Sunspot.

5. That's it! Read the next section to see how to start up the server. The recommended usad is the current usage listed below the legacy.

(*optional 6th step based on legacy code... not sure if it really is working*)

4. That's it! Read the next section to see how to start up the server.
5. After starting your server, run `bundle exec rake db:seed` to seed your database with starter data.
6. After starting your server, run `bundle exec rake db:seed` to seed your database with starter data.

[install **rvm**]: https://rvm.io/rvm/install

### Legacy Usage (based on inhertied code)
### Legacy Usage (based on inherited code)

The `Makefile` helps simplify starting and stopping the dev server.

Expand All @@ -57,6 +62,11 @@ make rails # starts rails, pg, and solr, and seeds pg
make halt # shuts everything down and frees the port
```

### Precompile changes in the assets file
```
rake assets:precompile
```

### Debugging

#### Ruby
Expand Down
189 changes: 189 additions & 0 deletions app/assets/stylesheets/_headernav.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
.navbar-nav .mobile-user-session {
display: none;
}

.navbar {
top: 0;
background-color: #ffffff;
position: fixed;
box-shadow: 0px 2px 4px rgba(0,0,0,0.25);
font-family: 'Open Sans', sans-serif;
font-weight: normal;
font-size: 16px;
border: none;
border-radius: 0;
z-index: 2;
width: 100%;
}

.navbar a {
color: #4F4F4F;
}

.navbar .dropdown-menu {
font-size: 16px;
}

.navbar li a:hover, .navbar-nav li a:focus {
background-color: transparent;
color: #6BC06D;
opacity: 1;
}

.navbar li.active {
font-weight: 700;
}

li.active a {
color: #6BC06D;
}

#sign-in-btn {
border: 1px solid #828282;
font-size: 16px;
border-radius: 4px;
margin-left: 30px;
}

#sign-in-btn:hover {
color: #ffffff;
background-color:#828282;
}

.navbar-toggle .icon-bar {
background-color: #4F4F4F;
}

.navbar-toggle:hover .icon-bar {
background-color: #6BC06D;
}

#search-btn {
background-color: transparent;
position: relative;
top: 2px;
z-index: 2;
}

#search-btn:active, #search-btn:focus {
box-shadow: none;
outline: none
}

.search-icon {
background-color: transparent;
color: #4F4F4F;
cursor: pointer;
font-size: 16px;
}

.search-icon:hover {
color: #6BC06D;
}

#search-input {
position: absolute;
right: 0;
width: 0;
outline: none;
box-shadow: none;
border: none;
}

#search-input:focus {
border-bottom: 1px solid #4F4F4F;
width: 200px;
}


.search-group {
display: none;
}

#search {
display: block;
}

#search-mobile {
display: none;
}

// Collapse the navbar earlier
@media (max-width: 850px) {

#mobile-login {
margin-top: 16px;
}

.navbar-nav .mobile-user-session {
display: block;
font-weight: bold;
}

#mobile-search-btn {
background-color: transparent;
z-index: 4;
}

#mobile-search-input {
outline: none;
box-shadow: none;
border: none;
border-bottom: 1px solid #4F4F4F;
position: absolute;
width: 200px;
right:16px;
}

#mobile-search-btn:active, #mobile-search-btn:focus {
box-shadow: none;
outline: none
}
.navbar-header {
float: none;
}
.navbar-toggle {
display: block;
}
.navbar-collapse {
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.navbar-collapse.collapse {
display: none!important;
}
.navbar-nav {
float: none!important;
margin: 7.5px -15px;
}
.navbar-nav>li {
float: none;
}
.navbar-nav>li>a {
padding-top: 10px;
padding-bottom: 10px;
}
.navbar-text {
float: none;
margin: 15px 0;
}
/* since 3.1.0 */
.navbar-collapse.collapse.in {
display: block!important;
}
.collapsing {
overflow: hidden!important;
}
#search {
display: none;
}

#search-mobile {
display: block;
padding: 0 10px;
}

#sign-in-btn {
display: none;
}
}
25 changes: 6 additions & 19 deletions app/views/application/_landing.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@
/*display: none;*/
}

.navbar{
margin-bottom: 0;
font-family: 'Open Sans', sans-serif;
background-color: #ffffff;
border: none;
}

.notice {
display: none;
}
Expand Down Expand Up @@ -56,13 +49,6 @@
display: none;
}

.navbar{
margin-bottom: 0;
font-family: 'Open Sans', sans-serif;
font-weight: normal;
border: none;
}

.jumbotron {
background-color: white;
background-image: url('/assets/hero-desktop.png');
Expand All @@ -75,6 +61,7 @@
display: block;
text-align: left;
font-family: 'Gotham', serif;
margin-top: 40px;
}

.jumbotron h2{
Expand Down Expand Up @@ -468,6 +455,9 @@
}

@media (max-width: 767px) {
.jumbotron {
margin-top: 30px;
}
.mobile {
display: block;
}
Expand All @@ -478,10 +468,7 @@
.notice {
display: none;
}
.jumbotron {
margin-top: -6em;
-# IMPORTANT: give the container containing the jumbotron a name and lower padding when jumbotron code is found
}

#explore {
bottom: 15.25em;
left: 2.75em;
Expand Down Expand Up @@ -568,7 +555,7 @@
@media (max-width: 585px) {
#explore {
bottom: 14.5em;
left: 2.75em;
left: 2.5em;
}
}

Expand Down
5 changes: 1 addition & 4 deletions app/views/application/about.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -373,12 +373,9 @@
$(document).ready(function() {

window.onload = function() {
setTimeout(function() {
$(".about-content").css("opacity", 1);
$(".our-story-container").css("top", 0);
}, 1000);

};
};



Expand Down
20 changes: 0 additions & 20 deletions app/views/application/index.html.haml
Original file line number Diff line number Diff line change
@@ -1,21 +1 @@
/ - if user_signed_in?
/ / Methods
/ .row
/ .col-md-4
/ %h3= link_to "Methods", design_methods_path
/ %p Discover new ways to approach design problems.
/ .col-md-8
/ .row
/ - @design_methods.each do |method|
/ = render "/application/thumbnail_compact", locals: @thumb_obj = thumbnail(method, "3")
/ / Case Studies
/ .row
/ .col-md-4
/ %h3= link_to "Case Studies", case_studies_path
/ %p Find examples of real world design problems.
/ .col-md-8
/ .row
/ - @case_studies.each do |cs|
/ = render "/application/thumbnail_compact", locals: @thumb_obj = thumbnail(cs, "3")
/ - else
= render partial: "landing"
Loading

0 comments on commit 325134c

Please sign in to comment.