Skip to content

Commit

Permalink
Merge pull request #44 from stefanondisponibile/develop
Browse files Browse the repository at this point in the history
Release `v0.6.0`
  • Loading branch information
stefanondisponibile authored Jun 25, 2023
2 parents 145a3f5 + 41810c4 commit 20df4e0
Show file tree
Hide file tree
Showing 11 changed files with 847 additions and 6 deletions.
Empty file added docs/css/custom.css
Empty file.
109 changes: 109 additions & 0 deletions docs/css/termynal.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
/**
* termynal.js
*
* @author Ines Montani <[email protected]>
* @version 0.0.1
* @license MIT
*/

:root {
--color-bg: #252a33;
--color-text: #eee;
--color-text-subtle: #a2a2a2;
}

[data-termynal] {
width: 750px;
max-width: 100%;
background: var(--color-bg);
color: var(--color-text);
/* font-size: 18px; */
font-size: 15px;
/* font-family: 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace; */
font-family: 'Roboto Mono', 'Fira Mono', Consolas, Menlo, Monaco, 'Courier New', Courier, monospace;
border-radius: 4px;
padding: 75px 45px 35px;
position: relative;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}

[data-termynal]:before {
content: '';
position: absolute;
top: 15px;
left: 15px;
display: inline-block;
width: 15px;
height: 15px;
border-radius: 50%;
/* A little hack to display the window buttons in one pseudo element. */
background: #d9515d;
-webkit-box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
box-shadow: 25px 0 0 #f4c025, 50px 0 0 #3ec930;
}

[data-termynal]:after {
content: 'bash';
position: absolute;
color: var(--color-text-subtle);
top: 5px;
left: 0;
width: 100%;
text-align: center;
}

a[data-terminal-control] {
text-align: right;
display: block;
color: #aebbff;
}

[data-ty] {
display: block;
line-height: 2;
}

[data-ty]:before {
/* Set up defaults and ensure empty lines are displayed. */
content: '';
display: inline-block;
vertical-align: middle;
}

[data-ty="input"]:before,
[data-ty-prompt]:before {
margin-right: 0.75em;
color: var(--color-text-subtle);
}

[data-ty="input"]:before {
content: '$';
}

[data-ty][data-ty-prompt]:before {
content: attr(data-ty-prompt);
}

[data-ty-cursor]:after {
content: attr(data-ty-cursor);
font-family: monospace;
margin-left: 0.5em;
-webkit-animation: blink 1s infinite;
animation: blink 1s infinite;
}


/* Cursor animation */

@-webkit-keyframes blink {
50% {
opacity: 0;
}
}

@keyframes blink {
50% {
opacity: 0;
}
}
24 changes: 24 additions & 0 deletions docs/gen_ref_pages.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Generate the code reference pages."""

from pathlib import Path

import mkdocs_gen_files

for path in sorted(Path("src").rglob("*.py")):
module_path = path.relative_to("src").with_suffix("")
doc_path = path.relative_to("src").with_suffix(".md")
full_doc_path = Path("reference", doc_path)

parts = list(module_path.parts)
if "proto" in parts:
continue
if parts[-1] == "__init__":
parts = parts[:-1]
elif parts[-1] == "__main__":
continue

with mkdocs_gen_files.open(full_doc_path, "w") as fd:
identifier = ".".join(parts)
print("::: " + identifier, file=fd)

mkdocs_gen_files.set_edit_path(full_doc_path, path)
Binary file added docs/img/rb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/wb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 13 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
# The Boring Library
<p align="center">
<a href="https://stefanofrassetto.com/theboringlibrary"><img src="img/rb.png" alt="TheBoringLibrary"></a>
</p>

I don't know.
## Installation

<div class="termy" data-termynal>
<span data-ty="input">pip install theboringlibrary</span>
<span data-ty="progress">Installing...</span>
</div>

## Reference

See the [reference](./reference/theboringlibrary/core) for more.
9 changes: 9 additions & 0 deletions docs/js/custom.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(function(){
document
.querySelectorAll('.termy')
.forEach(node => {
new Termynal(node, {
lineDelay: 500
});
});
})()
Loading

0 comments on commit 20df4e0

Please sign in to comment.