Datetime

[JavaScript] Custom Music Player

Koowoy
Background The audio tag from HTML provides a default music player, or more specifically the browser provides a controllable music player for audio tags. However, since this is powered by the browser, customizing the player to fit the style and need of the web page is impossible. Therefore the alternative is to create a custom music player that is connected to the original audio source. Code HTML <!-- hidden audio tag (with tachyon display-none class) --> <audio class="media-player dn" src="{{ post.

[Django] Template Tag/Filter (Loop/Datetime)

Koowoy
Make the First Element of a Django Template Loop Different from Others The method of adding and removing current class with JavaScript to give different styling and action needs an extra step with django. When elements are created with loops, adding current class to one of the elements will automatically copy them into all others, unless there is a way to set the first item of the loop. {% for post in posts_list %} {% if forloop.