You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2016/11/28 16:34:45 UTC
incubator-juneau-website git commit: Announcements
Repository: incubator-juneau-website
Updated Branches:
refs/heads/asf-site b5d3a0a04 -> 2c2708495
Announcements
Project: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/commit/2c270849
Tree: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/tree/2c270849
Diff: http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/diff/2c270849
Branch: refs/heads/asf-site
Commit: 2c27084952f9b17779469e1ae1b296a9eaa1e745
Parents: b5d3a0a
Author: JamesBognar <ja...@apache.org>
Authored: Mon Nov 28 11:34:42 2016 -0500
Committer: JamesBognar <ja...@apache.org>
Committed: Mon Nov 28 11:34:42 2016 -0500
----------------------------------------------------------------------
content/announcements.html | 6 ------
content/index.html | 22 +++++++++++++++++++++-
content/twitter.html | 6 ++++++
3 files changed, 27 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/2c270849/content/announcements.html
----------------------------------------------------------------------
diff --git a/content/announcements.html b/content/announcements.html
deleted file mode 100644
index 58f5f03..0000000
--- a/content/announcements.html
+++ /dev/null
@@ -1,6 +0,0 @@
-<!DOCTYPE html>
-<html>
-<body>
- <a class="twitter-timeline" data-width="600" href="https://twitter.com/ApacheJuneau">Tweets by ApacheJuneau</a> <script src="http://platform.twitter.com/widgets.js" charset="utf-8"></script>
-</body>
-</html>
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/2c270849/content/index.html
----------------------------------------------------------------------
diff --git a/content/index.html b/content/index.html
index 097d69a..3cd168e 100644
--- a/content/index.html
+++ b/content/index.html
@@ -80,6 +80,7 @@
var footer = document.getElementById('footer');
if (body != null) {
article.innerHTML = body.innerHTML;
+ nodeScriptReplace(article);
}
var availableHeight = window.innerHeight - header.clientHeight - footer.clientHeight - 40;
article.style.minHeight = availableHeight + 'px';
@@ -93,6 +94,25 @@
var id = hash.substring(1, hash.length - 5);
document.getElementById(id).click();
}
+
+ function nodeScriptReplace(node) {
+ if (node.tagName === 'SCRIPT') {
+ node.parentNode.replaceChild(nodeScriptClone(node) , node);
+ } else {
+ node.childNodes.forEach(nodeScriptReplace);
+ }
+ return node;
+ }
+
+ function nodeScriptClone(node) {
+ var script = document.createElement("script");
+ script.text = node.innerHTML;
+ var attrs = node.attributes;
+ for (var i = attrs.length - 1; i >= 0; i--) {
+ script.setAttribute(attrs[i].name, attrs[i].value);
+ }
+ return script;
+ }
</script>
</head>
@@ -112,7 +132,7 @@
<li><a href='sourceCode.html' id='sourceCode' onclick="return select(this)">Source Code</a></li>
<li><a href='issueTracking.html' id='issueTracking' onclick="return select(this)">Issue Tracking</a></li>
<li><a href='community.html' id='community' onclick="return select(this)">Community</a></li>
- <li><a href='announcements.html' id='announcements' onclick="return select(this)">Announcements</a></li>
+ <li><a href='twitter.html' id='twitter' onclick="return select(this)">Twitter</a></li>
</ul>
</nav>
http://git-wip-us.apache.org/repos/asf/incubator-juneau-website/blob/2c270849/content/twitter.html
----------------------------------------------------------------------
diff --git a/content/twitter.html b/content/twitter.html
new file mode 100644
index 0000000..9239acb
--- /dev/null
+++ b/content/twitter.html
@@ -0,0 +1,6 @@
+<!DOCTYPE html>
+<html>
+<body onload="http://platform.twitter.com/widgets.js">
+ <a class="twitter-timeline" data-width="600" href="https://twitter.com/ApacheJuneau"></a> <script async src="http://platform.twitter.com/widgets.js" charset="utf-8"></script>
+</body>
+</html>