diff --git a/templates/error.tpl b/templates/error.tpl index abc8897..e5685fc 100644 --- a/templates/error.tpl +++ b/templates/error.tpl @@ -1,8 +1,8 @@ -{include file='inc/head.tpl'} -
-
+{extends file='page.tpl'} +{block name='main'} +
{include file="inc/logo.tpl"}

{t}An error occurred{/t}

{$error|escape|nl2br}

-
- {include file='inc/footer.tpl'} +
+{/block} diff --git a/templates/extractors.tpl b/templates/extractors.tpl index a1d1bce..24171ee 100644 --- a/templates/extractors.tpl +++ b/templates/extractors.tpl @@ -1,12 +1,12 @@ -{include file='inc/head.tpl'} -{include file='inc/header.tpl'} -{include file='inc/logo.tpl'} -

{t}Supported websites{/t}

-
- -
-{include file='inc/footer.tpl'} +{extends file='page.tpl'} +{block name='main'} + {include file='inc/logo.tpl'} +

{t}Supported websites{/t}

+
+ +
+{/block} diff --git a/templates/inc/footer.tpl b/templates/inc/footer.tpl index ed7092a..34fd553 100644 --- a/templates/inc/footer.tpl +++ b/templates/inc/footer.tpl @@ -1,4 +1,3 @@ - - -{if isset($debug_render)} - {$debug_render->render()} -{/if} - - diff --git a/templates/inc/head.tpl b/templates/inc/head.tpl index 4e5d68d..e5c9203 100644 --- a/templates/inc/head.tpl +++ b/templates/inc/head.tpl @@ -1,5 +1,3 @@ - - @@ -27,5 +25,3 @@ {$debug_render->renderHead()} {/if} - -
diff --git a/templates/inc/header.tpl b/templates/inc/header.tpl index af28104..c93f4d3 100644 --- a/templates/inc/header.tpl +++ b/templates/inc/header.tpl @@ -27,4 +27,3 @@
{/if} -
diff --git a/templates/inc/logo.tpl b/templates/inc/logo.tpl index b1da44f..a600013 100644 --- a/templates/inc/logo.tpl +++ b/templates/inc/logo.tpl @@ -1,5 +1,8 @@

- {$config->appName} -

+ + {$config->appName} + + + diff --git a/templates/index.tpl b/templates/index.tpl index b30b578..fab4b08 100644 --- a/templates/index.tpl +++ b/templates/index.tpl @@ -1,6 +1,5 @@ -{include file='inc/head.tpl'} -{include file='inc/header.tpl'} -
+{extends file='page.tpl'} +{block name='main'}
@@ -20,18 +19,23 @@ {if $config->convert}
- defaultAudio) ? 'checked' : ''}> + defaultAudio) ? 'checked' : ''}> - {if $config->convertSeek} -
- - -
+ {if $config->convertSeek} +
+ + +
{/if}
@@ -44,6 +48,4 @@ {t}Bookmarklet{/t}
- - -{include file='inc/footer.tpl'} +{/block} diff --git a/templates/info.tpl b/templates/info.tpl index 0acb1a2..fa881ac 100644 --- a/templates/info.tpl +++ b/templates/info.tpl @@ -1,108 +1,106 @@ -{include file="inc/head.tpl"} -
+{extends file='page.tpl'} +{block name='main'}
-
- {include file="inc/logo.tpl"} - {include file='snippets/title.tpl' assign=title} -

- {t params=['@title' => $title]}You are going to download @title.{/t} -

- {if isset($video->thumbnail)} - + {include file="inc/logo.tpl"} + {include file='snippets/title.tpl' assign=title} +

+ {t params=['@title' => $title]}You are going to download @title.{/t} +

+ {if isset($video->thumbnail)} + + {/if} + {if isset($video->description)} + + {/if} + {if isset($video->upload_date)} + + {/if} +
+ + + {if $config->uglyUrls} + {/if} - {if isset($video->description)} - - {/if} - {if isset($video->upload_date)} - - {/if} -
- - - {if $config->uglyUrls} - - {/if} - {if isset($video->formats) && count($video->formats) > 1} -

- + + {foreach $config->genericFormats as $format => $name} + {* + To make the default generic formats translatable: + {t}Best{/t} + {t}Remux best video with best audio{/t} + {t}Worst{/t} + *} + + {/foreach} + + + {foreach $video->formats as $format} + {if $config->stream || $format->protocol|in_array:array('http', 'https')} + {strip} + - {/strip} - {/if} - {/foreach} - - -
-
- {/if} - {if $config->stream} - stream !== 'ask'}checked{/if} name="stream" id="stream"/> - -
-
- {/if} - {if $config->convertAdvanced} - - - - {t}with{/t} - - - {t}kbit/s audio{/t} -
-
- {/if} -
- -
+ + +
+
+ {/if} + {if $config->stream} + stream !== 'ask'}checked{/if} name="stream" id="stream"/> + +
+
+ {/if} + {if $config->convertAdvanced} + + + + {t}with{/t} + + + {t}kbit/s audio{/t} +
+
+ {/if} +
+
- {include file="inc/footer.tpl"} +{/block} diff --git a/templates/page.tpl b/templates/page.tpl new file mode 100644 index 0000000..26823db --- /dev/null +++ b/templates/page.tpl @@ -0,0 +1,18 @@ + + +{include file='inc/head.tpl'} + +
+ {include file='inc/header.tpl'} +
+
+ {block name="main"}{/block} +
+
+ {include file='inc/footer.tpl'} +
+{if isset($debug_render)} + {$debug_render->render()} +{/if} + + diff --git a/templates/password.tpl b/templates/password.tpl index 62c0f4c..0945f54 100644 --- a/templates/password.tpl +++ b/templates/password.tpl @@ -1,14 +1,12 @@ -{include file='inc/head.tpl'} -
-
- {include file="inc/logo.tpl"} -

{t}This video is protected{/t}

-

{t}You need a password in order to download this video.{/t}

-
- - -

- -
-
- {include file='inc/footer.tpl'} +{extends file='page.tpl'} +{block name='main'} + {include file="inc/logo.tpl"} +

{t}This video is protected{/t}

+

{t}You need a password in order to download this video.{/t}

+
+ + +

+ +
+{/block} diff --git a/templates/playlist.tpl b/templates/playlist.tpl index a9ea037..5b28346 100644 --- a/templates/playlist.tpl +++ b/templates/playlist.tpl @@ -1,41 +1,40 @@ -{include file="inc/head.tpl"} -
-
- {include file="inc/logo.tpl"} +{extends file='page.tpl'} +{block name='main'} + {include file="inc/logo.tpl"} - {if isset($video->title)} - {include file='snippets/title.tpl' assign=title} -

- {t params=['@title'=>$title]}Videos extracted from @title:{/t} -

- {/if} + {if isset($video->title)} + {include file='snippets/title.tpl' assign=title} +

+ {t params=['@title'=>$title]}Videos extracted from @title:{/t} +

+ {/if} - {if $config->stream} - webpage_url}" class="downloadBtn">Download everything - {/if} - {foreach $video->entries as $entry} -
-

webpage_url}" class="downloadBtn">Download everything + {/if} + {foreach $video->entries as $entry} +
+

+ - {if !isset($entry->title)} - {if $entry->ie_key == YoutubePlaylist} - Playlist - {else} - Video - {/if} + {if !isset($entry->title)} + {if $entry->ie_key == YoutubePlaylist} + Playlist {else} - {$entry->title} + Video {/if} -

- url}">{t}Download{/t} - url}">{t}More options{/t} -
- {/foreach} - -

- {include file="inc/footer.tpl"} + {else} + {$entry->title} + {/if} + + + url}">{t}Download{/t} + url}">{t}More options{/t} +
+ {/foreach} +{/block}