Skip to content

Commit

Permalink
Setup css variables
Browse files Browse the repository at this point in the history
  • Loading branch information
agneym committed Sep 15, 2019
1 parent 954b471 commit 684e97a
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ inputs:
commitMsg:
description: "commit message to be shown when adding image"
default: "just some wholesome content. yo all!"
background-color:
description: "background color for image"
default: "#ffffff"
font-color:
description: "font color for image"
default: "#000000"
runs:
using: "docker"
image: "Dockerfile"
2 changes: 2 additions & 0 deletions src/generate-html.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ function generateHtml(prop: Partial<IProps>) {
}
og-image-element {
--heading-font: 'Aleo', serif;
--background-color: ${prop.backgroundColor};
--font-color: ${prop.fontColor};
}
</style>
<script type="module" rel="preload" src="https://unpkg.com/@agney/og-image-element@0.1.0"></script>
Expand Down
6 changes: 5 additions & 1 deletion src/repo-props.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ import { getInput } from "@actions/core";
async function getRepoProps() {
const assetPath = getInput(`path`);
const commitMsg = getInput(`commitMsg`);
const backgroundColor = getInput(`background-color`);
const fontColor = getInput(`font-color`);
return {
assetPath,
commitMsg
commitMsg,
backgroundColor,
fontColor
};
}

Expand Down
2 changes: 2 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface IProps {
subtitle: string;
filename: string;
imageUrl: string;
backgroundColor: string;
fontColor: string;
}

export interface IFrontMatter {
Expand Down

0 comments on commit 684e97a

Please sign in to comment.