Skip to content

Commit

Permalink
Fixed base path
Browse files Browse the repository at this point in the history
  • Loading branch information
s-gv committed Aug 19, 2021
1 parent 84b26b6 commit 8f383b0
Show file tree
Hide file tree
Showing 16 changed files with 49 additions and 49 deletions.
10 changes: 5 additions & 5 deletions templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ <h2>Admin</h2>
</div>
<br>
{{ if .Domain.SignupToken }}
<label for="signup_token">Shareable unlisted signup link: <a href="{{ .BasePath }}/auth/signup/{{ .Domain.SignupToken }}">https://{{ .Host }}{{ .BasePath }}/auth/signup/{{ .Domain.SignupToken }}</a></label><br>
<label for="signup_token">Shareable unlisted signup link: <a href="{{ .BasePath }}auth/signup/{{ .Domain.SignupToken }}">https://{{ .Host }}{{ .BasePath }}auth/signup/{{ .Domain.SignupToken }}</a></label><br>
{{ end }}
{{ end }}
{{ if .ErrMsg }}
Expand All @@ -46,7 +46,7 @@ <h2>Mods</h2>

{{ range .Mods }}
<div class="well">
<form method="POST" action="{{ $.BasePath }}/admin/mods/delete">
<form method="POST" action="{{ $.BasePath }}admin/mods/delete">
{{ $.csrfField }}
{{ .Email }} ({{ .DisplayName }})
<input type="hidden" name="mod_user_id" value="{{ .UserID }}">
Expand All @@ -58,7 +58,7 @@ <h2>Mods</h2>
{{ end }}

<div class="well">
<form method="POST" action="{{ .BasePath }}/admin/mods/create">
<form method="POST" action="{{ .BasePath }}admin/mods/create">
{{ .csrfField }}
<div class="form-row">
<label for="mod_user_email" class="form-label">New Mod Email</label>
Expand All @@ -75,7 +75,7 @@ <h2>Mods</h2>
<h2>Categories</h2>
{{ range .Categories }}
<div class="well" style="margin-bottom: 20px;">
<form method="POST" action="{{ $.BasePath }}/admin/categories/{{ .CategoryID }}">
<form method="POST" action="{{ $.BasePath }}admin/categories/{{ .CategoryID }}">
{{ $.csrfField }}
<div class="form-row">
<label for="cat-name-{{ .CategoryID }}" class="form-label">Category name</label>
Expand Down Expand Up @@ -104,7 +104,7 @@ <h2>Categories</h2>
{{ end }}

<div class="well">
<form method="POST" action="{{ .BasePath }}/admin/categories/create">
<form method="POST" action="{{ .BasePath }}admin/categories/create">
{{ .csrfField }}
<div class="form-row">
<label for="cat-name-new" class="form-label">New category name</label>
Expand Down
14 changes: 7 additions & 7 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@

<title>{{ block "title" . }}Orange Forum{{ end }}</title>

<link rel="shortcut icon" href="{{ .BasePath }}/static/favicon.png">
<link rel="stylesheet" href="{{ .BasePath }}/static/orangeforum.css?v=100">
<link rel="shortcut icon" href="{{ .BasePath }}static/favicon.png">
<link rel="stylesheet" href="{{ .BasePath }}static/orangeforum.css?v=100">
</head>
<body>
<div id="topbar">
Expand All @@ -25,15 +25,15 @@
</div>
<div>
{{ if .User }}
<a href="{{ .BasePath }}/users/{{ .User.UserID }}">
<a href="{{ .BasePath }}users/{{ .User.UserID }}">
{{ .User.DisplayName }}
</a>
<a class="btn-link" href="{{ .BasePath }}/auth/logout" style="margin-left: 8px;">Logout</a>
<a class="btn-link" href="{{ .BasePath }}auth/logout" style="margin-left: 8px;">Logout</a>
{{ else }}
<a class="btn-link" href="{{ .BasePath }}/auth/signin">
<a class="btn-link" href="{{ .BasePath }}auth/signin">
Login <svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="14" height="14" viewBox="0 0 172 172" style=" fill:#000000;"><g fill="none" fill-rule="nonzero" stroke="none" stroke-width="1" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="10" stroke-dasharray="" stroke-dashoffset="0" font-family="none" font-weight="none" font-size="none" text-anchor="none" style="mix-blend-mode: normal"><path d="M0,172v-172h172v172z" fill="none"></path><g fill="#ffffff"><path d="M106.41156,111.89406c-0.51063,-5.54969 -0.30906,-9.41969 -0.30906,-14.48563c2.51281,-1.31687 7.01438,-9.71531 7.76688,-16.81031c1.97531,-0.16125 5.09281,-2.08281 6.00656,-9.68844c0.48375,-4.085 -1.46469,-6.38281 -2.66062,-7.10844c3.21156,-9.66156 9.89,-39.56 -12.33563,-42.65062c-2.29781,-4.01781 -8.15656,-6.04688 -15.76219,-6.04688c-30.46281,0.56438 -34.13125,23.005 -27.45281,48.6975c-1.19594,0.72563 -3.14437,3.02344 -2.66062,7.10844c0.92719,7.60563 4.03125,9.52719 6.00656,9.68844c0.7525,7.095 5.42875,15.49344 7.955,16.81031c0,5.06594 0.18812,8.93594 -0.3225,14.48563c-6.02,16.20562 -46.68188,11.65031 -48.56313,42.90594h130.72c-1.88125,-31.25562 -42.36844,-26.70031 -48.38844,-42.90594z"></path></g></g></svg>
</a>
<a class="btn-link" href="{{ .BasePath }}/auth/signup" style="margin-left: 8px;">Signup</a>
<a class="btn-link" href="{{ .BasePath }}auth/signup" style="margin-left: 8px;">Signup</a>
{{ end }}
</div>
</div>
Expand All @@ -43,6 +43,6 @@
{{ block "body" . }}
{{ end }}
</div>
<script src="{{ .BasePath }}/static/orangeforum.js?v=100"></script>
<script src="{{ .BasePath }}static/orangeforum.js?v=100"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion templates/commentedit.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h2>{{ if .Comment }}Edit{{ else }}New{{ end }} comment</h2>

<p>
<a href="{{ .BasePath }}">Home</a> / <a href="{{ .BasePath }}/categories/{{ .Category.CategoryID }}">{{ .Category.Name }}</a> / <a href="{{ .BasePath }}/categories/{{ .Category.CategoryID }}/topics/{{ .Topic.TopicID }}">{{ .Topic.Title }}</a> / {{ if .Comment }}Edit{{ else }}New{{ end }} comment
<a href="{{ .BasePath }}">Home</a> / <a href="{{ .BasePath }}categories/{{ .Category.CategoryID }}">{{ .Category.Name }}</a> / <a href="{{ .BasePath }}categories/{{ .Category.CategoryID }}/topics/{{ .Topic.TopicID }}">{{ .Topic.Title }}</a> / {{ if .Comment }}Edit{{ else }}New{{ end }} comment
</p>

<div class="well-wide">
Expand Down
2 changes: 1 addition & 1 deletion templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h2>Categories</h2>
<div class="cat-row" style="border-left: 6px solid {{ .IndexPageColorStr }};{{ if eq $i 0}}border-top: 4px solid lightgray;{{ end }}">
<div>
<div class="cat-title">
<a href="{{ $.BasePath }}/categories/{{ $c.CategoryID }}">{{ $c.Name }}</a>
<a href="{{ $.BasePath }}categories/{{ $c.CategoryID }}">{{ $c.Name }}</a>
</div>
<div class="cat-subtitle">
{{ $c.Description }}
Expand Down
4 changes: 2 additions & 2 deletions templates/ot_signin.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ <h2>Signin</h2>
<p style="color:red;">{{ .ErrMsg }}</p>
{{ end }}
<p>
Want to sign in with your password? <a href="{{ .BasePath }}/auth/signin?next={{ .Next }}">Signin!</a>
Want to sign in with your password? <a href="{{ .BasePath }}auth/signin?next={{ .Next }}">Signin!</a>
</p>
<p>
Don't have an account? <a href="{{ .BasePath }}/auth/signup?next={{ .Next }}">Sign up!</a>
Don't have an account? <a href="{{ .BasePath }}auth/signup?next={{ .Next }}">Sign up!</a>
</p>
{{ end }}
4 changes: 2 additions & 2 deletions templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ <h2>User profile</h2>
</form>
{{ if .User }}
<br>
<p><a href="{{ .BasePath }}/auth/changepass">Change password</a></p>
<p><a href="{{ .BasePath }}auth/changepass">Change password</a></p>
{{ end }}
{{ if .User }}{{ if .User.IsSuperAdmin }}
<p><a href="{{ .BasePath }}/admin">Admin section</a></p>
<p><a href="{{ .BasePath }}admin">Admin section</a></p>
{{ end }}{{ end }}
</div>
{{ else }}
Expand Down
4 changes: 2 additions & 2 deletions templates/signin.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ <h2>Signin</h2>
<p style="color:red;">{{ .ErrMsg }}</p>
{{ end }}
<p>
Want to sign in with a <a href="{{ .BasePath }}/auth/otsignin?next={{ .Next }}">one time link?</a>
Want to sign in with a <a href="{{ .BasePath }}auth/otsignin?next={{ .Next }}">one time link?</a>
</p>
<p>
Don't have an account? <a href="{{ .BasePath }}/auth/signup?next={{ .Next }}">Sign up!</a>
Don't have an account? <a href="{{ .BasePath }}auth/signup?next={{ .Next }}">Sign up!</a>
</p>

{{ .Var }}
Expand Down
2 changes: 1 addition & 1 deletion templates/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ <h2>Signup</h2>
<p style="color:red;">{{ .ErrMsg }}</p>
{{ end }}
<p>
Already have an account? <a href="{{ .BasePath }}/auth/signin?next={{ .Next }}">Signin!</a>
Already have an account? <a href="{{ .BasePath }}auth/signin?next={{ .Next }}">Signin!</a>
</p>
{{ end }}
Loading

0 comments on commit 8f383b0

Please sign in to comment.