Merge Edge with sort and resize #2

Merged
alfred merged 64 commits from edge into master 2022-07-28 01:51:14 +01:00
5 changed files with 34 additions and 29 deletions
Showing only changes of commit 7d68f0be91 - Show all commits

View File

@ -8,13 +8,13 @@ import (
)
type AboutYaml struct {
Title string `yaml:"title"`
Content string `yaml:"content"`
ThumbnailLocation string `yaml:"thumbnailLocation"`
ImageLocation string `yaml:"imageLocation"`
ImageAltText string `yaml:"imageAltText"`
BirthYear int `yaml:"birthYear"`
ContactEmail string `yaml:"contactEmail"`
Title string `yaml:"title"`
Content string `yaml:"content"`
ThumbnailLocation template.URL `yaml:"thumbnailLocation"`
ImageLocation template.URL `yaml:"imageLocation"`
ImageAltText string `yaml:"imageAltText"`
BirthYear int `yaml:"birthYear"`
ContactEmail string `yaml:"contactEmail"`
}
func (ay AboutYaml) GetContent() template.HTML {

View File

@ -1,13 +1,15 @@
package index
import "html/template"
type DataYaml struct {
HeaderLinks map[string]string `yaml:"headerLinks"`
CSSBaseURL string `yaml:"cssBaseURL"`
CSSLightURL string `yaml:"cssLightURL"`
CSSDarkURL string `yaml:"cssDarkURL"`
JScriptURL string `yaml:"jScriptURL"`
About AboutYaml `yaml:"about"`
Entries []EntryYaml `yaml:"entries"`
HeaderLinks map[string]template.URL `yaml:"headerLinks"`
CSSBaseURL template.URL `yaml:"cssBaseURL"`
CSSLightURL template.URL `yaml:"cssLightURL"`
CSSDarkURL template.URL `yaml:"cssDarkURL"`
JScriptURL template.URL `yaml:"jScriptURL"`
About AboutYaml `yaml:"about"`
Entries []EntryYaml `yaml:"entries"`
}
func (dy DataYaml) GetHeaderLabels() []string {
@ -23,7 +25,7 @@ func (dy DataYaml) GetHeaderLabels() []string {
return toReturn
}
func (dy DataYaml) GetHeaderLink(headerLabel string) string {
func (dy DataYaml) GetHeaderLink(headerLabel string) template.URL {
if dy.HeaderLinks == nil {
return ""
}

View File

@ -10,20 +10,20 @@ import (
const dateFormat = "01-2006"
type EntryYaml struct {
Name string `yaml:"name"`
Content string `yaml:"content"`
StartDate yaml.DateType `yaml:"startDate"`
EndDate yaml.DateType `yaml:"endDate"`
VideoLocation string `yaml:"videoLocation"`
VideoContentType string `yaml:"videoContentType"`
ThumbnailLocations []string `yaml:"thumbnailLocations"`
ImageLocations []string `yaml:"imageLocations"`
ImageAltTexts []string `yaml:"imageAltTexts"`
Name string `yaml:"name"`
Content string `yaml:"content"`
StartDate yaml.DateType `yaml:"startDate"`
EndDate yaml.DateType `yaml:"endDate"`
VideoLocation template.URL `yaml:"videoLocation"`
VideoContentType string `yaml:"videoContentType"`
ThumbnailLocations []template.URL `yaml:"thumbnailLocations"`
ImageLocations []template.URL `yaml:"imageLocations"`
ImageAltTexts []string `yaml:"imageAltTexts"`
}
type ImageReference struct {
ThumbnailLocation string
ImageLocation string
ThumbnailLocation template.URL
ImageLocation template.URL
ImageAltText string
}

View File

@ -90,7 +90,7 @@ func (p *Page) GetContents(urlParameters url.Values) (contentType string, conten
theMarshal := &Marshal{
Data: *theData,
Light: urlParameters.Has("light"),
Parameters: p.getNonThemedCleanQuery(urlParameters),
Parameters: template.URL(p.getNonThemedCleanQuery(urlParameters)),
}
switch strings.ToLower(urlParameters.Get("order")) {
case "end":

View File

@ -1,10 +1,13 @@
package index
import "sort"
import (
"html/template"
"sort"
)
type Marshal struct {
Data DataYaml
Parameters string
Parameters template.URL
OrderStartDate int8
OrderEndDate int8
OrderName int8