Skip to content

Commit

Permalink
change: name of display short url to shawty rather than wavly
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza12700 committed Sep 13, 2024
1 parent 02c13c2 commit 9c52f6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ func main() {
// Creating the ServerMux router
router := http.NewServeMux()

// Serving static files
router.Handle("GET /static/", http.StripPrefix("/static/", http.FileServer(http.Dir("./static"))))

// Reading the URLS-SQL schema file
Expand Down
2 changes: 1 addition & 1 deletion partial-html/short-link.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

<a class="underline text-white" href="/s/{{ .ShortUrl }}">wavly/s/{{ .ShortUrl }}</a>
<a class="underline text-white" href="/s/{{ .ShortUrl }}">shawty/s/{{ .ShortUrl }}</a>
<p>Long URL: <a class="underline" href="{{ .OriginalUrl }}">{{ .OriginalUrl }}</a></p>

<a class="my-3 hover:underline w-fit p-3 rounded-md bg-zinc-700" href="/stat/{{ .ShortUrl }}">Total clicks of your short URL</a>
2 changes: 1 addition & 1 deletion static/stat.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1 class="text-5xl text-center text-white font-bold">Shawty</h1>
<div class="w-[56rem] flex flex-col gap-3 my-8 mx-auto">
<h2 class="text-3xl font-bold font-mono">Total number of clicks</h2>
<p>The number of clicks from the shortened URL that redirected the user to the destination page.</p>
<a class="underline bg-[#292929] font-mono p-2 w-fit rounded-md text-white" href="/s/{{ .ShortUrl }}">wavly/s/{{ .ShortUrl }}</a>
<a class="underline bg-[#292929] font-mono p-2 w-fit rounded-md text-white" href="/s/{{ .ShortUrl }}">shawty/s/{{ .ShortUrl }}</a>
<p class="text-lg font-bold flex gap-3">Original URL : <a class="underline font-mono" href="{{ .OriginalUrl }}">{{ .OriginalUrl }}</a></p>
<h3 class="font-bold text-xl font-mono">Count: {{ .Count }}</h3>
</div>
Expand Down

0 comments on commit 9c52f6e

Please sign in to comment.