summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/partials.php18
-rw-r--r--public/index.php2
-rw-r--r--public/static/style.css5
3 files changed, 25 insertions, 0 deletions
diff --git a/lib/partials.php b/lib/partials.php
index 042e5a8..1498425 100644
--- a/lib/partials.php
+++ b/lib/partials.php
@@ -14,4 +14,22 @@ function html_big_navbar()
</div>
</section>
<?php ;
+}
+
+function html_footer()
+{
+ $files = glob(FILE_DIRECTORY . "/*.*");
+ $file_size = 0;
+
+ foreach ($files as $file) {
+ $file_size += filesize($file);
+ }
+
+ $file_size /= 1024 * 1024;
+
+ echo '' ?>
+ <footer class="column justify-center align-center gap-8">
+ <p>Serving <?= count($files) ?> files and <?= sprintf("%.2f", $file_size) ?>MB of active content</p>
+ </footer>
+ <?php ;
} \ No newline at end of file
diff --git a/public/index.php b/public/index.php
index 4a1267c..7d07c5b 100644
--- a/public/index.php
+++ b/public/index.php
@@ -42,6 +42,8 @@ include_once $_SERVER['DOCUMENT_ROOT'] . '/../lib/partials.php';
<div class="content grid grid-3 gap-8" id="uploaded-files">
</div>
</section>
+
+ <?php html_footer() ?>
</main>
</body>
diff --git a/public/static/style.css b/public/static/style.css
index 7671a92..69332ca 100644
--- a/public/static/style.css
+++ b/public/static/style.css
@@ -34,6 +34,11 @@ main {
gap: 8px;
}
+footer {
+ border-top: 1px solid var(--box-border);
+ padding-top: 4px;
+}
+
/** FORM */
button[type=submit] {
background: linear-gradient(0deg, var(--box-tab-background), var(--background));