add: css styling

This commit is contained in:
odweta
2026-09-07 17:24:53 +02:00
parent 480c0f753f
commit 9cd55d3735
3 changed files with 62 additions and 8 deletions
+3
View File
@@ -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'));
});
+8 -7
View File
@@ -7,13 +7,14 @@
<title>Searchthing</title>
</head>
<body>
<h1 id="title">search the web</h1>
<h3 id="subtitle">get the search results and save them in a json file.</h3>
<form id="searchform" action="/search" name="searchbox" method="GET">
<p>
search: <input type="text" name="query"/>
<input type="submit" value="submit"/>
</p>
<div id="centerdiv">
<h1 id="title">Search the web!</h1>
<h3 id="subtitle">Get the search results and save them in a JSON file.</h3>
<form action="/search" name="searchbox" method="GET">
<input id="searchform" placeholder="Type your query here..." type="text" name="query"/>
<br>
<input id="searchbutton" type="submit" value="Search"/>
</form>
</div>
</body>
</html>
+50
View File
@@ -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;
}