Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Add: new logo for image detail page #15

Merged
merged 1 commit into from
Oct 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/components/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ const styles = {
},
}

const repositories = "repositories"
const explore = "explore"
const repositories = "/repositories"
const explore = "/explore"

const NavBar = () => {
const loc = useHistory();
Expand All @@ -49,13 +49,13 @@ const NavBar = () => {
const getActiveNavItemStyle = (who) => {
switch (who) {
case repositories:
if (loc.location.pathname === "/" + who) {
if (loc.location.pathname === who) {
return styles.activeNavItemStyle
}

return styles.navButtonStyle
case explore:
if (loc.location.pathname === "/" + who) {
if (loc.location.pathname === who) {
return styles.activeNavItemStyle
}

Expand Down
12 changes: 6 additions & 6 deletions src/pages/image_detail.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import NavBar from "../components/menu";
import {Typography, Badge, Card} from "antd";
import ReactMarkdown from "react-markdown";
import dc from "../styles/pictures/dc.png";
import containerLogo from "../styles/pictures/container-logo.png";
import {useParams} from "react-router-dom";

const { Title, Paragraph, Text, Link } = Typography;
Expand All @@ -19,20 +19,20 @@ with a colon, like the \`:id\` param defined in`
<div style={{display: "flex", justifyContent: "center", flexDirection: "column", alignItems: "center"}}>
<Card style={{width: "90%", marginTop: "2%"}}>
<div style={{flexDirection: "row", display: "flex", alignItems: "center"}}>
<img src={dc} alt="container-image-logo"/>
<div>
<h2 style={{fontWeight: "bold"}}>{username+"/"+imagename}</h2>
<img src={containerLogo} style={{height: 100, }} alt="container-image-logo"/>
<div style={{marginLeft: "2%"}}>
<Typography.Title level={2}>{username+"/"+imagename}</Typography.Title>
<p>{desc}</p>
</div>
</div>

<div style={{display: "flex", justifyContent: "space-between"}}>
<div style={{display: "flex", justifyContent: "space-between", marginTop: "1%"}}>
<div>
{
tags.map((t) => {
return <Badge
count={t}
style={{ backgroundColor: 'rgba(152,171,196,0.98)', color: "black", fontWeight: "500"}}
style={{ margin: "0 2px", backgroundColor: '#7c8fa9', color: "#fff", fontWeight: "bold"}}

/>
})
Expand Down
Binary file added src/styles/pictures/container-logo.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 removed src/styles/pictures/dc.png
Binary file not shown.