diff --git a/.htaccess b/.htaccess
deleted file mode 100644
index 403e132..0000000
--- a/.htaccess
+++ /dev/null
@@ -1,33 +0,0 @@
-
-php_flag display_errors Off
-php_flag log_errors On
-php_value error_log syslog
-
-php_flag safe_mode On
-php_flag safe_mode_gid On
-php_value open_basedir /var/www/board
-php_value safe_mode_exec_dir /var/empty
-
-
-
- Order Deny,Allow
- Deny from all
-
-
-
-
-
-
- # these files require authentication
-
- SSLOptions +OptRenegotiate +StdEnvVars +ExportCertData
- SSLUserName SSL_CLIENT_S_DN_Email
- SSLVerifyClient require
-#
-# RewriteEngine on
-# RewriteCond %{SSL:SSL_CLIENT_VERIFY} !=SUCCESS
-# RewriteRule .? - [F]
-# ErrorDocument 403 "You need a client side certificate issued by CAcert to access this url"
-#
-
-
diff --git a/README.md b/README.md
index 6a3dbd4..ab8ccc0 100644
--- a/README.md
+++ b/README.md
@@ -71,7 +71,7 @@ use `openssl` to create a self signed server certificate and retrieve the CAcert
```shell script
openssl req -new -newkey rsa:2048 -keyout server.key -x509 -out server.crt -subj '/CN=localhost'
-curl -O cacert_class3.pem http://www.cacert.org/certs/class3_X0E.crt
+curl -o cacert_class3.pem http://www.cacert.org/certs/class3_X0E.crt
```
It is advisable to have a local mail setup that intercepts outgoing email or to use email addresses that you control.
@@ -91,8 +91,7 @@ Parameter | Description | How to get a valid value
`csrf_key` | A base64 encoded random byte value of at least 32 bytes used to encrypt [CSRF](https://en.wikipedia.org/wiki/Cross-site_request_forgery#Prevention) tokens | see [Generating random byte values](#generating-random-byte-values) below
`base_url` | The base URL of your application instance (production value is https://motions.cacert.org) | use https://localhost:8443
`mail_server`.`host` | Mail server host (production value is `localhost`) | `localhost`
-`mail_server`.`port` | Mail server TCP port (production value is `25` | see [how to setup a debugging SMTP server](#debugging-smtp-server) below and choose the port of that
-
+`mail_server`.`port` | Mail server TCP port (production value is `25` | see [how to setup a debugging SMTP server](#debugging-smtp-server) below and choose the port of that (default `8025`)
### Generating random byte values
```shell script
diff --git a/boardvoting.go b/boardvoting.go
index 7228849..e58bee1 100644
--- a/boardvoting.go
+++ b/boardvoting.go
@@ -219,7 +219,9 @@ func motionListHandler(w http.ResponseWriter, r *http.Request) {
templateContext.PrevPage = params.Page - 1
}
- renderTemplate(w, r, []string{"motions.html", "motion_fragments.html", "header.html", "footer.html"}, templateContext)
+ renderTemplate(w, r, []string{
+ "motions.html", "motion_fragments.html", "page_fragments.html", "header.html", "footer.html",
+ }, templateContext)
}
func motionHandler(w http.ResponseWriter, r *http.Request) {
@@ -252,7 +254,7 @@ func motionHandler(w http.ResponseWriter, r *http.Request) {
}
templateContext.Decision = decision
templateContext.PageTitle = fmt.Sprintf("Motion %s: %s", decision.Tag, decision.Title)
- renderTemplate(w, r, []string{"motion.html", "motion_fragments.html", "header.html", "footer.html"}, templateContext)
+ renderTemplate(w, r, []string{"motion.html", "motion_fragments.html", "page_fragments.html", "header.html", "footer.html"}, templateContext)
}
func singleDecisionHandler(w http.ResponseWriter, r *http.Request, tag string, handler func(http.ResponseWriter, *http.Request)) {
@@ -326,7 +328,7 @@ func (a *withDrawMotionAction) Handle(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(http.StatusPreconditionFailed), http.StatusPreconditionFailed)
return
}
- templates := []string{"withdraw_motion_form.html", "header.html", "footer.html", "motion_fragments.html"}
+ templates := []string{"withdraw_motion_form.html", "header.html", "footer.html", "motion_fragments.html", "page_fragments.html"}
var templateContext struct {
PageTitle string
Decision *DecisionForDisplay
@@ -366,7 +368,7 @@ func (h *newMotionHandler) Handle(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(http.StatusPreconditionFailed), http.StatusPreconditionFailed)
}
- templates := []string{"create_motion_form.html", "header.html", "footer.html"}
+ templates := []string{"create_motion_form.html", "page_fragments.html", "header.html", "footer.html"}
var templateContext struct {
Form NewDecisionForm
PageTitle string
@@ -428,7 +430,7 @@ func (a editMotionAction) Handle(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(http.StatusPreconditionFailed), http.StatusPreconditionFailed)
return
}
- templates := []string{"edit_motion_form.html", "header.html", "footer.html"}
+ templates := []string{"edit_motion_form.html", "page_fragments.html", "header.html", "footer.html"}
var templateContext struct {
Form EditDecisionForm
PageTitle string
@@ -560,7 +562,7 @@ func (h *directVoteHandler) Handle(w http.ResponseWriter, r *http.Request) {
http.Redirect(w, r, "/motions/", http.StatusMovedPermanently)
default:
- templates := []string{"direct_vote_form.html", "header.html", "footer.html", "motion_fragments.html"}
+ templates := []string{"direct_vote_form.html", "header.html", "footer.html", "motion_fragments.html", "page_fragments.html"}
var templateContext struct {
Decision *DecisionForDisplay
VoteChoice VoteChoice
@@ -601,7 +603,7 @@ func (h *proxyVoteHandler) Handle(w http.ResponseWriter, r *http.Request) {
http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
return
}
- templates := []string{"proxy_vote_form.html", "header.html", "footer.html", "motion_fragments.html"}
+ templates := []string{"proxy_vote_form.html", "header.html", "footer.html", "motion_fragments.html", "page_fragments.html"}
var templateContext struct {
Form ProxyVoteForm
Decision *DecisionForDisplay
diff --git a/boardvoting/static/images/CAcert-logo-colour.svg b/boardvoting/static/images/CAcert-logo-colour.svg
new file mode 100644
index 0000000..0d8e071
--- /dev/null
+++ b/boardvoting/static/images/CAcert-logo-colour.svg
@@ -0,0 +1,46 @@
+
+
+
+
\ No newline at end of file
diff --git a/boardvoting/static/images/favicon.ico b/boardvoting/static/images/favicon.ico
new file mode 100644
index 0000000..3c9c9c2
Binary files /dev/null and b/boardvoting/static/images/favicon.ico differ
diff --git a/boardvoting/templates/create_motion_form.html b/boardvoting/templates/create_motion_form.html
index ef72ec6..2d8db12 100644
--- a/boardvoting/templates/create_motion_form.html
+++ b/boardvoting/templates/create_motion_form.html
@@ -1,74 +1,66 @@
{{ template "header.html" . }}
-
-