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

Add anchor links handlers #245

Merged
merged 2 commits into from
Dec 1, 2017
Merged

Conversation

calvellido
Copy link
Contributor

@calvellido calvellido commented Dec 1, 2017

  • Add three JS function to main.js, which given a DOM content block, traverse its header elements, and given that they include an id attribute, an anchor link element will be added.
  • As the project already uses Font Awesome, this link shows the fa-link icon.
  • Add the necessary CSS code to get this added element hidden by default, and show it on hover.

This closes #74.

* Add three JS function to main.js, which given a DOM content block, traverse its header elements, and given that they include an id attribute, an anchor link element will be added.
* As the project already uses Font Awesome, this link shows the fa-link icon.
* Add the necssary CSS code to get this added element hidden by default, and show it on hover.
@@ -12,6 +13,34 @@ function activeToggle() {
});
}

var anchorForId = function (id) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be great if we could move these functions to Scala.js code, as it's a short script! Maybe for a future PR?

Copy link

@jdesiloniz jdesiloniz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's release a new patch version with this feature. Thanks!

Copy link
Contributor Author

@calvellido calvellido left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bumped version on bf5e574

Copy link
Member

@juanpedromoreno juanpedromoreno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thanks!

@calvellido calvellido merged commit 50f47de into master Dec 1, 2017
@calvellido calvellido deleted the jv-74-add-anchor-links-handlers branch December 4, 2017 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable anchor links
3 participants