Update templ dependency to v0.3.906 and adjust XML declaration formatting in templates

This commit is contained in:
2025-07-16 21:02:15 +08:00
parent 042b383988
commit ca3fdf8980
11 changed files with 21 additions and 23 deletions

View File

@@ -1,8 +1,8 @@
package template
templ ContainerXML() {
@templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`)
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
@templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`)
<container xmlns="urn:oasis:names:tc:opendocument:xmlns:container" version="1.0">
<rootfiles>
<rootfile full-path="OEBPS/content.opf" media-type="application/oebps-package+xml"></rootfile>
</rootfiles>

View File

@@ -1,6 +1,6 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
// templ: version: v0.3.906
package template
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -29,11 +29,11 @@ func ContainerXML() templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<container version=\"1.0\" xmlns=\"urn:oasis:names:tc:opendocument:xmlns:container\"><rootfiles><rootfile full-path=\"OEBPS/content.opf\" media-type=\"application/oebps-package+xml\"></rootfile></rootfiles></container>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<container xmlns=\"urn:oasis:names:tc:opendocument:xmlns:container\" version=\"1.0\"><rootfiles><rootfile full-path=\"OEBPS/content.opf\" media-type=\"application/oebps-package+xml\"></rootfile></rootfiles></container>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -3,7 +3,7 @@ package template
import "bilinovel-downloader/model"
templ ContentOPF(uniqueIdentifier string, dc *model.DublinCoreMetadata, manifest *model.Manifest, spine *model.Spine, guide *model.Guide) {
@templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`)
@templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`)
<package version="3.0" xmlns="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/" unique-identifier={ uniqueIdentifier }>
if dc != nil {
{{ metadata, err := dc.Marshal() }}

View File

@@ -1,6 +1,6 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
// templ: version: v0.3.906
package template
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -31,7 +31,7 @@ func ContentOPF(uniqueIdentifier string, dc *model.DublinCoreMetadata, manifest
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -3,9 +3,9 @@ package template
import "bilinovel-downloader/model"
templ ContentXHTML(content *model.Chapter) {
@templ.Raw(`<?xml version="1.0" encoding="utf-8" standalone="no"?>`)
@templ.Raw(`<!DOCTYPE html>`)
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="zh-CN" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:xml="http://www.w3.org/XML/1998/namespace">
@templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`)
// @templ.Raw(`<!DOCTYPE html>`)
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xml:lang="zh-CN">
<head>
<title>{ content.Title }</title>
@templ.Raw(`<link href="../Styles/style.css" rel="stylesheet" type="text/css"/>`)

View File

@@ -1,6 +1,6 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
// templ: version: v0.3.906
package template
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -31,15 +31,11 @@ func ContentXHTML(content *model.Chapter) templ.Component {
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templ.Raw(`<?xml version="1.0" encoding="utf-8" standalone="no"?>`).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templ.Raw(`<!DOCTYPE html>`).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"zh-CN\" xmlns:epub=\"http://www.idpf.org/2007/ops\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\"><head><title>")
templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 1, "<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:epub=\"http://www.idpf.org/2007/ops\" xml:lang=\"zh-CN\"><head><title>")
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}

View File

@@ -3,7 +3,7 @@ package template
import "bilinovel-downloader/model"
templ TocNCX(title string, head *model.TocNCXHead, navMap *model.NavMap) {
@templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`)
@templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`)
@templ.Raw(`<!DOCTYPE ncx PUBLIC "-//NISO//DTD ncx 2005-1//EN" "http://www.daisy.org/z3986/2005/ncx-2005-1.dtd">`)
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/" version="2005-1">
if head != nil {

View File

@@ -1,6 +1,6 @@
// Code generated by templ - DO NOT EDIT.
// templ: version: v0.3.857
// templ: version: v0.3.906
package template
//lint:file-ignore SA4006 This context is only used if a nested component is present.
@@ -31,7 +31,7 @@ func TocNCX(title string, head *model.TocNCXHead, navMap *model.NavMap) templ.Co
templ_7745c5c3_Var1 = templ.NopComponent
}
ctx = templ.ClearChildren(ctx)
templ_7745c5c3_Err = templ.Raw(`<?xml version="1.0" encoding="UTF-8"?>`).Render(ctx, templ_7745c5c3_Buffer)
templ_7745c5c3_Err = templ.Raw(`<?xml version='1.0' encoding='utf-8'?>`).Render(ctx, templ_7745c5c3_Buffer)
if templ_7745c5c3_Err != nil {
return templ_7745c5c3_Err
}