Skip to content

Commit

Permalink
Added branch and commit info in footer
Browse files Browse the repository at this point in the history
  • Loading branch information
JoLoZ authored and tsa96 committed Aug 13, 2023
1 parent a79697d commit 668b978
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/exporter/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ export class Templater {

replacers.game = slug.game;

replacers.commit = process.env.CF_PAGES_COMMIT_SHA || 'UNAVAILABLE';
replacers.branch = process.env.CF_PAGES_BRANCH || 'UNAVAILABLE';

// Read template HTML
let res: HTMLString = fs.readFileSync('templates/main.html', 'utf8');

Expand Down
6 changes: 6 additions & 0 deletions static/assets/css/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ body {
float: right;
}

.footer {
border-top: 0.1rem solid #555;
margin-top: 1rem;
padding-top: 0.5rem;
}

.content {
margin-top: 5rem;
margin-left: 20rem;
Expand Down
1 change: 1 addition & 0 deletions templates/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ <h2>Documentation</h2>
<div class="content">
<div class="notices"></div>
<div id="content">%CONTENT%</div>
<div class="footer">Commit: <code>%COMMIT%</code> Branch: <code>%BRANCH%</code></div>
</div>

<dialog id="gameSelector">
Expand Down

0 comments on commit 668b978

Please sign in to comment.