diff --git a/passmate.css b/passmate.css index ecc58a5..0ab36c3 100644 --- a/passmate.css +++ b/passmate.css @@ -250,6 +250,11 @@ overview,product { } letter { + display: none; + } + + product.index-letters letter { + display: block; font-family: 'copernicus'; font-weight: 600; font-size: 4em; @@ -312,6 +317,10 @@ overview,product { grid-row-gap: 0.2em; } + product.index-letters passwordBlock:nth-of-type(6) { + display: none; + } + passwordLabel,websiteLabel,usernameLabel { text-align: right; } diff --git a/passmate.js b/passmate.js index 5fe1f71..3c2019a 100644 --- a/passmate.js +++ b/passmate.js @@ -15,7 +15,7 @@ class PassMate { this.MASTER_PASSWORD_LENGTH = 32; this.PAGES_PER_LETTER = 2; - this.PASSWORDS_PER_PAGE = 5; + this.PASSWORDS_PER_PAGE = 6; this.VERSION = 0; this.pages = []; @@ -58,13 +58,23 @@ class PassMate { this.product.classList.remove('passwords-readable'); this.product.classList.add('passwords-' + key); }); - let shortItem = this.addElement('li', formats); format.add('short', this.addElement('button', shortItem, 'Short: 5EQaDfNS')); - let readableItem = this.addElement('li', formats); format.add('readable', this.addElement('button', readableItem, 'Readable: LeasedBarneyPlays565')); + let indexStep = this.addElement('li', instr, 'Choose your preferred index format:'); + let indexes = this.addElement('ul', indexStep); + let index = new Select((key) => { + this.product.classList.remove('index-letters'); + this.product.classList.remove('index-none'); + this.product.classList.add('index-' + key); + }); + let indexLettersItem = this.addElement('li', indexes); + index.add('letters', this.addElement('button', indexLettersItem, 'Letters: Look up by website name, A-Z')); + let indexNoneItem = this.addElement('li', indexes); + index.add('none', this.addElement('button', indexNoneItem, 'None: Use passwords from the beginning')); + let printReqStep = this.addElement('li', instr, 'Check that your printer supports two-sided printing. You\'ll need to print with the following settings:'); let printreqs = this.addElement('ul', printReqStep); this.addElement('li', printreqs, 'Paper size: Letter'); @@ -73,6 +83,7 @@ class PassMate { let printStep = this.addElement('li', instr); let print = this.addElement('button', printStep, 'Click here to print the book!'); + print.style.cursor = 'pointer'; printStep.addEventListener('click', () => { window.print(); });