Skip to content

Commit d4837e1

Browse files
chore: correct routing / change range on project page
Signed-off-by: Henry Gressmann <[email protected]>
1 parent bb8b6ed commit d4837e1

File tree

11 files changed

+221
-124
lines changed

11 files changed

+221
-124
lines changed

Cargo.lock

Lines changed: 31 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

data/licenses-cargo.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

data/licenses-npm.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

scripts/build-licenses.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
2-
cd "$(dirname "$0")"
3-
cargo about generate --format json -o ../data/licenses-cargo.json
2+
cd "$(dirname "$0")" && cd ..
3+
cargo about generate --format json -o ./data/licenses-cargo.json

src/web/webext.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ impl<E: RustEmbed + Send + Sync> Endpoint for EmbeddedFilesEndpoint<E> {
102102
return Err(StatusCode::METHOD_NOT_ALLOWED.into());
103103
}
104104

105+
if path.starts_with("p/") {
106+
let mut parts = path.splitn(3, '/').collect::<Vec<&str>>();
107+
parts[1] = "project";
108+
path = parts.join("/");
109+
}
110+
105111
let file = if let Some(content) = E::get(&path) {
106112
Some(content)
107113
} else {

web/src/api/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export const metricNames: Record<Metric, string> = {
3232
views: "Total Views",
3333
sessions: "Total Sessions",
3434
unique_visitors: "Unique Visitors",
35-
avg_views_per_session: "Avg Views Per Session",
35+
avg_views_per_session: "Avg. Views Per Session",
3636
};
3737

3838
export const dimensionNames: Record<Dimension, string> = {

web/src/components/icons.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,6 @@ export const Favicon = ({
9898
}: IconProps & {
9999
fqdn: string;
100100
}) => {
101+
fqdn = fqdn.replace(/[^a-zA-Z0-9.-]/g, "");
101102
return <img src={`https://icons.duckduckgo.com/ip3/${fqdn}.ico`} alt="favicon" height={size} width={size} />;
102103
};

web/src/components/project.module.css

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,25 @@
1616
gap: 1rem;
1717
}
1818

19+
.projectHeader.projectHeader {
20+
display: flex;
21+
justify-content: space-between;
22+
align-items: center;
23+
gap: 1rem;
24+
width: 100%;
25+
padding-bottom: 0rem;
26+
27+
a {
28+
cursor: pointer;
29+
}
30+
31+
> h1 {
32+
font-size: 1.7rem;
33+
margin: 0;
34+
align-items: first baseline;
35+
}
36+
}
37+
1938
div.graph {
2039
height: 18rem;
2140
margin-bottom: 1rem;

0 commit comments

Comments
 (0)