Skip to content
Snippets Groups Projects
Commit 707e70f3 authored by Johannes Barstad's avatar Johannes Barstad
Browse files

resolved merge issue, SEE TODO in index.html

parents 9b9b0fac b0fd0043
No related branches found
No related tags found
No related merge requests found
...@@ -564,6 +564,10 @@ Ensure the default browser behavior of the `hidden` attribute. ...@@ -564,6 +564,10 @@ Ensure the default browser behavior of the `hidden` attribute.
margin-left: 0.75rem; margin-left: 0.75rem;
} }
.box-border {
box-sizing: border-box;
}
.block { .block {
display: block; display: block;
} }
...@@ -592,6 +596,10 @@ Ensure the default browser behavior of the `hidden` attribute. ...@@ -592,6 +596,10 @@ Ensure the default browser behavior of the `hidden` attribute.
height: 3rem; height: 3rem;
} }
.h-8 {
height: 2rem;
}
.w-full { .w-full {
width: 100%; width: 100%;
} }
......
...@@ -28,11 +28,30 @@ ...@@ -28,11 +28,30 @@
</div> </div>
<div class = "container w-full mt-1.5 mb-3 sm:pl-36 sm:pr-36 flex justify-center overflow-hidden"> <div class = "container w-full mt-1.5 mb-3 sm:pl-36 sm:pr-36 flex justify-center overflow-hidden">
<a href="./undersok"> <a href="/undersok">
<button class="bg-orange-500 p-2 rounded justify-center">Undersøk</button> <button class="bg-orange-500 p-2 rounded justify-center">Undersøk</button>
</a> </a>
<!-- TODO: Decide on keeping current implementation of submitting a link, og implement new below here, from last push.
Form input for retrieving search request (domain, url or filehash)
<form class="bg-gray-200 w-full grid place-items-center">
<div class = "bg-green-300 container w-full mt-3 mb-1.5 pl-2 pr-2 sm:pl-36 sm:pr-36 overflow-hidden">
<label for="inputText">Input url, filehash or domain:</label>
<input class="w-full rounded h-8 box-border p-2 m-0"
placeholder="https://www.ntnu.no"
type="text" name="inputText" id="inputText">
</div>
<div class = "bg-green-300 container w-full mt-1.5 mb-3 sm:pl-36 sm:pr-36 flex justify-center overflow-hidden">
<a href="./investigate">
<button class="bg-orange-500 p-2 rounded justify-center" type="submit">Investigate</button>
>>>>>>> b0fd00433d7850c57e2a671a259721d4edcfc6ed
</a>
</div> </div>
</form> -->
</div> </div>
</body> </body>
......
...@@ -8,23 +8,20 @@ type fileData struct { ...@@ -8,23 +8,20 @@ type fileData struct {
} }
type reputationDomain struct { type reputationDomain struct {
domain string domain string
isGood bool isGood bool
threatScore int threatScore int
} }
type reputationUrl struct { type ReputationUrl struct {
url string url string
isGood bool isGood bool
threatScore int threatScore int
} }
type fileHashReputation struct{ type fileHashReputation struct {
filehash string filehash string
filename string filename string
fileType string fileType string
fileSize string fileSize string
} }
package main package main
import ( import (
"fmt"
"log" "log"
"net/http" "net/http"
//"net/http"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
...@@ -24,6 +24,12 @@ func main() { ...@@ -24,6 +24,12 @@ func main() {
r.Static("/img", "./Tailwind/img") r.Static("/img", "./Tailwind/img")
r.GET("/", func(c *gin.Context) { r.GET("/", func(c *gin.Context) {
fmt.Print("The input text is: ")
// All parameters in the url can be retrieved with the c.Request.Url.Query() command
// Returns a map of all the items, can be used for parsing several values / put into a struct?
fmt.Println(c.Request.URL.Query()["inputText"])
c.HTML(http.StatusOK, "index.html", gin.H{ c.HTML(http.StatusOK, "index.html", gin.H{
"isSelected": true, "isSelected": true,
}) })
......
package searchreputation
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment