summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-11-14 08:53:43 -0500
committerknolax <1339802534.kk@gmail.com>2017-11-14 08:53:43 -0500
commite6116f2dde5c3b38b4cab55899e3e23c55d8ede7 (patch)
treee59718d5e10136a5535bc2d65b28fb9597abe0f1
initial commit
-rw-r--r--cont/home.html15
-rw-r--r--cont/meta.html6
-rw-r--r--cont/testpage.html29
-rwxr-xr-xgen.sh43
-rw-r--r--home.html39
-rw-r--r--img/cloud2.jpgbin0 -> 30539 bytes
-rw-r--r--index1
-rw-r--r--meta.html27
-rw-r--r--src/footer.html5
-rw-r--r--src/header.html16
-rw-r--r--style.css31
-rw-r--r--testpage.html48
12 files changed, 260 insertions, 0 deletions
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 @@
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四--> [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 @@
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四-->[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 @@
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四-->[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
+<img src="img/cloud2.jpg"></img>
+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 "<a href=\"$page\">[$title] $date</a>" >> 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 @@
+<!DOCTYPE html>
+<head>
+<title>Home</title>
+<meta charset="utf-8">
+<link rel="stylesheet" href="style.css">
+</head>
+<body>
+<pre class="content">
+<div>
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四
+-->--------------------------------------------------------------------------------
+
+<a href="home.html">>HairyDiode</a>
+
+--------------------------------------------------------------------------------
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四--> 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
+<a href="meta.html">[Making This Site] 11-13-2017</a>
+<a href="testpage.html">[Testing Page] 11-12-2017</a>
+</div>
+</pre>
+</body>
+<!--
+if you're digging in the src you might be interested in how this site works here: https://hairydiode.xyz/meta.html
+-->
diff --git a/img/cloud2.jpg b/img/cloud2.jpg
new file mode 100644
index 0000000..346a1dd
--- /dev/null
+++ b/img/cloud2.jpg
Binary files differ
diff --git a/index b/index
new file mode 100644
index 0000000..87399fa
--- /dev/null
+++ b/index
@@ -0,0 +1 @@
+<a href="home.html">[Home] </a>
diff --git a/meta.html b/meta.html
new file mode 100644
index 0000000..175eb3a
--- /dev/null
+++ b/meta.html
@@ -0,0 +1,27 @@
+<!DOCTYPE html>
+<head>
+<title>Making This Site</title>
+<meta charset="utf-8">
+<link rel="stylesheet" href="style.css">
+</head>
+<body>
+<pre class="content">
+<div>
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四
+-->--------------------------------------------------------------------------------
+
+<a href="home.html">>HairyDiode</a>
+
+--------------------------------------------------------------------------------
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四-->Making This Site 11-13-2017
+--------------------------------------------------------------------------------
+</div>
+</pre>
+</body>
+<!--
+if you're digging in the src you might be interested in how this site works here: https://hairydiode.xyz/meta.html
+-->
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 @@
+</pre>
+</body>
+<!--
+if you're digging in the src you might be interested in how this site works here: https://hairydiode.xyz/meta.html
+-->
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 @@
+<!DOCTYPE html>
+<head>
+<title>[TITLE]</title>
+<meta charset="utf-8">
+<link rel="stylesheet" href="style.css">
+</head>
+<body>
+<pre class="content">
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四
+-->--------------------------------------------------------------------------------
+
+<a href="home.html">>HairyDiode</a>
+
+--------------------------------------------------------------------------------
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 <pre> 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 @@
+<!DOCTYPE html>
+<head>
+<title>Testing Page</title>
+<meta charset="utf-8">
+<link rel="stylesheet" href="style.css">
+</head>
+<body>
+<pre class="content">
+<div>
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四
+-->--------------------------------------------------------------------------------
+
+<a href="home.html">>HairyDiode</a>
+
+--------------------------------------------------------------------------------
+<!--
+123456789-223456789-323456789-423456789-523456789-623456789-723456789-8234567890
+一二三四-->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
+<img src="img/cloud2.jpg"></img>
+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
+</div>
+</pre>
+</body>
+<!--
+if you're digging in the src you might be interested in how this site works here: https://hairydiode.xyz/meta.html
+-->