Skip to content

Commit 52ed8c1

Browse files
committed
Add browse files link to sidebar
1 parent 19bc035 commit 52ed8c1

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

plugins/Sidebar/SidebarPlugin.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,15 @@ def sidebarRenderTransferStats(self, body, site):
169169
"""))
170170

171171
def sidebarRenderFileStats(self, body, site):
172+
site_address = site.content_manager.contents.get("content.json", {}).get("domain", site.address)
172173
body.append(_("""
173174
<li>
174175
<label>
175176
{_[Files]}
176-
<small class="label-right"><a href='#Site+directory' id='link-directory' class='link-right'>{_[Open site directory]}</a>
177-
<a href='/ZeroNet-Internal/Zip?address={site.address}' id='link-zip' class='link-right' download='site.zip'>{_[Save as .zip]}</a></small>
177+
<a href='/list/{site_address}' class='link-right link-outline'>{_[Browse files]}</a>
178+
<small class="label-right">
179+
<a href='/ZeroNet-Internal/Zip?address={site.address}' id='link-zip' class='link-right' download='site.zip'>{_[Save as .zip]}</a>
180+
</small>
178181
</label>
179182
<ul class='graph graph-stacked'>
180183
"""))

plugins/Sidebar/media/Sidebar.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,10 @@
1616
.sidebar .link-right { color: white; text-decoration: none; border-bottom: 1px solid #666; text-transform: uppercase; }
1717
.sidebar .link-right:hover { border-color: #CCC; }
1818
.sidebar .link-right:active { background-color: #444 }
19+
.sidebar .link-outline { outline: 1px solid #eee6; padding: 2px 13px; border-bottom: none; font-size: 80%; }
1920
/* SIDEBAR */
2021

21-
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; z-index: 2; }
22+
.sidebar-container { width: 100%; height: 100%; overflow: hidden; position: fixed; top: 0px; z-index: 2;}
2223
.sidebar { background-color: #212121; position: fixed; backface-visibility: hidden; right: -1200px; height: 100%; width: 1200px; } /*box-shadow: inset 0px 0px 10px #000*/
2324
.sidebar .content { margin: 30px; font-family: "Segoe UI Light", "Segoe UI", "Helvetica Neue"; color: white; width: 375px; height: 300px; font-weight: 200; transition: all 1s; opacity: 0 }
2425
.sidebar-container.loaded .content { opacity: 1; transform: none }

0 commit comments

Comments
 (0)