diff --git a/etc/devel.conf b/etc/devel.conf index e41f163..dcc106a 100644 --- a/etc/devel.conf +++ b/etc/devel.conf @@ -70,7 +70,7 @@ ip4.address=0.0.0.0 ip4.port=9000 # Name of web theme to use -theme=integral +theme=bootstrap # Path to the selected themes template files template.dir=%(install.dir)s/themes/%(theme)s/templates diff --git a/themes/bootstrap/public/inbucket.css b/themes/bootstrap/public/inbucket.css new file mode 100644 index 0000000..e897437 --- /dev/null +++ b/themes/bootstrap/public/inbucket.css @@ -0,0 +1,115 @@ +html { + position: relative; + min-height: 100%; +} + +body { + padding-top: 70px; + /* Margin bottom by footer height */ + margin-bottom: 60px; +} + +.mailbox-header { + font-size: 20px; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + /* Set the fixed height of the footer here */ + height: 70px; + background-color: #f5f5f5; +} + +.container .text-muted { + margin: 20px 0; +} + +#emailContent { + padding-bottom: 20px; +} + +#emailHeader { + border-collapse: collapse; +} + +#emailHeader th, #emailHeader td { + text-align: left; + padding: 0 3px 3px 0; +} + +#emailSubject { + border-bottom: 1px #606060 solid; + margin: 0; + width: 617px; +} + +#emailBody { + color: #555; + margin-top: 15px; +} + +#emailActions { + padding: 5px 0; + margin: 0 0 10px 0; +} + +#emailActions a { + background: #8ac6dc; + color: #fff; + text-decoration: none; + font-weight: bold; + padding: 5px; +} + +#emailActions a:hover { + background: #becf74; +} + +.errors { + background-color: #ffa0a0; + color: #333; + padding: 5px 10px; +} + +table.metrics { +} + +.metrics th { + text-align: left; + width: 15em; +} + +.metrics td.number { + width: 10em; +} + +.metrics td.sparkline { + width: 200px; +} + +#emailAttachments { + border-collapse: collapse; +} + +#emailAttachments th, #emailAttachments td { + text-align: left; + padding: 0 3px 3px 0; +} + +#emailAttachments .fileName:before { + content: '\203A\00A0'; +} + +#emailAttachments a { + background: #8ac6dc; + color: #fff; + text-decoration: none; + padding: 0 5px; +} + +#emailAttachments a:hover { + background: #becf74; +} + diff --git a/themes/bootstrap/templates/_base.html b/themes/bootstrap/templates/_base.html index 7f396b2..583af10 100644 --- a/themes/bootstrap/templates/_base.html +++ b/themes/bootstrap/templates/_base.html @@ -1,54 +1,75 @@ - - - + + - + + + + {{template "title" .}} - - - - + + + + + {{template "script" .}} - -
-
- {{template "menu" .}} + + +
+ {{with .ctx.Session.Flashes "errors"}} +
+

Please fix the following errors and resubmit:

+

    + {{range .}} +
  • {{.}}
  • + {{end}} +
+ {{end}} + + {{template "content" .}}
- + + diff --git a/themes/bootstrap/templates/mailbox/_list.html b/themes/bootstrap/templates/mailbox/_list.html index 49a656e..9500bcf 100644 --- a/themes/bootstrap/templates/mailbox/_list.html +++ b/themes/bootstrap/templates/mailbox/_list.html @@ -1,12 +1,12 @@ {{$name := .name}} {{range .messages}} -
-
{{.Subject}}
-
{{.From}}
-
{{friendlyTime .Date}}
-
+ {{else}} -
-

No messages!

-
+
No messages!
{{end}} diff --git a/themes/bootstrap/templates/mailbox/index.html b/themes/bootstrap/templates/mailbox/index.html index 4b5a174..cd7cfb5 100644 --- a/themes/bootstrap/templates/mailbox/index.html +++ b/themes/bootstrap/templates/mailbox/index.html @@ -13,19 +13,13 @@ } function listLoaded() { - $('.listEntry').hover( - function() { - $(this).addClass("listEntryHover") - }, - function() { - $(this).removeClass("listEntryHover") - } - ).click( - function() { - $('.listEntry').removeClass("listEntrySelected") - $(this).addClass("listEntrySelected") - $('#emailContent').load('/mailbox/{{.name}}/' + this.id, messageLoaded) - } + $('.listEntry').click( + function() { + $('.listEntry').removeClass("disabled") + $(this).addClass("disabled") + $('#emailContent').load('/mailbox/{{.name}}/' + this.id, messageLoaded) + selected = this.id + } ) $("#messageList").slideDown() if (selected != "") { @@ -73,20 +67,36 @@ {{end}} -{{define "menu"}} - - -
-{{end}} - {{define "content"}} -
-

Select a message at left, or enter a different username into the box on upper right.

+
+
+ + {{.name}} +
+
+ +
+ {{with .ctx.Session.Flashes "errors"}} +
+

Please fix the following errors and resubmit:

+

    + {{range .}} +
  • {{.}}
  • + {{end}} +
+
+ {{end}} +
+

Select a message at left, or enter a different username into the box on upper right.

+
{{end}}