diff options
author | Adam Strzelecki <ono@java.pl> | 2015-12-07 23:30:52 +0100 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-12-08 00:57:46 +0100 |
commit | da2585c11e11023ffa7a8c69d21c6fecac520a8e (patch) | |
tree | 1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/user/auth | |
parent | dd8a06a397e26c46639eba1313102560dfa49c95 (diff) | |
download | gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip |
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.
1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/user/auth')
-rw-r--r-- | templates/user/auth/activate.tmpl | 68 | ||||
-rw-r--r-- | templates/user/auth/forgot_passwd.tmpl | 60 | ||||
-rw-r--r-- | templates/user/auth/reset_passwd.tmpl | 54 | ||||
-rw-r--r-- | templates/user/auth/signin.tmpl | 78 | ||||
-rw-r--r-- | templates/user/auth/signup.tmpl | 104 |
5 files changed, 182 insertions, 182 deletions
diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index 49419dcf6b..8bff54aaf4 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -1,38 +1,38 @@ {{template "base/head" .}} <div class="user activate"> - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{AppSubUrl}}/user/activate" method="post"> - {{.CsrfTokenHtml}} - <h2 class="ui top attached header"> - {{.i18n.Tr "auth.active_your_account"}} - </h2> - <div class="ui attached segment"> - {{template "base/alert" .}} - {{if .IsActivatePage}} - {{if .ServiceNotEnabled}} - <p class="center">{{.i18n.Tr "auth.disable_register_mail"}}</p> - {{else if .ResendLimited}} - <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> - {{else}} - <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .Hours | Str2html}}</p> - {{end}} - {{else}} - {{if .IsSendRegisterMail}} - <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p> - {{else if .IsActivateFailed}} - <p>{{.i18n.Tr "auth.invalid_code"}}</p> - {{else}} - <p>{{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}</p> - <div class="ui divider"></div> - <div class="text right"> - <button class="ui blue button">{{.i18n.Tr "auth.resend_mail"}}</button> - </div> - {{end}} - {{end}} - </div> - </form> - </div> - </div> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{AppSubUrl}}/user/activate" method="post"> + {{.CsrfTokenHtml}} + <h2 class="ui top attached header"> + {{.i18n.Tr "auth.active_your_account"}} + </h2> + <div class="ui attached segment"> + {{template "base/alert" .}} + {{if .IsActivatePage}} + {{if .ServiceNotEnabled}} + <p class="center">{{.i18n.Tr "auth.disable_register_mail"}}</p> + {{else if .ResendLimited}} + <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> + {{else}} + <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .SignedUser.Email .Hours | Str2html}}</p> + {{end}} + {{else}} + {{if .IsSendRegisterMail}} + <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p> + {{else if .IsActivateFailed}} + <p>{{.i18n.Tr "auth.invalid_code"}}</p> + {{else}} + <p>{{.i18n.Tr "auth.has_unconfirmed_mail" .SignedUser.Name .SignedUser.Email | Str2html}}</p> + <div class="ui divider"></div> + <div class="text right"> + <button class="ui blue button">{{.i18n.Tr "auth.resend_mail"}}</button> + </div> + {{end}} + {{end}} + </div> + </form> + </div> + </div> </div> {{template "base/footer" .}} diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl index de141e67a3..f1c25df503 100644 --- a/templates/user/auth/forgot_passwd.tmpl +++ b/templates/user/auth/forgot_passwd.tmpl @@ -1,34 +1,34 @@ {{template "base/head" .}} <div class="user forgot password"> - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <h2 class="ui top attached header"> - {{.i18n.Tr "auth.forgot_password"}} - </h2> - <div class="ui attached segment"> - {{template "base/alert" .}} - {{if .IsResetSent}} - <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p> - {{else if .IsResetRequest}} - <div class="required inline field {{if .Err_Email}}error{{end}}"> - <label for="email">{{.i18n.Tr "email"}}</label> - <input id="email" name="email" type="email" value="{{.Email}}" autofocus required> - </div> - <div class="ui divider"></div> - <div class="inline field"> - <label></label> - <button class="ui blue button">{{.i18n.Tr "auth.send_reset_mail"}}</button> - </div> - {{else if .IsResetDisable}} - <p class="center">{{.i18n.Tr "auth.disable_register_mail"}}</p> - {{else if .ResendLimited}} - <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> - {{end}} - </div> - </form> - </div> - </div> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <h2 class="ui top attached header"> + {{.i18n.Tr "auth.forgot_password"}} + </h2> + <div class="ui attached segment"> + {{template "base/alert" .}} + {{if .IsResetSent}} + <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" .Email .Hours | Str2html}}</p> + {{else if .IsResetRequest}} + <div class="required inline field {{if .Err_Email}}error{{end}}"> + <label for="email">{{.i18n.Tr "email"}}</label> + <input id="email" name="email" type="email" value="{{.Email}}" autofocus required> + </div> + <div class="ui divider"></div> + <div class="inline field"> + <label></label> + <button class="ui blue button">{{.i18n.Tr "auth.send_reset_mail"}}</button> + </div> + {{else if .IsResetDisable}} + <p class="center">{{.i18n.Tr "auth.disable_register_mail"}}</p> + {{else if .ResendLimited}} + <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p> + {{end}} + </div> + </form> + </div> + </div> </div> {{template "base/footer" .}} diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl index 5f06bd6494..cb124f5b25 100644 --- a/templates/user/auth/reset_passwd.tmpl +++ b/templates/user/auth/reset_passwd.tmpl @@ -1,31 +1,31 @@ {{template "base/head" .}} <div class="user reset password"> - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <input name="code" type="hidden" value="{{.Code}}"> - <h2 class="ui top attached header"> - {{.i18n.Tr "auth.reset_password"}} - </h2> - <div class="ui attached segment"> - {{template "base/alert" .}} - {{if .IsResetForm}} - <div class="required inline field {{if .Err_Password}}error{{end}}"> - <label for="password">{{.i18n.Tr "password"}}</label> - <input id="password" name="password" type="password" value="{{.password}}" autofocus required> - </div> - <div class="ui divider"></div> - <div class="inline field"> - <label></label> - <button class="ui blue button">{{.i18n.Tr "auth.reset_password_helper"}}</button> - </div> - {{else}} - <p class="center">{{.i18n.Tr "auth.invalid_code"}}</p> - {{end}} - </div> - </form> - </div> - </div> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <input name="code" type="hidden" value="{{.Code}}"> + <h2 class="ui top attached header"> + {{.i18n.Tr "auth.reset_password"}} + </h2> + <div class="ui attached segment"> + {{template "base/alert" .}} + {{if .IsResetForm}} + <div class="required inline field {{if .Err_Password}}error{{end}}"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" value="{{.password}}" autofocus required> + </div> + <div class="ui divider"></div> + <div class="inline field"> + <label></label> + <button class="ui blue button">{{.i18n.Tr "auth.reset_password_helper"}}</button> + </div> + {{else}} + <p class="center">{{.i18n.Tr "auth.invalid_code"}}</p> + {{end}} + </div> + </form> + </div> + </div> </div> {{template "base/footer" .}} diff --git a/templates/user/auth/signin.tmpl b/templates/user/auth/signin.tmpl index a1e30e95cb..b928f2bdb5 100644 --- a/templates/user/auth/signin.tmpl +++ b/templates/user/auth/signin.tmpl @@ -1,44 +1,44 @@ {{template "base/head" .}} <div class="user signin"> - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <h3 class="ui top attached header"> - {{.i18n.Tr "sign_in"}} - </h3> - <div class="ui attached segment"> - {{template "base/alert" .}} - <div class="required inline field {{if .Err_UserName}}error{{end}}"> - <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label> - <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required> - </div> - <div class="required inline field {{if .Err_Password}}error{{end}}"> - <label for="password">{{.i18n.Tr "password"}}</label> - <input id="password" name="password" type="password" value="{{.password}}" required> - </div> - <div class="inline field"> - <label></label> - <div class="ui checkbox"> - <label>{{.i18n.Tr "auth.remember_me"}}</label> - <input name="remember" type="checkbox"> - </div> - </div> + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <h3 class="ui top attached header"> + {{.i18n.Tr "sign_in"}} + </h3> + <div class="ui attached segment"> + {{template "base/alert" .}} + <div class="required inline field {{if .Err_UserName}}error{{end}}"> + <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label> + <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required> + </div> + <div class="required inline field {{if .Err_Password}}error{{end}}"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" value="{{.password}}" required> + </div> + <div class="inline field"> + <label></label> + <div class="ui checkbox"> + <label>{{.i18n.Tr "auth.remember_me"}}</label> + <input name="remember" type="checkbox"> + </div> + </div> - <div class="inline field"> - <label></label> - <button class="ui green button">{{.i18n.Tr "sign_in"}}</button> - <a href="{{AppSubUrl}}/user/forget_password">{{.i18n.Tr "auth.forget_password"}}</a> - </div> - {{if .ShowRegistrationButton}} - <div class="inline field"> - <label></label> - <a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a> - </div> - {{end}} - </div> - </form> - </div> - </div> + <div class="inline field"> + <label></label> + <button class="ui green button">{{.i18n.Tr "sign_in"}}</button> + <a href="{{AppSubUrl}}/user/forget_password">{{.i18n.Tr "auth.forget_password"}}</a> + </div> + {{if .ShowRegistrationButton}} + <div class="inline field"> + <label></label> + <a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a> + </div> + {{end}} + </div> + </form> + </div> + </div> </div> {{template "base/footer" .}} diff --git a/templates/user/auth/signup.tmpl b/templates/user/auth/signup.tmpl index c237a20d85..86c020d6bb 100644 --- a/templates/user/auth/signup.tmpl +++ b/templates/user/auth/signup.tmpl @@ -1,56 +1,56 @@ {{template "base/head" .}} <div class="user signup"> - <div class="ui middle very relaxed page grid"> - <div class="column"> - <form class="ui form" action="{{.Link}}" method="post"> - {{.CsrfTokenHtml}} - <h3 class="ui top attached header"> - {{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}} - </h3> - <div class="ui attached segment"> - {{template "base/alert" .}} - {{if .DisableRegistration}} - <p>{{.i18n.Tr "auth.disable_register_prompt"}}</p> - {{else}} - <div class="required inline field {{if .Err_UserName}}error{{end}}"> - <label for="user_name">{{.i18n.Tr "username"}}</label> - <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required> - </div> - <div class="required inline field {{if .Err_Email}}error{{end}}"> - <label for="email">{{.i18n.Tr "email"}}</label> - <input id="email" name="email" type="email" value="{{.email}}" required> - </div> - <div class="required inline field {{if .Err_Password}}error{{end}}"> - <label for="password">{{.i18n.Tr "password"}}</label> - <input id="password" name="password" type="password" value="{{.password}}" required> - </div> - <div class="required inline field {{if .Err_Password}}error{{end}}"> - <label for="retype">{{.i18n.Tr "re_type"}}</label> - <input id="retype" name="retype" type="password" value="{{.retype}}" required> - </div> - {{if .EnableCaptcha}} - <div class="inline field"> - <label></label> - {{.Captcha.CreateHtml}} - </div> - <div class="required inline field {{if .Err_Captcha}}error{{end}}"> - <label for="captcha">{{.i18n.Tr "captcha"}}</label> - <input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off"> - </div> - {{end}} + <div class="ui middle very relaxed page grid"> + <div class="column"> + <form class="ui form" action="{{.Link}}" method="post"> + {{.CsrfTokenHtml}} + <h3 class="ui top attached header"> + {{if .IsSocialLogin}}{{.i18n.Tr "social_sign_in" | Str2html}}{{else}}{{.i18n.Tr "sign_up"}}{{end}} + </h3> + <div class="ui attached segment"> + {{template "base/alert" .}} + {{if .DisableRegistration}} + <p>{{.i18n.Tr "auth.disable_register_prompt"}}</p> + {{else}} + <div class="required inline field {{if .Err_UserName}}error{{end}}"> + <label for="user_name">{{.i18n.Tr "username"}}</label> + <input id="user_name" name="user_name" value="{{.user_name}}" autofocus required> + </div> + <div class="required inline field {{if .Err_Email}}error{{end}}"> + <label for="email">{{.i18n.Tr "email"}}</label> + <input id="email" name="email" type="email" value="{{.email}}" required> + </div> + <div class="required inline field {{if .Err_Password}}error{{end}}"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" value="{{.password}}" required> + </div> + <div class="required inline field {{if .Err_Password}}error{{end}}"> + <label for="retype">{{.i18n.Tr "re_type"}}</label> + <input id="retype" name="retype" type="password" value="{{.retype}}" required> + </div> + {{if .EnableCaptcha}} + <div class="inline field"> + <label></label> + {{.Captcha.CreateHtml}} + </div> + <div class="required inline field {{if .Err_Captcha}}error{{end}}"> + <label for="captcha">{{.i18n.Tr "captcha"}}</label> + <input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off"> + </div> + {{end}} - <div class="inline field"> - <label></label> - <button class="ui green button">{{.i18n.Tr "auth.create_new_account"}}</button> - </div> - <div class="inline field"> - <label></label> - <a href="{{AppSubUrl}}/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a> - </div> - {{end}} - </div> - </form> - </div> - </div> + <div class="inline field"> + <label></label> + <button class="ui green button">{{.i18n.Tr "auth.create_new_account"}}</button> + </div> + <div class="inline field"> + <label></label> + <a href="{{AppSubUrl}}/user/login">{{if .IsSocialLogin}}{{.i18n.Tr "auth.social_register_hepler_msg"}}{{else}}{{.i18n.Tr "auth.register_hepler_msg"}}{{end}}</a> + </div> + {{end}} + </div> + </form> + </div> + </div> </div> -{{template "base/footer" .}}
\ No newline at end of file +{{template "base/footer" .}} |