File tree 3 files changed +11
-8
lines changed
3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,9 @@ A clone of [2048](https://play2048.co/), and also a remake of my first side proj
37
37
- Standard (default - blocks are relatively large)
38
38
- Compact (blocks are smaller)
39
39
- 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
40
43
41
44
## Development
42
45
@@ -106,9 +109,9 @@ npm run cypress run
106
109
107
110
Features I started but have decided to cut for the initial release. Will come back and finish these whenever I feel like it.
108
111
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
112
115
- Share Image feature ([ share-image] ( https://github.com/Coteh/2048-clone/tree/share-image ) )
113
116
- Allows player to share an image of their game board upon game over instead of just their score
114
117
- 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
122
125
123
126
- CLI interface
124
127
- Landscape mode
125
- - Undo feature (currently partially implemented for debugging purposes - enable debug mode when running locally to access)
126
128
- Sound effects
Original file line number Diff line number Diff line change @@ -923,20 +923,17 @@ document.addEventListener("DOMContentLoaded", async () => {
923
923
changelogLink . addEventListener ( "click" , async ( e ) => {
924
924
e . preventDefault ( ) ;
925
925
const dialogElem = createDialogContentFromTemplate ( "#changelog-content" ) ;
926
- console . log ( "changelogText" , changelogText ) ;
927
926
const changelog = await marked . parse ( changelogText )
928
- console . log ( "changelog" , changelog ) ;
929
927
const changelogElem = dialogElem . querySelector ( "#changelog-text" ) as HTMLElement ;
930
928
changelogElem . innerHTML = changelog ;
931
929
// Capitalize title
932
930
( 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
934
932
changelogElem . children . item ( 1 ) ?. remove ( ) ;
935
933
changelogElem . children . item ( 1 ) ?. remove ( ) ;
936
934
changelogElem . children . item ( 1 ) ?. remove ( ) ;
937
935
// All links in this section should open a new tab
938
936
changelogElem . querySelectorAll ( "a" ) . forEach ( elem => elem . target = "_blank" ) ;
939
- console . log ( dialogElem ) ;
940
937
renderDialog ( dialogElem , {
941
938
fadeIn : true ,
942
939
closable : true ,
Original file line number Diff line number Diff line change 41
41
position : relative;
42
42
}
43
43
44
+ .dialog > div .dialog-content > div .dialog-text > * : last-child {
45
+ padding : 0 0 16px 0 ;
46
+ }
47
+
44
48
.dialog button .close {
45
49
position : absolute;
46
50
top : 0 ;
You can’t perform that action at this time.
0 commit comments