About
+[Under Construction!]
+ +diff --git a/html/about.html b/html/about.html new file mode 100644 index 0000000..b9a9c9c --- /dev/null +++ b/html/about.html @@ -0,0 +1,23 @@ + + +
+[Under Construction!]
+ +I hope you enjoy your time here!
+ + + + +The requested web page was not found on this site. Rats!
+The <p> tag is for paragraphs. Paragraphs just like this one! This is an example paragraph.
+ +Here's how you use BOLD text.
+ +And here's how you use italic text.
+ + The <a> tag is for links! + +
+ This is an image caption! Huh? It's just a <p> tag! Ah, but we have added the class "caption"! "Classes" allow us to set special styles for certain elements.
+ +
Ahhh, back to a regular paragraph. All of that italicized text was making me a bit hoarse.
+ +
+
+ Wow, that image is smaller and aligned to the right. This text is flowing around it!
+Oh, I see... we added two classes to it... small and right! Marina must have set special styles in the CSS file for images with the small and right classes. Goodness gracious, what will she think of next?
+You might be confused if you're viewing this on a phone. When the screen gets really small, then the small class images just revert to taking up the whole width (responsive design). Otherwise they'd just be too ridiculously small! But I bet if you rotate your phone to wide view, you'll be able to see the effects of the small and right classes on images...
+ +
+ Hmmm... there's something strange about this image...
+Yikes! It's a link!! I guess you can put an <img> tag inside an <a> tag to create an image link!
+If you've been following along inside the HTML editor, you might be wondering, what are all those weird codes with stuff in-between & and ;? Those are called escape characters. < means "less than" symbol and > means "greater than" symbol. Those symbols are used in HTML tags. But if I try to write actual HTML tags to talk to you about them, then the computer will get confused. So somtimes we need to speak, quite literally, in code, to get around this. Maybe you are like... a math blogger so I thought I'd just let you know ahead of time. If you get unexpected results, check back over your writing. You might have typed something that to a human is normal but to a computer is confusing!
+ + + + + + + +Well, that's all for now. Keep this file around and use it for reference if you'd like. Happy blogging!
+~Marina
+Ready to write? Replace this text with your first paragraph!
+ + + +" + blogName + " is written by " + authorName + ", built with Zonelets, and hosted by Neocities!
"; + +//To do the following stuff, we want to know where we are in the posts array (if we're currently on a post page). +let currentIndex = -1; +let currentFilename = url.substring(url.lastIndexOf('posts/')); +//Depending on the web server settings (Or something?), the browser url may or may not have ".html" at the end. If not, we must add it back in to match the posts array. (12-19-2022 fix) +if ( ! currentFilename.endsWith(".html") ) { + currentFilename += ".html"; +} +let i; +for (i = 0; i < postsArray.length; i++) { + if ( postsArray[i][0] === currentFilename ) { + currentIndex = i; + } +} + +//Convert the post url to readable post name. E.g. changes "2020-10-10-My-First-Post.html" to "My First Post" +//Or pass along the "special characters" version of the title if one exists +function formatPostTitle(i) { + // Check if there is an alternate post title + if ( postsArray[i].length > 1 ) { + //Remember how we had to use encodeURI for special characters up above? Now we use decodeURI to get them back. + return decodeURI(postsArray[i][1]); + } else { + //If there is no alternate post title, check if the post uses the date format or not, and return the proper title + if ( postDateFormat.test ( postsArray[i][0].slice( 6,17 ) ) ) { + return postsArray[i][0].slice(17,-5).replace(/-/g," "); + } else { + return postsArray[i][0].slice(6,-5).replace(/-/g," "); + } + } +} + +//Get the current post title and date (if we are on a post page) +let currentPostTitle = ""; +let niceDate = ""; +if ( currentIndex > -1 ) { + currentPostTitle = formatPostTitle( currentIndex ); + //Generate the "nice to read" version of date + if ( postDateFormat.test ( postsArray[currentIndex][0].slice( 6,17 ) ) ) { + let monthSlice = postsArray[currentIndex][0].slice( 11,13 ); + let month = ""; + if ( monthSlice === "01") { month = "Jan";} + else if ( monthSlice === "02") { month = "Feb";} + else if ( monthSlice === "03") { month = "Mar";} + else if ( monthSlice === "04") { month = "Apr";} + else if ( monthSlice === "05") { month = "May";} + else if ( monthSlice === "06") { month = "Jun";} + else if ( monthSlice === "07") { month = "Jul";} + else if ( monthSlice === "08") { month = "Aug";} + else if ( monthSlice === "09") { month = "Sep";} + else if ( monthSlice === "10") { month = "Oct";} + else if ( monthSlice === "11") { month = "Nov";} + else if ( monthSlice === "12") { month = "Dec";} + niceDate = postsArray[currentIndex][0].slice( 14,16 ) + " " + month + ", " + postsArray[currentIndex][0].slice( 6,10 ); + } +} + +//Generate the Post List HTML, which will be shown on the "Archive" page. + +function formatPostLink(i) { + let postTitle_i = ""; + if ( postsArray[i].length > 1 ) { + postTitle_i = decodeURI(postsArray[i][1]); + } else { + if ( postDateFormat.test ( postsArray[i][0].slice( 6,17 ) ) ) { + postTitle_i = postsArray[i][0].slice(17,-5).replace(/-/g," "); + } else { + postTitle_i = postsArray[i][0].slice(6,-5).replace(/-/g," "); + } + } + if ( postDateFormat.test ( postsArray[i][0].slice( 6,17 ) ) ) { + return '