redirecter for ao3 that adds opengraph metadata

start adding more themes

Changed files
+187 -35
src
+17 -17
src/lib/ogimage.js
···
{image.topLine}
</div>
-
{image.props.rating && image.rating === 'E' && (<Explicit fg={theme.background} bg={theme.accent} width={28} height={28} />)}
-
{image.props.rating && image.rating === 'M' && (<Mature fg={theme.background} bg={theme.accent} width={28} height={28} />)}
-
{image.props.rating && image.rating === 'T' && (<Teen fg={theme.background} bg={theme.accent} width={28} height={28} />)}
-
{image.props.rating && image.rating === 'G' && (<General fg={theme.background} bg={theme.accent} width={28} height={28} />)}
-
{image.props.rating && image.rating === 'NR' && (<NotRated fg={theme.background} bg={theme.accent} width={28} height={28} />)}
+
{image.props.rating && image.rating === 'E' && (<Explicit fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}
+
{image.props.rating && image.rating === 'M' && (<Mature fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}
+
{image.props.rating && image.rating === 'T' && (<Teen fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}
+
{image.props.rating && image.rating === 'G' && (<General fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}
+
{image.props.rating && image.rating === 'NR' && (<NotRated fg={theme.accentColor} bg={theme.accent} width={28} height={28} />)}
-
{image.props.warnings && image.warning === 'NW' && (<NoWarnings fg={theme.background} bg={theme.accent2} width={28} height={28} />)}
-
{image.props.warnings && image.warning === 'CNTW' && (<ChoseNotToWarn fg={theme.background} bg={theme.accent2} width={28} height={28} />)}
-
{image.props.warnings && image.warning === 'W' && (<Warnings fg={theme.background} bg={theme.accent2} width={28} height={28} />)}
+
{image.props.warnings && image.warning === 'NW' && (<NoWarnings fg={theme.accent2Color} bg={theme.accent2} width={28} height={28} />)}
+
{image.props.warnings && image.warning === 'CNTW' && (<ChoseNotToWarn fg={theme.accent2Color} bg={theme.accent2} width={28} height={28} />)}
+
{image.props.warnings && image.warning === 'W' && (<Warnings fg={theme.accent2Color} bg={theme.accent2} width={28} height={28} />)}
-
{image.props.category && image.category === 'F' && (<Yuri fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
-
{image.props.category && image.category === 'M' && (<Yaoi fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
-
{image.props.category && image.category === 'FM' && (<Het fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
-
{image.props.category && image.category === 'G' && (<Gen fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
-
{image.props.category && image.category === 'MX' && (<MultiShip fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
-
{image.props.category && image.category === 'O' && (<OtherShip fg={theme.background} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'F' && (<Yuri fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'M' && (<Yaoi fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'FM' && (<Het fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'G' && (<Gen fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'MX' && (<MultiShip fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
+
{image.props.category && image.category === 'O' && (<OtherShip fg={theme.accent3Color} bg={theme.accent3} width={28} height={28} />)}
</div>
<div
style={{
···
<span
style={{
backgroundColor: theme.accent2,
-
color: theme.descBackground,
+
color: theme.accent2Color,
padding: "3px 5px",
borderRadius: 5
}}
···
<span
style={{
backgroundColor: theme.accent3,
-
color: theme.descBackground,
+
color: theme.accent3Color,
padding: "3px 5px",
borderRadius: 5
}}
···
<span
style={{
backgroundColor: theme.accent4,
-
color: theme.descBackground,
+
color: theme.accent4Color,
padding: "3px 5px",
borderRadius: 5
}}
+170 -18
src/lib/themes.js
···
descBackground: '#FFFFFF',
descColor: '#000000',
accent: '#FFFFFF',
-
accent2: '#990000',
-
accent3: '#009900',
-
accent4: '#000099'
+
accentColor: '#990000',
+
accent2: '#CC9999',
+
accent2Color: '#990000',
+
accent3: '#EEBBBB',
+
accent3Color: '#990000',
+
accent4: '#FFDDDD',
+
accent4Color: '#990000'
},
softEra: {
name: 'Soft Era',
···
descBackground: '#F9F5F5',
descColor: '#414141',
accent: '#DB90A7',
+
accentColor: '#F9F5F5',
accent2: '#EEAABE',
+
accent2Color: '#F9F5F5',
accent3: '#82B4E3',
-
accent4: '#a29acb'
+
accent3Color: '#F9F5F5',
+
accent4: '#a29acb',
+
accent4Color: '#F9F5F5',
},
wildCherry: {
name: 'Wild Cherry',
···
descBackground: '#FFFFFF',
descColor: '#2B1F32',
accent: '#E15D97',
+
accentColor: '#FFFFFF',
accent2: '#0AACC5',
+
accent2Color: '#FFFFFF',
accent3: '#FFB86C',
-
accent4: '#35BA66'
+
accent3Color: '#2B1F32',
+
accent4: '#35BA66',
+
accent4Color: '#FFFFFF',
},
rosePine: {
name: 'Rosé Pine',
···
descBackground: '#1f1d2e',
descColor: '#e0def4',
accent: '#eb6f92',
-
accent2: '#31748f',
+
accentColor: '#191724',
+
accent2: '#9ccfd8',
+
accent2Color: '#191724',
accent3: '#f6c177',
-
accent4: '#c4a7e7'
+
accent3Color: '#191724',
+
accent4: '#c4a7e7',
+
accent4Color: '#191724',
},
rosePineDawn: {
name: 'Rosé Pine Dawn',
···
descBackground: '#fffaf3',
descColor: '#575279',
accent: '#eb6f92',
+
accentColor: '#faf4ed',
accent2: '#286983',
+
accent2Color: '#faf4ed',
accent3: '#ea9d34',
-
accent4: '#907aa9'
+
accent3Color: '#faf4ed',
+
accent4: '#907aa9',
+
accent4Color: '#faf4ed',
},
rosePineMoon: {
name: 'Rosé Pine Moon',
···
descBackground: '#2a273f',
descColor: '#e0def4',
accent: '#b4637a',
-
accent2: '#3e8fb0',
+
accentColor: '#232136',
+
accent2: '#9ccfd8',
+
accent2Color: '#232136',
accent3: '#f6c177',
-
accent4: '#c4a7e7'
+
accent3Color: '#232136',
+
accent4: '#c4a7e7',
+
accent4Color: '#232136',
},
solarizedLight: {
name: 'Solarized Light',
···
descBackground: '#eee8d5',
descColor: '#002b36',
accent: '#d33682',
+
accentColor: '#fdf6e3',
accent2: '#2aa198',
+
accent2Color: '#fdf6e3',
accent3: '#859900',
-
accent4: '#6c71c4'
+
accent3Color: '#fdf6e3',
+
accent4: '#6c71c4',
+
accent4Color: '#fdf6e3',
},
solarizedDark: {
name: 'Solarized Dark',
···
descBackground: '#073642',
descColor: '#fdf6e3',
accent: '#d33682',
+
accentColor: '#002b36',
accent2: '#2aa198',
+
accent2Color: '#002b36',
accent3: '#859900',
-
accent4: '#6c71c4'
+
accent3Color: '#002b36',
+
accent4: '#6c71c4',
+
accent4Color: '#002b36',
},
squidgeworld: {
name: 'Squidgeworld',
···
color: '#f5f5dc',
descBackground: '#f5f5dc',
descColor: '#2a2a2a',
-
accent: '#fece3f',
+
accent: '#FFC825',
+
accentColor: '#f5f5dc',
accent2: '#818D4C',
+
accent2Color: '#f5f5dc',
accent3: '#6D7A34',
-
accent4: '#556121'
+
accent3Color: '#f5f5dc',
+
accent4: '#556121',
+
accent4Color: '#f5f5dc',
},
superlove: {
name: 'Superlove',
···
color: '#ffffff',
descBackground: '#FFFFFF',
descColor: '#2a2a2a',
-
accent: '#F9E4E6',
+
accent: '#F4C4C5',
+
accentColor: '#ffffff',
accent2: '#a33961',
+
accent2Color: '#ffffff',
accent3: '#87254A',
-
accent4: '#6A1133'
+
accent3Color: '#ffffff',
+
accent4: '#6A1133',
+
accent4Color: '#ffffff',
},
catppuccinMocha: {
name: 'Catppuccin Mocha',
···
descBackground: '#313244',
descColor: '#bac2de',
accent: '#f5e0dc',
+
accentColor: '#1e1e2e',
accent2: '#cba6f7',
+
accent2Color: '#1e1e2e',
accent3: '#fab387',
-
accent4: '#89dceb'
+
accent3Color: '#1e1e2e',
+
accent4: '#89dceb',
+
accent4Color: '#1e1e2e',
},
catppuccinLatte: {
name: 'Catppuccin Latte',
···
accent: '#dc8a78',
accentColor: '#FFFFFF',
accent2: '#8839ef',
+
accent2Color: '#eff1f5',
accent3: '#fe640b',
-
accent4: '#04a5e5'
+
accent3Color: '#eff1f5',
+
accent4: '#04a5e5',
+
accent4Color: '#eff1f5',
+
},
+
atelierCave: {
+
name: 'Atelier Cave',
+
background: '#19171c',
+
color: '#655F6D',
+
descBackground: '#19171c',
+
descColor: '#E2DFE7',
+
accent: '#BE4678',
+
accentColor: '#E2DFE7',
+
accent2: '#2A9292',
+
accent2Color: '#E2DFE7',
+
accent3: '#AA573C',
+
accent3Color: '#E2DFE7',
+
accent4: '#A06E3B',
+
accent4Color: '#E2DFE7'
+
},
+
atelierDune: {
+
name: 'Atelier Dune',
+
background: '#20201d',
+
color: '#7D7A68',
+
descBackground: '#20201d',
+
descColor: '#7D7A68',
+
accent: '#D73737',
+
accentColor: '#FEFBEC',
+
accent2: '#60AC39',
+
accent2Color: '#FEFBEC',
+
accent3: '#AE9513',
+
accent3Color: '#FEFBEC',
+
accent4: '#6684E1',
+
accent4Color: '#FEFBEC'
+
},
+
atelierEstuary: {
+
name: 'Atelier Estuary',
+
background: '#22221b',
+
color: '#6C6B5A',
+
descBackground: '#22221b',
+
descColor: '#E7E6DF',
+
accent: '#BA6236',
+
accentColor: '#F4F3EC',
+
accent2: '#7D9726',
+
accent2Color: '#F4F3EC',
+
accent3: '#AE7313',
+
accent3Color: '#F4F3EC',
+
accent4: '#36A166',
+
accent4Color: '#F4F3EC'
+
},
+
atelierForest: {
+
name: 'Atelier Forest',
+
background: '#1b1918',
+
color: '#766E6B',
+
descBackground: '#1b1918',
+
descColor: '#F1EFEE',
+
accent: '#F22C40',
+
accentColor: '#F1EFEE',
+
accent2: '#7B9726',
+
accent2Color: '#F1EFEE',
+
accent3: '#DF5320',
+
accent3Color: '#F1EFEE',
+
accent4: '#407EE7',
+
accent4Color: '#F1EFEE'
+
},
+
atelierHeath: {
+
name: 'Atelier Heath',
+
background: '#1b1918',
+
color: '#776977',
+
descBackground: '#1b1918',
+
descColor: '#F7F3F7',
+
accent: '#CA402B',
+
accentColor: '#F7F3F7',
+
accent2: '#918B3B',
+
accent2Color: '#F7F3F7',
+
accent3: '#BB8A35',
+
accent3Color: '#F7F3F7',
+
accent4: '#516AEC',
+
accent4Color: '#F7F3F7'
+
},
+
atelierLakeside: {
+
name: 'Atelier Lakeside',
+
background: '#161b1d',
+
color: '#5A7B8C',
+
descBackground: '#161b1d',
+
descColor: '#EBF8FF',
+
accent: '#D22D72',
+
accentColor: '#EBF8FF',
+
accent2: '#568C3B',
+
accent2Color: '#EBF8FF',
+
accent3: '#935C25',
+
accent3Color: '#EBF8FF',
+
accent4: '#257FAD',
+
accent4Color: '#EBF8FF'
+
},
+
atelierPlateau: {
+
name: 'Atelier Plateau',
+
background: '#1b1818',
+
color: '#655D5D',
+
descBackground: '#1b1818',
+
descColor: '#F4ECEC',
+
accent: '#CA4949',
+
accentColor: '#F4ECEC',
+
accent2: '#4B8B8B',
+
accent2Color: '#F4ECEC',
+
accent3: '#A06E3B',
+
accent3Color: '#F4ECEC',
+
accent4: '#7272CA',
+
accent4Color: '#F4ECEC'
}
}