diff --git a/apps/blueprints/src/components/Panel.tsx b/apps/blueprints/src/components/Panel.tsx index 4f7e919..9be2e7f 100644 --- a/apps/blueprints/src/components/Panel.tsx +++ b/apps/blueprints/src/components/Panel.tsx @@ -6,6 +6,7 @@ import clsx from "clsx"; const StyledPanel = styled(Box)` display: flex; flex-direction: column; + width: 100%; padding: 12px; background-color: #313031; box-shadow: inset 3px 0 3px -3px #201815, inset 2px 0 2px -2px #201815, @@ -13,16 +14,16 @@ const StyledPanel = styled(Box)` inset 0 1px 1px -1px #8f8c8b, inset -3px 0 3px -3px #201815, inset -2px 0 2px -2px #201815, inset -2px 0 1px -1px #201815, inset 0 -3px 3px -3px #000, inset 0 -2px 2px -2px #000, inset 0 -1px 1px -1px #000, 0 0 2px 0 #201815, 0 0 4px 0 #201815; +`; - .title { - font-weight: 900; - color: #ffe6c0; - line-height: 1.25; - margin: 0 0 12px 0; - font-size: 120%; - display: flex; - align-items: center; - } +const StyledTitle = styled.h2` + font-weight: 900; + color: #ffe6c0; + line-height: 1.25; + margin: 0 0 12px 0; + font-size: 120%; + display: flex; + align-items: center; `; const StyledPanelContent = styled.div` @@ -42,8 +43,8 @@ interface PanelProps extends Omit { export const Panel: React.FC = ({ title, bottom, children, className, ...props }) => ( - {title &&

{title}

} + {title && {title}} {children} - {bottom &&
{bottom}
} + {bottom &&
{bottom}
}
); diff --git a/apps/blueprints/src/components/blueprint/Blueprint.tsx b/apps/blueprints/src/components/blueprint/Blueprint.tsx index 6b44921..4e1694b 100644 --- a/apps/blueprints/src/components/blueprint/Blueprint.tsx +++ b/apps/blueprints/src/components/blueprint/Blueprint.tsx @@ -13,24 +13,16 @@ import { BlueprintData } from "./BlueprintData"; import { BlueprintInfo } from "./BlueprintInfo"; import { BlueprintTags } from "./BlueprintTags"; import { BlueprintEntities } from "./BlueprintEntities"; -import { FactorioCode } from "../FactorioCode"; const StyledBlueptintPage = styled(Grid)` grid-gap: 16px; - .title { - position: relative; - width: 100%; - display: flex; - align-items: center; - - .text { - white-space: nowrap; - width: calc(100% - 120px); - display: inline-block; - overflow: hidden; - text-overflow: ellipsis; - } + .text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + margin-right: 0.5rem; + flex-grow: 1; } .panel { @@ -42,10 +34,6 @@ const StyledBlueptintPage = styled(Grid)` overflow: auto; } } - - .description { - max-height: 600px; - } } `; @@ -89,7 +77,7 @@ export const BlueprintSubPage: React.FC = ({ gridColumn={chakraResponsive({ mobile: "1", desktop: "3 / span 2" })} gridRow="1" title={ -
+ <> Image = ({ /> )} -
+ } > {string && } + <> {blueprint_page.title} - + } > {blueprint_page.description_markdown} diff --git a/apps/blueprints/src/components/blueprint/BlueprintBook.tsx b/apps/blueprints/src/components/blueprint/BlueprintBook.tsx index 82749ca..0dfab4a 100644 --- a/apps/blueprints/src/components/blueprint/BlueprintBook.tsx +++ b/apps/blueprints/src/components/blueprint/BlueprintBook.tsx @@ -29,12 +29,12 @@ import { FactorioCode } from "../FactorioCode"; const StyledBlueptintPage = styled(Grid)` grid-gap: 16px; - .title .text { + .text { white-space: nowrap; - width: calc(100% - 120px); - display: inline-block; overflow: hidden; text-overflow: ellipsis; + margin-right: 0.5rem; + flex-grow: 1; } .panel { @@ -46,10 +46,6 @@ const StyledBlueptintPage = styled(Grid)` overflow: auto; } } - - .description { - max-height: 600px; - } } `; @@ -190,15 +186,9 @@ export const BlueprintBookSubPage: React.FC = ({ - Description - - - } > {blueprint_page.description_markdown}