Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove unneeded bookmark name index. * Change bookmark search query to use post_search_data. This allows searching on topic title and post content * Tweak the style/layout of the bookmark list so the search looks better and the whole page fits better on mobile.
- Loading branch information
1 parent
ff7678e
commit 716ccf7
Showing
7 changed files
with
131 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
app/assets/stylesheets/common/components/bookmark-list-item.scss
This file was deleted.
Oops, something went wrong.
61 changes: 61 additions & 0 deletions
61
app/assets/stylesheets/common/components/bookmark-list.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
$mobile-breakpoint: 700px; | ||
|
||
.bookmark-list { | ||
th.post-metadata { | ||
text-align: center; | ||
} | ||
} | ||
|
||
.bookmark-search-form { | ||
margin-bottom: 1em; | ||
display: flex; | ||
|
||
input[type="text"] { | ||
flex: 1; | ||
margin-right: 1em; | ||
} | ||
|
||
@media (max-width: $mobile-breakpoint) { | ||
input[type="text"] { | ||
margin-bottom: 0; | ||
} | ||
} | ||
} | ||
|
||
.bookmark-list-item { | ||
td.post-metadata { | ||
text-align: center; | ||
} | ||
@media (max-width: $mobile-breakpoint) { | ||
.main-link { | ||
padding-left: 0.5em; | ||
padding-right: 0.5em; | ||
} | ||
} | ||
.bookmark-metadata { | ||
font-size: $font-down-2; | ||
display: flex; | ||
margin-bottom: 0.2em; | ||
|
||
&-item { | ||
margin-right: 0.5em; | ||
display: flex; | ||
align-items: center; | ||
} | ||
|
||
.d-icon { | ||
// not aligning center because of multi-line notes | ||
align-self: flex-start; | ||
margin-right: 0.2em; | ||
padding-top: 0.12em; | ||
} | ||
|
||
@media (max-width: $mobile-breakpoint) { | ||
flex-direction: column; | ||
&-item { | ||
display: block; | ||
margin-bottom: 0.2em; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
db/migrate/20200715030908_remove_unneccessary_bookmark_name_index.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# frozen_string_literal: true | ||
|
||
class RemoveUnneccessaryBookmarkNameIndex < ActiveRecord::Migration[6.0] | ||
def change | ||
remove_index :bookmarks, :name | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters