-
Notifications
You must be signed in to change notification settings - Fork 484
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/Hetarth02/Documenter.jl
- Loading branch information
Showing
80 changed files
with
2,953 additions
and
19,146 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
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,17 @@ | ||
# Various build products | ||
docs/build/ | ||
# Vendored theme stuff | ||
assets/html/scss/highlightjs/ | ||
# And generated theme stuff | ||
assets/html/themes/ | ||
|
||
# Tests contain a bunch of Markdown and such, so we'll just | ||
# completely ignore it | ||
test/ | ||
|
||
# Let's not format Markdown files for now | ||
*.md | ||
# Also the SCSS files, but we should format those eventually | ||
*.scss | ||
# And the GitHub workflows, but we should also format those eventually | ||
.github/**/*.yml |
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,3 @@ | ||
{ | ||
"tabWidth": 2 | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
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,24 @@ | ||
JULIA:=julia | ||
|
||
default: help | ||
|
||
docs-instantiate: | ||
${JULIA} docs/instantiate.jl | ||
|
||
docs: docs-instantiate | ||
${JULIA} --project=docs docs/make.jl | ||
|
||
changelog: | ||
${JULIA} docs/changelog.jl | ||
|
||
themes: docs-instantiate | ||
${JULIA} --project=docs -e 'using DocumenterTools; DocumenterTools.Themes.compile_native_themes()' | ||
|
||
help: | ||
@echo "The following make commands are available:" | ||
@echo " - make changelog: update all links in CHANGELOG.md's footer" | ||
@echo " - make docs: build the documentation" | ||
@echo " - make test: run the tests" | ||
@echo " - make themes: compile Documenter's native CSS themes" | ||
|
||
.PHONY: default docs-instantiate themes help changelog docs test |
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
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,18 +1,100 @@ | ||
let searchbox = document.querySelector("#documenter-search-query"); | ||
let sidebar = document.querySelector(".docs-sidebar"); | ||
// libraries: jquery | ||
// arguments: $ | ||
|
||
let search_modal_header = ` | ||
<header class="modal-card-head gap-2 is-align-items-center is-justify-content-space-between w-100 px-3"> | ||
<div class="field mb-0 w-100"> | ||
<p class="control has-icons-right"> | ||
<input class="input documenter-search-input" type="text" placeholder="Search" /> | ||
<span class="icon is-small is-right has-text-primary-dark"> | ||
<i class="fas fa-magnifying-glass"></i> | ||
</span> | ||
</p> | ||
</div> | ||
<div class="icon is-size-4 is-clickable close-search-modal"> | ||
<i class="fas fa-times"></i> | ||
</div> | ||
</header> | ||
`; | ||
|
||
let initial_search_body = ` | ||
<div class="has-text-centered my-5 py-5">Type something to get started!</div> | ||
`; | ||
|
||
let search_modal_footer = ` | ||
<footer class="modal-card-foot"> | ||
<span> | ||
<kbd class="search-modal-key-hints">Ctrl</kbd> + | ||
<kbd class="search-modal-key-hints">/</kbd> to search | ||
</span> | ||
<span class="ml-3"> <kbd class="search-modal-key-hints">esc</kbd> to close </span> | ||
</footer> | ||
`; | ||
|
||
$(document.body).append( | ||
` | ||
<div class="modal" id="search-modal"> | ||
<div class="modal-background"></div> | ||
<div class="modal-card search-min-width-50 search-min-height-100 is-justify-content-center"> | ||
${search_modal_header} | ||
<section class="modal-card-body is-flex is-flex-direction-column is-justify-content-center gap-4 search-modal-card-body"> | ||
${initial_search_body} | ||
</section> | ||
${search_modal_footer} | ||
</div> | ||
</div> | ||
` | ||
); | ||
|
||
document.querySelector(".docs-search-query").addEventListener("click", () => { | ||
openModal(); | ||
}); | ||
|
||
document.querySelector(".close-search-modal").addEventListener("click", () => { | ||
closeModal(); | ||
}); | ||
|
||
$(document).on("click", ".search-result-link", function () { | ||
closeModal(); | ||
}); | ||
|
||
document.addEventListener("keydown", (event) => { | ||
if ((event.ctrlKey || event.metaKey) && event.key === "/") { | ||
if (!sidebar.classList.contains("visible")) { | ||
sidebar.classList.add("visible"); | ||
} | ||
searchbox.focus(); | ||
return false; | ||
openModal(); | ||
} else if (event.key === "Escape") { | ||
if (sidebar.classList.contains("visible")) { | ||
sidebar.classList.remove("visible"); | ||
} | ||
searchbox.blur(); | ||
return false; | ||
closeModal(); | ||
} | ||
|
||
return false; | ||
}); | ||
|
||
// Functions to open and close a modal | ||
function openModal() { | ||
let searchModal = document.querySelector("#search-modal"); | ||
|
||
searchModal.classList.add("is-active"); | ||
document.querySelector(".documenter-search-input").focus(); | ||
} | ||
|
||
function closeModal() { | ||
let searchModal = document.querySelector("#search-modal"); | ||
let initial_search_body = ` | ||
<div class="has-text-centered my-5 py-5">Type something to get started!</div> | ||
`; | ||
|
||
searchModal.classList.remove("is-active"); | ||
document.querySelector(".documenter-search-input").blur(); | ||
|
||
if (!$(".search-modal-card-body").hasClass("is-justify-content-center")) { | ||
$(".search-modal-card-body").addClass("is-justify-content-center"); | ||
} | ||
|
||
$(".documenter-search-input").val(""); | ||
$(".search-modal-card-body").html(initial_search_body); | ||
} | ||
|
||
document | ||
.querySelector("#search-modal .modal-background") | ||
.addEventListener("click", () => { | ||
closeModal(); | ||
}); |
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
Oops, something went wrong.