Skip to content

Commit

Permalink
Deploying to site from @ eda4984 🚀
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed Mar 4, 2024
1 parent 27f4b38 commit 8c79452
Show file tree
Hide file tree
Showing 270 changed files with 611 additions and 579 deletions.
3 changes: 3 additions & 0 deletions docs/latest/images/homepage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
45 changes: 24 additions & 21 deletions docs/latest/scripts/platform-content-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ const samplesLightThemeName = 'idea'
window.addEventListener('load', () => {
document.querySelectorAll("div[data-platform-hinted]")
.forEach(elem => elem.addEventListener('click', (event) => togglePlatformDependent(event, elem)))
document.querySelectorAll("div[tabs-section]")
.forEach(elem => elem.addEventListener('click', (event) => toggleSectionsEventHandler(event)))
const filterSection = document.getElementById('filter-section')
if (filterSection) {
filterSection.addEventListener('click', (event) => filterButtonHandler(event))
Expand Down Expand Up @@ -177,19 +175,30 @@ function handleAnchor() {
}

function initTabs() {
document.querySelectorAll("div[tabs-section]")
.forEach(element => {
showCorrespondingTabBody(element)
element.addEventListener('click', (event) => toggleSectionsEventHandler(event))
})
let cached = localStorage.getItem("active-tab")
if (cached) {
let parsed = JSON.parse(cached)
let tab = document.querySelector('div[tabs-section] > button[data-togglable="' + parsed + '"]')
if (tab) {
toggleSections(tab)
}
}
// we could have only a single type of data - classlike or package
const mainContent = document.querySelector('.main-content');
const type = mainContent ? mainContent.getAttribute("data-page-type") : null;
const localStorageKey = "active-tab-" + type;
document.querySelectorAll('div[tabs-section]').forEach(element => {
showCorrespondingTabBody(element);
element.addEventListener('click', ({target}) => {
const togglable = target ? target.getAttribute("data-togglable") : null;
if (!togglable) return;

localStorage.setItem(localStorageKey, JSON.stringify(togglable));
toggleSections(target);
});
});

const cached = localStorage.getItem(localStorageKey);
if (!cached) return;

const tab = document.querySelector(
'div[tabs-section] > button[data-togglable="' + JSON.parse(cached) + '"]'
);
if (!tab) return;

toggleSections(tab);
}

function showCorrespondingTabBody(element) {
Expand Down Expand Up @@ -293,12 +302,6 @@ function toggleSections(target) {
activateTabsBody("tabs-section-body")
}

function toggleSectionsEventHandler(evt) {
if (!evt.target.getAttribute("data-togglable")) return
localStorage.setItem('active-tab', JSON.stringify(evt.target.getAttribute("data-togglable")))
toggleSections(evt.target)
}

function togglePlatformDependent(e, container) {
let target = e.target
if (target.tagName != 'BUTTON') return;
Expand Down
2 changes: 1 addition & 1 deletion docs/latest/styles/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

66 changes: 46 additions & 20 deletions docs/latest/styles/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -342,6 +342,7 @@ td:first-child {
/* --- Navigation controls --- */
.navigation-controls {
display: flex;
margin-left: 4px;
}

@media (min-width: 760px) {
Expand All @@ -354,45 +355,50 @@ td:first-child {
display: none;
}

/* --- Navigation THEME --- */
.navigation-controls--search {
.navigation-controls--btn {
display: inline-flex;
font-size: 0;
line-height: 0;
}

.navigation-controls--theme {
display: block;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: inherit;
margin-left: 4px;
background-position: 50% 50%;
padding: 0;
border: none;
cursor: pointer;
font-size: 0;
line-height: 0;
transition: background-color 200ms ease-in-out;
will-change: background-color;
}

.navigation-controls--theme::before {
height: 40px;
width: 40px;
.navigation-controls--btn:hover {
background-color: var(--white-10);
}

.navigation-controls--theme {
background-image: url("../images/theme-toggle.svg");
background-repeat: no-repeat;
}

.navigation-controls--theme:hover {
background: var(--white-10);
@media (max-width: 759px) {
.navigation-controls--theme {
display: none;
}
}

.navigation-controls--theme::before {
display: block;
content: url("../images/theme-toggle.svg");
.navigation-controls--homepage {
background-image: url("../images/homepage.svg");
background-repeat: no-repeat;
background-size: 24px 24px;
}

@media (max-width: 759px) {
.navigation-controls--theme {
.navigation-controls--homepage {
display: none;
}
}
/* /--- Navigation THEME --- */

.navigation .platform-selector:not([data-active]) {
color: #fff;
Expand Down Expand Up @@ -656,6 +662,26 @@ code.paragraph {
text-decoration: line-through;
}

/* Workaround for Firefox https://github.com/Kotlin/dokka/issues/3156 */
@-moz-document url-prefix() {
.strikethrough {
position: relative;
text-decoration: none;
}

/* complex selectors here are required to handle multiline cases */
.strikethrough::after, .strikethrough span:after {
content: '';
position: absolute;
top: 7px;
left: 0;
right: 0;
height: 1px;
background-color: currentColor;
z-index: 1;
}
}

.symbol:empty {
padding: 0;
}
Expand Down Expand Up @@ -684,7 +710,7 @@ code {

code:not(.block) {
display: inline-block;
vertical-align: middle;
vertical-align: bottom;
}

.symbol > a {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ <h2 class="">Functions</h2>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-filterable-set=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-active="" data-toggle=":zipline-cryptography:dokkaHtmlPartial/jsMain">js</button></div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="next-bytes.html"><span class="token function">nextBytes</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">sink<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a><span class="token punctuation">, </span></span><span class="parameter ">offset<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">0</span><span class="token punctuation">, </span></span><span class="parameter ">count<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span>sink.size - offset</span></span><span class="token punctuation">)</span></div></div> </div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">fun </span><a href="next-bytes.html"><span class="token function">nextBytes</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">sink<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a><span class="token punctuation">, </span></span><span class="parameter ">offset<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">0</span><span class="token punctuation">, </span></span><span class="parameter ">count<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span>sink.size - offset</span></span><span class="token punctuation">)</span></div></div> </div>
</div>
</div>
</div>
Expand All @@ -100,7 +100,7 @@ <h2 class="">Functions</h2>
<div class="title">
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-filterable-set=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-active="" data-toggle=":zipline-cryptography:dokkaHtmlPartial/jsMain">js</button></div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="next-long.html"><span class="token function">nextLong</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a></div></div> </div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">fun </span><a href="next-long.html"><span class="token function">nextLong</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a></div></div> </div>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1 class="cover"><span>next</span><wbr><span><span>Bytes</span></span></h1>
</div>
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-filterable-set=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-active="" data-toggle=":zipline-cryptography:dokkaHtmlPartial/jsMain">js</button></div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="next-bytes.html"><span class="token function">nextBytes</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">sink<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a><span class="token punctuation">, </span></span><span class="parameter ">offset<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">0</span><span class="token punctuation">, </span></span><span class="parameter ">count<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span>sink.size - offset</span></span><span class="token punctuation">)</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/cashapp/zipline/tree/trunk//zipline-cryptography/src/jsMain/kotlin/app/cash/zipline/cryptography/Random.kt#L19">source</a>)</span></span></div></div> </div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">fun </span><a href="next-bytes.html"><span class="token function">nextBytes</span></a><span class="token punctuation">(</span><span class="parameters "><span class="parameter ">sink<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-byte-array/index.html">ByteArray</a><span class="token punctuation">, </span></span><span class="parameter ">offset<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span><span class="token constant">0</span><span class="token punctuation">, </span></span><span class="parameter ">count<span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-int/index.html">Int</a><span class="token operator"> = </span>sink.size - offset</span></span><span class="token punctuation">)</span><span class="clearfix"><span class="floating-right">(<a href="https://github.com/cashapp/zipline/tree/trunk//zipline-cryptography/src/jsMain/kotlin/app/cash/zipline/cryptography/Random.kt#L19">source</a>)</span></span></div></div> </div>
</div>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ <h1 class="cover"><span>next</span><wbr><span><span>Long</span></span></h1>
</div>
<div class="platform-hinted with-platform-tabs" data-platform-hinted="data-platform-hinted">
<div class="platform-bookmarks-row" data-toggle-list="data-toggle-list"><button class="platform-bookmark" data-filterable-current=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-filterable-set=":zipline-cryptography:dokkaHtmlPartial/jsMain" data-active="" data-toggle=":zipline-cryptography:dokkaHtmlPartial/jsMain">js</button></div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword"></span><span class="token keyword">fun </span><a href="next-long.html"><span class="token function">nextLong</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/cashapp/zipline/tree/trunk//zipline-cryptography/src/jsMain/kotlin/app/cash/zipline/cryptography/Random.kt#L21">source</a>)</span></span></div></div> </div>
<div class="content sourceset-dependent-content" data-active="" data-togglable=":zipline-cryptography:dokkaHtmlPartial/jsMain"><div class="symbol monospace"><span class="token keyword">abstract </span><span class="token keyword">fun </span><a href="next-long.html"><span class="token function">nextLong</span></a><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token operator">: </span><a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="clearfix"><span class="floating-right">(<a href="https://github.com/cashapp/zipline/tree/trunk//zipline-cryptography/src/jsMain/kotlin/app/cash/zipline/cryptography/Random.kt#L21">source</a>)</span></span></div></div> </div>
</div>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>© 2024 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
Expand Down
Loading

0 comments on commit 8c79452

Please sign in to comment.