diff --git a/README.md b/README.md
index 5c7c293..078faa8 100644
--- a/README.md
+++ b/README.md
@@ -54,10 +54,14 @@ Join our **Discord community** to get the latest development update info, share
5. Open your web browser and navigate to `http:/localhost:8080` to access the web interface.
-## Dependencies
+## Utilized projects
-This project utilizes the [librdsparser](https://github.com/kkonradpl/librdsparser) library for RDS parsing. Make sure to check out the library for more information.
-Pre-built version of this library is bundled with the webserver.
+This project utilizes these libraries:
+- [librdsparser](https://github.com/kkonradpl/librdsparser) library by Konrad Kosmatka for RDS parsing
+- [3LAS](https://github.com/jojobond/3LAS) library by JoJoBond for Low Latency Audio Streaming
+- [flat-flags](https://github.com/luishdez/flat-flags) library by luishdez for RDS country flags
+
+All of these libraries are already bundled with the webserver.
## Contributing
diff --git a/datahandler.js b/datahandler.js
index 858c9ca..1a23561 100644
--- a/datahandler.js
+++ b/datahandler.js
@@ -204,8 +204,8 @@ const clientUpdateIntervals = new Map(); // Store update intervals for each clie
// Initialize the data object
var dataToSend = {
pi: '?',
- freq: 87.500,
- previousFreq: 87.500,
+ freq: 87.500.toFixed(3),
+ previousFreq: 87.500.toFixed(3),
signal: 0,
st: false,
st_forced: false,
diff --git a/index.js b/index.js
index a6a2759..e2bcf3f 100644
--- a/index.js
+++ b/index.js
@@ -271,6 +271,48 @@ const authenticate = (req, res, next) => {
app.set('view engine', 'ejs'); // Set EJS as the template engine
app.set('views', path.join(__dirname, '/web'))
+function parseMarkdown(parsed) {
+ parsed = parsed.replace(/<\/?[^>]+(>|$)/g, '');
+
+ var grayTextRegex = /--(.*?)--/g;
+ parsed = parsed.replace(grayTextRegex, '$1');
+
+ var boldRegex = /\*\*(.*?)\*\*/g;
+ parsed = parsed.replace(boldRegex, '$1');
+
+ var italicRegex = /\*(.*?)\*/g;
+ parsed = parsed.replace(italicRegex, '$1');
+
+ var linkRegex = /\[([^\]]+)]\(([^)]+)\)/g;
+ parsed = parsed.replace(linkRegex, '$1');
+
+ var breakLineRegex = /\\n/g;
+ parsed = parsed.replace(breakLineRegex, '
');
+
+ return parsed;
+}
+
+function removeMarkdown(parsed) {
+ parsed = parsed.replace(/<\/?[^>]+(>|$)/g, '');
+
+ var grayTextRegex = /--(.*?)--/g;
+ parsed = parsed.replace(grayTextRegex, '$1');
+
+ var boldRegex = /\*\*(.*?)\*\*/g;
+ parsed = parsed.replace(boldRegex, '$1');
+
+ var italicRegex = /\*(.*?)\*/g;
+ parsed = parsed.replace(italicRegex, '$1');
+
+ var linkRegex = /\[([^\]]+)]\(([^)]+)\)/g;
+ parsed = parsed.replace(linkRegex, '$1');
+
+ var breakLineRegex = /\\n/g;
+ parsed = parsed.replace(breakLineRegex, '');
+
+ return parsed;
+}
+
app.get('/', (req, res) => {
if (!fs.existsSync(configName + '.json')) {
parseAudioDevice((result) => {
@@ -285,7 +327,8 @@ app.get('/', (req, res) => {
isAdminAuthenticated: req.session.isAdminAuthenticated,
isTuneAuthenticated: req.session.isTuneAuthenticated,
tunerName: serverConfig.identification.tunerName,
- tunerDesc: serverConfig.identification.tunerDesc,
+ tunerDesc: parseMarkdown(serverConfig.identification.tunerDesc),
+ tunerDescMeta: removeMarkdown(serverConfig.identification.tunerDesc),
tunerLock: serverConfig.lockToAdmin,
publicTuner: serverConfig.publicTuner
})
diff --git a/package.json b/package.json
index 01e004f..61d19a1 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "fm-dx-webserver",
- "version": "1.0.8",
+ "version": "1.0.9",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/web/css/breadcrumbs.css b/web/css/breadcrumbs.css
index bfbb35f..e7f0ab7 100644
--- a/web/css/breadcrumbs.css
+++ b/web/css/breadcrumbs.css
@@ -78,7 +78,7 @@ label {
#settings, #back-btn, #users-online-container {
background: transparent;
border: 0;
- color: white;
+ color: var(--color-text);
position: absolute;
top: 15px;
right: 15px;
@@ -189,7 +189,7 @@ label {
#data-pi {
font-size: 24px;
margin-top: 50px;
- color: #aaa;
+ color: var(--color-text-2)
}
h2.show-phone {
display: inline;
@@ -272,4 +272,12 @@ label {
margin-bottom: 10px;
font-size: 18px;
}
+
+ h2.mb-0 {
+ margin-bottom: 0;
+ margin-top: 2px !important;
+ }
+ #af-list ul {
+ max-height: 330px;
+ }
}
\ No newline at end of file
diff --git a/web/css/buttons.css b/web/css/buttons.css
index 4f573a9..ea34e92 100644
--- a/web/css/buttons.css
+++ b/web/css/buttons.css
@@ -25,7 +25,7 @@ input[type="text"], textarea, input[type="password"] {
box-sizing: border-box;
border: 2px solid transparent;
outline: 0;
- color: white;
+ color: var(--color-text);
background-color: var(--color-1);
font-family: 'Titillium Web', sans-serif;
}
@@ -38,7 +38,7 @@ input[type="text"], textarea, input[type="password"] {
box-sizing: border-box;
border: 2px solid transparent;
outline: 0;
- color: white;
+ color: var(--color-text);
background-color: var(--color-1);
font-family: 'Titillium Web', sans-serif;
}
@@ -112,10 +112,12 @@ input[type="range"]::-moz-range-thumb {
box-sizing: border-box;
height: 48px;
width: 48px;
- background-color: var(--color-4);
- border-radius: 0px 30px 30px 0px;
- border: 0;
- outline: none;
+ background: url('../images/speaker.svg') center no-repeat, var(--color-5);
+ background-position: center;
+ background-size: 20px;
+ border-radius: 30px;
+ outline: 4px solid var(--color-5);
+ outline-offset: -3px;
/* slider progress trick */
box-shadow: -420px 0 0 400px var(--color-4);
}
diff --git a/web/css/helpers.css b/web/css/helpers.css
index a159a7a..fe47ce9 100644
--- a/web/css/helpers.css
+++ b/web/css/helpers.css
@@ -99,10 +99,14 @@
font-weight: 300;
}
+.text-color-default {
+ color: var(--color-text);
+}
+
.text-medium {
font-size: 24px;
- color: #aaa;
font-weight: 300;
+ opacity: 0.6;
}
.text-medium-big {
diff --git a/web/css/main.css b/web/css/main.css
index 7dc33ad..ed56d6e 100644
--- a/web/css/main.css
+++ b/web/css/main.css
@@ -1,13 +1,16 @@
:root {
- --color-main: #111;
- --color-main-bright: #aaa;
+ --color-main: #000;
+ --color-main-bright: #ccc;
+ --color-text: white;
- --color-1: color-mix(in srgb, var(--color-main) 95%, var(--color-main-bright));
- --color-2: color-mix(in srgb, var(--color-main) 75%, var(--color-main-bright));
- --color-3: color-mix(in srgb, var(--color-main) 50%, var(--color-main-bright));
- --color-4: color-mix(in srgb, var(--color-main) 20%, var(--color-main-bright));
- --color-5: color-mix(in srgb, var(--color-main) 0%, var(--color-main-bright));
+ --color-1: color-mix(in srgb, var(--color-main) 95%, var(--color-main-bright)); /* 5% Brightness */
+ --color-2: color-mix(in srgb, var(--color-main) 75%, var(--color-main-bright)); /* 25% Brightness */
+ --color-3: color-mix(in srgb, var(--color-main) 50%, var(--color-main-bright)); /* 50% Brightness */
+ --color-4: color-mix(in srgb, var(--color-main) 20%, var(--color-main-bright)); /* 80% Brightness */
+ --color-5: color-mix(in srgb, var(--color-main) 5%, var(--color-main-bright)); /* 95% Brightness */
+
+ --color-text-2: #ccc;
}
* {
@@ -41,7 +44,7 @@
body {
font-family: 'Titillium Web', sans-serif;
- color: white;
+ color: var(--color-text);
background-color: var(--color-main);
transition: 0.3s ease-in-out background-color;
margin: 0 auto;
@@ -72,5 +75,9 @@ body {
a {
text-decoration: none;
- color: white;
+ color: var(--color-text-2);
+}
+
+a:hover {
+ border-bottom: 1px solid var(--color-4);
}
\ No newline at end of file
diff --git a/web/css/modal.css b/web/css/modal.css
index bf9f877..4c8cd8a 100644
--- a/web/css/modal.css
+++ b/web/css/modal.css
@@ -47,7 +47,7 @@
}
.close:hover {
- color: white;
+ color: var(--color-text);
}
.modal-content .button-close {
diff --git a/web/images/speaker.svg b/web/images/speaker.svg
new file mode 100644
index 0000000..cac52d1
--- /dev/null
+++ b/web/images/speaker.svg
@@ -0,0 +1,7 @@
+
+
\ No newline at end of file
diff --git a/web/index.ejs b/web/index.ejs
index 7b9ca58..b1674cd 100644
--- a/web/index.ejs
+++ b/web/index.ejs
@@ -12,7 +12,7 @@
-
+
@@ -53,7 +53,7 @@
<%= tunerDesc %>
+<%- tunerDesc %>
FM-DX WebServer
by Noobish & the OpenRadio community.
- librds & maps.fmdx.pl by Konrad Kosmatka
- 3LAS by JoJoBond
- flat-flags by luishdez
-
FM-DX WebServer
by Noobish, kkonradpl & the OpenRadio community.