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
[WIP] Navigation #35
[WIP] Navigation #35
Conversation
New changes of layout in Dropdown-Submenu under 'Community' and 'About' (essentially in the classes .submenu and .dropdown) |
_sass/base/_layout.scss
Outdated
padding-top: 0.25em; | ||
margin-top: 10px; | ||
padding: 0px 10px; | ||
padding: 0px 10px; |
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.
For consistency we should probably stick with one formatting option - either 0px
or 0
. Both are valid although I would tend for the later as the unit is irrelevant for this value. What do you think? 😉
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.
Hey Steffan, thanks for the comment. Yes, I agree. The unity then doesn't make any difference. We then stick to just '0' from now on!
scripts/ots-app.js
Outdated
dropdownOpen : function() { | ||
$('.dropdown').on('click', 'a', function(event){ | ||
var target = event.target | ||
if($(target).parent().hasClass('open')){ |
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.
Instead of checking the class state yourself, how about using the .toggleClass(className)
method of jQuery? It might be easier to read and is also results in less code to maintain 😄
We further improved features and styling in the submenu through the classes .dropdown and .submenu. Icons from FontAwesome were added (dropdown arrow and close sign; the 3 social links). |
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.
Generally looks good!
I still have to see how it look like but i start to write down some code improvments!
Let me know if anything is not clear 😃
url: /about/drive | ||
- title: "Contact" | ||
url: /about/contact |
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.
can you insert a new empty line here please? Thanks!
_includes/_render_nav.html
Outdated
|
||
{% endif %} | ||
|
||
{% endif %} | ||
{% endfor %} |
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.
Also here, can we insert a new line?
I think this file also need a nice formatting. Can you please check that the indentation is done with 2 spaces and no 4 tabs? And that there are no random empty lines or weird indentation. Thanks :)
_includes/head.html
Outdated
@@ -15,6 +15,7 @@ | |||
|
|||
<link rel="stylesheet" href="{{ "/css/main.css" | prepend: site.baseurl }}"> | |||
<link rel="canonical" href="{{ page.url | replace:'index.html','' | prepend: site.baseurl | prepend: site.url }}"> | |||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> |
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.
Let's move this line before we call our main.css
file.
In this way our css will be called after the library one.
This means our styles will be always the last one so will be the one that actually is applied. (so if we want to override some libraries style, we can do it ;) )
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.
Got it!
_includes/header.html
Outdated
<ul class="main row col-xs-9 between-xs"> | ||
{% include _render_nav.html nav=site.data.nav.main %} | ||
</ul> | ||
<div class="main row between-xs col-xs-6"> |
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.
Did we check how this look like in mobile? Does it need some adjustment or is good?
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.
Hmmm.. It looks... under construction.. With the 'toggle device' tool you can only have a little notion of the final effect I think... There is no way we can run the test page on a real smartphone? Can I generate the link some how so I could open in another device than the computer rendering the site through Jekyll? I doubt it...
I'll play with it a bit more and see if it should be changed..
_sass/base/_layout.scss
Outdated
a { | ||
color: white; | ||
background-color: $brand-color; | ||
padding: 8px; |
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.
(funny now, commenting myself.. kind of schizophrenic) I just realized that this line is breaking the alignment between the parent links in the menu. So I have to figure out a way of changing this padding-style change without breaking the original alignment.... Anyone has any ideas?
Hey @Gushsd i check the branch, we are getting there :D
Let's keep this design mockup as guideline: I personally think you can change those stuff listed above, by your self. You know how to do it :) About mobile, i forgot that we need to do the mobile/hamburger menu but we can have a look it together. |
|
||
dropdownOpen : function() { | ||
$('.dropdown').on('click', 'a', function(event){ | ||
var target = event.target |
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.
Are we going to use JavaScript Standard Style? Looks like some Semicolons are missing or omitted on purpose. Guess its better to stick with inserting them after a statement to ensure consistency 😉
Updated header's links according to flexboxgrid framework.
Development of a dropdown menu project.