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

Commit

Permalink
Merge pull request #15 from containerish/image-detail-page
Browse files Browse the repository at this point in the history
Add: new logo for image detail page
  • Loading branch information
guacamole authored Oct 24, 2021
2 parents aab3816 + bb0303d commit 44a4a59
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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.

0 comments on commit 44a4a59

Please sign in to comment.