diff --git a/main.ts b/main.ts index 753faf3..a0cf162 100644 --- a/main.ts +++ b/main.ts @@ -303,8 +303,16 @@ class TimestampModal extends Modal { inputDiv.createEl('br'); //#region timezone - inputDiv.createEl('label', { text: 'Choose a timezone', cls: 'timestamp-label' }); - let timezone = inputDiv.createEl('select', { + const timezoneDiv = contentEl.createDiv() + timezoneDiv.addClass('timestamp-input-div') + + timezoneDiv.createEl('label', { + text: 'Choose a timezone', cls: 'timestamp-label', + attr: { + id: 'timezone-label' + } + }); + let timezone = timezoneDiv.createEl('select', { cls: 'timezone-options', attr: { id: 'timezone', @@ -340,7 +348,11 @@ class TimestampModal extends Modal { contentEl.createEl('h3', { text: 'Or', cls: 'timestamp-button-heading' }) const historyDiv = contentEl.createDiv(); historyDiv.addClass('timestamp-input-div') - historyDiv.createEl('label', { text: 'Choose from history', cls: 'timestamp-label' }) + historyDiv.createEl('label', { + text: 'Choose from history', cls: 'timestamp-label', attr: { + id: 'timestamp-history-label' + } + }) let history = historyDiv.createEl('select', { attr: { id: 'history', diff --git a/styles.css b/styles.css index 490a059..064df54 100644 --- a/styles.css +++ b/styles.css @@ -38,7 +38,12 @@ If your plugin does not need CSS, delete this file. text-align: center; } -.timezone-options { +body.is-mobile div.timestamp-input-div:has(>#timezone-label) { + margin-top: var(--size-4-2); +} + +.timezone-options, +body.is-mobile #history { margin-top: var(--size-4-2); }