Skip to content

Commit 8ad478a

Browse files
authored
[auto-verifier] docs commit 886c351
0 parents  commit 8ad478a

19 files changed

+467
-0
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source "https://rubygems.org"
2+
gem 'github-pages', group: :jekyll_plugins

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# cp-library

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
description: <small>This documentation is automatically generated by <a href="https://github.com/online-judge-tools/verification-helper">online-judge-tools/verification-helper</a></small>
2+
plugins:
3+
- jemoji
4+
- jekyll-redirect-from
5+
theme: jekyll-theme-minimal

_includes/document_body.html

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{% if page.data.dependsOn.size != 0 %}
2+
<h2>Depends on</h2>
3+
<ul>
4+
{% for item in page.data._extendedDependsOn %}
5+
<li><a href="{{ item.path | absolute_url }}">{{ item.icon }} {{ item.title }}
6+
{% if item.title != item.path %}<small>({{ item.path }})</small>{% endif %}
7+
</a></li>
8+
{% endfor %}
9+
</ul>
10+
{% endif %}
11+
12+
13+
{% if page.data.requiredBy.size != 0 %}
14+
<h2>Required by</h2>
15+
<ul>
16+
{% for item in page.data._extendedRequiredBy %}
17+
<li><a href="{{ item.path | absolute_url }}">{{ item.icon }} {{ item.title }}
18+
{% if item.title != item.path %}<small>({{ item.path }})</small>{% endif %}
19+
</a></li>
20+
{% endfor %}
21+
</ul>
22+
{% endif %}
23+
24+
25+
{% if page.data.verifiedWith.size != 0 %}
26+
<h2>Verified with</h2>
27+
<ul>
28+
{% for item in page.data._extendedVerifiedWith %}
29+
<li><a href="{{ item.path | absolute_url }}">{{ item.icon }} {{ item.title }}
30+
{% if item.title != item.path %}<small>({{ item.path }})</small>{% endif %}
31+
</a></li>
32+
{% endfor %}
33+
</ul>
34+
{% endif %}
35+
36+
37+
<h2>Code</h2>
38+
39+
<script defer type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
40+
<script defer src="https://cdn.jsdelivr.net/npm/[email protected]/jquery.balloon.min.js" integrity="sha256-ZEYs9VrgAeNuPvs15E39OsyOJaIkXEEt10fzxJ20+2I=" crossorigin="anonymous"></script>
41+
<script defer type="text/javascript" src="{{ "/assets/js/copy-button.js" | absolute_url }}"></script>
42+
<link rel="stylesheet" href="{{ "/assets/css/copy-button.css" | absolute_url }}">
43+
44+
<span><a id="unbundled"></a></span>
45+
{% include highlight.html extension=page.data._pathExtension content=page.data.code %}
46+
47+
<span><a id="bundled"></a></span>
48+
{% include highlight.html extension=page.data._pathExtension content=page.data.bundledCode %}

_includes/document_footer.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<a href="{{ "/" | absolute_url }}">Back to top page</a>

_includes/document_header.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<h1>{{ page.data._verificationStatusIcon }} {{ page.title }}
2+
{% if page.title != page.data.path %}<br><small>({{ page.data.path }})</small>{% endif %}
3+
</h1>
4+
5+
<ul>
6+
<li><a href="{{ site.github.repository_url }}/blob/master/{{ page.data.path }}">View this file on GitHub</a></li>
7+
<li>Last update: {{ page.data.timestamp }}</li>
8+
{% if page.data.attributes.PROBLEM %}
9+
<li>Problem: <a href="{{ page.data.attributes.PROBLEM }}">{{ page.data.attributes.PROBLEM }}</a></li>
10+
{% endif %}
11+
{% if page.data._pathExtension == "hpp" %}<li><a id="include-directive-anchor">Include: <code id="include-directive-code">#include "{{ page.data.path }}"</code></a></li>{% endif %}
12+
{% if page.data._isVerificationFailed %}<li>Link: <a href="{{ site.github.repository_url }}/actions">{{ page.data._verificationStatusIcon }} View error logs on GitHub Actions</a></li>{% endif %}
13+
{% for link in page.data.attributes.links %}
14+
{% if link != page.data.attributes.PROBLEM %}
15+
<li>Link: <a href="{{ link }}">{{ link }}</a></li>
16+
{% endif %}
17+
{% endfor %}
18+
</ul>
19+
20+
{% if page.data._pathExtension == "hpp" %}
21+
<script defer type="text/javascript">
22+
// make the include directive clickable
23+
(function() {
24+
const anchor = document.getElementById('include-directive-anchor');
25+
const code = document.getElementById('include-directive-code');
26+
anchor.addEventListener('click', function() {
27+
window.getSelection().selectAllChildren(code);
28+
document.execCommand("copy");
29+
window.getSelection().removeAllRanges();
30+
31+
const textContent = code.textContent;
32+
code.textContent = "Copied!";
33+
setTimeout(function() {
34+
code.textContent = textContent;
35+
}, 300);
36+
});
37+
})();
38+
</script>
39+
{% endif %}

_includes/highlight.html

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
{% comment %}
2+
This file is a workaround for Jekyll's `highlight` block.
3+
We cannot pass language to the `highlight` block as a parameter, so we need to list `if` blocks. Please feel free to add new languages.
4+
{% endcomment %}
5+
6+
{% if include.extension == "py" %}
7+
{% highlight python %}
8+
{{ include.content }}
9+
{% endhighlight %}
10+
11+
{% elsif include.extension == "rs" %}
12+
{% highlight rust %}
13+
{{ include.content }}
14+
{% endhighlight %}
15+
16+
{% elsif include.extension == "java" %}
17+
{% highlight java %}
18+
{{ include.content }}
19+
{% endhighlight %}
20+
21+
{% elsif include.extension == "cs" || include.extension == "csx" %}
22+
{% highlight csharp %}
23+
{{ include.content }}
24+
{% endhighlight %}
25+
26+
{% elsif include.extension == "fs" || include.extension == "fsx" %}
27+
{% highlight fsharp %}
28+
{{ include.content }}
29+
{% endhighlight %}
30+
31+
{% elsif include.extension == "go" %}
32+
{% highlight go %}
33+
{{ include.content }}
34+
{% endhighlight %}
35+
36+
{% elsif include.extension == "rb" %}
37+
{% highlight ruby %}
38+
{{ include.content }}
39+
{% endhighlight %}
40+
41+
{% elsif include.extension == "d" %}
42+
{% highlight csharp %}
43+
{{ include.content }}
44+
{% endhighlight %}
45+
46+
{% elsif include.extension == "nim" %}
47+
{% highlight nim %}
48+
{{ include.content }}
49+
{% endhighlight %}
50+
51+
{% elsif include.extension == "awk" %}
52+
{% highlight awk %}
53+
{{ include.content }}
54+
{% endhighlight %}
55+
56+
{% elsif include.extension == "bf" || include.extension == "brainfuck" %}
57+
{% highlight brainfuck %}
58+
{{ include.content }}
59+
{% endhighlight %}
60+
61+
{% else %}
62+
{% highlight cpp %}
63+
{{ include.content }}
64+
{% endhighlight %}
65+
66+
{% endif %}

_includes/mathjax.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<script type="text/javascript" async="" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-MML-AM_CHTML">
2+
</script>
3+
<script type="text/x-mathjax-config">
4+
MathJax.Hub.Config({
5+
TeX: { equationNumbers: { autoNumber: "AMS" }},
6+
tex2jax: {
7+
inlineMath: [ ['$','$'] ],
8+
processEscapes: true
9+
},
10+
"HTML-CSS": { matchFontHeight: false },
11+
displayAlign: "left",
12+
displayIndent: "2em"
13+
});
14+
</script>

_includes/theme_fix.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{% if site.theme == "jekyll-theme-minimal" %}
2+
<style type="text/css">
3+
@media screen and (min-width: 900px) {
4+
div.wrapper {
5+
width: 100%;
6+
}
7+
div.wrapper > header {
8+
width: 280px;
9+
}
10+
div.wrapper > section {
11+
width: calc(100% - 300px);
12+
}
13+
}
14+
a:hover, a:focus {
15+
font-weight: normal;
16+
text-decoration: underline;
17+
}
18+
h1 a:hover {
19+
font-weight: bold;
20+
}
21+
h1 a:focus {
22+
font-weight: bold;
23+
}
24+
</style>
25+
{% endif %}

_includes/toppage_body.html

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h2>Library Files</h2>
2+
3+
{% for category in page.data.libraryCategories %}
4+
<h3>{{ category.name }}</h3>
5+
<ul>
6+
{% for item in category.pages %}
7+
<li><a href="{{ item.path | absolute_url }}">{{ item.icon }} {{ item.title }}
8+
{% if item.title != item.path %}<small>({{ item.path }})</small>{% endif %}
9+
</a></li>
10+
{% endfor %}
11+
</ul>
12+
{% endfor %}
13+
14+
<h2>Verification Files</h2>
15+
16+
{% for category in page.data.verificationCategories %}
17+
<h3>{{ category.name }}</h3>
18+
<ul>
19+
{% for item in category.pages %}
20+
<li><a href="{{ item.path | absolute_url }}">{{ item.icon }} {{ item.title }}
21+
{% if item.title != item.path %}<small>({{ item.path }})</small>{% endif %}
22+
</a></li>
23+
{% endfor %}
24+
</ul>
25+
{% endfor %}

0 commit comments

Comments
 (0)