Title in big
parent
99aee28c1b
commit
1eaf0b12da
25
page.go
25
page.go
|
@ -8,10 +8,29 @@ import (
|
|||
func GenerateEpisodeDescription(imageURL, title, content string) string {
|
||||
// Template con sezione CDATA
|
||||
const descTemplate = `<![CDATA[
|
||||
<h1 style="margin-top:0;">{{.Title}}</h1>
|
||||
{{if .ImageURL}}<img src="{{.ImageURL}}" width="300" style="float:right; margin:0 0 10px 10px;">{{end}}
|
||||
<div style="clear:both;"></div>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<style>
|
||||
.episode-container { font-family: Arial, sans-serif; max-width: 800px; }
|
||||
.episode-image { float: right; margin: 0 0 15px 15px; max-width: 300px; }
|
||||
.episode-title { margin-top: 0; color: #333; }
|
||||
.episode-content { line-height: 1.6; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="episode-container">
|
||||
{{if .ImageURL}}
|
||||
<img src="{{.ImageURL}}" alt="{{.Title}}" class="episode-image">
|
||||
{{end}}
|
||||
<h3 class="episode-title">{{.Title}}</h3>
|
||||
<div class="episode-content">
|
||||
{{.Content}}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
]]>`
|
||||
|
||||
// Dati per il template
|
||||
|
|
Loading…
Reference in New Issue