mirror of
https://codeberg.org/Codeberg/Documentation.git
synced 2026-06-16 05:13:54 -07:00
TODO: - [x] Hide navbar items on small screens - [x] Fix `<blockquote>` rendering - [x] Fix `<code>` rendering - [ ] LibreJS Compatibility Reviewed-on: https://codeberg.org/Codeberg/Documentation/pulls/149 Co-authored-by: n <n@noreply.codeberg.org> Co-committed-by: n <n@noreply.codeberg.org>
This commit is contained in:
parent
1c7e459bd0
commit
ae684fbad4
17 changed files with 239 additions and 652 deletions
12
.eleventy.js
12
.eleventy.js
|
|
@ -1,5 +1,7 @@
|
|||
const navigationPlugin = require("@11ty/eleventy-navigation")
|
||||
const syntaxHighlightingPlugin = require("@11ty/eleventy-plugin-syntaxhighlight")
|
||||
const markdownIt = require('markdown-it');
|
||||
const markdownItClass = require('@toycode/markdown-it-class');
|
||||
|
||||
module.exports = function(eleventyConfig) {
|
||||
eleventyConfig.addPlugin(navigationPlugin)
|
||||
|
|
@ -10,6 +12,16 @@ module.exports = function(eleventyConfig) {
|
|||
|
||||
eleventyConfig.addShortcode("fas_icon", function(name) { return `<span class="fas fa-${name}"></span>` })
|
||||
|
||||
const mapping = {
|
||||
h2: 'content-title',h3: 'content-title',h4: 'content-title',h5: 'content-title',h6: 'content-title',
|
||||
table: 'table',
|
||||
blockquote: 'alert'
|
||||
};
|
||||
|
||||
const md = markdownIt({ linkify: false, html: true });
|
||||
md.use(markdownItClass, mapping);
|
||||
eleventyConfig.setLibrary('md', md);
|
||||
|
||||
return {
|
||||
dir: {
|
||||
input: "content"
|
||||
|
|
|
|||
|
|
@ -1,151 +1,40 @@
|
|||
html, body { width: 100%; height: 100%; margin: 0; padding: 0; background-color: white; color: black; }
|
||||
body { display: flex; flex-direction: column; font-family: "Inter", sans-serif; font-size: 13pt; font-weight: 300; }
|
||||
:link { color: #0000EE; }
|
||||
:visited { color: #551A8B; }
|
||||
:link:active, :visited:active { color: #FF0000; }
|
||||
.content img { border: 5px solid rgba(0, 0, 0, 0.2); max-width: 100%; }
|
||||
.content blockquote { margin: 0; }
|
||||
.content-title { margin-top: 20px !important; }
|
||||
|
||||
header { height: 60px; margin-top: 30px; margin-bottom: 60px; }
|
||||
header > .container { display: flex; align-items: center; }
|
||||
#header-action-buttons { text-align: right; }
|
||||
#header-logo { height: 100%; padding: 10px; padding-left: 0; box-sizing: border-box; }
|
||||
#header-logo img { height: 100%; }
|
||||
#header-logo-container { display: flex; align-items: center; height: 100%; }
|
||||
#header-logo a { text-decoration: none; }
|
||||
#logo-heading { color: #2185d0; font-weight: 700; font-size: 28pt; margin-left: 10px; }
|
||||
#contents-button { display: none; }
|
||||
.content pre { border-left: 5px solid #2185d0; }
|
||||
.dark-mode .content pre { border-left: 5px solid #355379; }
|
||||
|
||||
main { flex: 1; }
|
||||
main > .container { display: flex; }
|
||||
.content ol { list-style: decimal outside; padding-left: 2em; }
|
||||
|
||||
#sidebar { display: flex; flex-direction: column; padding: 50px 10px; background: #2185d0; color: white; font-weight: 500; box-sizing: border-box; }
|
||||
#sidebar nav { width: 350px; box-sizing: border-box; flex: 1; }
|
||||
#sidebar nav .fas { width: 30px; text-align: center; }
|
||||
#sidebar nav a { text-decoration: none; color: white; }
|
||||
#sidebar nav ul { list-style-type: none; padding: 0; margin: 0; }
|
||||
#sidebar .nav-section a { display: block; padding: 7px 10px; margin: 0 -10px 5px; background: #4595d3; font-size: 12pt; }
|
||||
#sidebar .nav-section:hover a, #sidebar .nav-section.active a { background: #27628f; margin-left: -15px; padding-left: 15px; padding-right: 15px; margin-right: -15px; }
|
||||
#sidebar .nav-second-level a { font-size: 11pt; }
|
||||
#sidebar .nav-second-level ul { margin-left: 15px; padding: 7px 0; }
|
||||
#sidebar .nav-second-level li { margin-bottom: 10px; }
|
||||
#sidebar .nav-second-level a:hover, #sidebar .nav-second-level a.active { text-decoration: underline; }
|
||||
#sidebar .sidebar-close-button { display: none; position: relative; text-align: right; top: -35px; }
|
||||
#sidebar .sidebar-close-button a:hover { color: red; }
|
||||
#sidebar .section-collapse-button { margin-left: 0 !important; padding-left: 5px !important; }
|
||||
#sidebar .section-collapse-button:hover { color: #cfffff; }
|
||||
#sidebar .section-link { margin-right: 0 !important; padding-right: 5px !important; }
|
||||
#sidebar-overlay { display: none; opacity: 0; position: fixed; width: 100%; height: 100%; z-index: 999; background: #000a; }
|
||||
.sidebar-overlay-in { opacity: 1; }
|
||||
|
||||
article { padding: 50px 0; width: 800px; }
|
||||
article :first-child { margin-top: 0; }
|
||||
|
||||
article h1 { font-size: 34pt; }
|
||||
article h2 { font-size: 26pt; }
|
||||
article h3 { font-size: 20pt; }
|
||||
article h4 { font-size: 16pt; }
|
||||
article h5 { font-size: 14pt; }
|
||||
article h6 { font-size: 12pt; }
|
||||
|
||||
article blockquote, article img, article pre { box-sizing: border-box; }
|
||||
article blockquote, article pre { background: #eee; padding: 30px; margin: 0; border-left: 5px solid #2185d0; overflow: auto; }
|
||||
article blockquote p:last-of-type { margin-bottom: 0; }
|
||||
article blockquote blockquote { background: #ddd; }
|
||||
article code { background: #eee; border-radius: 5px; padding: 1px 3px; }
|
||||
article pre code { background: none; border-radius: none; padding: 0; }
|
||||
article img { border: 5px solid #eee; max-width: 100%; }
|
||||
article p { hyphens: auto; max-width: 100%; }
|
||||
article table { border-collapse: collapse; }
|
||||
article td, th { padding: 15px; }
|
||||
article th { background: #ddd; }
|
||||
article tr:nth-of-type(even) { background: #eee; }
|
||||
article hr { width: 80%; border: 1px solid #eee; }
|
||||
|
||||
.contribution-invitation hr { margin-top: 70px; margin-bottom: 30px; }
|
||||
|
||||
footer { background: #f5f5f5; text-align: center; font-size: 8pt; padding: 15px; margin-top: 60px; }
|
||||
|
||||
#mobile-action-buttons { text-align: center; display: none; }
|
||||
#mobile-contents-button { display: none; }
|
||||
#mobile-contents-button a { color: #2185D0; font-size: 35px; }
|
||||
|
||||
|
||||
.action-buttons { flex: 1; }
|
||||
.action-buttons a { text-decoration: none; color: black; margin-left: 10px; }
|
||||
.action-buttons a:hover { text-decoration: underline; }
|
||||
.collapsible { overflow-y: hidden; transition: max-height 500ms; }
|
||||
.container { max-width: 1300px; margin: auto; height: 100%; }
|
||||
.flex-spacer { flex: 99; }
|
||||
|
||||
.narrow-only { display: none; }
|
||||
|
||||
@media screen and (max-width: 1400px) {
|
||||
.wide-only { display: none; }
|
||||
.narrow-only { display: initial; }
|
||||
|
||||
#header-logo { margin-left: 0; }
|
||||
#sidebar { display: block; position: fixed; overflow-y: auto; left: 0; top: 0; height: 100%; transform: translateX(-400px); z-index: 9999; }
|
||||
#sidebar .sidebar-close-button { display: block; }
|
||||
#sidebar nav { width: 300px; }
|
||||
#sidebar .nav-section a { font-size: 11pt; }
|
||||
|
||||
#sidebar-overlay.sidebar-overlay-in { display: block; }
|
||||
article { margin-left: 0; margin-right: 0; padding-top: 0; width: 100%; }
|
||||
.container { max-width: 780px; padding: 0 50px; }
|
||||
#contents-button { display: inline-block; background: #eee; border-radius: 5px; padding: 5px; width: 20px; height: 20px; text-align: center; }
|
||||
#contents-button:hover { background: #ccc; }
|
||||
/* Apply code style to generic code */
|
||||
pre:not([class*="language-"]) {
|
||||
background: #2E3440;
|
||||
color: #f8f8f2;
|
||||
padding: 1em;
|
||||
margin: .5em 0;
|
||||
overflow: auto;
|
||||
border-radius: 0.3em;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 750px) {
|
||||
#header-action-buttons { display: none; }
|
||||
#mobile-action-buttons { display: block; }
|
||||
#mobile-contents-button { display: block; }
|
||||
/* Override sidebar link style */
|
||||
.codeberg-design .sidebar-title a { color: var(--sidebar-title-text-color); }
|
||||
.codeberg-design .sidebar-title .dark-mode a { color: var(--dm-sidebar-title-text-color); }
|
||||
|
||||
.container { padding: 0 20px; }
|
||||
article p { text-align: left; }
|
||||
header { margin-top: 15px; margin-bottom: 30px; height: 50px; }
|
||||
#header-logo { flex: 1; }
|
||||
#logo-heading { font-size: 22pt; }
|
||||
#mobile-contents-button a { font-size: 30px; }
|
||||
|
||||
article h1 { font-size: 28pt; }
|
||||
article h2 { font-size: 22pt; }
|
||||
article h3 { font-size: 18pt; }
|
||||
/* Apply halfmoon style to inline code */
|
||||
code:not(pre > code) {
|
||||
font-size: var(--code-font-size);
|
||||
line-height: var(--code-line-height);
|
||||
padding: var(--code-padding);
|
||||
margin: var(--code-margin);
|
||||
color: var(--lm-code-text-color);
|
||||
background-color: var(--lm-code-bg-color);
|
||||
border: var(--code-border-width) var(--lm-code-border-color);
|
||||
border-radius: var(--code-border-radius);
|
||||
}
|
||||
.dark-mode code:not(pre > code) {
|
||||
color: var(--dm-code-text-color);
|
||||
background-color: var(--dm-code-bg-color);
|
||||
border-color: var(--dm-code-border-color);
|
||||
}
|
||||
|
||||
@keyframes slideSidebar {
|
||||
from { transform: translateX(-300px); }
|
||||
to { transform: translateX(0); }
|
||||
}
|
||||
|
||||
@keyframes fadeOverlay {
|
||||
from { opacity: 0; }
|
||||
to { opacity: 1; }
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
#logo-heading { color: #94cddc; }
|
||||
html, body { background-color: #373B49; color: #9ba8bb; }
|
||||
|
||||
footer { background: #0b0b0b; color: #bbb; }
|
||||
footer a { color: #36aaff; }
|
||||
footer a:visited { color: #86afcc; }
|
||||
|
||||
.action-buttons a { color: #9cd9e8; }
|
||||
|
||||
:link { color: #449ddc; }
|
||||
:visited { color: #5d8499; }
|
||||
:link:active, :visited:active { color: #828f55; }
|
||||
|
||||
code, pre { color: #9eaa96 !important; }
|
||||
|
||||
article h1 { color: #c6cfee; text-decoration: underline; }
|
||||
article h2, article h3, article h4, article h5 { color: #c6cfee; }
|
||||
article code { background: #2e3440; color: #9eaa96; }
|
||||
article hr { border: 1px solid #91bbdb; }
|
||||
article blockquote, article pre { background: #21242d; border-left: 5px solid #355379; color: #7f8a95; }
|
||||
|
||||
#sidebar { background: #2c303c; color: #879cb3; }
|
||||
#sidebar nav a { color: #8aa9b9; }
|
||||
#sidebar .nav-section a { background: #304862; font-size: 12pt; }
|
||||
#sidebar .nav-section:hover a, #sidebar .nav-section.active a { background: #20374f; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
sodipodi:docname="codeberg-favicon.svg"
|
||||
id="svg1468"
|
||||
version="1.1"
|
||||
viewBox="0 0 4.2150375 4.2150376"
|
||||
height="15.93085"
|
||||
width="15.930851">
|
||||
<defs
|
||||
id="defs1462">
|
||||
<linearGradient
|
||||
gradientUnits="userSpaceOnUse"
|
||||
y2="-6966.9307"
|
||||
x2="42575.336"
|
||||
y1="-7078.7891"
|
||||
x1="42519.285"
|
||||
id="linearGradient6918"
|
||||
xlink:href="#linearGradient6924" />
|
||||
<linearGradient
|
||||
id="linearGradient6924">
|
||||
<stop
|
||||
id="stop6920"
|
||||
offset="0"
|
||||
style="stop-color:#2185d0;stop-opacity:0" />
|
||||
<stop
|
||||
style="stop-color:#2185d0;stop-opacity:0.48923996"
|
||||
offset="0.49517274"
|
||||
id="stop6926" />
|
||||
<stop
|
||||
id="stop6922"
|
||||
offset="1"
|
||||
style="stop-color:#2185d0;stop-opacity:0.63279623" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
showguides="true"
|
||||
inkscape:snap-page="true"
|
||||
inkscape:snap-global="true"
|
||||
units="px"
|
||||
fit-margin-bottom="0.64969"
|
||||
fit-margin-right="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-top="0"
|
||||
showgrid="false"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="layer1"
|
||||
inkscape:document-units="px"
|
||||
inkscape:cy="14.621"
|
||||
inkscape:cx="-3.0265425"
|
||||
inkscape:zoom="32"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
borderopacity="1.0"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
id="base"
|
||||
inkscape:snap-bbox="true"
|
||||
inkscape:bbox-paths="true"
|
||||
inkscape:bbox-nodes="true"
|
||||
inkscape:snap-bbox-edge-midpoints="true"
|
||||
inkscape:snap-bbox-midpoints="true"
|
||||
inkscape:window-width="3200"
|
||||
inkscape:window-height="1672"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="54"
|
||||
inkscape:window-maximized="1">
|
||||
<inkscape:grid
|
||||
id="grid2067"
|
||||
type="xygrid"
|
||||
originx="-0.0091209171"
|
||||
originy="0.11900229" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata1465">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(-44.876583,-76.12794)"
|
||||
id="layer1"
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Layer 1">
|
||||
<ellipse
|
||||
style="fill:#ffffff;fill-opacity:0.98991939;stroke-width:0.26458332"
|
||||
id="path4524"
|
||||
cx="46.9841"
|
||||
cy="78.235458"
|
||||
rx="2.1075189"
|
||||
ry="2.1075187" />
|
||||
<g
|
||||
transform="matrix(0.09136496,0,0,0.09136496,-980.82243,248.23174)"
|
||||
id="g6933">
|
||||
<path
|
||||
id="path6733"
|
||||
style="opacity:0.5;vector-effect:none;fill:url(#linearGradient6918);fill-opacity:1;stroke:none;stroke-width:3.67845988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill"
|
||||
d="m 42519.285,-7078.7891 a 0.76086879,0.56791688 0 0 0 -0.738,0.6739 l 33.586,125.8886 a 87.182358,87.182358 0 0 0 39.381,-33.7636 l -71.565,-92.5196 a 0.76086879,0.56791688 0 0 0 -0.664,-0.2793 z"
|
||||
transform="scale(0.26458333)"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="scale(0.26458333)"
|
||||
id="circle6810"
|
||||
style="opacity:1;fill:#2185d0;fill-opacity:1;stroke:none;stroke-width:2.01452994px;stroke-opacity:1;paint-order:stroke markers fill"
|
||||
d="m 42517.32,-7119.4805 a 87.182358,87.182358 0 0 0 -86.855,87.1817 87.182358,87.182358 0 0 0 13.312,46.3047 l 72.688,-93.9727 a 1.3609979,1.0158567 0 0 1 2.359,0 l 72.692,93.9766 a 87.182358,87.182358 0 0 0 13.314,-46.3086 87.182358,87.182358 0 0 0 -87.182,-87.1817 87.182358,87.182358 0 0 0 -0.328,0 z"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 4.3 KiB |
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.92.5 (2060ec1f9f, 2020-04-08)"
|
||||
sodipodi:docname="codeberg-dark.svg"
|
||||
id="svg9965"
|
||||
version="1.1"
|
||||
viewBox="0 0 55.621185 55.621193"
|
||||
width="55.621185"
|
||||
height="55.621193">
|
||||
<metadata
|
||||
id="metadata9971">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs9969">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient6924"
|
||||
id="linearGradient6918"
|
||||
x1="42519.285"
|
||||
y1="-7078.7891"
|
||||
x2="42575.336"
|
||||
y2="-6966.9307"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient6924">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="0"
|
||||
id="stop6920" />
|
||||
<stop
|
||||
id="stop6926"
|
||||
offset="0.49517274"
|
||||
style="stop-color:#ffffff;stop-opacity:0.5" />
|
||||
<stop
|
||||
style="stop-color:#fdfeff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop6922" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg9965"
|
||||
inkscape:cy="72.714836"
|
||||
inkscape:cx="44.928006"
|
||||
inkscape:zoom="7.2407734"
|
||||
showgrid="false"
|
||||
id="namedview9967"
|
||||
inkscape:window-height="1672"
|
||||
inkscape:window-width="3200"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff"
|
||||
fit-margin-bottom="2.26835"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="54"
|
||||
inkscape:window-maximized="1" />
|
||||
<!-- outline -->
|
||||
<!-- small shadow -->
|
||||
<!-- mountain in foreground -->
|
||||
<!-- text -->
|
||||
<g
|
||||
transform="matrix(1.2056422,0,0,1.2056422,-13535.014,2271.0633)"
|
||||
id="g6933">
|
||||
<path
|
||||
transform="scale(0.26458333)"
|
||||
d="m 42519.285,-7078.7891 a 0.76086879,0.56791688 0 0 0 -0.738,0.6739 l 33.586,125.8886 a 87.182358,87.182358 0 0 0 39.381,-33.7636 l -71.565,-92.5196 a 0.76086879,0.56791688 0 0 0 -0.664,-0.2793 z"
|
||||
style="opacity:0.5;vector-effect:none;fill:url(#linearGradient6918);fill-opacity:1;stroke:none;stroke-width:3.67845988;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill"
|
||||
id="path6733"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
transform="scale(0.26458333)"
|
||||
d="m 42517.32,-7119.4805 a 87.182358,87.182358 0 0 0 -86.855,87.1817 87.182358,87.182358 0 0 0 13.312,46.3047 l 72.688,-93.9727 a 1.3609979,1.0158567 0 0 1 2.359,0 l 72.692,93.9766 a 87.182358,87.182358 0 0 0 13.314,-46.3086 87.182358,87.182358 0 0 0 -87.182,-87.1817 87.182358,87.182358 0 0 0 -0.328,0 z"
|
||||
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2.01452994px;stroke-opacity:1;paint-order:stroke markers fill"
|
||||
id="circle6810"
|
||||
inkscape:connector-curvature="0" />
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 3.6 KiB |
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="1.0 (4035a4fb49, 2020-05-01)"
|
||||
sodipodi:docname="codeberg.svg"
|
||||
id="svg10"
|
||||
version="1.1"
|
||||
viewBox="0 0 100 58">
|
||||
<metadata
|
||||
id="metadata16">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs14">
|
||||
<linearGradient
|
||||
xlink:href="#linearGradient6924"
|
||||
id="linearGradient6918"
|
||||
x1="42519.285"
|
||||
y1="-7078.7891"
|
||||
x2="42575.336"
|
||||
y2="-6966.9307"
|
||||
gradientUnits="userSpaceOnUse" />
|
||||
<linearGradient
|
||||
id="linearGradient6924">
|
||||
<stop
|
||||
style="stop-color:#ffffff;stop-opacity:0"
|
||||
offset="0"
|
||||
id="stop6920" />
|
||||
<stop
|
||||
id="stop6926"
|
||||
offset="0.49517274"
|
||||
style="stop-color:#71c2ff;stop-opacity:1" />
|
||||
<stop
|
||||
style="stop-color:#39aaff;stop-opacity:1"
|
||||
offset="1"
|
||||
id="stop6922" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg10"
|
||||
inkscape:cy="17.573059"
|
||||
inkscape:cx="45.102208"
|
||||
inkscape:zoom="6.6465517"
|
||||
showgrid="false"
|
||||
id="namedview12"
|
||||
inkscape:window-height="480"
|
||||
inkscape:window-width="640"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:pageopacity="0"
|
||||
guidetolerance="10"
|
||||
gridtolerance="10"
|
||||
objecttolerance="10"
|
||||
borderopacity="1"
|
||||
bordercolor="#666666"
|
||||
pagecolor="#ffffff" />
|
||||
<!-- outline -->
|
||||
<!-- small shadow -->
|
||||
<!-- mountain in foreground -->
|
||||
<!-- text -->
|
||||
<g
|
||||
transform="matrix(0.49902103,0,0,0.49902103,16.383035,-5.830387)"
|
||||
id="layer1">
|
||||
<g
|
||||
transform="matrix(1.4006354,0,0,1.4006354,-15690.065,2662.0533)"
|
||||
id="g6939">
|
||||
<path
|
||||
transform="scale(0.26458333)"
|
||||
d="m 42405.785,-6929.3027 c -6.178,0 -11.002,2.0754 -14.474,6.2246 -3.518,4.1491 -5.278,9.6275 -5.278,16.4375 0,5.2313 1.286,9.7874 3.856,13.666 3.563,5.4118 8.974,8.1172 16.236,8.1172 5.049,0 9.447,-1.872 13.191,-5.6153 l -3.451,-5.3437 c -3.336,2.1198 -6.221,3.1797 -8.658,3.1797 -3.699,0 -6.653,-1.4205 -8.863,-4.2617 -2.074,-2.7062 -3.112,-5.9541 -3.112,-9.7422 0,-4.2845 0.88,-7.7572 2.639,-10.418 2.031,-3.1118 4.894,-4.668 8.59,-4.668 2.661,0 5.615,1.1725 8.863,3.5176 l 3.451,-5.6133 c -4.331,-3.653 -8.661,-5.4804 -12.99,-5.4804 z m 122.604,0 -8.522,4.8027 v 38.8301 h 6.901 l 0.677,-3.043 c 2.074,2.5706 5.004,3.8555 8.791,3.8555 3.835,0 7.061,-1.1512 9.676,-3.4512 3.336,-3.0216 5.004,-7.4634 5.004,-13.3262 0,-4.5551 -1.126,-8.208 -3.379,-10.959 -2.572,-3.1118 -6.136,-4.6679 -10.689,-4.6679 -1.626,0 -3.114,0.3158 -4.467,0.9472 -1.714,0.8116 -3.045,1.9396 -3.992,3.3829 z m -45.871,0.1347 -8.528,4.7364 v 9.8086 c -2.119,-1.7137 -4.734,-2.5704 -7.845,-2.5704 -3.609,0 -6.698,1.1958 -9.268,3.586 -3.427,3.202 -5.141,7.7561 -5.141,13.664 0,4.1943 1.061,7.6225 3.18,10.2832 2.525,3.2021 6.198,4.8028 11.023,4.8028 1.716,0 3.386,-0.3837 5.008,-1.1504 1.623,-0.7665 2.797,-1.7356 3.52,-2.9082 l 1.217,3.2461 h 6.834 z m -47.993,11.9746 c -4.422,0 -8.008,1.3973 -10.757,4.1934 -3.024,3.0667 -4.536,7.0803 -4.536,12.041 0,4.3747 1.353,8.0741 4.059,11.0957 3.024,3.3373 6.77,5.0059 11.234,5.0059 3.833,0 7.192,-1.3082 10.077,-3.9238 3.474,-3.1119 5.21,-7.1717 5.21,-12.1778 0,-4.2842 -1.171,-7.9141 -3.517,-10.8906 -2.797,-3.5628 -6.72,-5.3438 -11.77,-5.3438 z m 67.071,0 c -4.374,0 -7.982,1.4438 -10.825,4.3301 -3.157,3.1569 -4.736,7.1472 -4.736,11.9727 0,4.9159 1.399,8.7722 4.195,11.5683 2.933,2.9765 7.016,4.4649 12.247,4.4649 4.87,0 8.929,-1.4438 12.177,-4.3301 l -2.166,-4.5313 c -3.202,1.8039 -6.269,2.7051 -9.199,2.7051 -2.076,0 -3.88,-0.6764 -5.412,-2.0293 -1.494,-1.3981 -2.33,-3.1345 -2.506,-5.209 h 21.109 v -3.1113 c 0,-4.4649 -1.173,-8.0965 -3.519,-10.8926 -2.706,-3.2922 -6.495,-4.9375 -11.365,-4.9375 z m 67.666,0 c -4.374,0 -7.982,1.4438 -10.824,4.3301 -3.158,3.1569 -4.737,7.1472 -4.737,11.9727 0,4.9159 1.399,8.7722 4.195,11.5683 2.931,2.9765 7.013,4.4649 12.247,4.4649 4.87,0 8.928,-1.4438 12.173,-4.3301 l -2.162,-4.5313 c -3.202,1.8039 -6.27,2.7051 -9.203,2.7051 -2.074,0 -3.877,-0.6764 -5.412,-2.0293 -1.492,-1.3981 -2.326,-3.1345 -2.502,-5.209 h 21.108 v -3.1113 c 0,-4.4649 -1.172,-8.0965 -3.518,-10.8926 -2.706,-3.2922 -6.495,-4.9375 -11.365,-4.9375 z m 33.017,0 c -1.353,0 -2.684,0.3604 -3.992,1.0821 -1.265,0.6763 -2.121,1.4884 -2.572,2.4355 l -0.811,-2.7051 h -7.24 v 30.711 h 8.391 v -22.0528 c 0.72,-1.5785 1.848,-2.3671 3.383,-2.3671 1.668,0 3.245,0.8564 4.734,2.5703 l 7.17,-3.9239 c -1.986,-3.8334 -5.006,-5.75 -9.063,-5.75 z m 22.016,0 c -3.563,0 -6.654,1.1958 -9.272,3.586 -3.426,3.202 -5.14,7.7561 -5.14,13.664 0,4.1492 1.06,7.5774 3.179,10.2832 2.482,3.2021 5.979,4.8028 10.489,4.8028 3.696,0 6.559,-1.5116 8.59,-4.5332 0,6.7648 -2.435,10.1484 -7.305,10.1484 -3.429,0 -6.519,-0.9029 -9.268,-2.707 l -2.166,4.3301 c 3.563,3.2471 7.78,4.8711 12.651,4.8711 4.689,0 8.297,-1.3758 10.824,-4.127 2.57,-2.7961 3.855,-6.7883 3.855,-11.9746 v -27.5313 h -6.562 l -0.676,3.3145 c 0,-0.451 -0.653,-1.1273 -1.961,-2.0293 -1.985,-1.3979 -4.398,-2.0977 -7.238,-2.0977 z m -122.768,6.0215 c 4.06,0 6.203,2.2094 6.43,6.6289 h -13.059 c 0.497,-4.4195 2.706,-6.6289 6.629,-6.6289 z m 67.666,0 c 4.057,0 6.199,2.2094 6.426,6.6289 h -13.055 c 0.497,-4.4195 2.706,-6.6289 6.629,-6.6289 z m -134.668,0.066 c 4.375,0 6.561,3.3819 6.561,10.1465 0,6.4943 -2.186,9.7422 -6.561,9.7422 -4.376,0 -6.566,-3.2479 -6.566,-9.7422 0,-6.7646 2.19,-10.1465 6.566,-10.1465 z m 33.446,0 c 1.489,0 2.774,0.4963 3.857,1.4883 1.126,0.9472 1.847,2.1642 2.162,3.6524 v 8.5918 c -0.224,1.6685 -1.035,3.1568 -2.433,4.4648 -1.399,1.2626 -2.909,1.8945 -4.532,1.8945 -4.374,0 -6.562,-3.3603 -6.562,-10.0801 0,-3.0667 0.678,-5.5008 2.031,-7.3046 1.353,-1.8039 3.179,-2.7071 5.477,-2.7071 z m 158.15,0 c 1.444,0 2.75,0.5196 3.922,1.5567 1.222,0.9922 1.921,2.186 2.098,3.584 v 7.7812 c 0,1.9392 -0.677,3.629 -2.03,5.0723 -1.353,1.3979 -2.953,2.0976 -4.802,2.0976 -4.42,0 -6.631,-3.3603 -6.631,-10.0801 0,-3.0667 0.678,-5.5008 2.031,-7.3046 1.353,-1.8039 3.157,-2.7071 5.412,-2.7071 z m -90.898,0.068 c 2.073,0 3.697,0.9012 4.871,2.7051 1.171,1.8038 1.758,4.2612 1.758,7.373 0,3.1569 -0.631,5.6393 -1.893,7.4434 -1.262,1.8038 -2.976,2.7051 -5.141,2.7051 -1.67,0 -3.138,-0.5641 -4.4,-1.6915 -1.227,-1.1275 -1.903,-2.5248 -2.029,-4.1933 v -7.375 c 0,-1.9392 0.655,-3.5844 1.963,-4.9375 1.353,-1.3528 2.976,-2.0293 4.871,-2.0293 z"
|
||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:17.8986px;line-height:1.25;font-family:Tajawal;-inkscape-font-specification:'Tajawal Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-east-asian:normal;letter-spacing:-0.284861px;word-spacing:0px;fill:#2185d0;fill-opacity:1;stroke:none;stroke-width:1.69121"
|
||||
id="path6736" />
|
||||
<g
|
||||
id="g6933">
|
||||
<path
|
||||
id="path6733"
|
||||
style="font-variation-settings:normal;opacity:0.5;vector-effect:none;fill:url(#linearGradient6918);fill-opacity:1;stroke:none;stroke-width:3.67846;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:2;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000;stop-opacity:1"
|
||||
d="m 42519.285,-7078.7891 a 0.76086879,0.56791688 0 0 0 -0.738,0.6739 l 33.586,125.8886 a 87.182358,87.182358 0 0 0 39.381,-33.7636 l -71.565,-92.5196 a 0.76086879,0.56791688 0 0 0 -0.664,-0.2793 z"
|
||||
transform="scale(0.26458333)" />
|
||||
<path
|
||||
id="circle6810"
|
||||
style="opacity:1;fill:#2185d0;fill-opacity:1;stroke:none;stroke-width:2.01453px;stroke-opacity:1;paint-order:stroke markers fill;stop-color:#000000"
|
||||
d="m 42517.32,-7119.4805 a 87.182358,87.182358 0 0 0 -86.855,87.1817 87.182358,87.182358 0 0 0 13.312,46.3047 l 72.688,-93.9727 a 1.3609979,1.0158567 0 0 1 2.359,0 l 72.692,93.9766 a 87.182358,87.182358 0 0 0 13.314,-46.3086 87.182358,87.182358 0 0 0 -87.182,-87.1817 87.182358,87.182358 0 0 0 -0.328,0 z"
|
||||
transform="scale(0.26458333)" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 8.5 KiB |
|
|
@ -1,22 +0,0 @@
|
|||
function onCollapseButtonClick(button) {
|
||||
let icon = button.querySelector(".fas")
|
||||
|
||||
let collapseId = button.dataset["collapseId"]
|
||||
let collapseElement = document.getElementById(collapseId)
|
||||
if (collapseElement.style.maxHeight == "0px") {
|
||||
icon.classList.remove("fa-plus-square")
|
||||
icon.classList.add("fa-minus-square")
|
||||
collapseElement.style.maxHeight = collapseElement.scrollHeight + "px"
|
||||
} else {
|
||||
console.log(collapseElement.style.maxHeight)
|
||||
if (collapseElement.style.maxHeight === "") { // This is a workaround to fix animation when no initial maxHeight has been set
|
||||
collapseElement.style.maxHeight = collapseElement.scrollHeight + "px"
|
||||
void collapseElement.offsetWidth // Needed to trigger render
|
||||
}
|
||||
|
||||
|
||||
icon.classList.add("fa-plus-square")
|
||||
icon.classList.remove("fa-minus-square")
|
||||
collapseElement.style.maxHeight = "0px"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
function getSidebar() {
|
||||
return document.querySelector("#sidebar")
|
||||
}
|
||||
|
||||
function getSidebarOverlay() {
|
||||
return document.querySelector("#sidebar-overlay")
|
||||
}
|
||||
|
||||
function hideSidebar() {
|
||||
resetSidebarAnimation()
|
||||
getSidebar().style.animation = "slideSidebar 0.5s ease-in-out reverse backwards"
|
||||
}
|
||||
|
||||
function showSidebar() {
|
||||
resetSidebarAnimation()
|
||||
|
||||
const sidebar = getSidebar()
|
||||
sidebar.classList.add("sidebar-in")
|
||||
sidebar.style.animation = "slideSidebar 0.5s ease-in-out normal forwards"
|
||||
|
||||
const overlay = getSidebarOverlay()
|
||||
overlay.classList.add("sidebar-overlay-in")
|
||||
overlay.style.animation = "fadeOverlay 0.5s ease-in-out normal forwards"
|
||||
}
|
||||
|
||||
function resetSidebarAnimation() {
|
||||
const sidebar = getSidebar()
|
||||
sidebar.classList.remove("sidebar-in")
|
||||
sidebar.style.animation = "none"
|
||||
void sidebar.offsetWidth // Needed to restart animation
|
||||
|
||||
const overlay = getSidebarOverlay()
|
||||
overlay.classList.remove("sidebar-overlay-in")
|
||||
overlay.style.animation = "none"
|
||||
void overlay.offsetWidth // Needed to restart animation
|
||||
}
|
||||
|
||||
function toggleSidebar() {
|
||||
if (getSidebar().classList.contains("sidebar-in"))
|
||||
hideSidebar()
|
||||
else
|
||||
showSidebar()
|
||||
}
|
||||
3
content/_data/env.js
Normal file
3
content/_data/env.js
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
module.exports = {
|
||||
environment: process.env.ELEVENTY_ENV
|
||||
};
|
||||
|
|
@ -1,6 +1,4 @@
|
|||
<div class="contribution-invitation">
|
||||
<hr>
|
||||
<blockquote>
|
||||
<div class="card">
|
||||
<p>Hey there! 👋 Thank you for reading this article!</p>
|
||||
<p>
|
||||
Is there something missing or do you have an idea on how to improve the documentation?
|
||||
|
|
@ -15,5 +13,4 @@
|
|||
For an introduction on contributing to Codeberg Documentation, please have a look
|
||||
at <a href="https://docs.codeberg.org/improving-codeberg/docs-contributor-faq">the Contributor FAQ</a>.
|
||||
</p>
|
||||
</blockquote>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,120 +1,157 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<title>{% if eleventyNavigation.title %}{{ eleventyNavigation.title }} | {% endif %}Codeberg Documentation</title>
|
||||
<html lang="en" class="codeberg-design">
|
||||
<head>
|
||||
<title>{% if eleventyNavigation.title %}{{ eleventyNavigation.title }} | {% endif %}Codeberg Documentation</title>
|
||||
|
||||
<meta charset="UTF-8">
|
||||
{% if description %}<meta name="description" content="{{ description }}">{% endif %}
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta charset="UTF-8">
|
||||
{% if description %}<meta name="description" content="{{ description }}">{% endif %}
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
||||
{% if env.environment == "testing" %}<meta name="robots" content="noindex">{% endif %}
|
||||
|
||||
<link rel="icon" type="image/svg+xml" href="/assets/images/logo/codeberg-favicon.svg" sizes="250x250">
|
||||
<link rel="icon" href="https://design.codeberg.org/logo-kit/favicon.ico" type="image/x-icon"/>
|
||||
<link rel="icon" href="https://design.codeberg.org/logo-kit/favicon.svg" type="image/svg+xml"/>
|
||||
<link rel="apple-touch-icon" href="https://design.codeberg.org/logo-kit/apple-touch-icon.png"/>
|
||||
|
||||
<link rel="preload" type="text/css" href="/assets/css/codeberg-docs.css">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/inter/Inter Web/inter.css" as="style">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/fontawesome5/css/solid.min.css" as="style">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/fontawesome5/css/fontawesome.min.css" as="style">
|
||||
<link rel="preload" type="text/css" href="/assets/css/codeberg-docs.css" as="style">
|
||||
<link rel="preload" type="text/css" href="https://design.codeberg.org/design-kit/codeberg.css" as="style">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/inter/Inter Web/inter.css" as="style">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/fontawesome5/css/solid.min.css" as="style">
|
||||
<link rel="preload" href="https://fonts.codeberg.org/dist/fontawesome5/css/fontawesome.min.css" as="style">
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/codeberg-docs.css" async>
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/prism-nord.css" async>
|
||||
<!-- Details and License: https://codeberg.org/Codeberg/Design/src/branch/master/design-kit -->
|
||||
<link rel="stylesheet" href="https://design.codeberg.org/design-kit/codeberg.css"/>
|
||||
<script defer src="https://design.codeberg.org/design-kit/codeberg.js"></script>
|
||||
|
||||
<!-- Details and License: https://fonts.codeberg.org/fonts/inter -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/inter/Inter Web/inter.css" async>
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/codeberg-docs.css" async>
|
||||
<!-- Syntax highlighting -->
|
||||
<link rel="stylesheet" type="text/css" href="/assets/css/prism-nord.css" async>
|
||||
|
||||
<!-- Details and License: https://fonts.codeberg.org/fonts/fontawesome5 -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/solid.min.css" async>
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/fontawesome.min.css" async>
|
||||
<!-- Details and License: https://fonts.codeberg.org/fonts/inter -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/inter/Inter Web/inter.css" async>
|
||||
|
||||
<script type="text/javascript" src="/assets/js/collapse.js"></script>
|
||||
<script type="text/javascript" src="/assets/js/sidebar.js"></script>
|
||||
</head>
|
||||
<!-- Details and License: https://fonts.codeberg.org/fonts/fontawesome5 -->
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/solid.min.css" async>
|
||||
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/fontawesome.min.css" async>
|
||||
|
||||
<body>
|
||||
<div id="sidebar-overlay" onclick="javascript:hideSidebar()"></div>
|
||||
<header>
|
||||
<div class="container">
|
||||
<div id="header-logo">
|
||||
<a href="/">
|
||||
<div id="header-logo-container">
|
||||
<img src="/assets/images/logo/codeberg-favicon.svg" alt="Codeberg">
|
||||
<div id="logo-heading">Documentation</div>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="action-buttons" id="header-action-buttons">
|
||||
<!--<a href="#">{% fas_icon "globe-europe" %} English</a>-->
|
||||
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "history" %} View History</a>
|
||||
<a href="{{ urls.docsSourcesMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "code" %} View Source</a>
|
||||
<a href="#" id="contents-button" onclick="toggleSidebar()">{% fas_icon "bars" %}</a>
|
||||
</div>
|
||||
<div id="mobile-contents-button"><a href="#" onclick="toggleSidebar()">{% fas_icon "bars" %}</a></div>
|
||||
</div>
|
||||
</header>
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:90dc5c0be029de84e523b9b3922520e79e0e6f08&dn=cc0.txt CC0
|
||||
document.addEventListener("DOMContentLoaded", function() {
|
||||
document.getElementsByClassName("active")[0].scrollIntoView({block: "center"})
|
||||
});
|
||||
// @license-end
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<main>
|
||||
<div class="container">
|
||||
<div id="sidebar">
|
||||
<nav>
|
||||
<div class="sidebar-close-button"><a href="javascript:void(0)" onclick="hideSidebar()">{% fas_icon "times-circle" %}</a></div>
|
||||
|
||||
<ul>
|
||||
{% for entry in collections.all | eleventyNavigation %}
|
||||
{% set active = entry.url == page.url or entry.key == eleventyNavigation.parent %}
|
||||
{% if (not entry.draft) or active %}
|
||||
<li class="nav-section{% if active %} active{% endif %}" style="display: flex;">
|
||||
<a class="section-link" href="{{ entry.url }}" style="flex: 1;">{% fas_icon entry.icon | default("caret-right") %} {{ entry.title }}</a>
|
||||
{% if entry.children.length > 0 %}
|
||||
<a class="section-collapse-button" data-collapse-id="nav-second-level-{{ entry.key }}" href="javascript:void(0)" onclick="onCollapseButtonClick(this)">
|
||||
{% if active %}{% fas_icon "minus-square" %}{% else %}{% fas_icon "plus-square" %}{% endif %}
|
||||
</a>
|
||||
{% else %}
|
||||
<a class="section-collapse-button"><!-- Intentionally left blank --></a>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% if entry.children.length > 0 %}
|
||||
<li class="nav-second-level collapsible" id="nav-second-level-{{ entry.key }}"{% if not active %} style="max-height: 0px;"{% endif %}>
|
||||
<ul>
|
||||
{% for child in entry.children %}
|
||||
{% set child_active = child.url == page.url %}
|
||||
{% if child_active or not child.draft %}
|
||||
<li><a href="{{ child.url }}"{% if child_active %} class="active"{% endif %}>{{ child.title }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<body data-set-preferred-mode-onload="true">
|
||||
{% include 'license.njk' %}
|
||||
<div class="page-wrapper with-sidebar with-navbar with-transitions" data-sidebar-type="overlayed-sm-and-down">
|
||||
<div class="sidebar-overlay" onclick="halfmoon.toggleSidebar()"></div>
|
||||
<nav class="navbar">
|
||||
<div class="navbar-content">
|
||||
<button class="btn btn-primary" type="button" onclick="halfmoon.toggleSidebar()">
|
||||
<i class="fa fa-bars" aria-hidden="true"></i>
|
||||
<span class="sr-only">Toggle sidebar</span>
|
||||
</button>
|
||||
</div>
|
||||
<!-- Navbar brand -->
|
||||
<a href="https://docs.codeberg.org" class="navbar-brand" title="Codeberg Docs">
|
||||
<img src="https://design.codeberg.org/logo-kit/icon_inverted.svg" height="22px" width="22px" alt="Codeberg"> Docs
|
||||
</a>
|
||||
<!-- Navbar nav -->
|
||||
<ul class="navbar-nav ml-auto d-none d-md-flex">
|
||||
<li class="nav-item">
|
||||
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" class="nav-link" target="_blank" rel="noreferrer">
|
||||
{% fas_icon "history" %} View History
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
<li class="nav-item">
|
||||
<a href="{{ urls.docsSourcesMaster }}/{{ page.inputPath }}" class="nav-link" target="_blank" rel="noreferrer">
|
||||
{% fas_icon "code" %} View Source
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="javascript:;" onclick="document.body.classList.toggle('dark-mode')" class="nav-link">
|
||||
{% fas_icon "moon" %} Toggle Dark Mode
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<!-- Navbar content (dropdown menu) -->
|
||||
<div class="navbar-content d-md-none ml-auto">
|
||||
<div class="dropdown with-arrow">
|
||||
<button class="btn" data-toggle="dropdown" type="button" id="navbar-dropdown-toggle-btn-1">
|
||||
Menu <i class="fa fa-angle-down" aria-hidden="true"></i>
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right w-200" aria-labelledby="navbar-dropdown-toggle-btn-1">
|
||||
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" class="dropdown-item" target="_blank" rel="noreferrer">
|
||||
{% fas_icon "history" %} View History
|
||||
</a>
|
||||
<a href="{{ urls.docsSourcesMaster }}/{{ page.inputPath }}" class="dropdown-item" target="_blank" rel="noreferrer">
|
||||
{% fas_icon "code" %} View Source
|
||||
</a>
|
||||
<a href="javascript:;" onclick="document.body.classList.toggle('dark-mode')" class="dropdown-item">
|
||||
{% fas_icon "moon" %} Toggle Dark Mode
|
||||
</a>
|
||||
<div class="dropdown-divider mt-5"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="sidebar">
|
||||
<div class="sidebar-menu">
|
||||
{# <!-- Sidebar content with the search box -->
|
||||
<div class="sidebar-content">
|
||||
<input type="text" class="form-control" placeholder="Filter Docs" id="search-input">
|
||||
<div class="mt-10 font-size-12">
|
||||
Press <kbd>/</kbd> to focus
|
||||
</div>
|
||||
</div> #}
|
||||
|
||||
{% for entry in collections.all | eleventyNavigation %}
|
||||
{% set active = entry.url == page.url or entry.key == eleventyNavigation.parent %}
|
||||
{% if (not entry.draft) or active %}
|
||||
<h5 class="sidebar-title {% if active %} active{% endif %}">
|
||||
<a href="{{ entry.url }}" id="{{ entry.key }}">{% fas_icon entry.icon | default("caret-right") %} {{ entry.title }}</a>
|
||||
</h5>
|
||||
<div class="sidebar-divider"></div>
|
||||
{% if entry.children.length > 0 %}
|
||||
{% for child in entry.children %}
|
||||
{% set child_active = child.url == page.url %}
|
||||
{% if child_active or not child.draft %}
|
||||
<a href="{{ child.url }}" class="sidebar-link{% if child_active %} active{% endif %}" id="{{ child.key }}">
|
||||
<span class="name">{{ child.title }}</span>
|
||||
</a>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<br>
|
||||
{%- endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="content-wrapper">
|
||||
<div class="container-lg">
|
||||
<div class="content">
|
||||
{% if eleventyNavigation.title %}
|
||||
<h1 class="content-title font-size-24">{{ eleventyNavigation.title }}</h1>
|
||||
{% endif %}
|
||||
{% if eleventyNavigation.draft %}
|
||||
<strong>Please note that this article is still a draft and might not have any contents yet.</strong>
|
||||
{% endif %}
|
||||
{{ content | safe }}
|
||||
<hr class="mb-20">
|
||||
{% if page.url != '/' %}
|
||||
{% include 'contribution_invitation.njk' %}
|
||||
{% endif %}
|
||||
<div class="font-size-16 text-right">
|
||||
<p>© Codeberg Docs Contributors. See <a href="#modal-1" role="button">LICENSE</a></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="flex-spacer"></div>
|
||||
|
||||
<article>
|
||||
{% if eleventyNavigation.title %}<h1>{{ eleventyNavigation.title }}</h1>{% endif %}
|
||||
{% if eleventyNavigation.draft %}<strong>Please note that this article is still a draft and might not have any contents yet.</strong>{% endif %}
|
||||
{{ content | safe }}
|
||||
{% if page.url != '/' %}{% include 'contribution_invitation.njk' %}{% endif %}
|
||||
</article>
|
||||
</div>
|
||||
|
||||
<div class="action-buttons" id="mobile-action-buttons">
|
||||
<!--<a href="#">{% fas_icon "globe-europe" %} English</a>-->
|
||||
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "history" %} View History</a>
|
||||
<a href="{{ urls.docsSourcesMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "code" %} View Source</a>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<footer>
|
||||
This Website by <a href="{{ urls.docsSourcesMaster }}/CONTRIBUTORS.md">The Codeberg Documentation Contributors</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC-BY-SA 4.0</a>.
|
||||
It bundles third-party font software licensed under a different license.
|
||||
Please look at <a href="{{ urls.docsSourcesMaster }}/LICENSE.md">the LICENSE file</a> for details.<br>
|
||||
|
||||
Changes to the original versions of the article as well as its individual authors can be looked up in <a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank">this article's commit history</a><br>
|
||||
|
||||
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.<br>
|
||||
|
||||
For Imprint, Privacy Policy and other legal notices, please refer to <a href="https://codeberg.org">https://codeberg.org</a>.
|
||||
</footer>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
25
content/_includes/license.njk
Normal file
25
content/_includes/license.njk
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
<div class="modal" id="modal-1" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<h5 class="modal-title">LICENSE</h5>
|
||||
<p>
|
||||
This Website by <a href="{{ urls.docsSourcesMaster }}/CONTRIBUTORS.md">The Codeberg Documentation Contributors</a>
|
||||
is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC-BY-SA 4.0</a>.
|
||||
</p>
|
||||
<p>
|
||||
It bundles third-party font software licensed under a different license.
|
||||
Please look at <a href="{{ urls.docsSourcesMaster }}/LICENSE.md">the LICENSE file</a> for details.
|
||||
</p>
|
||||
<p>
|
||||
Changes to the original versions of the article as well as its individual authors can be looked up in
|
||||
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank" rel="noreferrer">this article's commit history</a>
|
||||
</p>
|
||||
<p>
|
||||
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.
|
||||
</p>
|
||||
<div class="text-right mt-20">
|
||||
<a href="#" class="btn mr-5" role="button">Close</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -13,7 +13,7 @@ The owner is the one who created the repository, or, in case of an organization,
|
|||
|
||||
The table below gives an overview of what collaborators/teams are allowed to do when granted each of these permission levels:
|
||||
|
||||
<table>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th> Task </th>
|
||||
|
|
|
|||
|
|
@ -54,12 +54,11 @@ If you fixed an issue specific to Codeberg that should not go into the upstream
|
|||
> merge requests, i. e. they seem to include commits you haven't made.
|
||||
>
|
||||
> If you face this issue, you can `git rebase` your commits onto the
|
||||
> current Codeberg branch and force-push. Use
|
||||
> ```
|
||||
> current Codeberg branch and force-push.
|
||||
> ```shell
|
||||
> git rebase origin/codeberg
|
||||
> git push -f
|
||||
> ```
|
||||
> for example.
|
||||
|
||||
### Working on better deployment methods
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
#!/bin/bash -ex
|
||||
|
||||
npm run build
|
||||
|
||||
rm -rf pages.git
|
||||
git clone git@codeberg.org:docs/pages.git pages.git
|
||||
git clone $1 pages.git
|
||||
rsync -av _site/* pages.git/
|
||||
( cd pages.git && git checkout --orphan current ) ## create new branch at origin
|
||||
( cd pages.git && git add -A ) ## add all generated files
|
||||
|
|
|
|||
13
package-lock.json
generated
13
package-lock.json
generated
|
|
@ -5,6 +5,9 @@
|
|||
"packages": {
|
||||
"": {
|
||||
"name": "codeberg-docs",
|
||||
"dependencies": {
|
||||
"@toycode/markdown-it-class": "^1.2.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^0.12.1",
|
||||
"@11ty/eleventy-navigation": "^0.1.6",
|
||||
|
|
@ -157,6 +160,11 @@
|
|||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/@toycode/markdown-it-class": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@toycode/markdown-it-class/-/markdown-it-class-1.2.4.tgz",
|
||||
"integrity": "sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ=="
|
||||
},
|
||||
"node_modules/@types/minimatch": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||
|
|
@ -3959,6 +3967,11 @@
|
|||
"fastq": "^1.6.0"
|
||||
}
|
||||
},
|
||||
"@toycode/markdown-it-class": {
|
||||
"version": "1.2.4",
|
||||
"resolved": "https://registry.npmjs.org/@toycode/markdown-it-class/-/markdown-it-class-1.2.4.tgz",
|
||||
"integrity": "sha512-hA4gHBK8moObkOYdWTjhy1wYcYy0MJeM3JjSKbsXHRpRMvIKhk6Jm+t3bXsSScTdz/byWqQbs8YIwVYjHp+SlQ=="
|
||||
},
|
||||
"@types/minimatch": {
|
||||
"version": "3.0.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz",
|
||||
|
|
|
|||
|
|
@ -4,12 +4,14 @@
|
|||
"private": true,
|
||||
"scripts": {
|
||||
"build": "rm -rf _site/ && eleventy",
|
||||
"deploy": "./deploy.sh",
|
||||
"deploy": "./deploy.sh git@codeberg.org:docs/pages.git",
|
||||
"deploytest": "ELEVENTY_ENV=testing ./deploy.sh git@codeberg-test.org:docs/pages.git",
|
||||
"serve": "eleventy --serve"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@11ty/eleventy": "^0.12.1",
|
||||
"@11ty/eleventy-navigation": "^0.1.6",
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1"
|
||||
"@11ty/eleventy-plugin-syntaxhighlight": "^3.0.1",
|
||||
"@toycode/markdown-it-class": "^1.2.4"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue