Skip to content

Commit

Permalink
#7 - unique css names
Browse files Browse the repository at this point in the history
  • Loading branch information
Talal-A committed Jan 21, 2025
1 parent 53eb13a commit 30a4d1c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class ImageSelectorModal extends Modal {
// Get the width of the viewport
const totalWidth = contentEl.innerWidth;

const row = contentEl.createDiv({cls: 'row'});
const leftImageDiv = row.createDiv({cls: 'column'});
const rightImageDiv = row.createDiv({cls: 'column'});
const row = contentEl.createDiv({cls: 'obsidian-immich-row'});
const leftImageDiv = row.createDiv({cls: 'obsidian-immich-column'});
const rightImageDiv = row.createDiv({cls: 'obsidian-immich-column'});
const left = leftImageDiv.createDiv();
const right = rightImageDiv.createDiv();
const leftBottom = leftImageDiv.createDiv();
Expand All @@ -115,7 +115,7 @@ class ImageSelectorModal extends Modal {
} else if (cachedResult.json['assets'][i]['type'] === "VIDEO") {
insertionText = '<video src="' + this.settings.immichUrl + '/api/assets/' + cachedResult.json['assets'][i]['id'] + '/video/playback?key=' + this.settings.immichAlbumKey + '"controls></video>\n';
}
const overallDiv = ( i & 1 ) ? right.createDiv({cls: 'overallDiv'}) : left.createDiv({cls: 'overallDiv'});
const overallDiv = ( i & 1 ) ? right.createDiv({cls: 'obsidian-immich-overallDiv'}) : left.createDiv({cls: 'obsidian-immich-overallDiv'});
const imgElement = overallDiv.createEl("img");
imgElement.src = thumbUrl;
imgElement.width = (totalWidth / 2) - 5;
Expand Down
6 changes: 3 additions & 3 deletions styles.css
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
.overallDiv {
.obsidian-immich-overallDiv {
position: relative;
}
.column {
.obsidian-immich-column {
float: left;
width: 50%;
}
/* Clear floats after the columns */
.row:after {
.obsidian-immich-row:after {
content: "";
display: table;
clear: both;
Expand Down

0 comments on commit 30a4d1c

Please sign in to comment.