Improved explainer UI

This commit is contained in:
Kieran Eglin 2024-03-02 11:57:03 -08:00
parent ce4497bc63
commit 7b3700801c
No known key found for this signature in database
GPG key ID: 193984967FCF432D
2 changed files with 12 additions and 5 deletions

View file

@ -30,7 +30,13 @@ defmodule PinchflatWeb.MediaProfiles.MediaProfileHTML do
end end
def custom_output_template_options do def custom_output_template_options do
~w(upload_day upload_month upload_year source_custom_name source_collection_type)a %{
upload_day: nil,
upload_month: nil,
upload_year: nil,
source_custom_name: "the name of the sources that use this profile",
source_collection_type: "the collection type of the sources that use this profile. Either 'channel' or 'playlist'"
}
end end
def common_output_template_options do def common_output_template_options do

View file

@ -46,8 +46,8 @@
</section> </section>
<h2 class="text-xl font-bold mb-2">Template Options</h2> <h2 class="text-xl font-bold mb-2">Template Options</h2>
<section class="ml-2 md:ml-4 mb-4 max-w-prose"> <section class="ml-2 md:ml-4 mb-4">
<p> <p class="max-w-prose">
Any single-word <code class="text-sm">yt-dlp</code> Any single-word <code class="text-sm">yt-dlp</code>
option option
<.inline_link href="https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#output-template"> <.inline_link href="https://github.com/yt-dlp/yt-dlp?tab=readme-ov-file#output-template">
@ -58,8 +58,9 @@
</p> </p>
<h3 class="text-lg font-bold mb-2">Custom Aliases</h3> <h3 class="text-lg font-bold mb-2">Custom Aliases</h3>
<ul class="list-disc list-inside ml-2 md:ml-5"> <ul class="list-disc list-inside ml-2 md:ml-5">
<li :for={opt <- custom_output_template_options()}> <li :for={{k, v} <- custom_output_template_options()}>
<.inline_code>{{ <%= opt %> }}</.inline_code> <.inline_code>{{ <%= k %> }}</.inline_code>
<span :if={v}>- <%= v %></span>
</li> </li>
</ul> </ul>
<h3 class="text-lg font-bold mb-2">Common Options</h3> <h3 class="text-lg font-bold mb-2">Common Options</h3>