-
Notifications
You must be signed in to change notification settings - Fork 10
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
Put back Bootstrap 2 nav-list styles #22
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
04faabd
Put back Bootstrap 2 nav list
fofr 1116313
Ignore DS_Store files
fofr bd4529d
Include nav-list header styles
fofr 701670e
Add a real world nav-list example
fofr ecc9899
Create normal and visited link variables
fofr 0bb7e84
Include visited link examples in nav-list
fofr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
*.gem | ||
*.rbc | ||
*.log | ||
.DS_Store | ||
.bundle | ||
.config | ||
.yardoc | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
59 changes: 59 additions & 0 deletions
59
app/assets/stylesheets/govuk_admin_template/nav_list.css.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* ========================================================================== | ||
Bootstrap 2 navigation list (removed from Bootstrap 3) | ||
http://getbootstrap.com/2.3.2/components.html#navs | ||
Ported from http://bit.ly/1pbZRYA, variable names updated | ||
========================================================================== */ | ||
|
||
.nav-list { | ||
padding-left: 15px; | ||
padding-right: 15px; | ||
margin-bottom: 0; | ||
|
||
.well & { | ||
margin: -11px -20px; | ||
} | ||
|
||
// Nav headers (for dropdowns and lists) | ||
.nav-header { | ||
display: block; | ||
padding: 3px 15px; | ||
font-size: 11px; | ||
font-weight: bold; | ||
line-height: $line-height-computed; | ||
color: $gray-light; | ||
text-transform: uppercase; | ||
} | ||
|
||
// Space them out when they follow another list item (link) | ||
li + .nav-header { | ||
margin-top: 9px; | ||
} | ||
} | ||
|
||
.nav-list > li > a, | ||
.nav-list .nav-header { | ||
margin-left: -15px; | ||
margin-right: -15px; | ||
} | ||
|
||
.nav-list > li > a { | ||
padding: 3px 15px; | ||
} | ||
|
||
.nav-list > .active > a, | ||
.nav-list > .active > a:visited, | ||
.nav-list > .active > a:hover, | ||
.nav-list > .active > a:focus { | ||
color: #fff; | ||
background-color: $link-color; | ||
} | ||
|
||
.nav-list [class^="glyphicon-"], | ||
.nav-list [class*=" glyphicon-"] { | ||
margin-right: 2px; | ||
} | ||
|
||
// Dividers (basically an hr) within the dropdown | ||
.nav-list .divider { | ||
@include nav-divider(); | ||
} |
2 changes: 2 additions & 0 deletions
2
app/controllers/govuk_admin_template/style_guide_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
module GovukAdminTemplate | ||
class StyleGuideController < ApplicationController | ||
def index | ||
@normal_link_href = "#{request.original_url}##{Time.now.utc.to_i}" | ||
@visited_link_href = request.original_url | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tiny nitpick: this would probably read better if it were:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
come to think of it, it might be more a bit more railsy to define these as helper methods in
ApplicationHelper
, rather than in the controllerThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the style guide expand to multiple pages, I'd make the helpers change.
Re: the format, I stuck to the style guide, but I agree, it looks a little odd.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The style guide is a guide - I think readability should trump the guide.
but it's a minor point.