improved anchor style

This commit is contained in:
Kim, Jimin 2022-01-24 09:45:44 +09:00
parent 3aa52e9315
commit 37e26b078d
3 changed files with 22 additions and 7 deletions

View file

@ -103,7 +103,7 @@ const TagSelect = (props: TagSelectProps) => {
multiValue: (styles) => ({ multiValue: (styles) => ({
...styles, ...styles,
color: "white", color: "white",
backgroundColor: theming.color.linkColor, backgroundColor: theming.light.linkColor,
borderRadius: "5px", borderRadius: "5px",
}), }),
multiValueLabel: (styles) => ({ multiValueLabel: (styles) => ({
@ -116,7 +116,7 @@ const TagSelect = (props: TagSelectProps) => {
marginLeft: "0.2rem", marginLeft: "0.2rem",
":hover": { ":hover": {
backgroundColor: "white", backgroundColor: "white",
color: theming.color.linkColor, color: theming.light.linkColor,
}, },
}), }),
}} }}

View file

@ -10,13 +10,28 @@ import theming from "./theming"
const anchorCSS = css` const anchorCSS = css`
a { a {
text-decoration: none; text-decoration: none;
color: ${theming.color.linkColor};
color: ${(props) =>
theming.theme(props.theme.currentTheme, {
light: theming.light.linkColor,
dark: theming.dark.linkColor,
})};
&:hover {
color: ${(props) =>
theming.theme(props.theme.currentTheme, {
light: theming.dark.linkColor,
dark: theming.light.linkColor,
})};
}
} }
// header anchor offset to compensate for navbar /* The "#" thingy used beside headers */
a.header-anchor { a.header-anchor {
/* compensate for navbar height*/
display: inline-block; display: inline-block;
margin-top: 4.5rem; margin-top: 4.5rem;
color: ${(props) => color: ${(props) =>
theming.theme(props.theme.currentTheme, { theming.theme(props.theme.currentTheme, {
light: "lightgray", light: "lightgray",
@ -24,6 +39,7 @@ const anchorCSS = css`
})}; })};
} }
/* footnote anchors */
a[id^="fnref"] { a[id^="fnref"] {
display: inline; display: inline;
padding-top: 4.5rem; padding-top: 4.5rem;

View file

@ -29,9 +29,6 @@ const theming = {
screen_size1: "1000px", screen_size1: "1000px",
screen_size2: "1500px", screen_size2: "1500px",
}, },
color: {
linkColor: "#4592F7",
},
dark: { dark: {
backgroundColor0: "#202225", backgroundColor0: "#202225",
backgroundColor1: "#36393F", backgroundColor1: "#36393F",
@ -39,6 +36,7 @@ const theming = {
color0: "#FFFFFF", color0: "#FFFFFF",
color1: "#EEEEEE", color1: "#EEEEEE",
color2: "#CCC", color2: "#CCC",
linkColor: "#66AAFF",
}, },
light: { light: {
backgroundColor0: "#FFFFFF", backgroundColor0: "#FFFFFF",
@ -47,6 +45,7 @@ const theming = {
color0: "#000000", color0: "#000000",
color1: "#111111", color1: "#111111",
color2: "#555", color2: "#555",
linkColor: "#4592F7",
}, },
styles: { styles: {
hoverCard: css` hoverCard: css`