Skip to content

Commit

Permalink
add: UI design for Related Notes filter & sorter #15
Browse files Browse the repository at this point in the history
  • Loading branch information
SeptemberHX committed Oct 24, 2022
1 parent 5888a31 commit 99a5497
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/relatedNotes/panelHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,26 @@ var md = require('markdown-it')()
export function panelHtml(relatedEls: NoteElement[]) {
let result = [];
result.push(`<div class="related-notes-div">`);
result.push(`<div class="related-notes-option">`);
result.push(`<div class="related-notes-option-filter">
<input class="form-check-input" type="checkbox" id="left-check" name="Left" value="something" checked>
<label class="form-check-label"><i class="fas fa-arrow-left"></i></label>
<input class="form-check-input" type="checkbox" id="right-check" name="Right" value="something" checked>
<label class="form-check-label"><i class="fas fa-arrow-right"></i></label>
<input class="form-check-input" type="checkbox" id="bidirection-check" name="Left & Right" value="something" checked>
<label class="form-check-label"><i class="fas fa-arrows-alt-h"></i></label>
</div>
<div class="related-notes-option-sorter">
<select id="related-notes-sorter-selector" class="form-select form-select-sm" aria-label="Sorter Selector">;
<option value="Score">Score</option>
<option value="Alphabet">Alphabet</option>
<option value="LineNumber">LineNumber</option>
</select>
</div>
`);
result.push(`</div>`);
result.push('<ul class="list-group">');

for (const related of relatedEls) {
Expand Down
17 changes: 17 additions & 0 deletions src/scripts/relatedNotes/relatedNotes.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,23 @@ span.related-element-parent.badge.text-bg-light {
opacity: 0.5;
}

.related-notes-div .related-notes-option-filter {
display: inline;
margin: auto;
font-size: 1.1em;
}

.related-notes-div .related-notes-option {
display: grid;
grid-template-columns: auto auto;
justify-content: space-between;
padding: 0.25em 1em;
}

.related-notes-div .related-notes-option-filter label.form-check-label {
margin-right: 0.5em;
}

.related-element-body {
margin-left: 1em;
}
Expand Down

0 comments on commit 99a5497

Please sign in to comment.