//comic_settings.js was created by geno7, with much needed assistance from Dannarchy
//this is the main file you'll be messing with to manage and update your comic. most (not all) of the main toggle-able settings are here.
//comic_archive has more settings pertaining to the archive page, and comic_show has settings pertaining to the main place that pages of your comic are displayed.
letpg=Number(findGetParameter("pg"));//make "pg" mean the current page number (this line doesnt work unless I put it here, if you're inexperienced with js dont worry about it)
constmaxpg=26;//the current number of pages your comic has in total. this DOESNT necessarily mean number of IMAGE FILES as it doesn't count pages split into multiple files.
//YOU MUST UPDATE THIS NUMBER EVERY TIME YOU ADD A NEW PAGE or else it wont display the most recent page
// COMIC PAGE SETTINGS
constfolder="img/comics";//directory of the folder where you keep all the comics
constimage="pg";//what you'll name all your comic pages
constimgPart="_"//special character(s) you put after the page number to subdivide pages into multiple image files (ie pg2_1, pg2_2, etc)
constext="png";//file extension of your comic pages
//THUMBNAIL SETTINGS
constthumbFolder="img/thumbs"//directory of the folder where you keep all the thumbnail images for the comics, in case you want the archive page to use thumbnails.
constthumbExt="png"//file extension of thumbnails
constthumbDefault="default"//name of the default thumbnail that displays when no thumbnail is set, located in the directory you set thumbFolder to.
//NAVIGATION SETTINGS
constnavText=["First","Previous","Next","Last"];//alt text for your nav images, or just the text that shows up if you're not using images
constnavFolder="img/comicnav";//directory where nav images are stored
constnavExt="png"//file extension of nav images
constnavScrollTo="#showComic";//id of the div you want the page to automatically scroll to when you click to the next comic. will turn off if you delete text between quotation marks
if(pg==0){pg=maxpg;}//display MOST RECENT COMIC when the webpage is loaded. if you want to instead have the FIRST COMIC displayed first, change maxpg to 1.
//pgData holds all the parameters for each of your pages. copypaste this and fill out accordingly:
/*
{
pgNum:,
title:"",
date:writeDate([YEAR],[MONTH],[DAY]),
altText:"",
imageFiles:"",
authorNotes:``
},
*/
//Note: the formatting is important! The whole thing won't show up if you forget to include the commas or curly braces in the right place.
constpgData=[
/*{
pgNum:1,//what page number it is
title:"",//the title of the page (leaving this blank will default it to "Page X")
date:writeDate(2021,3,16),//the date on which the page was posted (mainly for the archive). The date is written using a function called "writeDate", basically just put writeDate and then some parenthesis and, comma separated, the year followed by the month and the day. Don't forget another comma at the end outside the parenthesis!