Skip to content

Commit

Permalink
Update screenshots
Browse files Browse the repository at this point in the history
Signed-off-by: Jo Vandeginste <[email protected]>
  • Loading branch information
jovandeginste committed Jan 12, 2025
1 parent ef6f3a9 commit 18658b2
Show file tree
Hide file tree
Showing 21 changed files with 47 additions and 30 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ Login / registration form
- new users have to be activated by an admin
- registration can be disabled

#### Multilingual

![](docs/login-nl.png)

### Dashboard

![](docs/dashboard.png)
Expand Down Expand Up @@ -185,6 +189,9 @@ Details of a workout, with:
calculated and stored in the database (serialized).
- Or add a workout manually.

![](docs/upload_workouts_manual.png)


### Statistics to follow your progress

![](docs/statistics.png)
Expand Down Expand Up @@ -320,6 +327,8 @@ Because I keep forgetting how to build every component, I created a Makefile.
make all # Run tests and build all components

# Install system dependencies
make install-dev-deps
# Install Javascript libraries
make install-deps

# Testing
Expand Down
Binary file modified docs/dashboard-responsive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/dashboard.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/login-nl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/login.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/responsive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/single_workout-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/single_workout-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/single_workout-responsive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/single_workout-theme.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/statistics-responsive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/statistics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/upload_workouts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/upload_workouts_manual.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/workout_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 19 additions & 3 deletions screenshots.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ export default async function () {
});

try {
await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:8080/user/signin?lang=nl"),
]);

page.screenshot({ path: "docs/login-nl.png", fullPage: true });

await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:8080"),
Expand Down Expand Up @@ -60,7 +67,7 @@ export default async function () {

await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:8080/workouts/10"),
page.goto("http://localhost:8080/workouts/250"),
]);
page.screenshot({ path: "docs/single_workout-dark.png", fullPage: true });

Expand All @@ -69,13 +76,22 @@ export default async function () {
page.goto("http://localhost:8080/workouts/add"),
]);
page.screenshot({ path: "docs/upload_workouts.png", fullPage: true });
const options = page.locator("#manual #type");
await options.selectOption("running");
await page.waitForSelector("#manual #location");
page.locator("#manual #location").fill("brussels");
await page.waitForSelector("#manual #address-results");
page.screenshot({
path: "docs/upload_workouts_manual.png",
fullPage: true,
});

page.emulateMedia({
colorScheme: "light",
});
await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:8080/workouts/10"),
page.goto("http://localhost:8080/workouts/250"),
]);
page.screenshot({ path: "docs/single_workout-light.png", fullPage: true });

Expand All @@ -96,7 +112,7 @@ export default async function () {

await Promise.all([
page.waitForNavigation(),
page.goto("http://localhost:8080/workouts/10"),
page.goto("http://localhost:8080/workouts/250"),
]);
page.screenshot({ path: "docs/single_workout-responsive.png" });

Expand Down
2 changes: 1 addition & 1 deletion views/partials/address_results.templ
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ templ AddressResults(addresses []string) {
</script>
}
if len(addresses) > 0 {
<ul class="list-none">
<ul id="address-results" class="list-none">
for _, a := range addresses {
<li>
@helpers.IconFor("location")
Expand Down
2 changes: 1 addition & 1 deletion views/partials/address_results_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion views/workouts/add.templ
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ templ Add() {
<div class="inner-form">
<h3>{ i18n.T(ctx, "Use a file") }</h3>
<form
id="upload"
method="post"
action={ templ.SafeURL(helpers.RouteFor(ctx, "workouts-create")) }
enctype="multipart/form-data"
Expand Down Expand Up @@ -79,7 +80,7 @@ templ Add() {
<div>
<div class="inner-form">
<h3>{ i18n.T(ctx, "Manual") }</h3>
<form method="post" action={ templ.SafeURL(helpers.RouteFor(ctx, "workouts-create")) }>
<form id="manual" method="post" action={ templ.SafeURL(helpers.RouteFor(ctx, "workouts-create")) }>
<table class="sm:table-auto">
<thead>
<tr>
Expand Down
30 changes: 15 additions & 15 deletions views/workouts/add_templ.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 18658b2

Please sign in to comment.