add ddg search
This commit is contained in:
parent
8ed15bda39
commit
17004bbb9e
2 changed files with 29 additions and 4 deletions
16
index.html
16
index.html
|
|
@ -9,11 +9,25 @@
|
|||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Comfortaa&display=swap" rel="stylesheet">
|
||||
<title>~</title>
|
||||
<script>
|
||||
function ddgSearch(event) {
|
||||
event.preventDefault()
|
||||
value = document.querySelector(".search-input").value
|
||||
if (value != null){
|
||||
window.location.assign(`https://duckduckgo.com/?q=${document.querySelector(".search-input").value}`);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<img src="image.gif">
|
||||
<h1>~/</h1>
|
||||
<div class="bookmark-conatiner">
|
||||
<form onsubmit="ddgSearch(event)">
|
||||
<input class="search-input" placeholder="ddg search" autofocus></input>
|
||||
<input type="submit" hidden/>
|
||||
</form>
|
||||
|
||||
<div class="bookmark-container">
|
||||
<div class="bookmarks">
|
||||
<h2>social</h2>
|
||||
<li><a href="https://reddit.com">reddit</a></li>
|
||||
|
|
|
|||
11
style.css
11
style.css
|
|
@ -39,3 +39,14 @@ a {
|
|||
display: inline-block;
|
||||
padding: 2em;
|
||||
}
|
||||
|
||||
.search-input {
|
||||
|
||||
background-color: transparent;
|
||||
font-family: 'Comfortaa', cursive;
|
||||
text-align: center;
|
||||
color: cyan;
|
||||
border: 0px;
|
||||
border-bottom: 1px solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue