-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add flexible formatting options for Audio and Quote display #2
base: master
Are you sure you want to change the base?
Conversation
@Majoramari Thank you for contributing. We can change the default behavior, but for the callout fix, a single extra space between them will suffice. Can you make this change so I can accept the PR? |
Could you clarify the exact location where I should add the extra space? |
Between the audio element and the Quote. above this line obsidian-noor/src/api/QuranApi.ts Line 44 in 19573af
|
In the commit 97f8bf7, I swapped the audio and quote, so now the audio comes after the quote to be more UX-friendly when there’s nothing above Refrence code: private async fetchQuran(surah: number, ayah: number) {
const [arabicResponse, translationResponse] = await Promise.all([
this.fetchData(surah, this.plugin.settings.reciter, ayah),
this.fetchData(surah, this.plugin.settings.translationOption, ayah)
]);
return `> [!Quote] ${this.getSurahTitle(arabicResponse)} - [[${arabicResponse.number}:${arabicResponse.ayahs![0].numberInSurah}](https://surahquran.com/english.php?sora=${arabicResponse.number}&aya=${arabicResponse.ayahs![0].numberInSurah})]
>
> ${arabicResponse.ayahs![0].text}${this.getTranslation(translationResponse)}
<audio src="${arabicResponse.ayahs![0].audio}" controls>
<p> Audio tag not supported </p>
</audio>
`;
} If you still want to add an empty line to get this result: I can add |
UX is subjective, I'd say it's better to be up. But it's fine, just make it configurable in settings and also increase the version to make it a valid release update. |
5966004
to
ec3b973
Compare
c9422d5
to
e5720dd
Compare
…o position - Added settings to let users choose whether the Quran quote appears above or below the audio element. - Enabled option to toggle an empty line between the Quran quote and the audio element. - Fixed previously broken callout formatting. - Updated version to 0.0.7
No description provided.