add: css styling
This commit is contained in:
@@ -5,6 +5,9 @@ const handleSearch = require('./search');
|
|||||||
const app = express();
|
const app = express();
|
||||||
const port = 3000;
|
const port = 3000;
|
||||||
|
|
||||||
|
// specifying the folder with the static content - html+css
|
||||||
|
app.use(express.static(__dirname + '/static'));
|
||||||
|
|
||||||
app.get('/', (req, res) => {
|
app.get('/', (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, '/static/index.html'));
|
res.sendFile(path.join(__dirname, '/static/index.html'));
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -7,13 +7,14 @@
|
|||||||
<title>Searchthing</title>
|
<title>Searchthing</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1 id="title">search the web</h1>
|
<div id="centerdiv">
|
||||||
<h3 id="subtitle">get the search results and save them in a json file.</h3>
|
<h1 id="title">Search the web!</h1>
|
||||||
<form id="searchform" action="/search" name="searchbox" method="GET">
|
<h3 id="subtitle">Get the search results and save them in a JSON file.</h3>
|
||||||
<p>
|
<form action="/search" name="searchbox" method="GET">
|
||||||
search: <input type="text" name="query"/>
|
<input id="searchform" placeholder="Type your query here..." type="text" name="query"/>
|
||||||
<input type="submit" value="submit"/>
|
<br>
|
||||||
</p>
|
<input id="searchbutton" type="submit" value="Search"/>
|
||||||
</form>
|
</form>
|
||||||
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</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