Installation | Basic Usage | Settings | Puzzle Object | License | Support | Donate

A Javascript app for solving acrostics in a browser.

Installation

Download latest version here (v1.0.2, January 2021)

Stylesheet <link rel="stylesheet" type="text/css" href="/path/to/mfacrostic.css"> Scripts <script src="/path/to/jquery-3.5.1.min.js"></script> <script src="/path/to/mfacrostic.js"></script> Optional; may improve mobile browser experience (add to <head>) <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

Basic Usage

$(element).mfAcrostic({...settings});

Create acrostic after document loaded/ready. For example, using a jQuery "ready" function:

$(function() { $("#my-acrostic-container").mfAcrostic({ puzzle: '/path/to/MyAcrostic.json', print: '/path/to/MyAcrostic.pdf', solution: '/path/to/MyAcrostic_Solution.pdf', maxCols: 30, hideHeader: true, }); });

NOTE: More than one mfAcrostic per web page has not been well-tested.

Settings

Key Description Type Default Examples
puzzle REQUIRED*
URL or path to puzzle JSON file; or a valid puzzle object.
String or Object * puzzle: '/path/puz.json'
puzzle: {...puz_object}
print URL or path for link to printable puzzle (pdf, png, etc.). String null print: '/path/puz.pdf'
solution URL or path for link to printable puzzle solution (pdf, png, etc.). String null solution: '/path/puz_solution.pdf'
defaultEm Base font size in pixels. Minimum of 16 is highly recommended to prevent auto-zooming in certain browsers. Integer 18 defaultEm: 21
maxCols Maximum number of grid columns. Integer null maxCols: 30
minWidth Minimum app width in pixels. Integer 240 minWindowWidth: 500
maxWidth Maximum app width in pixels. Integer null minWindowWidth: 1190
hideHeader Hide title, constructor, date above puzzle. Boolean false hideHeader: true
showGridPad Show trailing black squares on grids. Valid values are 'none', 'all', 'author', or 'grid'. String 'grid' showGridPad: 'none'
showGridPad: 'all'
showGridPad: 'author'
showGridPad: 'grid'
colorScheme Default color scheme for game board. String 'mfa-colors-default' colorScheme: 'mfa-colors-pastels'
disableStorage Disables saves of app progress/settings to localStorage. Boolean false disableStorage: true
disableAutoFocus Disables auto-focus on game board when puzzle loads. Boolean false disableAutoFocus: true

Puzzle Object

The mfAcrostic app creates a new puzzle instance from a puzzle object with its own compact, proprietary format. The object may be passed into the app either inline or in a JSON file (see the puzzle key in Settings).

Example of a puzzle object

{ "title": "Acrostic 136", "constructor": "Dave Murchie", "publishDate": "2020-12-28", "friendlyauthor": "A.A. Milne, \"Not That It Matters\"", "friendlyquote": "Almost anyone can be an author; the business is to collect money and fame from this state of being.", "quote": "ALMOST ANYONE CAN BE AN AUTHOR THE BUSINESS IS TO COLLECT MONEY AND FAME FROM THIS STATE OF BEING", "clues": [ { "clue": "\"I agree completely!\"", // Labelled as clue 'A.' in the app "answer": [ "7", // A, the 8th letter in 'quote' "58", // M, the 59th letter in 'quote' "54", // E, the 55th letter in 'quote' "22" // N, the 23rd letter in 'quote' ] }, { "clue": "Back at sea", // Labelled as clue 'B.' in the app "answer": [ "24", // A, the 25th letter in 'quote' "90", // F, the 91st letter in 'quote' "47" // T, the 48th letter in 'quote' ] }, {...more clues} ] }

Required object elements:

License

Creative Commons License

mfAcrostic is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Support

Support requests - including bug reports, usage/installation question, and feature requests - should be sent to the contact information found at the bottom of this page.

Support mfAcrostic with a donation to the developer - any amount is appreciated!