From e6116f2dde5c3b38b4cab55899e3e23c55d8ede7 Mon Sep 17 00:00:00 2001 From: knolax <1339802534.kk@gmail.com> Date: Tue, 14 Nov 2017 08:53:43 -0500 Subject: initial commit --- cont/home.html | 15 +++++++++++++++ cont/meta.html | 6 ++++++ cont/testpage.html | 29 +++++++++++++++++++++++++++++ gen.sh | 43 +++++++++++++++++++++++++++++++++++++++++++ home.html | 39 +++++++++++++++++++++++++++++++++++++++ img/cloud2.jpg | Bin 0 -> 30539 bytes index | 1 + meta.html | 27 +++++++++++++++++++++++++++ src/footer.html | 5 +++++ src/header.html | 16 ++++++++++++++++ style.css | 31 +++++++++++++++++++++++++++++++ testpage.html | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 12 files changed, 260 insertions(+) create mode 100644 cont/home.html create mode 100644 cont/meta.html create mode 100644 cont/testpage.html create mode 100755 gen.sh create mode 100644 home.html create mode 100644 img/cloud2.jpg create mode 100644 index create mode 100644 meta.html create mode 100644 src/footer.html create mode 100644 src/header.html create mode 100644 style.css create mode 100644 testpage.html diff --git a/cont/home.html b/cont/home.html new file mode 100644 index 0000000..1ad9035 --- /dev/null +++ b/cont/home.html @@ -0,0 +1,15 @@ + [TITLE] +-------------------------------------------------------------------------------- +What is this? + hairydiode.xyz +Who are you? + Haoran S Diao +How do I tell you your site is ugly? + Email:1339802534.kk@gmail.com + Phone:(Two Four Oh)-938-1333 + Github:https://github.com/knolax +Where's all the content? + Scroll Down +[SETTITLE]Home diff --git a/cont/meta.html b/cont/meta.html new file mode 100644 index 0000000..e161a18 --- /dev/null +++ b/cont/meta.html @@ -0,0 +1,6 @@ +[TITLE] [DATE] +-------------------------------------------------------------------------------- +[SETTITLE]Making This Site +[SETDATE]11-13-2017 diff --git a/cont/testpage.html b/cont/testpage.html new file mode 100644 index 0000000..c2bd13f --- /dev/null +++ b/cont/testpage.html @@ -0,0 +1,29 @@ +[TITLE] [DATE] +-------------------------------------------------------------------------------- + Since Lorem triblaxia loptopick rick afsjhfj I hate the megos 抗议 r e +I hate me ajkjk pls kill me now lorem ipsum doler nagum laraedae nukot k sd rr + sjdksjdks dsdssdsds dsaa sds dh uf aehfej ej h khkr kr jrhtjrtkr krt krt krt +sdsgd gsh ghsgdh sh dh shdsh s ds s sh shhsgd s s dg sdg sgd sgd hs gsh gsh dghs + shj shjd sj hsj hjs hdh sh jsh jsh jsh jhdjs hjds hjshd jsh jsh jsh jsh jdh jsd +dsdhsjdh jhd jshj hsjdhsjhdjshdj hs jhd jsh jsh js hjs hjs hjd hsj hjs hsj hdj d +dsjdhsjd j kdjks + +Kanor shalaka peilum yon. Wasadi paktu keyitu: adjhj +[SETTITLE]Home +should be deleted ^ +\[SETTITLE] this should be escaped +[TITLE] should be replaced +\[TITLE] should be escaped +\[TITLE] should be escaped and [TITLE] replaced +(nvm,this works on a per line basis) +[SETTITLE]HOME2 + +[SETDATE]11-12-2017 +should be deleted ^ +\[SETDATE] should be escaped +[DATE] should say 11-12-2017 +\[DATE] should be escaped +[SETTITLE]Testing Page +that should override the previous one diff --git a/gen.sh b/gen.sh new file mode 100755 index 0000000..a870ab3 --- /dev/null +++ b/gen.sh @@ -0,0 +1,43 @@ +pages=$(ls -S -t cont/| grep html | grep -v home.html) #lists the actual content +#-S -t so that the files are roughly in time order +#home is excluded and appended at the end to make sure it gets processed last +pages="$pages home.html" +#clears the index +rm index +for page in $pages; do + #clears page and page.tmp + rm $page $page.tmp + #adds the header + cat src/header.html >> $page.tmp + + #finds the [SETTITLE], but ignores \[SETTITLE], then filters out the [SETTITLE] part + #the head is to make it use the last one + title=$(cat cont/$page | grep '\[SETTITLE\]'| sed '/\\\[SETTITLE\]/d; s/\[SETTITLE\]//' | tail -n 1) + #does the same for the date + date=$(cat cont/$page | grep '\[SETDATE\]'| sed '/\\\[SETDATE\]/d; s/\[SETDATE\]//' | tail -n 1) + + + #replaces \[SETTITLE] with [SETTITLE], and removes lines with legitimate [SETTITLE]s in a temporary file + cat cont/$page | sed '/\\\[SETTITLE\]/bx; /\[SETTITLE\].*/d;:x s/\\\[SETTITLE\]/\[SETTITLE\]/' >> $page.tmp + #same for the date + cat $page.tmp | sed '/\\\[SETDATE\]/bx; /\[SETDATE\].*/d;:x s/\\\[SETDATE\]/\[SETDATE\]/' >> $page + + #adds the index if its the homepage + if [ "$page" == "home.html" ]; then + cat index >> $page + rm index + fi + #adds the footer + cat src/footer.html >> $page + + #replaces \[TITLE] with [TITLE] and [TITLE] with $title, "" is used so the $ still applies + + #however that means "\\\\" becomes "\\" when passed to sed from bash, and finally interpreted as a literal \ by sed + cat $page | sed "/\\\\\[TITLE\]/bx; s/\[TITLE\]/$title/; :x s/\\\\\[TITLE\]/\[TITLE\]/" > $page.tmp + #same with date + cat $page.tmp | sed "/\\\\\[DATE\]/bx; s/\[DATE\]/$date/; :x s/\\\\\[DATE\]/\[DATE\]/" > $page + + rm $page.tmp + #adds to the index + echo "[$title] $date" >> index +done diff --git a/home.html b/home.html new file mode 100644 index 0000000..c60c68c --- /dev/null +++ b/home.html @@ -0,0 +1,39 @@ + + +Home + + + + +
+
+-------------------------------------------------------------------------------- + +>HairyDiode + +-------------------------------------------------------------------------------- + Home +-------------------------------------------------------------------------------- +What is this? + hairydiode.xyz +Who are you? + Haoran S Diao +How do I tell you your site is ugly? + Email:1339802534.kk@gmail.com + Phone:(Two Four Oh)-938-1333 + Github:https://github.com/knolax +Where's all the content? + Scroll Down +[Making This Site] 11-13-2017 +[Testing Page] 11-12-2017 +
+
+ + diff --git a/img/cloud2.jpg b/img/cloud2.jpg new file mode 100644 index 0000000..346a1dd Binary files /dev/null and b/img/cloud2.jpg differ diff --git a/index b/index new file mode 100644 index 0000000..87399fa --- /dev/null +++ b/index @@ -0,0 +1 @@ +[Home] diff --git a/meta.html b/meta.html new file mode 100644 index 0000000..175eb3a --- /dev/null +++ b/meta.html @@ -0,0 +1,27 @@ + + +Making This Site + + + + +
+
+-------------------------------------------------------------------------------- + +>HairyDiode + +-------------------------------------------------------------------------------- +Making This Site 11-13-2017 +-------------------------------------------------------------------------------- +
+
+ + diff --git a/src/footer.html b/src/footer.html new file mode 100644 index 0000000..d257158 --- /dev/null +++ b/src/footer.html @@ -0,0 +1,5 @@ + + + diff --git a/src/header.html b/src/header.html new file mode 100644 index 0000000..dd92f61 --- /dev/null +++ b/src/header.html @@ -0,0 +1,16 @@ + + +[TITLE] + + + + +
+--------------------------------------------------------------------------------
+
+>HairyDiode                                             
+
+--------------------------------------------------------------------------------
diff --git a/style.css b/style.css
new file mode 100644
index 0000000..bd0ce07
--- /dev/null
+++ b/style.css
@@ -0,0 +1,31 @@
+* {
+	font-family: Courier, monospace;
+	color: #000000;
+	margin: 0px; /*default margins get in the way*/
+}
+a {
+	text-decoration: none; /*no underline*/
+	color: #801040;
+ 
+}
+a:hover {
+	color: #ffffff;
+	background-color: #801040;
+}
+.content {
+	/*the following works together to center the entire element*/
+	position:relative;
+	left:50%; /* this shifts the element to the right by 50% of its parent*/
+	display: inline-block; /* this makes the element only as wide as it needs to be*/
+	transform:translatex(-50%);/*this shifts it to the left by half its own width*/
+}
+img {
+	display: block;
+	/*overrides not margin to center from bounds of the 
 tag*/
+	margin-left: auto;
+	margin-right: auto;
+	/*default width*/
+	width: 100%;
+	/*preserves aspect ratio*/
+	height: auto;
+}
diff --git a/testpage.html b/testpage.html
new file mode 100644
index 0000000..6bcbb55
--- /dev/null
+++ b/testpage.html
@@ -0,0 +1,48 @@
+
+
+Testing Page
+
+
+
+
+
+
+-------------------------------------------------------------------------------- + +>HairyDiode + +-------------------------------------------------------------------------------- +Testing Page 11-12-2017 +-------------------------------------------------------------------------------- + Since Lorem triblaxia loptopick rick afsjhfj I hate the megos 抗议 r e +I hate me ajkjk pls kill me now lorem ipsum doler nagum laraedae nukot k sd rr + sjdksjdks dsdssdsds dsaa sds dh uf aehfej ej h khkr kr jrhtjrtkr krt krt krt +sdsgd gsh ghsgdh sh dh shdsh s ds s sh shhsgd s s dg sdg sgd sgd hs gsh gsh dghs + shj shjd sj hsj hjs hdh sh jsh jsh jsh jhdjs hjds hjshd jsh jsh jsh jsh jdh jsd +dsdhsjdh jhd jshj hsjdhsjhdjshdj hs jhd jsh jsh js hjs hjs hjd hsj hjs hsj hdj d +dsjdhsjd j kdjks + +Kanor shalaka peilum yon. Wasadi paktu keyitu: adjhj +should be deleted ^ +[SETTITLE] this should be escaped +Testing Page should be replaced +[TITLE] should be escaped +[TITLE] should be escaped and [TITLE] replaced +(nvm,this works on a per line basis) + +should be deleted ^ +[SETDATE] should be escaped +11-12-2017 should say 11-12-2017 +[DATE] should be escaped +that should override the previous one +
+
+ + -- cgit v1.1