Skip to content

Commit c24bb80

Browse files
committed
Add windows 10 style folder icons
Also a couple of style tweaks ahead of demo
1 parent 7feac4f commit c24bb80

File tree

2 files changed

+17
-23
lines changed

2 files changed

+17
-23
lines changed

airlock/templates/file_browser/index.html

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{% extends "base.html" %}
22

33
{% load django_vite %}
4+
{% load static %}
45

56
{% block extra_styles %}
67
<style>
@@ -21,7 +22,7 @@
2122
cursor: pointer;
2223
}
2324

24-
summary:has(>a.selected), li:has(>a.selected) {
25+
.tree summary:has(>a.selected), .tree li:has(>a.selected) {
2526
background-color: lightblue;
2627
}
2728

@@ -30,36 +31,31 @@
3031
cursor: pointer;
3132
}
3233

33-
3434
.tree .filegroup {
3535
text-transform: uppercase;
3636
}
3737

38-
summary:has(>a.filegroup) {
38+
.tree summary:has(>a.filegroup) {
3939
background-color: lightgrey;
4040
}
4141

42-
summary {
43-
padding-left: 0.25rem;
44-
}
45-
46-
div.content {
47-
padding: 0.5rem;
42+
.tree a.dir {
43+
background-image: url("{% static "folder.png" %}");
44+
background-repeat: no-repeat;
45+
background-size: 1.4rem;
46+
background-position: left 0 top 0;
47+
padding-left: 1.3rem;
4848
}
49-
/* ths attempt at a nice selected highlight doesn't quite work
50-
.tree li {
51-
position: relative;
49+
.tree summary {
50+
padding-left: 0.25rem;
5251
}
5352

54-
&::before {
55-
background: rgba(0, 255, 0, 0.1);
56-
content: "";
57-
position: absolute;
58-
left: -100vw;
59-
height: 100%;
60-
width: 100vw;
53+
54+
.content {
55+
width:100%;
56+
max-width: 100%;
57+
overflow: scroll;
6158
}
62-
*/
6359

6460
</style>
6561
{% endblock extra_styles %}
@@ -173,7 +169,7 @@
173169
{% endif %}
174170
{% endfragment %}
175171

176-
{% #card title=path_item.name custom_button=add_button %}
172+
{% #card title=path_item.name container=True custom_button=add_button %}
177173

178174
<div class="content">
179175
{% if path_item.suffix == '.html' %}
@@ -186,9 +182,7 @@
186182
>
187183
</iframe>
188184
{% else %}
189-
{% #code %}
190185
<pre>{{ path_item.contents }}</pre>
191-
{% /code %}
192186
{% endif %}
193187
</div>
194188
{% /card %}

assets/static/folder.png

22.5 KB
Loading

0 commit comments

Comments
 (0)