From 5d6dd7eb69380dd45c72bc020cb5f06ef02df772 Mon Sep 17 00:00:00 2001 From: Raven Scott Date: Wed, 15 Jan 2025 01:10:25 -0500 Subject: [PATCH] first commit --- .gitignore | 2 ++ app.js | 18 ++++++++++++++ index.html | 61 ++++++++++++++++++++++++++++++++++++++++++++++ package.json | 29 ++++++++++++++++++++++ styles.css | 17 +++++++++++++ test/index.test.js | 1 + 6 files changed, 128 insertions(+) create mode 100644 .gitignore create mode 100644 app.js create mode 100644 index.html create mode 100644 package.json create mode 100644 styles.css create mode 100644 test/index.test.js diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a56a7ef --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +node_modules + diff --git a/app.js b/app.js new file mode 100644 index 0000000..734cad0 --- /dev/null +++ b/app.js @@ -0,0 +1,18 @@ +document.addEventListener('DOMContentLoaded', () => { + const infoModalBtn = document.getElementById('info-modal-btn'); + const alertModalBtn = document.getElementById('alert-modal-btn'); + + // Bootstrap Modal instances + const infoModal = new bootstrap.Modal(document.getElementById('infoModal')); + const alertModal = new bootstrap.Modal(document.getElementById('alertModal')); + + // Event listeners + infoModalBtn.addEventListener('click', () => { + infoModal.show(); + }); + + alertModalBtn.addEventListener('click', () => { + alertModal.show(); + }); + }); + \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..63e1961 --- /dev/null +++ b/index.html @@ -0,0 +1,61 @@ + + + + + + Hello World App + + + + + +
+ +
Hello World App
+
+
+

Hello, World! 👋

+

Welcome to your first Pear application using Bootstrap!

+ + +
+ + + + + + + + + + diff --git a/package.json b/package.json new file mode 100644 index 0000000..85c0580 --- /dev/null +++ b/package.json @@ -0,0 +1,29 @@ +{ + "name": "pear-bootstrap-template", + "main": "index.html", + "pear": { + "name": "pear-bootstrap-template", + "type": "desktop", + "gui": { + "backgroundColor": "#1F2430", + "height": "540", + "width": "720" + }, + "links": [ + "http://*", + "https://*", + "ws://*", + "wss://*" +] + }, + "type": "module", + "license": "Apache-2.0", + "scripts": { + "dev": "pear run -d .", + "test": "brittle test/*.test.js" + }, + "devDependencies": { + "brittle": "^3.0.0", + "pear-interface": "^1.0.0" + } +} \ No newline at end of file diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..11b37bb --- /dev/null +++ b/styles.css @@ -0,0 +1,17 @@ +body { + background-color: #f8f9fa; + font-family: 'Arial', sans-serif; + } + + #titlebar { + -webkit-app-region: drag; + } + + .container { + padding: 2rem 0; + } + + button { + margin: 0.5rem; + } + \ No newline at end of file diff --git a/test/index.test.js b/test/index.test.js new file mode 100644 index 0000000..d9b912d --- /dev/null +++ b/test/index.test.js @@ -0,0 +1 @@ +import test from 'brittle' // https://github.com/holepunchto/brittle