mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-26 10:11:30 +00:00
Removed duplication across two mustache templates
Deduplicated the mustache templates static/templates/catalog_v2_entries.xml and static/templates/catalog_v2_complete_entry.xml (the latter was renamed to static/templates/catalog_v2_entry.xml).
This commit is contained in:
@ -45,7 +45,7 @@ templates/captured_external.html
|
||||
templates/catalog_entries.xml
|
||||
templates/catalog_v2_root.xml
|
||||
templates/catalog_v2_entries.xml
|
||||
templates/catalog_v2_complete_entry.xml
|
||||
templates/catalog_v2_entry.xml
|
||||
templates/catalog_v2_categories.xml
|
||||
templates/catalog_v2_languages.xml
|
||||
opensearchdescription.xml
|
||||
|
@ -9,34 +9,4 @@
|
||||
{{/filter}}
|
||||
<link rel="self" href="" type="application/atom+xml" />
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="{{root}}/catalog/searchdescription.xml" />
|
||||
{{#books}}
|
||||
<entry>
|
||||
<id>urn:uuid:{{id}}</id>
|
||||
<title>{{title}}</title>
|
||||
<updated>{{updated}}</updated>
|
||||
<summary>{{description}}</summary>
|
||||
<language>{{language}}</language>
|
||||
<name>{{name}}</name>
|
||||
<flavour>{{flavour}}</flavour>
|
||||
<category>{{category}}</category>
|
||||
<tags>{{tags}}</tags>
|
||||
<articleCount>{{article_count}}</articleCount>
|
||||
<mediaCount>{{media_count}}</mediaCount>
|
||||
{{#icons}}
|
||||
<link rel="http://opds-spec.org/image/thumbnail"
|
||||
href="/meta?name=Illustration_{{icon_width}}x{{icon_height}}@{{icon_scale}}&content={{{content_id}}}"
|
||||
type="image/png;width={{icon_width}};height={{icon_height}};scale={{icon_scale}}"/>
|
||||
{{/icons}}
|
||||
<link type="text/html" href="/{{{content_id}}}" />
|
||||
<author>
|
||||
<name>{{author_name}}</name>
|
||||
</author>
|
||||
<publisher>
|
||||
<name>{{publisher_name}}</name>
|
||||
</publisher>
|
||||
{{#url}}
|
||||
<link rel="http://opds-spec.org/acquisition/open-access" type="application/x-zim" href="{{{url}}}" length="{{{size}}}" />
|
||||
{{/url}}
|
||||
</entry>
|
||||
{{/books}}
|
||||
</feed>
|
||||
{{#books}}{{{entry}}}{{/books}}</feed>
|
||||
|
@ -21,39 +21,4 @@
|
||||
<startIndex>{{startIndex}}</startIndex>
|
||||
<itemsPerPage>{{itemsPerPage}}</itemsPerPage>
|
||||
{{/filter}}
|
||||
{{#books}}
|
||||
<entry>
|
||||
<id>urn:uuid:{{id}}</id>
|
||||
<title>{{title}}</title>
|
||||
<updated>{{updated}}</updated>
|
||||
{{#dump_partial_entries}}
|
||||
<link rel="alternate"
|
||||
href="{{endpoint_root}}/entry/{{{id}}}"
|
||||
type="application/atom+xml;type=entry;profile=opds-catalog"/>
|
||||
{{/dump_partial_entries}}{{^dump_partial_entries}} <summary>{{description}}</summary>
|
||||
<language>{{language}}</language>
|
||||
<name>{{name}}</name>
|
||||
<flavour>{{flavour}}</flavour>
|
||||
<category>{{category}}</category>
|
||||
<tags>{{tags}}</tags>
|
||||
<articleCount>{{article_count}}</articleCount>
|
||||
<mediaCount>{{media_count}}</mediaCount>
|
||||
{{#icons}}
|
||||
<link rel="http://opds-spec.org/image/thumbnail"
|
||||
href="/meta?name=Illustration_{{icon_width}}x{{icon_height}}@{{icon_scale}}&content={{{content_id}}}"
|
||||
type="image/png;width={{icon_width}};height={{icon_height}};scale={{icon_scale}}"/>
|
||||
{{/icons}}
|
||||
<link type="text/html" href="/{{{content_id}}}" />
|
||||
<author>
|
||||
<name>{{author_name}}</name>
|
||||
</author>
|
||||
<publisher>
|
||||
<name>{{publisher_name}}</name>
|
||||
</publisher>
|
||||
{{#url}}
|
||||
<link rel="http://opds-spec.org/acquisition/open-access" type="application/x-zim" href="{{{url}}}" length="{{{size}}}" />
|
||||
{{/url}}
|
||||
{{/dump_partial_entries}}
|
||||
</entry>
|
||||
{{/books}}
|
||||
</feed>
|
||||
{{#books}}{{{entry}}}{{/books}}</feed>
|
||||
|
@ -1,9 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<entry>
|
||||
{{#with_xml_header}}<?xml version="1.0" encoding="UTF-8"?>
|
||||
{{/with_xml_header}} <entry>
|
||||
<id>urn:uuid:{{id}}</id>
|
||||
<title>{{title}}</title>
|
||||
<updated>{{updated}}</updated>
|
||||
<summary>{{description}}</summary>
|
||||
{{#dump_partial_entries}}
|
||||
<link rel="alternate"
|
||||
href="{{endpoint_root}}/entry/{{{id}}}"
|
||||
type="application/atom+xml;type=entry;profile=opds-catalog"/>
|
||||
{{/dump_partial_entries}}{{^dump_partial_entries}} <summary>{{description}}</summary>
|
||||
<language>{{language}}</language>
|
||||
<name>{{name}}</name>
|
||||
<flavour>{{flavour}}</flavour>
|
||||
@ -26,4 +30,5 @@
|
||||
{{#url}}
|
||||
<link rel="http://opds-spec.org/acquisition/open-access" type="application/x-zim" href="{{{url}}}" length="{{{size}}}" />
|
||||
{{/url}}
|
||||
{{/dump_partial_entries}}
|
||||
</entry>
|
Reference in New Issue
Block a user