-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add xml responses for hyperview
- Loading branch information
Showing
15 changed files
with
536 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<view xmlns="https://hyperview.org/hyperview" style="Cast__List"> | ||
{{ range $i, $cast := .Cast}} | ||
<view style="Section"> | ||
<view style="Divider"> | ||
<text style="Divider__Text">{{ $cast.Job }}</text> | ||
<view style="Divider__Line"></view> | ||
</view> | ||
{{ range $cast.People }} | ||
{{ if $.HasCharacters }} | ||
<view style="Cast__Row" key="{{ .Name }}-{{ $cast.Job }}"> | ||
<text style="Body__Text"> | ||
<behavior action="push" href="/person/{{ .ID }}" show-during-load="loading" /> | ||
{{ .Name }} | ||
</text> | ||
{{ if .Character }} | ||
<view style="Cast__Row__Line"></view> | ||
{{ end }} | ||
<view style="Cast__Character"> | ||
<text style="Body__Text" numberOfLines="1">{{ .Character }}</text> | ||
</view> | ||
</view> | ||
{{ else }} | ||
<view style="Cast__Row" key="{{ .Name }}-{{ $cast.Job }}"> | ||
<text style="Body__Text">{{ .Name }}</text> | ||
</view> | ||
{{ end }} | ||
{{ end }} | ||
</view> | ||
{{ end }} | ||
</view> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
<doc xmlns="https://hyperview.org/hyperview"> | ||
<screen id="feed"> | ||
<styles> | ||
<style id="Body" backgroundColor="rgb(23,23,23)" flex="1"></style> | ||
<style id="Loading" backgroundColor="red" flex="1"></style> | ||
<style id="Link" borderBottomWidth="1" borderBottomColor="rgb(212,212,212)" borderStyle="solid"></style> | ||
<style id="Link__Text" color="rgb(212,212,212)" fontSize="16"></style> | ||
<style id="movieList" flex="1" paddingHorizontal="20" paddingTop="24"></style> | ||
<style id="Movie" marginBottom="24" rowGap="16"></style> | ||
<style id="Movie__Header" rowGap="4"></style> | ||
<style id="Movie__Title" color="rgb(212,212,212)" fontSize="16" fontWeight="500"></style> | ||
<style id="Movie__Overview" color="rgb(163,163,163)" fontSize="14" fontWeight="400" lineHeight="20"></style> | ||
<style id="Spinner" alignItems="center" flex="1" height="48" justifyContent="center" ></style> | ||
<style id="Movie__WatchedAt" color="rgb(163,163,163)" fontSize="12" fontWeight="400" lineHeight="16"></style> | ||
<style id="FAB" position="absolute" bottom="24" right="24" backgroundColor="#262626" borderRadius="24" justifyContent="center" alignItems="center" height="56" width="56"> | ||
<modifier pressed="true"> | ||
<style backgroundColor="#404040" /> | ||
</modifier> | ||
</style> | ||
<style id="FAB__Text" color="rgb(229,229,229)" fontSize="24" fontWeight="400"></style> | ||
<style id="Year__Wrap" marginVertical="16"></style> | ||
<style id="Year" color="rgb(23,23,23)" fontSize="48" fontWeight="400" textShadowColor="rgba(255,255,255,0.8)" textShadowRadius="1"></style> | ||
</styles> | ||
<body style="Body" safe-area="true"> | ||
<list style="movieList" id="movies" trigger="refresh" href="/?refresh=true" action="replace-inner" target="movie-items"> | ||
<item style="Year__Wrap"> | ||
<text style="Year"> | ||
{{ .CurrentYear }} | ||
</text> | ||
</item> | ||
{{ template "feed_pages" .}} | ||
</list> | ||
<view style="FAB"> | ||
<behavior show-during-load="loading" action="push" trigger="press" href="/movies/new" /> | ||
<text style="FAB__Text"> | ||
+ | ||
</text> | ||
</view> | ||
</body> | ||
</screen> | ||
|
||
<screen id="loading"> | ||
<styles> | ||
<style id="Spinner" backgroundColor="rgb(23,23,23)" flex="1" alignItems="center" justifyContent="center"></style> | ||
</styles> | ||
<body style="Spinner"> | ||
<spinner color="rgba(63,63,63)" /> | ||
</body> | ||
</screen> | ||
</doc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{{ $year := .LastMovieYear }} | ||
|
||
<items xmlns="https://hyperview.org/hyperview" id="movie-items"> | ||
{{ range .Movies }} | ||
{{if ne $year (.WatchedAt.Format "2006")}} | ||
<item key="year-{{ .ID }}" style="Year__Wrap"> | ||
<text style="Year"> | ||
{{ .WatchedAt.Format "2006" }} | ||
</text> | ||
</item> | ||
{{ $year = (.WatchedAt.Format "2006") }} | ||
{{end}} | ||
<item key="{{ .ID }}-{{ .WatchedAt.Format "2006-01-02 15:04" }}" style="Movie"> | ||
<behavior action="push" href="/movies/{{ .ID }}" show-during-load="loading" /> | ||
<view style="Movie__Header"> | ||
<text style="Movie__Title"> | ||
{{ .Title }} | ||
</text> | ||
<text style="Movie__WatchedAt"> | ||
{{ .WatchedAt.Format "January 02 2006" }} | ||
</text> | ||
</view> | ||
{{ if .Overview }} | ||
<text style="Movie__Overview" numberOfLines="3"> | ||
{{ .Overview }} | ||
</text> | ||
{{ end }} | ||
</item> | ||
{{ end }} | ||
<item | ||
key="loadMore-{{ .Page }}" | ||
trigger="visible" | ||
once="true" | ||
href="/?page={{ .Page }}&lastMovieYear={{ $year }}" | ||
action="replace" | ||
style="Spinner" | ||
> | ||
<spinner /> | ||
</item> | ||
</items> |
Oops, something went wrong.