Skip to content

Commit 8b4faaa

Browse files
committed
Fix no spacing at bottom of changelog dialog in mobile Safari
Other Changes: - Remove console logs that are no longer needed - Update README
1 parent 30c8fdf commit 8b4faaa

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

README.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ A clone of [2048](https://play2048.co/), and also a remake of my first side proj
3737
- Standard (default - blocks are relatively large)
3838
- Compact (blocks are smaller)
3939
- Confetti animation when player achieves 2048 (using [canvas-confetti](https://github.com/catdad/canvas-confetti) library)
40+
- Changelog Dialog
41+
- Shows the contents of [CHANGELOG.md](CHANGELOG.md) in a dialog box in-game
42+
- Uses [marked](https://github.com/markedjs/marked) to parse the changelog markdown file into HTML to be displayed in the dialog
4043

4144
## Development
4245

@@ -106,9 +109,9 @@ npm run cypress run
106109

107110
Features I started but have decided to cut for the initial release. Will come back and finish these whenever I feel like it.
108111

109-
- Changelog Dialog ([changelog-dialog](https://github.com/Coteh/2048-clone/tree/changelog-dialog))
110-
- Shows the contents of [CHANGELOG.md](CHANGELOG.md) in a dialog box in-game
111-
- Uses [marked](https://github.com/markedjs/marked) to parse the changelog markdown file into HTML to be displayed in the dialog
112+
- Undo feature
113+
- Currently partially implemented for debugging purposes
114+
- Enable debug mode when running locally to access
112115
- Share Image feature ([share-image](https://github.com/Coteh/2048-clone/tree/share-image))
113116
- Allows player to share an image of their game board upon game over instead of just their score
114117
- Currently uses [html-to-image](https://github.com/bubkoo/html-to-image) to take a snapshot of the DOM to save as image that is then exported to share sheet
@@ -122,5 +125,4 @@ Features I started but have decided to cut for the initial release. Will come ba
122125

123126
- CLI interface
124127
- Landscape mode
125-
- Undo feature (currently partially implemented for debugging purposes - enable debug mode when running locally to access)
126128
- Sound effects

src/index.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -923,20 +923,17 @@ document.addEventListener("DOMContentLoaded", async () => {
923923
changelogLink.addEventListener("click", async (e) => {
924924
e.preventDefault();
925925
const dialogElem = createDialogContentFromTemplate("#changelog-content");
926-
console.log("changelogText", changelogText);
927926
const changelog = await marked.parse(changelogText)
928-
console.log("changelog", changelog);
929927
const changelogElem = dialogElem.querySelector("#changelog-text") as HTMLElement;
930928
changelogElem.innerHTML = changelog;
931929
// Capitalize title
932930
(changelogElem.children.item(0) as HTMLElement).style.textTransform = "uppercase";
933-
// Remove info about Keep a Changelog and Unreleased section
931+
// Remove Keep a Changelog and Unreleased sections
934932
changelogElem.children.item(1)?.remove();
935933
changelogElem.children.item(1)?.remove();
936934
changelogElem.children.item(1)?.remove();
937935
// All links in this section should open a new tab
938936
changelogElem.querySelectorAll("a").forEach(elem => elem.target = "_blank");
939-
console.log(dialogElem);
940937
renderDialog(dialogElem, {
941938
fadeIn: true,
942939
closable: true,

src/styles/components/dialog.css

+4
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@
4141
position: relative;
4242
}
4343

44+
.dialog > div.dialog-content > div.dialog-text > *:last-child {
45+
padding: 0 0 16px 0;
46+
}
47+
4448
.dialog button.close {
4549
position: absolute;
4650
top: 0;

0 commit comments

Comments
 (0)