From 1f0b9012e386cb07715193814e5379bfc84bcdfc Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Fri, 19 Jan 2024 02:32:55 +0000 Subject: [PATCH] Use some w3.css in the core HTML. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4784 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- core/client.js | 16 ++-- core/core.js | 7 +- core/index.html | 15 ++-- core/w3.css | 235 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 257 insertions(+), 16 deletions(-) create mode 100644 core/w3.css diff --git a/core/client.js b/core/client.js index ef9e36cf..a511eab1 100644 --- a/core/client.js +++ b/core/client.js @@ -105,16 +105,17 @@ class TfNavigationElement extends LitElement { render_permissions() { if (this.show_permissions) { return html` +
This app has the following permissions:
${Object.keys(this.permissions).map(key => html`
${key}: ${this.permissions[key] ? '✅ Allowed' : '❌ Denied'} - +
`)} - +
`; @@ -286,11 +287,12 @@ class TfFilesPaneElement extends LitElement { html` self.set_expanded(false)} class="expander">«` : html` self.set_expanded(true)} class="expander">»`; let content = html` +
openFile(event.detail.file)}>
-
-
+
+
`; return html` @@ -707,6 +709,8 @@ function api_requestPermission(permission, id) { let check = document.createElement('input'); check.id = 'permissions_remember_check'; check.type = 'checkbox'; + check.classList.add('w3-check'); + check.classList.add('w3-blue'); div.appendChild(check); let label = document.createElement('label'); label.htmlFor = check.id; @@ -732,8 +736,8 @@ function api_requestPermission(permission, id) { div = document.createElement('div'); for (let option of k_options) { let button = document.createElement('button'); - button.style.minWidth = '3em'; - button.style.minHeight = '3em'; + button.classList.add('w3-button'); + button.classList.add('w3-blue'); button.innerText = option.text; button.id = option.id; button.onclick = function() { diff --git a/core/core.js b/core/core.js index 61516e90..88d95eb6 100644 --- a/core/core.js +++ b/core/core.js @@ -33,11 +33,12 @@ const k_magic_bytes = [ let k_static_files = [ {uri: '/', path: 'index.html', type: 'text/html; charset=UTF-8'}, - {uri: '/style.css', type: 'text/css; charset=UTF-8'}, - {uri: '/favicon.png', type: 'image/png'}, {uri: '/client.js', type: 'text/javascript; charset=UTF-8'}, - {uri: '/tfrpc.js', type: 'text/javascript; charset=UTF-8', headers: {'Access-Control-Allow-Origin': 'null'}}, + {uri: '/favicon.png', type: 'image/png'}, {uri: '/robots.txt', type: 'text/plain; charset=UTF-8'}, + {uri: '/style.css', type: 'text/css; charset=UTF-8'}, + {uri: '/tfrpc.js', type: 'text/javascript; charset=UTF-8', headers: {'Access-Control-Allow-Origin': 'null'}}, + {uri: '/w3.css', type: 'text/css; charset=UTF-8'}, ]; const k_global_settings = { diff --git a/core/index.html b/core/index.html index 2b02e72c..2560fd7f 100644 --- a/core/index.html +++ b/core/index.html @@ -3,6 +3,7 @@ Tilde Friends +