Browse Source

Show default text when no entry is selected

2xB 2 years ago
parent
commit
6e1de5a76b
1 changed files with 27 additions and 0 deletions
  1. 27 0
      viewer/archive/archiveviewer.js

+ 27 - 0
viewer/archive/archiveviewer.js

@@ -55,6 +55,33 @@ class ArchiveView {
         this.page_path = page_path
         
         this.index = index
+        
+        const blobContent = new Blob([`
+        <!doctype html><html><head>
+        <style>
+        body {
+            min-height: 100vh;
+            display: flex;
+            align-items: center;
+            justify-content: space-around;
+        }
+        
+        h1,h2 {
+            display: flex;
+            align-items: center;
+            justify-content: center;
+        }
+        </style>
+        </head>
+            <body style="background:#aaa; color:#fff;">
+                <div>
+                    <h1>Welcome to the archive viewer!</h1>
+                    <h2>Select a date and version to start!</h2>
+                </div>
+            </body>
+        </html>
+        `], {type: "text/html"})
+        this.content.src = URL.createObjectURL(blobContent)
     }
     
     add_commits(commits) {