Skip to content

Commit

Permalink
add docs template
Browse files Browse the repository at this point in the history
  • Loading branch information
Flipper committed Apr 14, 2024
1 parent 30cf21a commit 12fa559
Show file tree
Hide file tree
Showing 8 changed files with 170 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# docsify-betterembed
A docsify.js plugin to embed selective areas from another markdown file.

1 change: 1 addition & 0 deletions docs/.nojekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
File prevents GitHub Pages from ignoring files that begin with an underscore.
5 changes: 5 additions & 0 deletions docs/_404.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 404 - Sorry!

We don't have this page :(

[Return Home?](README.md)
40 changes: 40 additions & 0 deletions docs/_css/edits.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
:root{
--docsify-example-panels-left-panel-width : 55%;
--docsify-example-panels-right-panel-width : 45%;
}
.floating-cat{
position:absolute;
right: 0px;
width: 200px;
height: 360px;
z-index: 1000;

-webkit-filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.6));
filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.6));

transform: translatey(0px);
animation: float 6s ease-in-out infinite;
}

.floating-cat img{
position:fixed;
}
@keyframes float {
0% {
-webkit-filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.8));
filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.6));
transform: translatey(0px);
}
50% {
box-shadow: drop-shadow(0px 25px 10px rgba(0,0,0,0.4));
filter: drop-shadow(0px 25px 10px rgba(0,0,0,0.2));
transform: translatey(-20px);
}
100% {
box-shadow: drop-shadow(0px 5px 5px rgba(0,0,0,0.8));
filter: drop-shadow(0px 5px 5px rgba(0,0,0,0.6));
transform: translatey(0px);
}
}

.text-danger{color:red;}
45 changes: 45 additions & 0 deletions docs/_js/docsifyConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
window.$docsify = {
catchPluginErrors: true,
name: "Docsify.js Better Embed",
repo: "https://github.com/FlippedCodes/docsify-betterembed/",
auto2top: true,
loadSidebar: true,
loadNavbar: true,
mergeNavbar: true,
subMaxLevel: 3,
formatUpdated: "{YYYY}-{MM}-{DD} {HH}:{mm}",
progress: {
position: "top",
color: "var(--accent)",
height: "2px",
},
darklightTheme: {
// Theme colors chose according to Resonite color palette
dark: {
custom_dropshadow_color: 'var(--codeBackgroundColor)',
custom_logo_invert: 'invert()',
'theme-color': 'var(--accent)',
accent: '#ba64f2',
toogleBackground: '#ffffff',
background: '#2b2f35',
textColor: '#e1e1e0',
codeTextColor: '#e1e1e0',
codeBackgroundColor: '#11151d',
borderColor: '#474c50',
highlightColor: '#ae5458',
},
light: {
custom_dropshadow_color: 'var(--borderColor)',
custom_logo_invert: '',
'theme-color': 'var(--accent)',
accent: '#e69e50',
toogleBackground: '#091a28',
background: '#fff',
textColor: '#2b2f35',
codeTextColor: '#11151d',
codeBackgroundColor: '#e1e1e0',
borderColor: '#86888b',
highlightColor: '#ba64f2',
},
},
};
33 changes: 33 additions & 0 deletions docs/_js/plugin-footer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Edit on Github https://github.com/docsifyjs/docsify/blob/167596be51d8918efa2238a0e12eab14445e4022/docs/index.html#L193C16-L193C16
// footer https://github.com/boopathikumar018/docsify-darklight-theme/blob/master/docs/index.html
function footer(hook, vm) {
const footer = [
'<footer style="text-align: center; padding-top: 40px;">',
"<br/>",
'Made with ❤ by <a href="https://github.com/FlipperLP" target="_blank">@Phil</a> &copy; 2024',
"</footer>",
].join("");

// TODO: Look into what this does
hook.beforeEach((html) => {
if (/githubusercontent\.com/.test(vm.route.file)) {
url = vm.route.file
.replace("raw.githubusercontent.com", "github.com")
.replace(/\/master/, "/blob/master");
} else if (/jsdelivr\.net/.test(vm.route.file)) {
url = vm.route.file
.replace("cdn.jsdelivr.net/gh", "github.com")
.replace("@master", "/blob/master");
} else {
url =
"https://github.com/FlippedCodes/docsify-betterembed/blob/main/" +
vm.route.file;
}
const editText = `\n\<div style="text-align: right"><a href="${url}" target="_blank">:memo: Edit on GitHub</a></div>`;

return html + editText + footer;
});
}
// Add plugin to docsify's plugin array
window.$docsify = window.$docsify || {};
$docsify.plugins = [footer, ...($docsify.plugins || [])];
4 changes: 4 additions & 0 deletions docs/_sidebar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
- [Documentation](/)
- **Links**
- [![Github](https://icongr.am/simple/github.svg?color=808080&size=32)Github](https://github.com/VagnerDomingues/docsify-example-panels)
- [![NPM](https://icongr.am/simple/npm.svg?colored&size=32)NPM](https://www.npmjs.com/package/docsify-example-panels)
41 changes: 41 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<title>Unofficial Resonite Docs</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="description" content="The unofficial Resonite Docs.">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0">
<link rel="icon" type="image/x-icon" href="_media/favicon.ico">
<!-- Order is important -->
<link
rel="stylesheet"
href="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/style.min.css"
title="docsify-darklight-theme"
type="text/css"
/>
<link rel="stylesheet" href="//cdn.jsdelivr.net/npm/docsify@4/themes/vue.css"/>
<link rel="stylesheet" href="_css/edits.css" type="text/css" />
<script src="/_js/setHeaderLang.js"></script>
</head>

<body>
<div id="app"> </div>
<!-- Local Config -->
<script src="_js/docsifyConfig.js"></script>
<!-- custom plugins -->
<script src="_js/plugin-footer.js"></script>
<script src="_js/plugin-protofluxNodeRender.js"></script>
<script src="_js/plugin-partialMarkdownEmbed.js"></script>
<script src="_js/plugin-alias.js"></script>
<script src="_js/plugin-rootLink.js"></script>
<!-- Docsify with plugins -->
<script src="//cdn.jsdelivr.net/npm/docsify@4"></script>
<script src="//cdn.jsdelivr.net/npm/docsify/lib/plugins/search.min.js"></script>
<script src="https://unpkg.com/docsify-plugin-flexible-alerts"></script>
<script src="//cdn.jsdelivr.net/npm/docsify-darklight-theme@latest/dist/index.min.js" type="text/javascript"></script>
<script src="https://cdn.jsdelivr.net/npm/docsify-example-panels"></script>
</body>

</html>

0 comments on commit 12fa559

Please # to comment.