Skip to content

Commit 9d23289

Browse files
committed
Style search
1 parent 936f256 commit 9d23289

File tree

3 files changed

+83
-8
lines changed

3 files changed

+83
-8
lines changed

static/assets/magnifying-glass.svg

Lines changed: 44 additions & 7 deletions
Loading

static/index.css

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,44 @@ header {
4242
margin-left: 1vw;
4343
}
4444

45+
.search {
46+
font-size: 2rem;
47+
position: relative;
48+
padding: 1rem;
49+
margin-left: -1rem;
50+
}
51+
52+
.search[open] {
53+
background: black;
54+
color: white;
55+
}
56+
.search[open] summary {
57+
content: "Close Search";
58+
}
59+
60+
.search form {
61+
position: absolute;
62+
top: 0;
63+
left: 100%;
64+
width: 100%;
65+
height: 4rem;
66+
}
67+
68+
.search input:nth-of-type(1) {
69+
border: 0;
70+
display: inline;
71+
width: 80%;
72+
height: 4rem;
73+
}
74+
75+
.search input:nth-of-type(2) {
76+
width: 15%;
77+
}
78+
79+
form {
80+
background: white;
81+
}
82+
4583
header ul li {
4684
margin-bottom: 1rem;
4785
max-width: 14vw;

templates/index.ejs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<li><a href="https://techcrunch.com/"><object data="assets/logo.svg" title="Tech Crunch logo" type="image/svg+xml"></object></a></li>
1919
<li><a href="https://oidc.techcrunch.com/login/?prompt=login&dest=https%3A%2F%2Ftechcrunch.com%2F">Login</a></li>
2020
<li>
21-
<details>
21+
<details class="search">
2222
<summary>Search</summary>
2323

2424
<form action="https://search.techcrunch.com/search">

0 commit comments

Comments
 (0)