add: css styling
This commit is contained in:
@@ -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'));
|
||||
});
|
||||
|
||||
@@ -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>
|
||||
</form>
|
||||
<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>
|
||||
@@ -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;
|
||||
}
|
||||
Reference in New Issue
Block a user