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 rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Comfortaa&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css2?family=Comfortaa&display=swap" rel="stylesheet">
|
||||||
<title>~</title>
|
<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>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<img src="image.gif">
|
<img src="image.gif">
|
||||||
<h1>~/</h1>
|
<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">
|
<div class="bookmarks">
|
||||||
<h2>social</h2>
|
<h2>social</h2>
|
||||||
<li><a href="https://reddit.com">reddit</a></li>
|
<li><a href="https://reddit.com">reddit</a></li>
|
||||||
|
|
|
||||||
15
style.css
15
style.css
|
|
@ -21,7 +21,7 @@ img {
|
||||||
float: left;
|
float: left;
|
||||||
margin-left: 10%;
|
margin-left: 10%;
|
||||||
max-width: 30%;
|
max-width: 30%;
|
||||||
height: auto;
|
height: auto;
|
||||||
border-radius: 2%;
|
border-radius: 2%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -35,7 +35,18 @@ a {
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarks {
|
.bookmarks {
|
||||||
width: 20%;
|
width: 20%;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: 2em;
|
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