mirror of
https://github.com/9001/copyparty.git
synced 2025-08-18 09:22:31 -06:00
fix html links for items in vfs root
This commit is contained in:
parent
f7b19a04e1
commit
88701157d5
|
@ -597,7 +597,9 @@ class HttpCli(object):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
def tx_mounts(self):
|
def tx_mounts(self):
|
||||||
html = self.conn.tpl_mounts.render(this=self)
|
rvol = [x + "/" if x else x for x in self.rvol]
|
||||||
|
wvol = [x + "/" if x else x for x in self.wvol]
|
||||||
|
html = self.conn.tpl_mounts.render(this=self, rvol=rvol, wvol=wvol)
|
||||||
self.reply(html.encode("utf-8"))
|
self.reply(html.encode("utf-8"))
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
@ -610,6 +612,7 @@ class HttpCli(object):
|
||||||
def tx_browser(self):
|
def tx_browser(self):
|
||||||
vpath = ""
|
vpath = ""
|
||||||
vpnodes = [["", "/"]]
|
vpnodes = [["", "/"]]
|
||||||
|
if self.vpath:
|
||||||
for node in self.vpath.split("/"):
|
for node in self.vpath.split("/"):
|
||||||
if not vpath:
|
if not vpath:
|
||||||
vpath = node
|
vpath = node
|
||||||
|
@ -635,7 +638,7 @@ class HttpCli(object):
|
||||||
files = []
|
files = []
|
||||||
for fn in exclude_dotfiles(vfs_ls):
|
for fn in exclude_dotfiles(vfs_ls):
|
||||||
href = fn
|
href = fn
|
||||||
if self.absolute_urls:
|
if self.absolute_urls and vpath:
|
||||||
href = "/" + vpath + "/" + fn
|
href = "/" + vpath + "/" + fn
|
||||||
|
|
||||||
fspath = fsroot + "/" + fn
|
fspath = fsroot + "/" + fn
|
||||||
|
|
|
@ -32,7 +32,7 @@ body {
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
background: #4c4c4c;
|
background: #4c4c4c;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: .35em .5em .2em 1em;
|
padding: .35em .5em .2em .5em;
|
||||||
border-radius: 0 .3em .3em 0;
|
border-radius: 0 .3em .3em 0;
|
||||||
box-shadow: .1em .1em .4em #222;
|
box-shadow: .1em .1em .4em #222;
|
||||||
margin: 1em 0;
|
margin: 1em 0;
|
||||||
|
@ -104,8 +104,14 @@ a {
|
||||||
#path a {
|
#path a {
|
||||||
margin: 0 0 0 -.2em;
|
margin: 0 0 0 -.2em;
|
||||||
padding: 0 0 0 .4em;
|
padding: 0 0 0 .4em;
|
||||||
|
/* ie: */
|
||||||
|
border-bottom: .1em solid #777\9;
|
||||||
|
margin-right: 1em\9;
|
||||||
}
|
}
|
||||||
#path a:after {
|
#path a:first-child {
|
||||||
|
padding-left: .8em;
|
||||||
|
}
|
||||||
|
#path a:not(:last-child):after {
|
||||||
content: '';
|
content: '';
|
||||||
width: 1.05em;
|
width: 1.05em;
|
||||||
height: 1.05em;
|
height: 1.05em;
|
||||||
|
@ -120,9 +126,6 @@ a {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0));
|
background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0,0,0,0.2), rgba(0,0,0,0));
|
||||||
}
|
}
|
||||||
#path span {
|
|
||||||
padding-left: .2em;
|
|
||||||
}
|
|
||||||
.logue {
|
.logue {
|
||||||
padding: .2em 1.5em;
|
padding: .2em 1.5em;
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,9 @@
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
<h1 id="path">
|
<h1 id="path">
|
||||||
{%- for n in vpnodes[:-1] %}
|
{%- for n in vpnodes %}
|
||||||
<a href="/{{ n[0] }}">{{ n[1] }}</a>
|
<a href="/{{ n[0] }}">{{ n[1] }}</a>
|
||||||
{%- endfor %}
|
{%- endfor %}
|
||||||
<span>{{ vpnodes[-1][1] }}</span>
|
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
{%- if prologue %}
|
{%- if prologue %}
|
||||||
|
|
|
@ -20,7 +20,8 @@ li {
|
||||||
a {
|
a {
|
||||||
color: #047;
|
color: #047;
|
||||||
background: #fff;
|
background: #fff;
|
||||||
|
text-decoration: none;
|
||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
border-radius: .2em;
|
border-radius: .2em;
|
||||||
padding: .2em .5em;
|
padding: .2em .8em;
|
||||||
}
|
}
|
|
@ -15,15 +15,15 @@
|
||||||
|
|
||||||
<h1>you can browse these:</h1>
|
<h1>you can browse these:</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for mp in this.rvol %}
|
{% for mp in rvol %}
|
||||||
<li><a href="/{{ mp }}/">/{{ mp }}/</a></li>
|
<li><a href="/{{ mp }}">/{{ mp }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h1>you can upload to:</h1>
|
<h1>you can upload to:</h1>
|
||||||
<ul>
|
<ul>
|
||||||
{% for mp in this.wvol %}
|
{% for mp in wvol %}
|
||||||
<li><a href="/{{ mp }}/">/{{ mp }}/</a></li>
|
<li><a href="/{{ mp }}">/{{ mp }}</a></li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue