Skip to content

Commit

Permalink
lineにstyleを当てられるようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
yuiseki committed Jun 4, 2022
1 parent 95fd6b9 commit cb2e24f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/layout/ScrapboxPageView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const ScrapboxPageView: React.FC<{
return (
<>
<h2>{displayTitle}</h2>
<div>
<div className="page">
<Lines lines={lines} />
</div>
<footer>
Expand Down
3 changes: 2 additions & 1 deletion src/components/scrapbox/Lines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export const Lines: React.FC<{ lines: Line[] }> = ({ lines }) => {
return (
<div
key={idx}
className="line"
style={{
padding: "5px " + line.indent * 20 + "px",
}}
Expand All @@ -17,7 +18,7 @@ export const Lines: React.FC<{ lines: Line[] }> = ({ lines }) => {
</div>
);
} else {
return <div key={idx} />;
return <div key={idx} className="line" />;
}
})}
</>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function MyApp({ Component, pageProps, router }: AppProps) {
return (
<div className="root">
<h1>{process.env.siteName}</h1>
<nav>
<nav className="navbar">
<ul className="nav nav-pills">
{pinnedPages.map((page) => {
switch (page) {
Expand Down
4 changes: 4 additions & 0 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ a[href^="http"] {
margin-bottom: 60px;
}

.page .line {
min-height: 1em;
}

footer {
padding: 30px 0;
}
Expand Down

0 comments on commit cb2e24f

Please sign in to comment.