Skip to content

Commit

Permalink
Merge pull request #10 from chizmw/fix-first-page-footer-placement
Browse files Browse the repository at this point in the history
Fix first page footer placement
  • Loading branch information
chizmw authored Apr 14, 2023
2 parents 81a55fe + e40225c commit f7563c0
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 33 deletions.
15 changes: 15 additions & 0 deletions .changes/0.0.6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## 0.0.6 - 2023-04-14

### Added

* fix placement of footer info on first page
### Changed

* add more json assets to 'make refresh-json' [#2]
* Update gameinfo/*.json from assets
* pre-commit autoupdate, and format change for 'exclude'
* ignore .changes/unreleased/ files with yamllint
### Fixed

* [pre-commit] ignore anything in gameinfo and fonts as we don't author these ourself
* add make dep of 'install-dev' for 'process'
5 changes: 0 additions & 5 deletions .changes/unreleased/Changed-20230414-014524.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/unreleased/Changed-20230414-015528.yaml

This file was deleted.

5 changes: 0 additions & 5 deletions .changes/unreleased/Changed-20230414-115103.yaml

This file was deleted.

6 changes: 0 additions & 6 deletions .changes/unreleased/Fixed-20230414-105528.yaml

This file was deleted.

1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ repos:
hooks:
- id: yamllint
args: [--format, parsable, --strict]
exclude: ^.changes/unreleased

- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.2
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
and is generated by [Changie](https://github.com/miniscruff/changie).

## 0.0.6 - 2023-04-14

### Added

* fix placement of footer info on first page
### Changed

* add more json assets to 'make refresh-json' [#2]
* Update gameinfo/*.json from assets
* pre-commit autoupdate, and format change for 'exclude'
* ignore .changes/unreleased/ files with yamllint
### Fixed

* [pre-commit] ignore anything in gameinfo and fonts as we don't author these ourself
* add make dep of 'install-dev' for 'process'
## 0.0.5 - 2023-04-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ INPUT_FILE=

all: examples

process:
process: install-dev
@basename="$(shell basename "$(INPUT_FILE)" .json)" && \
poetry run python3 -m botcpdf.main "$(INPUT_FILE)"

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<!-- markdownlint-disable MD013 -->

![version](https://img.shields.io/badge/version-v0.0.5-blue) ![GitHub issues](https://img.shields.io/github/issues-raw/chizmw/botc-custom-script-json2pdf) ![GitHub last commit](https://img.shields.io/github/last-commit/chizmw/botc-custom-script-json2pdf) ![GitHub pull requests](https://img.shields.io/github/issues-pr/chizmw/botc-custom-script-json2pdf)
![version](https://img.shields.io/badge/version-v0.0.6-blue) ![GitHub issues](https://img.shields.io/github/issues-raw/chizmw/botc-custom-script-json2pdf) ![GitHub last commit](https://img.shields.io/github/last-commit/chizmw/botc-custom-script-json2pdf) ![GitHub pull requests](https://img.shields.io/github/issues-pr/chizmw/botc-custom-script-json2pdf)

<!-- markdownlint-enable MD013 -->

Expand Down
3 changes: 2 additions & 1 deletion botcpdf/role.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def __init__(self):
self.derive_night_values()

def derive_night_values(self):
"""Derive values for first_night and other_night"""
night_data = load_nightdata()
#print(night_data)

# loop through firstNight list in night_data; we need the index as well
for index, role_id in enumerate(night_data["firstNight"]):
Expand Down Expand Up @@ -189,6 +189,7 @@ def get_other_night_meta_roles(self) -> list[Role]:
"""Get a list of meta roles."""
return [self.roles["_dawn"], self.roles["_dusk"]]


# we're outside the class now, and this is just helper functions
def cleanup_role_id(id_slug) -> str:
"""Cleanup the character ID."""
Expand Down
1 change: 1 addition & 0 deletions botcpdf/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def load_role_data():
"""Load role data from a JSON file."""
return load_data("gameinfo/roles-bra1n.json")


def load_nightdata():
"""Load role data from a JSON file."""
return load_data("gameinfo/nightsheet.json")
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "botc-json2pdf"
version = "0.0.5"
version = "0.0.6"
description = ""
authors = ["Chisel <[email protected]>"]
readme = "README.md"
Expand Down
17 changes: 9 additions & 8 deletions templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,6 @@ div.not-first-night {
bottom: 5%;
transform: translateX(-50%);
}
div.not-affiliated {
position: absolute;
right: 0%;
bottom: 1%;
font-family: botc-light, sans-serif;
font-size: 7px;
}

header {
display: flex;
Expand All @@ -208,15 +201,23 @@ footer {
display: flex;
justify-content: space-between;
align-items: flex-start;
background-color: none;
color: black;
font-family: botc-light, sans-serif;
background-color: none;

position: fixed; /* Add this line */
bottom: 15px; /* Add this line */
left: 0;
right: 0;
padding: 0 10px; /* Add this line for some padding */
}

footer .footer-left {
left: 0%;
font-size: 8px;
}

footer .footer-right {
right: 0%;
font-size: 8px;
}

0 comments on commit f7563c0

Please sign in to comment.