8000 Frontend style tweaks by benhalpern · Pull Request #20964 · forem/forem · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Frontend style tweaks #20964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/assets/stylesheets/components/header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@
}
}

.main-search-page {
.crayons-textfield {
padding-left: 40px;
}
}

.crayons-header--search-typeahead {
border: 1px solid var(--base-20);
border-radius: var(--radius);
Expand Down
2 changes: 1 addition & 1 deletion app/assets/stylesheets/config/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// by specific value... And that's the value.

--header-height: 56px;
--site-width: 1280px;
--site-width: 1320px;

////////////////////////////////////////////////////////////////////////////////////
// Spacing Units. //////////////////////////////////////////////////////////////////
Expand Down
7 changes: 4 additions & 3 deletions app/javascript/Search/SearchForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@
return () => {
document.removeEventListener('mousedown', handleClickOutside);
};
}, []);

Check warning on line 88 in app/javascript/Search/SearchForm.jsx

View workflow job for this annotation

GitHub Actions / audit

React Hook useEffect has a missing dependency: 'handleClickOutside'. Either include it or remove the dependency array

return (
<form
Expand Down Expand Up @@ -113,9 +113,10 @@
value={inputValue}
>
=> {
document
.getElementById('search-typeahead')
.classList.remove('hidden');
const typeahead = document.getElementById('search-typeahead');
if (typeahead) {
typeahead.classList.remove('hidden');
}
setShowSuggestions(true);
}}
>
Expand Down
6 changes: 3 additions & 3 deletions app/views/stories/articles_search/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<% end %>
<div id="query-wrapper"></div>

<main id="main-content">
<main id="main-content" class="main-search-page">
<div id="index-container"
class="crayons-layout crayons-layout--header-inside crayons-layout--limited-l crayons-layout--2-cols"
data-params="<%= params.to_json(only: %i[tag username q]) %>" data-which="<%= @list_of %>"
Expand All @@ -15,8 +15,8 @@
<form accept-charset="UTF-8" method="get" action="/search" role="search">
<div class="crayons-fields crayons-fields--horizontal">
<div class="crayons-field flex-1 relative">
<input class="crayons-textfield" type="text" name="q" placeholder="<%= t("views.search.placeholder") %>" autocomplete="on" />
<button type="submit" aria-label="Search" class="crayons-btn crayons-btn--ghost crayons-btn--s crayons-btn--icon-rounded absolute right-2 bottom-0 top-0 m-1">
<input class="crayons-textfield landing-search-input" type="text" name="q" placeholder="<%= t("views.search.placeholder") %>" autocomplete="on" />
<button type="submit" aria-label="Search" class="c-btn c-btn--icon-alone absolute inset-px right-auto mt-0 py-0">
<%= crayons_icon_tag(:search, aria_hidden: true, title: t("views.search.icon.title")) %>
</button>
</div>
Expand Do 43BA wn
Loading
0