mirror of
https://github.com/4rkal/shortr.git
synced 2024-11-14 05:37:23 +02:00
28 lines
444 B
Plaintext
28 lines
444 B
Plaintext
package views
|
|
|
|
import (
|
|
"github.com/4rkal/shortr/models"
|
|
"fmt"
|
|
|
|
)
|
|
|
|
templ StatsForm(){
|
|
@Base(){
|
|
<form action="/stats" method="post">
|
|
<label for="name">Website ID:</label>
|
|
<input type="text" id="id" name="id" required>
|
|
<br>
|
|
<input type="submit" value="Submit">
|
|
</form>
|
|
}
|
|
}
|
|
|
|
templ Stats(link *models.Link){
|
|
@Base(){
|
|
<h1>Statistics for {link.Url}</h1>
|
|
|
|
<h2>Visitors {fmt.Sprintf("%v",link.Clicks)}</h2>
|
|
|
|
}
|
|
}
|