Skip to content

Commit

Permalink
Improved filter display on mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
TomNCatz committed Sep 7, 2023
1 parent 436ee3e commit dd3da2e
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "obsidian-gallery-tagged",
"name": "Tagged Gallery",
"version": "0.7.0",
"version": "0.7.1",
"minAppVersion": "1.3.0",
"description": "Main Gallery to tag / filter / add notes to images. Display blocks to embed images inside notes. Display block to an image information",
"author": "Tom",
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions src/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,17 @@ export class GalleryView extends ItemView
});

// Filter Exclusive or inclusive
const exclusiveFilterEl = this.filterEl.createEl('input', {
cls: 'ob-gallery-filter-input',
const exclusiveFilterDiv = this.filterEl.createDiv({
cls: 'ob-gallery-filter-input'
})
const exclusiveFilterEl = exclusiveFilterDiv.createEl('input', {
cls: 'ob-gallery-filter-checkbox-input',
type: 'checkbox'
})
exclusiveFilterEl.name = 'exclusive'
exclusiveFilterEl.id = 'exclusive'

const exclusiveFilterLabelEl = this.filterEl.createEl('label');
const exclusiveFilterLabelEl = exclusiveFilterDiv.createEl('label');
exclusiveFilterLabelEl.textContent = "Exclusive";
exclusiveFilterLabelEl.htmlFor = "exclusive"
exclusiveFilterLabelEl.style.paddingLeft = "20px"
Expand All @@ -137,14 +140,17 @@ export class GalleryView extends ItemView
});

// Should display order be reversed
const sortReverseEl = this.filterEl.createEl('input', {
cls: 'ob-gallery-filter-input',
const sortReverseDiv = this.filterEl.createDiv({
cls: 'ob-gallery-filter-input'
})
const sortReverseEl = sortReverseDiv.createEl('input', {
cls: 'ob-gallery-filter-checkbox-input',
type: 'checkbox'
})
sortReverseEl.name = 'sortReverse'
sortReverseEl.id = 'sortReverse'

const sortReverseLabelEl = this.filterEl.createEl('label');
const sortReverseLabelEl = sortReverseDiv.createEl('label');
sortReverseLabelEl.textContent = "Reverse Sort";
sortReverseLabelEl.htmlFor = "sortReverse"
sortReverseLabelEl.style.paddingLeft = "20px"
Expand Down
9 changes: 7 additions & 2 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}

.ob-gallery-filter {
height: 70px;
height: 100px;
width: 100%;
position: relative;
border: none;
Expand All @@ -25,11 +25,16 @@
padding: 20px;
}

.ob-gallery-filter-checkbox-input{

}

.ob-gallery-filter-input {
width: 20%;
width: 23% !important;
left: 20px;
position: static;
margin-right: 20px;
display: inline-block;
}

.ob-gallery-image-focus {
Expand Down

0 comments on commit dd3da2e

Please sign in to comment.