Skip to content

Commit

Permalink
Merge branch 'master.next' into rwd-content-edits
Browse files Browse the repository at this point in the history
* master.next:
  Adding appendix back for other resources.
  Adding fast click for extra clicky-ness good-ness -ish-ness; Also another look at anchor navigation on mobile;
  • Loading branch information
rcherny committed Aug 20, 2015
2 parents 78ce416 + 875aa90 commit df68718
Show file tree
Hide file tree
Showing 10 changed files with 1,790 additions and 11 deletions.
861 changes: 856 additions & 5 deletions _assets/js/main.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion _assets/js/main.min.js

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions en.html
Expand Up @@ -844,6 +844,21 @@ <h3 id="resources">Resources</h3>
???</li>
</ul>
</section>
<section><h2 id="appendix">Appendix</h2>
<p>We are just scratching the surface with this guide. Being a Front-end developer these days covers an enormous spectrum of technologies and techniques.</p>
<h3 id="advanced-topics">Advanced Topics</h3>
<p>...</p>
<h4 id="css-preprocessors">CSS Preprocessors</h4>
<p>...</p>
<h4 id="performance">Performance</h4>
<p>...</p>
<h4 id="accessibility">Accessibility</h4>
<p>...</p>
<h3 id="links-for-more-resources">Links for More Resources</h3>
<p>...</p>
<h3 id="acknowledgements">Acknowledgements</h3>
<p>...</p>
</section>

</article>
</main>
Expand Down
15 changes: 15 additions & 0 deletions index.html
Expand Up @@ -844,6 +844,21 @@ <h3 id="resources">Resources</h3>
???</li>
</ul>
</section>
<section><h2 id="appendix">Appendix</h2>
<p>We are just scratching the surface with this guide. Being a Front-end developer these days covers an enormous spectrum of technologies and techniques.</p>
<h3 id="advanced-topics">Advanced Topics</h3>
<p>...</p>
<h4 id="css-preprocessors">CSS Preprocessors</h4>
<p>...</p>
<h4 id="performance">Performance</h4>
<p>...</p>
<h4 id="accessibility">Accessibility</h4>
<p>...</p>
<h3 id="links-for-more-resources">Links for More Resources</h3>
<p>...</p>
<h3 id="acknowledgements">Acknowledgements</h3>
<p>...</p>
</section>

</article>
</main>
Expand Down
30 changes: 30 additions & 0 deletions src/content/en/appendix.md
@@ -0,0 +1,30 @@

## Appendix

We are just scratching the surface with this guide. Being a Front-end developer these days covers an enormous spectrum of technologies and techniques.

### Advanced Topics

...

#### CSS Preprocessors

...

#### Performance

...

#### Accessibility

...

### Links for More Resources

...

### Acknowledgements

...


1 change: 1 addition & 0 deletions src/content/en/build/en.hbs
Expand Up @@ -6,5 +6,6 @@
<section>{{md 'src/content/en/css.md' }}</section>
<section>{{md 'src/content/en/javascript.md' }}</section>
<section>{{md 'src/content/en/responsive.md' }}</section>
<section>{{md 'src/content/en/appendix.md' }}</section>

</article>
15 changes: 15 additions & 0 deletions src/content/es/appendix.md
@@ -0,0 +1,15 @@

## Appendix

### Advanced Topics

#### CSS Preprocessors

#### Performance

#### Accessibility

#### More Tools and Resources

### Acknowledgements

1 change: 1 addition & 0 deletions src/content/es/build/es.hbs
Expand Up @@ -6,5 +6,6 @@
<section>{{md 'src/content/es/css.md' }}</section>
<section>{{md 'src/content/es/javascript.md' }}</section>
<section>{{md 'src/content/es/responsive.md' }}</section>
<section>{{md 'src/content/es/appendix.md' }}</section>

</article>
20 changes: 15 additions & 5 deletions src/js/script.js
@@ -1,4 +1,4 @@
"use strict";
'use strict';
/**
* Author: Isobar
*/
Expand Down Expand Up @@ -40,7 +40,7 @@ var ISOBAR = {

the_text = $.trim(hx[i].innerHTML);
anchor = currentMatch + '_' + the_text.replace(/\s+|\-/g, '_').replace(/[^A-Z0-9_]/gi, '').replace(/_+/g, '_').toLowerCase();
inner += '<a href="#' + anchor + '" class="anchor_link" title="Permalink">◊</a>';
inner += '<a href="#' + anchor + '" class="anchor_link js-here" title="Permalink">◊</a>';

if (tag === 'h2' || tag === 'h3') {
toc_contents += '<li class="' + tag + '"><a href="#' + anchor + '">' + the_text + '</a></li>';
Expand All @@ -61,11 +61,18 @@ var ISOBAR = {
},
// just hooking up back to top
anchors: function() {
var iso = ISOBAR.util;

this.$body.on('click', '.back-anchor', function() {
window.scrollTo(0, 0);
window.location.hash = '';
return false;
});
this.$body.on('click', '.js-here', function(e){
if (iso.$body.hasClass('mob')) {
ISOBAR.common.scrollNow(e);
}
});
},
toggleMenu: function(e){
var iso = ISOBAR.util;
Expand All @@ -77,16 +84,14 @@ var ISOBAR = {
},
scrollNow: function(e){
e.preventDefault;
// console.log('here we will use the scroll');
var target = e.target.getAttribute('href');
if (target[0] === '#') {
$.scrollTo(target, { offset: -85, duration: 500 });
$.scrollTo(target, { offset: -85, duration: 250 });
};
}
},
util: {
$body : $('body'), // cache the body

settings: {},

fire: function(func, funcname, args) {
Expand All @@ -100,9 +105,14 @@ var ISOBAR = {
var iso = ISOBAR.util;
iso.settings = ISOBAR.settings; // convenience

$('html').removeClass('no-js');

//Fire resize event and call setLayout(). Put onresize events in there.
window.addEventListener('resize', iso.debounce(iso.setLayout, 50));

// enable pointer events for touch devices
FastClick.attach(document.body);

// hit up common first.
iso.fire('common');

Expand Down

0 comments on commit df68718

Please sign in to comment.