Add a cut off head :)

This commit is contained in:
Aaron Fischer 2015-12-06 15:53:11 +01:00
parent 266cd24045
commit a6a9a3efb4
4 changed files with 18 additions and 7 deletions

View file

@ -15,6 +15,13 @@ textarea {
margin-right: 30px; margin-right: 30px;
} }
#head {
float: left;
margin-right: 20px;
margin-top: 20px;
}
{% if cljs %} {% if cljs %}
@-moz-keyframes three-quarters-loader { @-moz-keyframes three-quarters-loader {
0% { 0% {

Binary file not shown.

After

Width:  |  Height:  |  Size: 968 B

View file

@ -1,15 +1,18 @@
{% extends "base.html" %} {% extends "base.html" %}
{% block content %} {% block content %}
<div class="row"> <div class="row">
<div class="span12"> <div class="span3">
<p>Use this form to analyze a e-mail. Just paste the whole e-mail <img id="head" src="img/head.png">
</div>
<div class="span9">
<p class="col-md-9">Use this form to analyze a e-mail. Just paste the whole e-mail
in <strong>raw mode</strong> here and hit the analyze button. The e-mail in <strong>raw mode</strong> here and hit the analyze button. The e-mail
will be analyzed and an visual representation will be generated. Use this will be analyzed and an visual representation will be generated. Use this
tool to find e-mail problems or to see which servers, locations and tool to find e-mail problems or to see which servers, locations and
companies the e-mail passed. This tool is intended for debugging e-mail companies the e-mail passed. This tool is intended for debugging e-mail
communication.</p> communication.</p>
<form action="/analyze" method="post"> <form class="col-md-9" action="/analyze" method="post">
{% csrf-field %} {% csrf-field %}
<textarea class="form-control" name="mailheader" placeholder="Paste your e-mail in source format (with headers) here."></textarea><br> <textarea class="form-control" name="mailheader" placeholder="Paste your e-mail in source format (with headers) here."></textarea><br>
<input class="btn btn-success form-control" type="submit" name="send" <input class="btn btn-success form-control" type="submit" name="send"

View file

@ -13,10 +13,6 @@
(defn about-page [] (defn about-page []
(layout/render "about.html")) (layout/render "about.html"))
(defn show-sample [index]
(let [email-content (slurp (str "sample-data/example" index ".eml"))]
(show-result email-content)))
;; TODO: Show more information (mail round trip time, ...) ;; TODO: Show more information (mail round trip time, ...)
(defn show-result [message-string] (defn show-result [message-string]
(if (empty? (parser/parse message-string)) (if (empty? (parser/parse message-string))
@ -28,6 +24,11 @@
:email parsed-email :email parsed-email
:token token})))) :token token}))))
(defn show-sample [index]
(let [email-content (slurp (str "sample-data/example" index ".eml"))]
(show-result email-content)))
(defn generated-image [token] (defn generated-image [token]
(-> (clojure.java.io/input-stream (str "generated-images/" token ".svg")) (-> (clojure.java.io/input-stream (str "generated-images/" token ".svg"))
ok ok