diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..7e35c18 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +deploy.sh +Makefile +README-AUTOSTRADA.html +README-AUTOSTRADA.MD +.vscode/launch.json diff --git a/assets/efs.go b/assets/efs.go new file mode 100644 index 0000000..4fe04bb --- /dev/null +++ b/assets/efs.go @@ -0,0 +1,8 @@ +package assets + +import ( + "embed" +) + +//go:embed "emails" "migrations" "templates" "static" +var EmbeddedFiles embed.FS diff --git a/assets/emails/example.tmpl b/assets/emails/example.tmpl new file mode 100644 index 0000000..f381541 --- /dev/null +++ b/assets/emails/example.tmpl @@ -0,0 +1,24 @@ +{{define "subject"}}Example subject{{end}} + +{{define "plainBody"}} +Hi {{.Name}}, + +This is an example body + +Sent at: {{now}} +{{end}} + +{{define "htmlBody"}} + + +
+ + + + +Hi {{.Name}},
+This is an example body
+Sent at: {{now}}
+ + +{{end}} \ No newline at end of file diff --git a/assets/emails/forgotten-password.tmpl b/assets/emails/forgotten-password.tmpl new file mode 100644 index 0000000..9eb163e --- /dev/null +++ b/assets/emails/forgotten-password.tmpl @@ -0,0 +1,29 @@ +{{define "subject"}}Reset your password{{end}} + +{{define "plainBody"}} +Hi, + +Someone (hopefully you) has requested a password reset for your {{.BaseURL}} account. Follow the link below to set a new password: + +Please go to the following page and set a new password: + +{{.BaseURL}}/password-reset/{{.PlaintextToken}} + +If you don't wish to reset your password, disregard this email and no action will be taken. +{{end}} + +{{define "htmlBody"}} + + + + + + + +Hi,
+Someone (hopefully you) has requested a password reset for your {{.BaseURL}} account. Follow the link below to set a new password:
+{{.BaseURL}}/password-reset/{{.PlaintextToken}}
+If you don't wish to reset your password, disregard this email and no action will be taken.
+ + +{{end}} \ No newline at end of file diff --git a/assets/jstemplates/items/field-text.handlebars b/assets/jstemplates/items/field-text.handlebars new file mode 100644 index 0000000..8b24a76 --- /dev/null +++ b/assets/jstemplates/items/field-text.handlebars @@ -0,0 +1,4 @@ +'+(n?e:d(e,!0))+"
\n":""+(n?e:d(e,!0))+"
\n"},n.blockquote=function(e){return"\n"+e+"\n"},n.html=function(e){return e},n.heading=function(e,t,n,i){return this.options.headerIds?"
"+e+"
\n"},n.table=function(e,t){return t&&(t=""+t+""),""+e+"
"},n.br=function(){return this.options.xhtml?""+d(e.message+"",!0)+"";throw e}try{var s=I.lex(e,t);if(t.walkTokens){if(t.async)return Promise.all(_.walkTokens(s,t.walkTokens)).then((function(){return P.parse(s,t)})).catch(l);_.walkTokens(s,t.walkTokens)}return P.parse(s,t)}catch(e){l(e)}}_.options=_.setOptions=function(t){var n;return k(_.defaults,t),n=_.defaults,e.defaults=n,_},_.getDefaults=r,_.defaults=e.defaults,_.use=function(){for(var e=arguments.length,t=new Array(e),n=0;n
"+d(e.message+"",!0)+"";throw e}},_.Parser=P,_.parser=P.parse,_.Renderer=z,_.TextRenderer=H,_.Lexer=I,_.lexer=I.lex,_.Tokenizer=T,_.Slugger=R,_.parse=_;var W=_.options,j=_.setOptions,q=_.use,U=_.walkTokens,$=_.parseInline,G=_,V=P.parse,X=I.lex;e.Lexer=I,e.Parser=P,e.Renderer=z,e.Slugger=R,e.TextRenderer=H,e.Tokenizer=T,e.getDefaults=r,e.lexer=X,e.marked=_,e.options=W,e.parse=G,e.parseInline=$,e.parser=V,e.setOptions=j,e.use=q,e.walkTokens=U,Object.defineProperty(e,"__esModule",{value:!0})}))},{}],16:[function(e,t,n){(function(n){(function(){var i;!function(){"use strict";(i=function(e,t,i,r){r=r||{},this.dictionary=null,this.rules={},this.dictionaryTable={},this.compoundRules=[],this.compoundRuleCodes={},this.replacementTable=[],this.flags=r.flags||{},this.memoized={},this.loaded=!1;var o,a,l,s,u,c=this;function d(e,t){var n=c._readFile(e,null,r.asyncLoad);r.asyncLoad?n.then((function(e){t(e)})):t(n)}function h(e){t=e,i&&p()}function f(e){i=e,t&&p()}function p(){for(c.rules=c._parseAFF(t),c.compoundRuleCodes={},a=0,s=c.compoundRules.length;a