forked from fluid-project/infusion-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FLUID-6205: Enabled further linting checks and fixed problems reported.
- Loading branch information
1 parent
65decf7
commit ae8f3ea
Showing
12 changed files
with
98 additions
and
69 deletions.
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
src/static/lib/infusion |
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,9 @@ | ||
{ | ||
"extends": "eslint-config-fluid", | ||
"env": { | ||
"browser": true | ||
}, | ||
"plugins": [ | ||
"markdown" | ||
] | ||
} |
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
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
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,3 +1,4 @@ | ||
/* eslint-env node */ | ||
/* | ||
A stub to allow others to `fluid.require` this package and reuse its content, as in: | ||
|
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
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
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,38 +1,42 @@ | ||
fluid.registerNamespace("fluid.docs"); | ||
/* eslint-env browser:true node:false */ | ||
(function ($) { | ||
"use strict"; | ||
fluid.registerNamespace("fluid.docs"); | ||
|
||
fluid.docs.findActivePageToc = function () { | ||
var allPages = $(".infusion-docs-TOC li .infusion-docs-TOC-pageName"); | ||
var activePage = allPages.filter(":not(a *)"); | ||
return activePage; | ||
}; | ||
fluid.docs.findActivePageToc = function () { | ||
var allPages = $(".infusion-docs-TOC li .infusion-docs-TOC-pageName"); | ||
var activePage = allPages.filter(":not(a *)"); | ||
return activePage; | ||
}; | ||
|
||
fluid.docs.scrollActivePageTocIntoView = function () { | ||
var active = fluid.docs.findActivePageToc(); | ||
if (active.length === 1) { | ||
active[0].scrollIntoView(); | ||
} | ||
}; | ||
fluid.docs.scrollActivePageTocIntoView = function () { | ||
var active = fluid.docs.findActivePageToc(); | ||
if (active.length === 1) { | ||
active[0].scrollIntoView(); | ||
} | ||
}; | ||
|
||
fluid.docs.headerLinkMarkup = "<a class=\"infusion-docs-anchor\" aria-hidden=\"true\" href=\"%href\"><span class=\"octicon octicon-link\"></a>" | ||
fluid.docs.headerLinkMarkup = "<a class=\"infusion-docs-anchor\" aria-hidden=\"true\" href=\"%href\"><span class=\"octicon octicon-link\"></a>"; | ||
|
||
fluid.docs.fabricateHeaderLinks = function () { | ||
var headers = $(":header"); | ||
fluid.each(headers, function (header) { | ||
var id = header.id; | ||
var anchor = $(fluid.stringTemplate(fluid.docs.headerLinkMarkup, {href: "#" + id})); | ||
var jHeader = $(header); | ||
jHeader.prepend(anchor); | ||
var link = $("span", anchor); | ||
jHeader.add(anchor).hover(function () { | ||
link.css("visibility", "visible"); | ||
}, function () { | ||
link.css("visibility", "hidden"); | ||
fluid.docs.fabricateHeaderLinks = function () { | ||
var headers = $(":header"); | ||
fluid.each(headers, function (header) { | ||
var id = header.id; | ||
var anchor = $(fluid.stringTemplate(fluid.docs.headerLinkMarkup, {href: "#" + id})); | ||
var jHeader = $(header); | ||
jHeader.prepend(anchor); | ||
var link = $("span", anchor); | ||
jHeader.add(anchor).hover(function () { | ||
link.css("visibility", "visible"); | ||
}, function () { | ||
link.css("visibility", "hidden"); | ||
}); | ||
link.css("visibility", "hidden"); // We do not apply this in the stylesheet because it does not work, for reasons I cannot explain | ||
}); | ||
link.css("visibility", "hidden"); // We do not apply this in the stylesheet because it does not work, for reasons I cannot explain | ||
}); | ||
}; | ||
}; | ||
|
||
fluid.docs.onLoad = function () { | ||
fluid.docs.scrollActivePageTocIntoView(); | ||
fluid.docs.fabricateHeaderLinks(); | ||
}; | ||
fluid.docs.onLoad = function () { | ||
fluid.docs.scrollActivePageTocIntoView(); | ||
fluid.docs.fabricateHeaderLinks(); | ||
}; | ||
})(jQuery); |
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,3 +1,4 @@ | ||
/* eslint-env node */ | ||
"use strict"; | ||
require("./js/test-docpad-links"); | ||
require("./js/test-link-checker"); | ||
require("./js/test-link-checker"); |
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
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
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