Skip to content

Commit

Permalink
Miscellaneous design improvements (ordinals#1968)
Browse files Browse the repository at this point in the history
* blue text only on hover in navbar

* white text in navbar

* add missing semicolon in css

* change navbar background to black

* switch search button from text to symbol

* improve navbar submit element style
  • Loading branch information
raphjaph authored Mar 24, 2023
1 parent a4ee361 commit 0d54a53
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
1 change: 0 additions & 1 deletion src/index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,6 @@ impl Index {
.open_table(SATPOINT_TO_INSCRIPTION_ID)?,
outpoint,
)?
.into_iter()
.map(|(_satpoint, inscription_id)| inscription_id)
.collect(),
)
Expand Down
4 changes: 2 additions & 2 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ impl Server {
.get_inscription_by_id(inscription_id)?
.ok_or_not_found(|| format!("inscription {inscription_id}"))?;

return match inscription.media() {
match inscription.media() {
Media::Audio => Ok(PreviewAudioHtml { inscription_id }.into_response()),
Media::Iframe => Ok(
Self::content_response(inscription)
Expand Down Expand Up @@ -809,7 +809,7 @@ impl Server {
}
Media::Unknown => Ok(PreviewUnknownHtml.into_response()),
Media::Video => Ok(PreviewVideoHtml { inscription_id }.into_response()),
};
}
}

async fn inscription(
Expand Down
1 change: 0 additions & 1 deletion src/subcommand/wallet/transaction_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ impl TransactionBuilder {
version: 1,
lock_time: PackedLockTime::ZERO,
input: (0..inputs)
.into_iter()
.map(|_| TxIn {
previous_output: OutPoint::null(),
script_sig: Script::new(),
Expand Down
2 changes: 1 addition & 1 deletion src/templates.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ mod tests {
<a href=/rare.txt>rare.txt</a>
<form action=/search method=get>
<input type=text .*>
<input type=submit value=Search>
<input type=submit value='&#9906'>
</form>
</nav>
</header>
Expand Down
28 changes: 22 additions & 6 deletions static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
--dark-fg: #98a3ad;
--epic: darkorchid;
--legendary: gold;
--light-bg: #292c2f;
--light-fg: #a1adb8;
--light-bg: #000000;
--light-fg: #ffffff;
--link: #4169e1;
--mythic: #f2a900;
--rare: cornflowerblue;
Expand Down Expand Up @@ -48,10 +48,6 @@ a:hover {
text-decoration: underline;
}

a:visited {
color: var(--link);
}

dt {
font-weight: bold;
margin-top: 0.5rem;
Expand All @@ -70,6 +66,15 @@ nav > :first-child {
font-weight: bold;
}

nav a:hover {
color: var(--link);
text-decoration: none;
}

nav a {
color: var(--light-fg);
}

form {
display: flex;
flex-grow: 1;
Expand All @@ -87,6 +92,17 @@ input[type=text] {
min-width: 0;
}

input[type=submit] {
background: none;
border: none;
color: var(--light-fg);
cursor: pointer;
font-weight: bold;
font: inherit;
outline: inherit;
padding: 0;
}

dl {
overflow-wrap: break-word;
}
Expand Down
2 changes: 1 addition & 1 deletion templates/page.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
%% }
<form action=/search method=get>
<input type=text autocapitalize=off autocomplete=off autocorrect=off name=query spellcheck=false>
<input type=submit value=Search>
<input type=submit value='&#9906'>
</form>
</nav>
</header>
Expand Down

0 comments on commit 0d54a53

Please sign in to comment.