Compare commits
No commits in common. "e892ed9f0bc7a4fb076fc7e401ceaf8c3d27e81f" and "2a069a12258d4bc3676d25a048fd8aaa34874fd4" have entirely different histories.
e892ed9f0b
...
2a069a1225
29 changed files with 322 additions and 23 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -30,6 +30,3 @@ test.*
|
|||
# Nix
|
||||
result
|
||||
/result
|
||||
|
||||
# Mkdocs
|
||||
/site
|
||||
|
|
23
.md.toml
Normal file
23
.md.toml
Normal file
|
@ -0,0 +1,23 @@
|
|||
html_void = ["area", "base", "br", "col", "command", "embed", "hr", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]
|
||||
dont_copy_paths = [
|
||||
# "./src/templates"
|
||||
]
|
||||
|
||||
src = "./src"
|
||||
dest = "./build"
|
||||
[template]
|
||||
enable = true
|
||||
order = [
|
||||
{ type = "Powerpoint", path = "./src/templates/powerpoint.html" },
|
||||
{ type = "Adjacent" },
|
||||
{ type = "AdjacentFolder" },
|
||||
{ type = "RootFolder", path = "./src/templates/folder.html" },
|
||||
# path to the templates' folder,
|
||||
{ type = "Root", path = "./src/templates" },
|
||||
{ type = "General", path = "./src/templates/general.html" },
|
||||
{ type = "Default" },
|
||||
]
|
||||
|
||||
[indexing]
|
||||
roots = ["wiki"]
|
||||
render_drafts = false
|
104
flake.lock
104
flake.lock
|
@ -1,6 +1,72 @@
|
|||
{
|
||||
"nodes": {
|
||||
"bfom": {
|
||||
"inputs": {
|
||||
"naersk": "naersk",
|
||||
"nixpkgs": "nixpkgs_2",
|
||||
"utils": "utils"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1723500950,
|
||||
"narHash": "sha256-t1eApFGI+JzLIW2YToLlDV20n+Nevk1q4fZBYU1m93I=",
|
||||
"owner": "silver_rust",
|
||||
"repo": "bfom",
|
||||
"rev": "7f339f28442758ecc3f1697e3f70d441973664b9",
|
||||
"type": "gitlab"
|
||||
},
|
||||
"original": {
|
||||
"owner": "silver_rust",
|
||||
"repo": "bfom",
|
||||
"type": "gitlab"
|
||||
}
|
||||
},
|
||||
"naersk": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1713520724,
|
||||
"narHash": "sha256-CO8MmVDmqZX2FovL75pu5BvwhW+Vugc7Q6ze7Hj8heI=",
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"rev": "c5037590290c6c7dae2e42e7da1e247e54ed2d49",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-community",
|
||||
"repo": "naersk",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1714091391,
|
||||
"narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_2": {
|
||||
"locked": {
|
||||
"lastModified": 1714091391,
|
||||
"narHash": "sha256-68n3GBvlm1MIeJXadPzQ3v8Y9sIW3zmv8gI5w5sliC8=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "4c86138ce486d601d956a165e2f7a0fc029a03c1",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"id": "nixpkgs",
|
||||
"type": "indirect"
|
||||
}
|
||||
},
|
||||
"nixpkgs_3": {
|
||||
"locked": {
|
||||
"lastModified": 1695837737,
|
||||
"narHash": "sha256-KcqmJ5hNacLuE7fkz5586kp/vt4NLo6+Prq3DMgrxpQ=",
|
||||
|
@ -16,8 +82,9 @@
|
|||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs",
|
||||
"utils": "utils"
|
||||
"bfom": "bfom",
|
||||
"nixpkgs": "nixpkgs_3",
|
||||
"utils": "utils_2"
|
||||
}
|
||||
},
|
||||
"systems": {
|
||||
|
@ -35,10 +102,43 @@
|
|||
"type": "github"
|
||||
}
|
||||
},
|
||||
"systems_2": {
|
||||
"locked": {
|
||||
"lastModified": 1681028828,
|
||||
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nix-systems",
|
||||
"repo": "default",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils": {
|
||||
"inputs": {
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1710146030,
|
||||
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"utils_2": {
|
||||
"inputs": {
|
||||
"systems": "systems_2"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
|
|
21
flake.nix
21
flake.nix
|
@ -3,30 +3,27 @@
|
|||
|
||||
inputs = {
|
||||
utils.url = "github:numtide/flake-utils";
|
||||
bfom.url = "gitlab:silver_rust/bfom";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, utils, }: utils.lib.eachDefaultSystem (system:
|
||||
outputs = { self, nixpkgs, utils, bfom }: utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages."${system}";
|
||||
in {
|
||||
in rec {
|
||||
# `nix build`
|
||||
defaultPackage = pkgs.stdenv.mkDerivation {
|
||||
name = "skynet-wiki";
|
||||
name = "skynet-website-renew";
|
||||
src = self;
|
||||
buildInputs = [
|
||||
pkgs.python3Packages.mkdocs
|
||||
pkgs.python3Packages.mkdocs-material
|
||||
];
|
||||
buildPhase = "mkdocs build";
|
||||
installPhase = "mkdir -p $out; cp -R site/* $out;";
|
||||
buildPhase = "${bfom.defaultPackage."${system}"}/bin/cargo-bfom";
|
||||
installPhase = "mkdir -p $out; cp -R build/* $out";
|
||||
};
|
||||
|
||||
devShells.default = pkgs.mkShell {
|
||||
name = "Skynet Wiki env";
|
||||
packages = [
|
||||
pkgs.python3Packages.mkdocs
|
||||
pkgs.python3Packages.mkdocs-material
|
||||
bfom.defaultPackage."${system}"
|
||||
];
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
site_name: Skynet Wiki
|
||||
site_url: https://wiki.skynet.ie
|
||||
docs_dir: ./src/
|
||||
theme:
|
||||
name: material
|
|
@ -1 +0,0 @@
|
|||
# Skynet Wiki
|
27
src/templates/general.html
Normal file
27
src/templates/general.html
Normal file
|
@ -0,0 +1,27 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-ie">
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<link href="./assets/favicon/favicon-16x16.png" rel="icon" type="image/png"/>
|
||||
<link href="./assets/index.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<!-- for code formatting -->
|
||||
<link rel="stylesheet" href="./assets/hybrid.min.css">
|
||||
<script src="./assets/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header class="page-header"></header>
|
||||
<main class="page-body">
|
||||
{body}
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
83
src/templates/powerpoint.html
Normal file
83
src/templates/powerpoint.html
Normal file
|
@ -0,0 +1,83 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang='en'>
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<link href="./assets/favicon/favicon-16x16.png" rel="icon" type="image/png"/>
|
||||
|
||||
<!-- for code formatting -->
|
||||
<link rel="stylesheet" href="./assets/hybrid.min.css">
|
||||
<script src="./assets/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</head>
|
||||
<body>
|
||||
{body}
|
||||
</body>
|
||||
<style>
|
||||
section.slide {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%) scale(3);
|
||||
}
|
||||
ol, ul {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
img{
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
max-width: 40%;
|
||||
max-height: 40%;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
let slide_number = 0;
|
||||
let slide_max = 0;
|
||||
|
||||
for (let section of document.querySelectorAll("section.slide")) {
|
||||
let number = parseInt(section.id, 10);
|
||||
if (number > slide_max) {
|
||||
slide_max = number;
|
||||
}
|
||||
}
|
||||
|
||||
slide_next = (change) => {
|
||||
// make old hidden
|
||||
document.getElementById(`${slide_number}`).style.display = "none";
|
||||
|
||||
// make the change
|
||||
let slide_number_new = slide_number + change;
|
||||
if (slide_number_new >= 0 && slide_number_new <= slide_max) {
|
||||
slide_number += change;
|
||||
}
|
||||
|
||||
// make current visible
|
||||
document.getElementById(`${slide_number}`).style.display = "block";
|
||||
}
|
||||
|
||||
// add event listner
|
||||
onkeydown = (event) => {
|
||||
if (event.key === "ArrowRight" || event.key === "ArrowDown") {
|
||||
slide_next(1);
|
||||
}
|
||||
if (event.key === "ArrowLeft" || event.key === "ArrowUp") {
|
||||
slide_next(-1);
|
||||
}
|
||||
};
|
||||
|
||||
on_events = (clickTargetWidth, xCoordInClickTarget) => {
|
||||
if (clickTargetWidth / 2 > xCoordInClickTarget) {
|
||||
slide_next(-1);
|
||||
} else {
|
||||
slide_next(1);
|
||||
}
|
||||
}
|
||||
|
||||
ontouchstart = (event) => {
|
||||
on_events(event.target.offsetWidth, event.touches[0].clientX - event.target.getBoundingClientRect().left);
|
||||
};
|
||||
// show the first slide
|
||||
slide_next(0)
|
||||
</script>
|
||||
</html>
|
40
src/templates/wiki.html
Normal file
40
src/templates/wiki.html
Normal file
|
@ -0,0 +1,40 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-ie">
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<link href="./assets/favicon/favicon-16x16.png" rel="icon" type="image/png"/>
|
||||
<link href="./assets/index.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<!-- for code formatting -->
|
||||
<link rel="stylesheet" href="./assets/hybrid.min.css">
|
||||
<script src="./assets/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header class="page-header">
|
||||
<a href="./" >
|
||||
<img alt="Sharky, our mascot" height="81.56" src="./assets/sharky.svg" width="145"/>
|
||||
</a>
|
||||
<h1>
|
||||
<a href="./" >
|
||||
<h1>Skynet Wiki</h1>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<main class="page-body">
|
||||
<h1>{title}</h1>
|
||||
<h4>{date}</h4>
|
||||
<!--indentation is managed by the converter-->
|
||||
{body}
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
38
src/templates/wiki_index.html
Normal file
38
src/templates/wiki_index.html
Normal file
|
@ -0,0 +1,38 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en-ie">
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<link href="./assets/favicon/favicon-16x16.png" rel="icon" type="image/png"/>
|
||||
<link href="./assets/index.css" rel="stylesheet" type="text/css"/>
|
||||
|
||||
<!-- for code formatting -->
|
||||
<link rel="stylesheet" href="./assets/hybrid.min.css">
|
||||
<script src="./assets/highlight.min.js"></script>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="wrapper">
|
||||
<header class="page-header">
|
||||
<a href="./" >
|
||||
<img alt="Sharky, our mascot" height="81.56" src="./assets/sharky.svg" width="145"/>
|
||||
</a>
|
||||
<h1>
|
||||
<a href="./" >
|
||||
<h1>Skynet Wiki</h1>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
||||
<main class="page-body">
|
||||
<!--indentation is managed by the converter-->
|
||||
{body}
|
||||
</main>
|
||||
<footer class="page-footer">
|
||||
UL Computer Society 2023-<span id="year">2023</span>
|
||||
<script>
|
||||
document.getElementById('year').textContent = new Date().getFullYear().toString()
|
||||
</script>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Loading…
Reference in a new issue