diff --git a/pages/about.tmpl b/pages/about.tmpl new file mode 100644 index 0000000..061d733 --- /dev/null +++ b/pages/about.tmpl @@ -0,0 +1,24 @@ +{{define "head"}}About {{.SiteName}} +{{end}} +{{define "content"}}
+
+
+
+
+

Simple and focused

+

Write.as isn't a platform for building any kind of blog or website. It's meant to help you get your thoughts down—and published—fast.

+
+ +
+

Distraction-free

+

Our editor lets you write and publish — that's it. And we separated the reading experience so there's no stream or feed or "likes" or "follows" to steal your focus.

+
+ +
+

Never lose your progress

+

Your writing automatically saves as you type. It'll always be waiting, even if you don't "save" before leaving.

+
+
+
+
+{{end}} diff --git a/pages/landing.tmpl b/pages/landing.tmpl new file mode 100644 index 0000000..397a261 --- /dev/null +++ b/pages/landing.tmpl @@ -0,0 +1,117 @@ +{{define "head"}} +{{.SiteName}} + + +{{end}} +{{define "content"}} +
+ +
+
+

{{if .Federation}}Start your blog in the fediverse{{else}}Start your minimalist blog{{end}}

+

Learn more...

+
+ +
+ {{if .Flashes}}
    + {{range .Flashes}}
  • {{.}}
  • {{end}} +
{{end}} + +
+
+
+ + + +
+ +
+
+
+
+
+
+ +{{if .Federation}} +
+{{end}} +
+ +{{ if .Federation }} +
+ +

Join the Fediverse

+

The fediverse is a large network of platforms that all speak a common language. Imagine if you could reply to Instagram posts from Twitter, or interact with your favorite Medium blogs from Facebook — federated alternatives like PixelFed, Mastodon, and Write Freely enable you to do these types of things.

+ +
+ +
+ +

Write More Socially

+

Write Freely can communicate with other federated platforms like Mastodon, so people can follow your blogs, bookmark their favorite posts, and boost them to their followers. Sign up above to create a blog and join the fediverse.

+ +
+{{ end }} + +{{end}} diff --git a/pages/login.tmpl b/pages/login.tmpl new file mode 100644 index 0000000..411da50 --- /dev/null +++ b/pages/login.tmpl @@ -0,0 +1,30 @@ +{{define "head"}}Log in — {{.SiteName}} + + + +{{end}} +{{define "content"}} +
+

Log in to {{.SiteName}}

+ + {{if .Flashes}}{{end}} + +
+
+
+ {{if .To}}{{end}} + +
+ +

{{if .Message}}{{.Message}}{{else}}No account yet? Sign up to start a blog.{{end}}

+ + +{{end}} diff --git a/pages/privacy.tmpl b/pages/privacy.tmpl new file mode 100644 index 0000000..9c8c2c0 --- /dev/null +++ b/pages/privacy.tmpl @@ -0,0 +1,7 @@ +{{define "head"}}{{.SiteName}} Privacy Policy +{{end}} +{{define "content"}}
+

Privacy Policy

+

We protect your privacy! Like, for real.

+
+{{end}} diff --git a/templates/base.tmpl b/templates/base.tmpl new file mode 100644 index 0000000..365770e --- /dev/null +++ b/templates/base.tmpl @@ -0,0 +1,55 @@ +{{define "base"}} + + + {{ template "head" . }} + + + + + + + + + +
+
+

{{.SiteName}}

+ {{if .HeaderNav}} + + {{end}} +
+ +
+ {{ template "content" . }} +
+ + {{ template "footer" . }} + + {{if not .JSDisabled}} + + {{else}} + {{if .WebFonts}}{{end}} + {{end}} + +{{end}} diff --git a/templates/collection-post.tmpl b/templates/collection-post.tmpl new file mode 100644 index 0000000..289ee60 --- /dev/null +++ b/templates/collection-post.tmpl @@ -0,0 +1,135 @@ +{{define "post"}} + + + + + {{.PlainDisplayTitle}} — {{.Collection.DisplayTitle}} + + + + + + + + + {{if gt .Views 1}} + {{end}} + + + + + + + {{if gt (len .Images) 0}}{{else}}{{end}} + + + + + + + {{range .Images}}{{else}}{{end}} + + {{if .Collection.StyleSheet}}{{end}} + {{if .Collection.RenderMathJax}} + + {{end}} + + + + +
+ +
+

+ +
+ +
{{if .IsScheduled}}

Scheduled

{{end}}{{if .Title.String}}

{{.FormattedDisplayTitle}}

{{end}}
{{.HTMLContent}}
+ + {{ if .Collection.ShowFooterBranding }} +

+ {{ end }} + + + {{if .Collection.CanShowScript}} + {{range .Collection.ExternalScripts}}{{end}} + {{if .Collection.Script}}{{end}} + {{end}} + +{{end}} diff --git a/templates/collection-tags.tmpl b/templates/collection-tags.tmpl new file mode 100644 index 0000000..5550b42 --- /dev/null +++ b/templates/collection-tags.tmpl @@ -0,0 +1,198 @@ +{{define "collection-tags"}} + + + + + {{.Tag}} — {{.Collection.DisplayTitle}} + + + + {{if not .Collection.IsPrivate}}{{end}} + + + + + + + + {{if gt .Views 1}} + {{end}} + + + + + + + + + + + {{if .Collection.StyleSheet}}{{end}} + {{if .Collection.RenderMathJax}} + + {{end}} + + + + +
+ +
+

{{.Collection.DisplayTitle}}

+ +
+ + {{if .Posts}}
{{else}}
{{end}} +

{{.Tag}}

+ {{template "posts" .}} + {{if .Posts}}
{{else}}
{{end}} + + {{ if .Collection.ShowFooterBranding }} + + {{ end }} + + + {{if .CanShowScript}} + {{range .ExternalScripts}}{{end}} + {{if .Collection.Script}}{{end}} + {{end}} + {{if .IsOwner}} + + + {{end}} + +{{end}} diff --git a/templates/collection.tmpl b/templates/collection.tmpl new file mode 100644 index 0000000..33c6317 --- /dev/null +++ b/templates/collection.tmpl @@ -0,0 +1,225 @@ +{{define "collection"}} + + + + + {{.DisplayTitle}}{{if not .SingleUser}} — {{.SiteName}}{{end}} + + + + + {{if gt .CurrentPage 1}}{{end}} + {{if lt .CurrentPage .TotalPages}}{{end}} + {{if not .IsPrivate}}{{end}} + + + + + + + + + + + + + + + {{if .StyleSheet}}{{end}} + {{if .RenderMathJax}} + + {{end}} + + + + {{if .IsOwner}}{{end}} + +
+

{{if .Posts}}{{else}}write.as {{end}}{{.DisplayTitle}}

+ {{if .Description}}

{{.Description}}

{{end}} + {{/*if not .Public/*}} + + {{/*end*/}} + {{if .PinnedPosts}} + {{end}} +
+ + {{if .Posts}}
{{else}}
{{end}} + + {{if .IsWelcome}} +
+

Welcome, {{.Username}}!

+

This is your new blog.

+

Start writing, or customize your blog.

+

Check out our writing guide to see what else you can do, and get in touch anytime with questions or feedback.

+
+ {{end}} + + {{template "posts" .}} + + {{if gt .TotalPages 1}}{{end}} + + {{if .Posts}}
{{else}}
{{end}} + + {{if .ShowFooterBranding }} + + {{ end }} + + + {{if .CanShowScript}} + {{range .ExternalScripts}}{{end}} + {{if .Script}}{{end}} + {{end}} + + + +{{end}} diff --git a/templates/edit-meta.tmpl b/templates/edit-meta.tmpl new file mode 100644 index 0000000..026dd49 --- /dev/null +++ b/templates/edit-meta.tmpl @@ -0,0 +1,371 @@ +{{define "edit-meta"}} + + + + Edit metadata: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} — {{.SiteName}} + + + + + + + + +
+
+

{{if .User}}w{{else}}write.as{{end}} +

+ +
+
+
+
+
+
+
+ +
+
+

Edit metadata: {{if .Post.Title}}{{.Post.Title}}{{else}}{{.Post.Id}}{{end}} view post

+ + {{if .Flashes}}{{end}} + +
+ {{if .EditCollection}} +
+
+ {{end}} +
+
+ +
+
+
+
+
+ UTC now +

Date format should be: YYYY-MM-DD HH:MM:SS

+
+
 
+
+
+
+ + + + + + +{{end}} diff --git a/templates/include/footer.tmpl b/templates/include/footer.tmpl new file mode 100644 index 0000000..8abe64e --- /dev/null +++ b/templates/include/footer.tmpl @@ -0,0 +1,25 @@ +{{define "footer"}} + +{{end}} diff --git a/templates/include/posts.tmpl b/templates/include/posts.tmpl new file mode 100644 index 0000000..165311b --- /dev/null +++ b/templates/include/posts.tmpl @@ -0,0 +1,53 @@ +{{ define "posts" }} +{{ range $el := .Posts }}
+ {{if .IsScheduled}}

Scheduled

{{end}} + {{if .Title.String}}

{{if .HasTitleLink}}{{.HTMLTitle}} {{else}}{{end}} + {{if $.IsOwner}} + + {{if $.CanPin}}{{end}} + + {{if gt (len $.Collections) 1}}{{else}} + {{range $.Collections}} + + {{end}} + {{end}} + {{end}} +

+ {{if $.Format.ShowDates}}{{end}} +{{else}} +

+ {{if $.Format.ShowDates}}{{end}} + {{if $.IsOwner}} + {{if not $.Format.ShowDates}}{{end}} + + {{if $.CanPin}}{{end}} + + {{if gt (len $.Collections) 1}}{{else}} + {{range $.Collections}} + + {{end}} + {{end}} + {{end}} +

+{{end}} + +{{if .Excerpt}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.Excerpt}}
+ +{{localstr "Read more..." .Language.String}}{{else}}
{{if and (and (not $.IsOwner) (not $.Format.ShowDates)) (not .Title.String)}}{{end}}{{.HTMLContent}}
{{end}}
{{ end }} +{{ end }} diff --git a/templates/password-collection.tmpl b/templates/password-collection.tmpl new file mode 100644 index 0000000..d6116af --- /dev/null +++ b/templates/password-collection.tmpl @@ -0,0 +1,75 @@ +{{define "password-collection"}} + + + + + {{.DisplayTitle}}{{if not .SingleUser}} — {{.SiteName}}{{end}} + + + + + + + + + + + + + + + + + + {{if .StyleSheet}}{{end}} + + + +
+

{{.DisplayTitle}}

+
+ +
+ +
+
+ {{if .Flashes}}
    + {{range .Flashes}}
  • {{.}}
  • {{end}} +
{{else}} +

This blog requires a password.

+ {{end}} + + + +

+
+
+
+ + + + + {{if and .Script .CanShowScript}}{{end}} + + + +{{end}} diff --git a/templates/post.tmpl b/templates/post.tmpl new file mode 100644 index 0000000..53e2bd8 --- /dev/null +++ b/templates/post.tmpl @@ -0,0 +1,97 @@ +{{define "post"}} + + + + + {{if .Title}}{{.Title}}{{else}}{{.GenTitle}}{{end}} — {{.SiteName}} + + {{if .IsCode}} + + {{end}} + + + + + + + + + + + + + + {{if gt .Views 1}} + {{end}} + + + + + + + + {{if .Author}}{{end}} + + + + +
+

{{.SiteName}}

+ +
+ +
{{if .Title}}

{{.Title}}

{{end}}{{ if .IsPlainText }}

{{.Content}}

{{ else }}
{{.HTMLContent}}
{{ end }}
+ + + + + {{if .IsCode}} + + + {{else}} + + {{if .IsPlainText}}{{end}} + {{end}} + +{{end}}