diff --git a/README.md b/README.md index 2bb90e9..1dd2e41 100644 --- a/README.md +++ b/README.md @@ -33,4 +33,11 @@ This project is licensed under the MIT License. See the `LICENSE` file for more - animate.css - A cross-browser library of CSS animations. [animate.css GitHub](https://github.com/animate-css/animate.css) - NeutralinoJS - The lightweight and portable framework used to build this application. [NeutralinoJS GitHub](https://github.com/neutralinojs/neutralinojs) - Bootstrap icons - Used for the icons in the application. [Bootstrap icons GitHub](https://github.com/twbs/icons) -- DALL-E3 by OpenAI - Used for generating all visible images/graphics. [DALL-E3 GitHub](https://github.com/openai/DALL-E) \ No newline at end of file +- DALL-E3 by OpenAI - Used for generating all visible images/graphics. [DALL-E3 GitHub](https://github.com/openai/DALL-E) + +### Dev notes + +Init dev env +1. run `neu update` +2. run `neu build` +3. run `neu run` \ No newline at end of file diff --git a/src/icons/lineconv.webp b/src/icons/lineconv.webp new file mode 100644 index 0000000..e80b673 Binary files /dev/null and b/src/icons/lineconv.webp differ diff --git a/src/views/home/home.html b/src/views/home/home.html index 09bfba8..431233a 100644 --- a/src/views/home/home.html +++ b/src/views/home/home.html @@ -34,6 +34,17 @@ +
+
+
+ App 1 +
+
Multiline to single line
+

Convert multiline text to singleline

+
+
+
+
diff --git a/src/views/home/home.js b/src/views/home/home.js index c3748b9..09135c1 100644 --- a/src/views/home/home.js +++ b/src/views/home/home.js @@ -16,6 +16,10 @@ function init(){ console.log("About button clicked"); loadView("about"); }); + $("#home-btn-sl").click(function(){ + console.log("Singleline converter button clicked"); + loadView("slconv"); + }); $("#exit-btn").click(function(){ console.log("Quit button clicked"); quit(); diff --git a/src/views/slconv/slconv.css b/src/views/slconv/slconv.css new file mode 100644 index 0000000..e69de29 diff --git a/src/views/slconv/slconv.html b/src/views/slconv/slconv.html new file mode 100644 index 0000000..4f0120d --- /dev/null +++ b/src/views/slconv/slconv.html @@ -0,0 +1,33 @@ +
+
+
+
+ +
+
+
+

Singleline Converter

+

Enter your text, convert, done

+ +

Input:

+ + +
+

Output:

+ +
+
+
+
+
+
diff --git a/src/views/slconv/slconv.js b/src/views/slconv/slconv.js new file mode 100644 index 0000000..0bc5481 --- /dev/null +++ b/src/views/slconv/slconv.js @@ -0,0 +1,20 @@ +(function () { + $(document).ready(function () { + console.log("Initialization of slconv.js finished."); + $("#slconv-btn-convert").click(function () { + console.log("Convert button clicked"); + convert(); + }); + }); + + async function convert() { + console.log("Converting..."); + const inputText = $("#input-textarea").val(); + console.log(inputText) + const outputText = inputText.replace(/\n/g, ' '); + console.log(outputText); + $("#output-textarea").val(outputText); + $("#output-container-div").removeClass("visually-hidden"); + await Neutralino.clipboard.writeText(outputText); + } +})(); \ No newline at end of file