aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBobby <[email protected]>2024-03-27 22:36:48 -0400
committerBobby <[email protected]>2024-03-27 22:36:48 -0400
commit6db0708d10192a24760035e12bb7eee8c2b4e2d7 (patch)
tree5f546437218095256df57f32aadf77c40c7de543 /templates
parent5c0b62ad493b629142f722b2f84c91071153350a (diff)
downloadthatcomputerscientist-6db0708d10192a24760035e12bb7eee8c2b4e2d7.tar.xz
thatcomputerscientist-6db0708d10192a24760035e12bb7eee8c2b4e2d7.zip
Update: View Text Files in Repos
Diffstat (limited to 'templates')
-rw-r--r--templates/dev_status/repo.html56
1 files changed, 55 insertions, 1 deletions
diff --git a/templates/dev_status/repo.html b/templates/dev_status/repo.html
index 59ca7b0d..b880517b 100644
--- a/templates/dev_status/repo.html
+++ b/templates/dev_status/repo.html
@@ -1,4 +1,13 @@
{% extends 'blog/partials/base.html' %} {% block content %} {% load static %}
+<style>
+ .highlight {
+ max-width: 680px;
+ }
+
+ table td.linenos {
+ padding: 0;
+ }
+</style>
<img
style="width: 730px; display: block; margin: 40px auto 20px auto"
src="https://socialify.thatcomputerscientist.com/luciferreeves/{{repo}}/png?font=KoHo&forks=1&issues=1&language=1&language2=1&pattern=Circuit%20Board&pulls=1&stargazers=1&theme=Dark"
@@ -59,4 +68,49 @@
{% endfor %}
</tbody>
</table>
-{% endif %} {% endblock %}
+{% endif %} {% if "byteSize" in files and not files.isBinary %}
+<div
+ style="
+ background: #272727a3;
+ border: 1px solid #434343;
+ border-radius: 8px 8px 2px 2px;
+ "
+>
+ <div
+ style="
+ background: #353535;
+ padding: 0px 10px;
+ border-radius: 8px 8px 0px 0px;
+ "
+ >
+ <h4 style="margin: 0">
+ Viewing
+ <a href="{% url 'dev_status:repo-path' repo files.path %}"
+ >{{ files.name }}</a
+ >
+ <pre style="display: inline-block; margin-left: 10px">
+{{ files.lines }} lines ({{ files.loc }} loc) • {{ files.size }}</pre
+ >
+ </h4>
+ </div>
+ {{files.text|safe}}
+</div>
+
+ {% comment %}
+ <p>
+ <span title="File" style="margin-right: 5px">
+ <img
+ src="{% static 'images/icons/notepad_file-2.png' %}"
+ alt="File"
+ style="display: inline-block; vertical-align: middle; height: 16px"
+ />
+ </span>
+ <a href="{% url 'dev_status:repo-path' repo files.path %}"
+ >{{ files.name }}</a
+ >
+ - {{ files.size }}
+ </p>
+
+ <pre>{{ files.text }}</pre>
+ {% endcomment %} {% endif %} {% endblock %}
+</div>