Deploy website

Deploy website version based on c0e11ec01b
This commit is contained in:
wing328
2019-12-02 04:28:16 +00:00
parent 0160b2df2d
commit 819bf0c191
4 changed files with 35 additions and 28 deletions

View File

@@ -2,23 +2,23 @@
<feed xmlns="http://www.w3.org/2005/Atom">
<id>https://openapi-generator.tech/blog</id>
<title>OpenAPI Generator Blog</title>
<updated>2018-12-24T06:00:00Z</updated>
<generator>Feed for Node.js</generator>
<updated>2018-12-24T06:00:00.000Z</updated>
<generator>https://github.com/jpmonette/feed</generator>
<link rel="alternate" href="https://openapi-generator.tech/blog"/>
<subtitle>The best place to stay up-to-date with the latest OpenAPI Generator news and events.</subtitle>
<logo>https://openapi-generator.tech/img/mono-logo.svg</logo>
<rights>Copyright © 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both &quot;OpenAPI Tools&quot; (https://OpenAPITools.org) and &quot;OpenAPI Generator&quot; are not affiliated with OpenAPI Initiative (OAI))</rights>
<rights>Copyright © 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both "OpenAPI Tools" (https://OpenAPITools.org) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI))</rights>
<entry>
<title type="html"><![CDATA[New Website]]></title>
<id>https://openapi-generator.tech/blog/2018/12/24/new-website.html</id>
<link href="https://openapi-generator.tech/blog/2018/12/24/new-website.html">
</link>
<updated>2018-12-24T06:00:00Z</updated>
<link href="https://openapi-generator.tech/blog/2018/12/24/new-website.html"/>
<updated>2018-12-24T06:00:00.000Z</updated>
<summary type="html"><![CDATA[<p>Every great open source project has great documentation.</p>
<p>That's why we're proud to announce that we've adopted a new website and design for our official documentation.</p>
]]></summary>
<author>
<name>Jim Schubert</name>
<email/>
<uri>http://twitter.com/jimschubert</uri>
</author>
</entry>

View File

@@ -6,13 +6,13 @@
<description>The best place to stay up-to-date with the latest OpenAPI Generator news and events.</description>
<lastBuildDate>Mon, 24 Dec 2018 06:00:00 GMT</lastBuildDate>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Feed for Node.js</generator>
<generator>https://github.com/jpmonette/feed</generator>
<image>
<title>OpenAPI Generator Blog</title>
<url>https://openapi-generator.tech/img/mono-logo.svg</url>
<link>https://openapi-generator.tech/blog</link>
</image>
<copyright>Copyright © 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both &quot;OpenAPI Tools&quot; (https://OpenAPITools.org) and &quot;OpenAPI Generator&quot; are not affiliated with OpenAPI Initiative (OAI))</copyright>
<copyright>Copyright © 2019 OpenAPI-Generator Contributors (https://openapi-generator.tech). (Both "OpenAPI Tools" (https://OpenAPITools.org) and "OpenAPI Generator" are not affiliated with OpenAPI Initiative (OAI))</copyright>
<item>
<title><![CDATA[New Website]]></title>
<link>https://openapi-generator.tech/blog/2018/12/24/new-website.html</link>

View File

@@ -4,27 +4,27 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
// Turn off ESLint for this file because it's sent down to users as-is.
/* eslint-disable */
window.addEventListener('load', function() {
// add event listener for all tab
document.querySelectorAll('.nav-link').forEach(function(el) {
el.addEventListener('click', function(e) {
const groupId = e.target.getAttribute('data-group');
var groupId = e.target.getAttribute('data-group');
document
.querySelectorAll(`.nav-link[data-group=${groupId}]`)
.querySelectorAll('.nav-link[data-group='.concat(groupId, ']'))
.forEach(function(el) {
el.classList.remove('active');
});
document
.querySelectorAll(`.tab-pane[data-group=${groupId}]`)
.querySelectorAll('.tab-pane[data-group='.concat(groupId, ']'))
.forEach(function(el) {
el.classList.remove('active');
});
e.target.classList.add('active');
document
.querySelector(`#${e.target.getAttribute('data-tab')}`)
.querySelector('#'.concat(e.target.getAttribute('data-tab')))
.classList.add('active');
});
});

View File

@@ -5,50 +5,56 @@
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable prefer-arrow-callback */
/* eslint-disable */
(function scrollSpy() {
const OFFSET = 10;
let timer;
let headingsCache;
const findHeadings = function findHeadings() {
var OFFSET = 10;
var timer;
var headingsCache;
var findHeadings = function findHeadings() {
return headingsCache || document.querySelectorAll('.toc-headings > li > a');
};
const onScroll = function onScroll() {
var onScroll = function onScroll() {
if (timer) {
// throttle
return;
}
timer = setTimeout(function() {
timer = null;
let activeNavFound = false;
const headings = findHeadings(); // toc nav anchors
var activeNavFound = false;
var headings = findHeadings(); // toc nav anchors
/**
* On every call, try to find header right after <-- next header
* the one whose content is on the current screen <-- highlight this
*/
for (let i = 0; i < headings.length; i++) {
for (var i = 0; i < headings.length; i++) {
// headings[i] is current element
// if an element is already active, then current element is not active
// if no element is already active, then current element is active
let currNavActive = !activeNavFound;
var currNavActive = !activeNavFound;
/**
* Enter the following check up only when an active nav header is not yet found
* Then, check the bounding rectangle of the next header
* The headers that are scrolled passed will have negative bounding rect top
* So the first one with positive bounding rect top will be the nearest next header
*/
if (currNavActive && i < headings.length - 1) {
const heading = headings[i + 1];
const next = decodeURIComponent(heading.href.split('#')[1]);
const nextHeader = document.getElementById(next);
var heading = headings[i + 1];
var next = decodeURIComponent(heading.href.split('#')[1]);
var nextHeader = document.getElementById(next);
if (nextHeader) {
const top = nextHeader.getBoundingClientRect().top;
var top = nextHeader.getBoundingClientRect().top;
currNavActive = top > OFFSET;
} else {
console.error('Can not find header element', {
id: next,
heading,
heading: heading,
});
}
}
@@ -56,6 +62,7 @@
* Stop searching once a first such header is found,
* this makes sure the highlighted header is the most current one
*/
if (currNavActive) {
activeNavFound = true;
headings[i].classList.add('active');