Compare commits
4 Commits
40683f61c1
...
86f6396bdb
Author | SHA1 | Date | |
---|---|---|---|
|
86f6396bdb | ||
|
f918b39f5a | ||
|
315d32dfea | ||
|
038bb5e641 |
38
books.pl
38
books.pl
@ -32,7 +32,7 @@ use DateTime;
|
||||
|
||||
# While these have json formatting, they are JS files
|
||||
my $complete_books_js = "complete_books.js";
|
||||
my $book_pages_js = "book_pages2.js";
|
||||
my $book_pages_js = "book_pages.js";
|
||||
|
||||
# number of lines in a page
|
||||
my $number_of_lines = 31;
|
||||
@ -68,6 +68,34 @@ my @books = (
|
||||
url => "https://www.gutenberg.org/ebooks/121",
|
||||
file => "books/northangerabbey.txt",
|
||||
chapter_marker => "CHAPTER"
|
||||
},
|
||||
{
|
||||
title => "The Picture of Dorian Gray",
|
||||
author => "Oscar Wilde",
|
||||
url => "https://www.gutenberg.org/ebooks/174",
|
||||
file => "books/doriangray.txt",
|
||||
chapter_marker => "CHAPTER"
|
||||
},
|
||||
{
|
||||
title => "The Mysteries of Udolpho",
|
||||
author => "Ann Ward Radcliffe",
|
||||
url => "https://www.gutenberg.org/ebooks/3268",
|
||||
file => "books/udolpho.txt",
|
||||
chapter_marker => "CHAPTER"
|
||||
},
|
||||
{
|
||||
title => "The Enchanted Castle",
|
||||
author => "E. Nesbit",
|
||||
url => "https://www.gutenberg.org/ebooks/34219",
|
||||
file => "books/enchantedcastle.txt",
|
||||
chapter_marker => "CHAPTER"
|
||||
},
|
||||
{
|
||||
title => "Frankenstein",
|
||||
author => "Mary Wollstonecraft Shelley",
|
||||
url => "https://www.gutenberg.org/ebooks/84",
|
||||
file => "books/frankenstein.txt",
|
||||
chapter_marker => "Chapter"
|
||||
}
|
||||
); # books hash
|
||||
|
||||
@ -77,6 +105,7 @@ my $json = new JSON;
|
||||
# Make the books into pages
|
||||
###################################
|
||||
|
||||
# iterate over books
|
||||
my $k = 0;
|
||||
|
||||
foreach (@books) {
|
||||
@ -88,9 +117,11 @@ foreach (@books) {
|
||||
my @chapters = split('\n' . $books[$k]{'chapter_marker'}, $book);
|
||||
|
||||
# go through each chapter and make pages based on number of desired lines
|
||||
|
||||
|
||||
#iterate over chapters
|
||||
my $j = 0;
|
||||
my @page_text;
|
||||
|
||||
foreach (@chapters) {
|
||||
|
||||
my @chapter_lines = split(/\r\n/, $chapters[$j]);
|
||||
@ -175,6 +206,9 @@ for ( my $l; $l < $number_of_pages; $l++){
|
||||
# pull out a random chapter from that book
|
||||
my $chapter_select = int(rand($chapter_list));
|
||||
|
||||
# pop off the last page, as it may be blank, or short
|
||||
pop @{$books[$book_list]{'pages'}[$chapter_select]};
|
||||
|
||||
# get the number of pages in the chapter
|
||||
my $page_list = @{$books[$book_list]{'pages'}[$chapter_select]};
|
||||
# pull out a random page from the chapter
|
||||
|
11
index.html
11
index.html
@ -217,9 +217,16 @@ $(document).ready(function(){
|
||||
<div id="poem_list"></div>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>More Blackout Poetry Awaits!</h2>
|
||||
<p>Check out our site for more blackout poetry, including HIDE AND SEEK a Blackout Poetry workbook by Bram Stoker nominated poet Jessica McHugh!</p>
|
||||
<p><a href="http://apokrupha.com/blackout">apokrupha.com/blackout</a></p>
|
||||
</section>
|
||||
|
||||
<footer>
|
||||
<h2>About</h2>
|
||||
<p>This site made with <a href="https://jquery.com/">jQuery</a>, PHP and <a href="https://www.barebones.com/products/bbedit/">BBEdit</a> with help from <a href="https://espressoapp.com/">Espresso</a>.</p>
|
||||
<p><a href="https://code.jacobhaddon.com/jake/smhn">Code</a> by Jacob Haddon - license <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GPLv3.0</a> - <a href="https://Apokrupha.com/BlackOut">Apokrupha.com/Blackout</a></p>
|
||||
<p><a href="https://code.jacobhaddon.com/jake/dbpc">Code</a> by Jacob Haddon - license <a href="https://www.gnu.org/licenses/gpl-3.0.en.html">GPLv3.0</a> - <a href="https://Apokrupha.com/BlackOut">Apokrupha.com/Blackout</a></p>
|
||||
</footer>
|
||||
|
||||
<!--Help Section-->
|
||||
@ -274,7 +281,7 @@ $(document).ready(function(){
|
||||
|
||||
<h1>Contact</h1>
|
||||
|
||||
<p>webmaster@ </p>
|
||||
<p>webmaster@dailyblackoutpoetrychallenge.com</p>
|
||||
|
||||
<p>We are intolerant of intolerance. If you see something hateful, transphobic, homophobic, racist, or the like, let us know.</p>
|
||||
|
||||
|
22
style.css
22
style.css
@ -11,21 +11,19 @@ Written by Jacob Haddon https://jacobhaddon.com
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: "lora";
|
||||
src: local("Lora"),
|
||||
url("fonts/Lora/webfonts/Lora-Regular.woff2") format('woff2'),
|
||||
url("fonts/Lora/variable/Lora-VariableFont_wght.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-family: "lora";
|
||||
src: url("fonts/Lora/webfonts/Lora-Regular.woff2") format('woff2'),
|
||||
url("fonts/Lora/variable/Lora-VariableFont_wght.ttf") format('truetype');
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: "lora";
|
||||
src: local("Lora"),
|
||||
url("fonts/Lora/webfonts/Lora-Italic.woff2") format('woff2'),
|
||||
url("fonts/Lora/variable/Lora-Italic-VariableFont_wght.ttf")format('truetype');
|
||||
font-weight: normal;
|
||||
font-style: italic;
|
||||
font-family: "lora";
|
||||
src: url("fonts/Lora/webfonts/Lora-Italic.woff2") format('woff2'),
|
||||
url("fonts/Lora/variable/Lora-Italic-VariableFont_wght.ttf")format('truetype');
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
body {
|
||||
|
Loading…
x
Reference in New Issue
Block a user