From 9cd55d3735194d570bc3cf5fb2c23b77aebcb11d Mon Sep 17 00:00:00 2001 From: odweta Date: Mon, 7 Sep 2026 17:24:53 +0200 Subject: [PATCH] add: css styling --- app/src/app.js | 3 +++ app/src/static/index.html | 17 ++++++------- app/src/static/style.css | 50 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+), 8 deletions(-) create mode 100644 app/src/static/style.css diff --git a/app/src/app.js b/app/src/app.js index bfb41b5..1fb34c8 100644 --- a/app/src/app.js +++ b/app/src/app.js @@ -5,6 +5,9 @@ const handleSearch = require('./search'); const app = express(); const port = 3000; +// specifying the folder with the static content - html+css +app.use(express.static(__dirname + '/static')); + app.get('/', (req, res) => { res.sendFile(path.join(__dirname, '/static/index.html')); }); diff --git a/app/src/static/index.html b/app/src/static/index.html index 3d9b2df..2c5b0d6 100644 --- a/app/src/static/index.html +++ b/app/src/static/index.html @@ -7,13 +7,14 @@ Searchthing -

search the web

-

get the search results and save them in a json file.

-
-

- search: - -

-
+
+

Search the web!

+

Get the search results and save them in a JSON file.

+
+ +
+ +
+
\ No newline at end of file diff --git a/app/src/static/style.css b/app/src/static/style.css new file mode 100644 index 0000000..38ff2e2 --- /dev/null +++ b/app/src/static/style.css @@ -0,0 +1,50 @@ +* { + box-sizing: border-box; +} + +html { + background-color: rgb(69, 70, 62); + color: rgb(218, 204, 85); +} + +#centerdiv { + max-width: fit-content; + margin: auto; + text-align: center; +} + +#title, +#subtitle, +#searchbutton { + font-family: Arial, Helvetica, sans-serif; +} + +#title { + font-style: italic; +} + +#searchform, +#searchbutton { + width: 100%; + padding: 0.5rem; + background-color: rgb(69, 70, 62); + color: #F2BB85; + border-color: #F2BB85; +} + +#searchform { + font-family: 'Courier New', Courier, monospace; + color: rgb(218, 204, 85); +} + +#searchbutton { + margin-top: 1rem; + font-size: large; + font-weight: bold; +} + +#searchbutton:hover, +#searchform:focus { + border-color: #FFDFBF; + outline-style: none; +} \ No newline at end of file