-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: some proper data about user ip and location
- Loading branch information
Showing
13 changed files
with
625 additions
and
48 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,28 @@ | ||
use askama_axum::Template; | ||
|
||
use crate::project::Project; | ||
|
||
#[derive(Template)] | ||
#[template(path = "htmx/tabs.html")] | ||
pub struct TabsT { | ||
pub struct TabsT | ||
{ | ||
pub liked: bool, | ||
pub projects: Vec<Project>, | ||
} | ||
} | ||
|
||
#[derive(Template)] | ||
#[template(path = "htmx/location.html")] | ||
pub struct LocationT | ||
{ | ||
pub location: GeoLocation, | ||
} | ||
|
||
pub struct GeoLocation | ||
{ | ||
pub latitude: String, | ||
pub longitude: String, | ||
pub city: String, | ||
pub region: String, | ||
pub country: String, | ||
pub timezone: String, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<tr class="border px-4 py-2"> | ||
<td class="border px-4 py-2">Location</td> | ||
<td class="border px-4 py-2">{{ location.country }}, {{ location.city }}, {{ location.region }}</td> | ||
</tr> | ||
<tr> | ||
<td class="border px-4 py-2">Latitude & Longitude</td> | ||
<td class="border px-4 py-2">{{location.latitude}} | {{location.longitude}}</td> | ||
</tr> | ||
<tr> | ||
<td class="border px-4 py-2">Timezone</td> | ||
<td class="border px-4 py-2">{{location.timezone}}</td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters