aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordan <[email protected]>2023-05-16 11:24:36 -0400
committerdan <[email protected]>2023-05-16 11:24:36 -0400
commitc3f8712140b84542eeec79b5a039bfdc3c327e68 (patch)
tree1953d789a4b31671ce83b9c0f27d90eb567e8f33
parent67895673ac3614003e6c3652892865f112d445b3 (diff)
downloadsimple-comments-widget-c3f8712140b84542eeec79b5a039bfdc3c327e68.tar.gz
simple-comments-widget-c3f8712140b84542eeec79b5a039bfdc3c327e68.tar.bz2
simple-comments-widget-c3f8712140b84542eeec79b5a039bfdc3c327e68.zip
feat: add demo page for github pages
-rw-r--r--client.html2
-rw-r--r--config.js12
-rw-r--r--index.html9
3 files changed, 20 insertions, 3 deletions
diff --git a/client.html b/client.html
index 68c6c90..328a38b 100644
--- a/client.html
+++ b/client.html
@@ -1,8 +1,6 @@
<!DOCTYPE html>
<html>
<head>
- <!-- usage demo -->
- <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="style.css">
</head>
<body>
diff --git a/config.js b/config.js
index 28e29eb..2290a3a 100644
--- a/config.js
+++ b/config.js
@@ -1,4 +1,14 @@
-const config = {
+// Default config
+var config = {
"base_url": "http://localhost:7060/comments",
"page_id": "add-page-id-here"
}
+
+
+// github pages config
+if (window.location.href === 'https://danielrholland.github.io/simple-comments-widget/client.html'){
+ config = {
+ base_url : 'https://comments.dotemgo.com/comments',
+ page_id : 'https://danielrholland.github.io/simple-comments-widget/client.html'
+ };
+}
diff --git a/index.html b/index.html
new file mode 100644
index 0000000..6fad70f
--- /dev/null
+++ b/index.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="stylesheet" href="style.css">
+ </head>
+ <h1> Comments Demo Page </h1>
+ <object width="100%" height="1000vh" type="text/html" data="client.html"></object>
+</html>