🏡 index : ~doyle/chartered.git

author Jordan Doyle <jordan@doyle.la> 2021-10-15 19:47:46.0 +01:00:00
committer Jordan Doyle <jordan@doyle.la> 2021-10-15 19:47:46.0 +01:00:00
commit
b1f975f2c070ec4d49f51f1d2c577692dd4c524e [patch]
tree
3d390babe4ed5ac1f2b5e73a43c5be2e99af31a2
parent
fdbcd3d902dfeb969f36492e20b6d9366f39b8b2
download
b1f975f2c070ec4d49f51f1d2c577692dd4c524e.tar.gz

Better profile picture for users without one



Diff

 chartered-frontend/src/util.tsx         | 11 ++++++++++-
 chartered-frontend/src/pages/Search.tsx |  2 ++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/chartered-frontend/src/util.tsx b/chartered-frontend/src/util.tsx
index 8bab153..d3addf4 100644
--- a/chartered-frontend/src/util.tsx
+++ a/chartered-frontend/src/util.tsx
@@ -1,6 +1,7 @@
import React = require("react");
import ReactPlaceholder from "react-placeholder";
import { AuthContext } from "./useAuth";
import {PersonFill} from "react-bootstrap-icons";

export const BASE_URL = process.env.BASE_URL || "http://localhost:8888";

@@ -95,9 +96,15 @@
  } else {
    return (
      <div
        className={`position-relative rounded-circle d-inline-block ${className}`}
        className={`position-relative rounded-circle d-inline-flex justify-content-center align-items-center ${className}`}
        style={{ width, height, background: "rgb(235, 235, 235)" }}
      />
      >
        <PersonFill style={{
          width: `calc(${width} / 2)`,
          height: `calc(${height} / 2)`,
          color: "rgba(0, 0, 0, .1)"
        }} />
      </div>
    );
  }
}
diff --git a/chartered-frontend/src/pages/Search.tsx b/chartered-frontend/src/pages/Search.tsx
index 0b68bfc..ce78ae5 100644
--- a/chartered-frontend/src/pages/Search.tsx
+++ a/chartered-frontend/src/pages/Search.tsx
@@ -181,6 +181,7 @@
                        <a
                          href={crate.homepage}
                          className="text-decoration-none me-2"
                          target="_blank"
                        >
                          Homepage
                        </a>
@@ -191,6 +192,7 @@
                        <a
                          href={crate.repository}
                          className="text-decoration-none me-2"
                          target="_blank"
                        >
                          Repository
                        </a>