commit 598539c953b1e311195b42ce15d440d7f18b1b13 Author: Astoria Floyd Date: Thu Oct 14 00:19:29 2021 +0000 Initial commit, mostly just concealed.world with some text changes. + markdown! diff --git a/404.php b/404.php new file mode 100644 index 0000000..76a56db --- /dev/null +++ b/404.php @@ -0,0 +1,26 @@ + + + + 404 + + + + + + + +

Uh oh

+
+
+ 404 - Not Found +

There is nothing here.

+

We appear to be lost.

+ +
+ diff --git a/About/_index.php b/About/_index.php new file mode 100644 index 0000000..12eec82 --- /dev/null +++ b/About/_index.php @@ -0,0 +1,9 @@ + diff --git a/About/about.md b/About/about.md new file mode 100644 index 0000000..2825df4 --- /dev/null +++ b/About/about.md @@ -0,0 +1,13 @@ +## Who are you? +I am Astoria. + +## Why did you make this website? +I lost the source code to the old one + +## Do you host minecraft servers? +For my friends yeah, your not getting one out of me. + +## What is the meaning of life? +Fliburdiscurp + +{{< image src="/img/suffer.png" alt="Suffer.png" position="center" style="border-radius: 8px;" >}} \ No newline at end of file diff --git a/About/about.php b/About/about.php new file mode 100644 index 0000000..ef2e446 --- /dev/null +++ b/About/about.php @@ -0,0 +1,6 @@ +

Example

'; # Article Title ?> + +

2021.10.13

diff --git a/About/example.php b/About/example.php new file mode 100644 index 0000000..20cb8ce --- /dev/null +++ b/About/example.php @@ -0,0 +1,7 @@ +

Example

'; # Article Title ?> + +

Dummy text

+ +

More dummy text

+ +

2021.01.01

diff --git a/Archive/_index.php b/Archive/_index.php new file mode 100644 index 0000000..9ed7b2e --- /dev/null +++ b/Archive/_index.php @@ -0,0 +1,9 @@ + diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..822737e --- /dev/null +++ b/LICENSE @@ -0,0 +1,19 @@ +Copyright (c) 2020 ++ Astoria 2021! +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/Media/_index.php b/Media/_index.php new file mode 100644 index 0000000..a6933f7 --- /dev/null +++ b/Media/_index.php @@ -0,0 +1,9 @@ + diff --git a/News/_index.php b/News/_index.php new file mode 100644 index 0000000..12eec82 --- /dev/null +++ b/News/_index.php @@ -0,0 +1,9 @@ + diff --git a/News/example.php b/News/example.php new file mode 100644 index 0000000..20cb8ce --- /dev/null +++ b/News/example.php @@ -0,0 +1,7 @@ +

Example

'; # Article Title ?> + +

Dummy text

+ +

More dummy text

+ +

2021.01.01

diff --git a/News/wellThisIsAwkward.md b/News/wellThisIsAwkward.md new file mode 100644 index 0000000..3758b2a --- /dev/null +++ b/News/wellThisIsAwkward.md @@ -0,0 +1,44 @@ +So, been a good few months. + +# Where you been Astoria? + +Well, mostly I have... not been tending to this website thats what. +This does not mean I have been resting on my feet! + +# So whats different + +>1. I have switched to linux. ([Mint](https://linuxmint.com/) specifically!) +>2. I **lost the source code to this website** when I switched to linux. +>3. I learned myself some better programming. +>4. I tried installing [Bedrock Linux](https://bedrocklinux.org/), goofed, + and reinstalled Linux Mint, then properly installed Bedrock. +>5. I installed a different linux. ([Arch](https://archlinux.org/) specifically!) +>6. Started working on a [discord bot](https://git.broken-moon.net/astoriafloyd/thembot/) for a friends server. +>7. Actually learned how to use an IDE. +>8. Stopped trying to use VIM (Don't use vim. I beg you.) + and switched to VSCode. +>9. Remembered this website exists. +>10. Started writing this new version of the site. + +# Why would you ever use vim? + +The ability to use it over SSH. +VSCode can do that too (I am doing it right now!) +Switch to VSCode. I beg you. +# Back to the point. +Oh yes, this is dragging on for a fair bit. +Most of the Minecraft server have been replaced. +(And why were they ever listed, they are mostly proprietary packs.) + +# Anything actually useful to know? + +Oh I know! Introducing the local [Gitea](http://git.broken-moon.net/) sever! +Its basically github but it goes down when this site does, feel free to use it I guess. + +# Closing notes +* New website +* New services +* New source code +* Less relevancy +* Removed Herobrine +* No longer Obsolete (Markdown for the win!) \ No newline at end of file diff --git a/News/wellthisisawkward.php b/News/wellthisisawkward.php new file mode 100644 index 0000000..c8354e5 --- /dev/null +++ b/News/wellthisisawkward.php @@ -0,0 +1,8 @@ +

Well, This is Awkward.

'; # Article Title ?> + +

2021.08.18

diff --git a/Parsedown.php b/Parsedown.php new file mode 100644 index 0000000..1b9d6d5 --- /dev/null +++ b/Parsedown.php @@ -0,0 +1,1712 @@ +DefinitionData = array(); + + # standardize line breaks + $text = str_replace(array("\r\n", "\r"), "\n", $text); + + # remove surrounding line breaks + $text = trim($text, "\n"); + + # split text into lines + $lines = explode("\n", $text); + + # iterate through lines to identify blocks + $markup = $this->lines($lines); + + # trim line breaks + $markup = trim($markup, "\n"); + + return $markup; + } + + # + # Setters + # + + function setBreaksEnabled($breaksEnabled) + { + $this->breaksEnabled = $breaksEnabled; + + return $this; + } + + protected $breaksEnabled; + + function setMarkupEscaped($markupEscaped) + { + $this->markupEscaped = $markupEscaped; + + return $this; + } + + protected $markupEscaped; + + function setUrlsLinked($urlsLinked) + { + $this->urlsLinked = $urlsLinked; + + return $this; + } + + protected $urlsLinked = true; + + function setSafeMode($safeMode) + { + $this->safeMode = (bool) $safeMode; + + return $this; + } + + protected $safeMode; + + protected $safeLinksWhitelist = array( + 'http://', + 'https://', + 'ftp://', + 'ftps://', + 'mailto:', + 'data:image/png;base64,', + 'data:image/gif;base64,', + 'data:image/jpeg;base64,', + 'irc:', + 'ircs:', + 'git:', + 'ssh:', + 'news:', + 'steam:', + ); + + # + # Lines + # + + protected $BlockTypes = array( + '#' => array('Header'), + '*' => array('Rule', 'List'), + '+' => array('List'), + '-' => array('SetextHeader', 'Table', 'Rule', 'List'), + '0' => array('List'), + '1' => array('List'), + '2' => array('List'), + '3' => array('List'), + '4' => array('List'), + '5' => array('List'), + '6' => array('List'), + '7' => array('List'), + '8' => array('List'), + '9' => array('List'), + ':' => array('Table'), + '<' => array('Comment', 'Markup'), + '=' => array('SetextHeader'), + '>' => array('Quote'), + '[' => array('Reference'), + '_' => array('Rule'), + '`' => array('FencedCode'), + '|' => array('Table'), + '~' => array('FencedCode'), + ); + + # ~ + + protected $unmarkedBlockTypes = array( + 'Code', + ); + + # + # Blocks + # + + protected function lines(array $lines) + { + $CurrentBlock = null; + + foreach ($lines as $line) + { + if (chop($line) === '') + { + if (isset($CurrentBlock)) + { + $CurrentBlock['interrupted'] = true; + } + + continue; + } + + if (strpos($line, "\t") !== false) + { + $parts = explode("\t", $line); + + $line = $parts[0]; + + unset($parts[0]); + + foreach ($parts as $part) + { + $shortage = 4 - mb_strlen($line, 'utf-8') % 4; + + $line .= str_repeat(' ', $shortage); + $line .= $part; + } + } + + $indent = 0; + + while (isset($line[$indent]) and $line[$indent] === ' ') + { + $indent ++; + } + + $text = $indent > 0 ? substr($line, $indent) : $line; + + # ~ + + $Line = array('body' => $line, 'indent' => $indent, 'text' => $text); + + # ~ + + if (isset($CurrentBlock['continuable'])) + { + $Block = $this->{'block'.$CurrentBlock['type'].'Continue'}($Line, $CurrentBlock); + + if (isset($Block)) + { + $CurrentBlock = $Block; + + continue; + } + else + { + if ($this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + } + } + + # ~ + + $marker = $text[0]; + + # ~ + + $blockTypes = $this->unmarkedBlockTypes; + + if (isset($this->BlockTypes[$marker])) + { + foreach ($this->BlockTypes[$marker] as $blockType) + { + $blockTypes []= $blockType; + } + } + + # + # ~ + + foreach ($blockTypes as $blockType) + { + $Block = $this->{'block'.$blockType}($Line, $CurrentBlock); + + if (isset($Block)) + { + $Block['type'] = $blockType; + + if ( ! isset($Block['identified'])) + { + $Blocks []= $CurrentBlock; + + $Block['identified'] = true; + } + + if ($this->isBlockContinuable($blockType)) + { + $Block['continuable'] = true; + } + + $CurrentBlock = $Block; + + continue 2; + } + } + + # ~ + + if (isset($CurrentBlock) and ! isset($CurrentBlock['type']) and ! isset($CurrentBlock['interrupted'])) + { + $CurrentBlock['element']['text'] .= "\n".$text; + } + else + { + $Blocks []= $CurrentBlock; + + $CurrentBlock = $this->paragraph($Line); + + $CurrentBlock['identified'] = true; + } + } + + # ~ + + if (isset($CurrentBlock['continuable']) and $this->isBlockCompletable($CurrentBlock['type'])) + { + $CurrentBlock = $this->{'block'.$CurrentBlock['type'].'Complete'}($CurrentBlock); + } + + # ~ + + $Blocks []= $CurrentBlock; + + unset($Blocks[0]); + + # ~ + + $markup = ''; + + foreach ($Blocks as $Block) + { + if (isset($Block['hidden'])) + { + continue; + } + + $markup .= "\n"; + $markup .= isset($Block['markup']) ? $Block['markup'] : $this->element($Block['element']); + } + + $markup .= "\n"; + + # ~ + + return $markup; + } + + protected function isBlockContinuable($Type) + { + return method_exists($this, 'block'.$Type.'Continue'); + } + + protected function isBlockCompletable($Type) + { + return method_exists($this, 'block'.$Type.'Complete'); + } + + # + # Code + + protected function blockCode($Line, $Block = null) + { + if (isset($Block) and ! isset($Block['type']) and ! isset($Block['interrupted'])) + { + return; + } + + if ($Line['indent'] >= 4) + { + $text = substr($Line['body'], 4); + + $Block = array( + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => array( + 'name' => 'code', + 'text' => $text, + ), + ), + ); + + return $Block; + } + } + + protected function blockCodeContinue($Line, $Block) + { + if ($Line['indent'] >= 4) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['element']['text']['text'] .= "\n"; + + $text = substr($Line['body'], 4); + + $Block['element']['text']['text'] .= $text; + + return $Block; + } + } + + protected function blockCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Comment + + protected function blockComment($Line) + { + if ($this->markupEscaped or $this->safeMode) + { + return; + } + + if (isset($Line['text'][3]) and $Line['text'][3] === '-' and $Line['text'][2] === '-' and $Line['text'][1] === '!') + { + $Block = array( + 'markup' => $Line['body'], + ); + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + } + + protected function blockCommentContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + $Block['markup'] .= "\n" . $Line['body']; + + if (preg_match('/-->$/', $Line['text'])) + { + $Block['closed'] = true; + } + + return $Block; + } + + # + # Fenced Code + + protected function blockFencedCode($Line) + { + if (preg_match('/^['.$Line['text'][0].']{3,}[ ]*([^`]+)?[ ]*$/', $Line['text'], $matches)) + { + $Element = array( + 'name' => 'code', + 'text' => '', + ); + + if (isset($matches[1])) + { + /** + * https://www.w3.org/TR/2011/WD-html5-20110525/elements.html#classes + * Every HTML element may have a class attribute specified. + * The attribute, if specified, must have a value that is a set + * of space-separated tokens representing the various classes + * that the element belongs to. + * [...] + * The space characters, for the purposes of this specification, + * are U+0020 SPACE, U+0009 CHARACTER TABULATION (tab), + * U+000A LINE FEED (LF), U+000C FORM FEED (FF), and + * U+000D CARRIAGE RETURN (CR). + */ + $language = substr($matches[1], 0, strcspn($matches[1], " \t\n\f\r")); + + $class = 'language-'.$language; + + $Element['attributes'] = array( + 'class' => $class, + ); + } + + $Block = array( + 'char' => $Line['text'][0], + 'element' => array( + 'name' => 'pre', + 'handler' => 'element', + 'text' => $Element, + ), + ); + + return $Block; + } + } + + protected function blockFencedCodeContinue($Line, $Block) + { + if (isset($Block['complete'])) + { + return; + } + + if (isset($Block['interrupted'])) + { + $Block['element']['text']['text'] .= "\n"; + + unset($Block['interrupted']); + } + + if (preg_match('/^'.$Block['char'].'{3,}[ ]*$/', $Line['text'])) + { + $Block['element']['text']['text'] = substr($Block['element']['text']['text'], 1); + + $Block['complete'] = true; + + return $Block; + } + + $Block['element']['text']['text'] .= "\n".$Line['body']; + + return $Block; + } + + protected function blockFencedCodeComplete($Block) + { + $text = $Block['element']['text']['text']; + + $Block['element']['text']['text'] = $text; + + return $Block; + } + + # + # Header + + protected function blockHeader($Line) + { + if (isset($Line['text'][1])) + { + $level = 1; + + while (isset($Line['text'][$level]) and $Line['text'][$level] === '#') + { + $level ++; + } + + if ($level > 6) + { + return; + } + + $text = trim($Line['text'], '# '); + + $Block = array( + 'element' => array( + 'name' => 'h' . min(6, $level), + 'text' => $text, + 'handler' => 'line', + ), + ); + + return $Block; + } + } + + # + # List + + protected function blockList($Line) + { + list($name, $pattern) = $Line['text'][0] <= '-' ? array('ul', '[*+-]') : array('ol', '[0-9]+[.]'); + + if (preg_match('/^('.$pattern.'[ ]+)(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'indent' => $Line['indent'], + 'pattern' => $pattern, + 'element' => array( + 'name' => $name, + 'handler' => 'elements', + ), + ); + + if($name === 'ol') + { + $listStart = stristr($matches[0], '.', true); + + if($listStart !== '1') + { + $Block['element']['attributes'] = array('start' => $listStart); + } + } + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $matches[2], + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + } + + protected function blockListContinue($Line, array $Block) + { + if ($Block['indent'] === $Line['indent'] and preg_match('/^'.$Block['pattern'].'(?:[ ]+(.*)|$)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['li']['text'] []= ''; + + $Block['loose'] = true; + + unset($Block['interrupted']); + } + + unset($Block['li']); + + $text = isset($matches[1]) ? $matches[1] : ''; + + $Block['li'] = array( + 'name' => 'li', + 'handler' => 'li', + 'text' => array( + $text, + ), + ); + + $Block['element']['text'] []= & $Block['li']; + + return $Block; + } + + if ($Line['text'][0] === '[' and $this->blockReference($Line)) + { + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + return $Block; + } + + if ($Line['indent'] > 0) + { + $Block['li']['text'] []= ''; + + $text = preg_replace('/^[ ]{0,4}/', '', $Line['body']); + + $Block['li']['text'] []= $text; + + unset($Block['interrupted']); + + return $Block; + } + } + + protected function blockListComplete(array $Block) + { + if (isset($Block['loose'])) + { + foreach ($Block['element']['text'] as &$li) + { + if (end($li['text']) !== '') + { + $li['text'] []= ''; + } + } + } + + return $Block; + } + + # + # Quote + + protected function blockQuote($Line) + { + if (preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + $Block = array( + 'element' => array( + 'name' => 'blockquote', + 'handler' => 'lines', + 'text' => (array) $matches[1], + ), + ); + + return $Block; + } + } + + protected function blockQuoteContinue($Line, array $Block) + { + if ($Line['text'][0] === '>' and preg_match('/^>[ ]?(.*)/', $Line['text'], $matches)) + { + if (isset($Block['interrupted'])) + { + $Block['element']['text'] []= ''; + + unset($Block['interrupted']); + } + + $Block['element']['text'] []= $matches[1]; + + return $Block; + } + + if ( ! isset($Block['interrupted'])) + { + $Block['element']['text'] []= $Line['text']; + + return $Block; + } + } + + # + # Rule + + protected function blockRule($Line) + { + if (preg_match('/^(['.$Line['text'][0].'])([ ]*\1){2,}[ ]*$/', $Line['text'])) + { + $Block = array( + 'element' => array( + 'name' => 'hr' + ), + ); + + return $Block; + } + } + + # + # Setext + + protected function blockSetextHeader($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (chop($Line['text'], $Line['text'][0]) === '') + { + $Block['element']['name'] = $Line['text'][0] === '=' ? 'h1' : 'h2'; + + return $Block; + } + } + + # + # Markup + + protected function blockMarkup($Line) + { + if ($this->markupEscaped or $this->safeMode) + { + return; + } + + if (preg_match('/^<(\w[\w-]*)(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*(\/)?>/', $Line['text'], $matches)) + { + $element = strtolower($matches[1]); + + if (in_array($element, $this->textLevelElements)) + { + return; + } + + $Block = array( + 'name' => $matches[1], + 'depth' => 0, + 'markup' => $Line['text'], + ); + + $length = strlen($matches[0]); + + $remainder = substr($Line['text'], $length); + + if (trim($remainder) === '') + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + $Block['closed'] = true; + + $Block['void'] = true; + } + } + else + { + if (isset($matches[2]) or in_array($matches[1], $this->voidElements)) + { + return; + } + + if (preg_match('/<\/'.$matches[1].'>[ ]*$/i', $remainder)) + { + $Block['closed'] = true; + } + } + + return $Block; + } + } + + protected function blockMarkupContinue($Line, array $Block) + { + if (isset($Block['closed'])) + { + return; + } + + if (preg_match('/^<'.$Block['name'].'(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*>/i', $Line['text'])) # open + { + $Block['depth'] ++; + } + + if (preg_match('/(.*?)<\/'.$Block['name'].'>[ ]*$/i', $Line['text'], $matches)) # close + { + if ($Block['depth'] > 0) + { + $Block['depth'] --; + } + else + { + $Block['closed'] = true; + } + } + + if (isset($Block['interrupted'])) + { + $Block['markup'] .= "\n"; + + unset($Block['interrupted']); + } + + $Block['markup'] .= "\n".$Line['body']; + + return $Block; + } + + # + # Reference + + protected function blockReference($Line) + { + if (preg_match('/^\[(.+?)\]:[ ]*?(?:[ ]+["\'(](.+)["\')])?[ ]*$/', $Line['text'], $matches)) + { + $id = strtolower($matches[1]); + + $Data = array( + 'url' => $matches[2], + 'title' => null, + ); + + if (isset($matches[3])) + { + $Data['title'] = $matches[3]; + } + + $this->DefinitionData['Reference'][$id] = $Data; + + $Block = array( + 'hidden' => true, + ); + + return $Block; + } + } + + # + # Table + + protected function blockTable($Line, array $Block = null) + { + if ( ! isset($Block) or isset($Block['type']) or isset($Block['interrupted'])) + { + return; + } + + if (strpos($Block['element']['text'], '|') !== false and chop($Line['text'], ' -:|') === '') + { + $alignments = array(); + + $divider = $Line['text']; + + $divider = trim($divider); + $divider = trim($divider, '|'); + + $dividerCells = explode('|', $divider); + + foreach ($dividerCells as $dividerCell) + { + $dividerCell = trim($dividerCell); + + if ($dividerCell === '') + { + continue; + } + + $alignment = null; + + if ($dividerCell[0] === ':') + { + $alignment = 'left'; + } + + if (substr($dividerCell, - 1) === ':') + { + $alignment = $alignment === 'left' ? 'center' : 'right'; + } + + $alignments []= $alignment; + } + + # ~ + + $HeaderElements = array(); + + $header = $Block['element']['text']; + + $header = trim($header); + $header = trim($header, '|'); + + $headerCells = explode('|', $header); + + foreach ($headerCells as $index => $headerCell) + { + $headerCell = trim($headerCell); + + $HeaderElement = array( + 'name' => 'th', + 'text' => $headerCell, + 'handler' => 'line', + ); + + if (isset($alignments[$index])) + { + $alignment = $alignments[$index]; + + $HeaderElement['attributes'] = array( + 'style' => 'text-align: '.$alignment.';', + ); + } + + $HeaderElements []= $HeaderElement; + } + + # ~ + + $Block = array( + 'alignments' => $alignments, + 'identified' => true, + 'element' => array( + 'name' => 'table', + 'handler' => 'elements', + ), + ); + + $Block['element']['text'] []= array( + 'name' => 'thead', + 'handler' => 'elements', + ); + + $Block['element']['text'] []= array( + 'name' => 'tbody', + 'handler' => 'elements', + 'text' => array(), + ); + + $Block['element']['text'][0]['text'] []= array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $HeaderElements, + ); + + return $Block; + } + } + + protected function blockTableContinue($Line, array $Block) + { + if (isset($Block['interrupted'])) + { + return; + } + + if ($Line['text'][0] === '|' or strpos($Line['text'], '|')) + { + $Elements = array(); + + $row = $Line['text']; + + $row = trim($row); + $row = trim($row, '|'); + + preg_match_all('/(?:(\\\\[|])|[^|`]|`[^`]+`|`)+/', $row, $matches); + + foreach ($matches[0] as $index => $cell) + { + $cell = trim($cell); + + $Element = array( + 'name' => 'td', + 'handler' => 'line', + 'text' => $cell, + ); + + if (isset($Block['alignments'][$index])) + { + $Element['attributes'] = array( + 'style' => 'text-align: '.$Block['alignments'][$index].';', + ); + } + + $Elements []= $Element; + } + + $Element = array( + 'name' => 'tr', + 'handler' => 'elements', + 'text' => $Elements, + ); + + $Block['element']['text'][1]['text'] []= $Element; + + return $Block; + } + } + + # + # ~ + # + + protected function paragraph($Line) + { + $Block = array( + 'element' => array( + 'name' => 'p', + 'text' => $Line['text'], + 'handler' => 'line', + ), + ); + + return $Block; + } + + # + # Inline Elements + # + + protected $InlineTypes = array( + '"' => array('SpecialCharacter'), + '!' => array('Image'), + '&' => array('SpecialCharacter'), + '*' => array('Emphasis'), + ':' => array('Url'), + '<' => array('UrlTag', 'EmailTag', 'Markup', 'SpecialCharacter'), + '>' => array('SpecialCharacter'), + '[' => array('Link'), + '_' => array('Emphasis'), + '`' => array('Code'), + '~' => array('Strikethrough'), + '\\' => array('EscapeSequence'), + ); + + # ~ + + protected $inlineMarkerList = '!"*_&[:<>`~\\'; + + # + # ~ + # + + public function line($text, $nonNestables=array()) + { + $markup = ''; + + # $excerpt is based on the first occurrence of a marker + + while ($excerpt = strpbrk($text, $this->inlineMarkerList)) + { + $marker = $excerpt[0]; + + $markerPosition = strpos($text, $marker); + + $Excerpt = array('text' => $excerpt, 'context' => $text); + + foreach ($this->InlineTypes[$marker] as $inlineType) + { + # check to see if the current inline type is nestable in the current context + + if ( ! empty($nonNestables) and in_array($inlineType, $nonNestables)) + { + continue; + } + + $Inline = $this->{'inline'.$inlineType}($Excerpt); + + if ( ! isset($Inline)) + { + continue; + } + + # makes sure that the inline belongs to "our" marker + + if (isset($Inline['position']) and $Inline['position'] > $markerPosition) + { + continue; + } + + # sets a default inline position + + if ( ! isset($Inline['position'])) + { + $Inline['position'] = $markerPosition; + } + + # cause the new element to 'inherit' our non nestables + + foreach ($nonNestables as $non_nestable) + { + $Inline['element']['nonNestables'][] = $non_nestable; + } + + # the text that comes before the inline + $unmarkedText = substr($text, 0, $Inline['position']); + + # compile the unmarked text + $markup .= $this->unmarkedText($unmarkedText); + + # compile the inline + $markup .= isset($Inline['markup']) ? $Inline['markup'] : $this->element($Inline['element']); + + # remove the examined text + $text = substr($text, $Inline['position'] + $Inline['extent']); + + continue 2; + } + + # the marker does not belong to an inline + + $unmarkedText = substr($text, 0, $markerPosition + 1); + + $markup .= $this->unmarkedText($unmarkedText); + + $text = substr($text, $markerPosition + 1); + } + + $markup .= $this->unmarkedText($text); + + return $markup; + } + + # + # ~ + # + + protected function inlineCode($Excerpt) + { + $marker = $Excerpt['text'][0]; + + if (preg_match('/^('.$marker.'+)[ ]*(.+?)[ ]*(? strlen($matches[0]), + 'element' => array( + 'name' => 'code', + 'text' => $text, + ), + ); + } + } + + protected function inlineEmailTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<((mailto:)?\S+?@\S+?)>/i', $Excerpt['text'], $matches)) + { + $url = $matches[1]; + + if ( ! isset($matches[2])) + { + $url = 'mailto:' . $url; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $matches[1], + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + protected function inlineEmphasis($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + $marker = $Excerpt['text'][0]; + + if ($Excerpt['text'][1] === $marker and preg_match($this->StrongRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'strong'; + } + elseif (preg_match($this->EmRegex[$marker], $Excerpt['text'], $matches)) + { + $emphasis = 'em'; + } + else + { + return; + } + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => $emphasis, + 'handler' => 'line', + 'text' => $matches[1], + ), + ); + } + + protected function inlineEscapeSequence($Excerpt) + { + if (isset($Excerpt['text'][1]) and in_array($Excerpt['text'][1], $this->specialCharacters)) + { + return array( + 'markup' => $Excerpt['text'][1], + 'extent' => 2, + ); + } + } + + protected function inlineImage($Excerpt) + { + if ( ! isset($Excerpt['text'][1]) or $Excerpt['text'][1] !== '[') + { + return; + } + + $Excerpt['text']= substr($Excerpt['text'], 1); + + $Link = $this->inlineLink($Excerpt); + + if ($Link === null) + { + return; + } + + $Inline = array( + 'extent' => $Link['extent'] + 1, + 'element' => array( + 'name' => 'img', + 'attributes' => array( + 'src' => $Link['element']['attributes']['href'], + 'alt' => $Link['element']['text'], + ), + ), + ); + + $Inline['element']['attributes'] += $Link['element']['attributes']; + + unset($Inline['element']['attributes']['href']); + + return $Inline; + } + + protected function inlineLink($Excerpt) + { + $Element = array( + 'name' => 'a', + 'handler' => 'line', + 'nonNestables' => array('Url', 'Link'), + 'text' => null, + 'attributes' => array( + 'href' => null, + 'title' => null, + ), + ); + + $extent = 0; + + $remainder = $Excerpt['text']; + + if (preg_match('/\[((?:[^][]++|(?R))*+)\]/', $remainder, $matches)) + { + $Element['text'] = $matches[1]; + + $extent += strlen($matches[0]); + + $remainder = substr($remainder, $extent); + } + else + { + return; + } + + if (preg_match('/^[(]\s*+((?:[^ ()]++|[(][^ )]+[)])++)(?:[ ]+("[^"]*"|\'[^\']*\'))?\s*[)]/', $remainder, $matches)) + { + $Element['attributes']['href'] = $matches[1]; + + if (isset($matches[2])) + { + $Element['attributes']['title'] = substr($matches[2], 1, - 1); + } + + $extent += strlen($matches[0]); + } + else + { + if (preg_match('/^\s*\[(.*?)\]/', $remainder, $matches)) + { + $definition = strlen($matches[1]) ? $matches[1] : $Element['text']; + $definition = strtolower($definition); + + $extent += strlen($matches[0]); + } + else + { + $definition = strtolower($Element['text']); + } + + if ( ! isset($this->DefinitionData['Reference'][$definition])) + { + return; + } + + $Definition = $this->DefinitionData['Reference'][$definition]; + + $Element['attributes']['href'] = $Definition['url']; + $Element['attributes']['title'] = $Definition['title']; + } + + return array( + 'extent' => $extent, + 'element' => $Element, + ); + } + + protected function inlineMarkup($Excerpt) + { + if ($this->markupEscaped or $this->safeMode or strpos($Excerpt['text'], '>') === false) + { + return; + } + + if ($Excerpt['text'][1] === '/' and preg_match('/^<\/\w[\w-]*[ ]*>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] === '!' and preg_match('/^/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + + if ($Excerpt['text'][1] !== ' ' and preg_match('/^<\w[\w-]*(?:[ ]*'.$this->regexHtmlAttribute.')*[ ]*\/?>/s', $Excerpt['text'], $matches)) + { + return array( + 'markup' => $matches[0], + 'extent' => strlen($matches[0]), + ); + } + } + + protected function inlineSpecialCharacter($Excerpt) + { + if ($Excerpt['text'][0] === '&' and ! preg_match('/^&#?\w+;/', $Excerpt['text'])) + { + return array( + 'markup' => '&', + 'extent' => 1, + ); + } + + $SpecialCharacter = array('>' => 'gt', '<' => 'lt', '"' => 'quot'); + + if (isset($SpecialCharacter[$Excerpt['text'][0]])) + { + return array( + 'markup' => '&'.$SpecialCharacter[$Excerpt['text'][0]].';', + 'extent' => 1, + ); + } + } + + protected function inlineStrikethrough($Excerpt) + { + if ( ! isset($Excerpt['text'][1])) + { + return; + } + + if ($Excerpt['text'][1] === '~' and preg_match('/^~~(?=\S)(.+?)(?<=\S)~~/', $Excerpt['text'], $matches)) + { + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'del', + 'text' => $matches[1], + 'handler' => 'line', + ), + ); + } + } + + protected function inlineUrl($Excerpt) + { + if ($this->urlsLinked !== true or ! isset($Excerpt['text'][2]) or $Excerpt['text'][2] !== '/') + { + return; + } + + if (preg_match('/\bhttps?:[\/]{2}[^\s<]+\b\/*/ui', $Excerpt['context'], $matches, PREG_OFFSET_CAPTURE)) + { + $url = $matches[0][0]; + + $Inline = array( + 'extent' => strlen($matches[0][0]), + 'position' => $matches[0][1], + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + + return $Inline; + } + } + + protected function inlineUrlTag($Excerpt) + { + if (strpos($Excerpt['text'], '>') !== false and preg_match('/^<(\w+:\/{2}[^ >]+)>/i', $Excerpt['text'], $matches)) + { + $url = $matches[1]; + + return array( + 'extent' => strlen($matches[0]), + 'element' => array( + 'name' => 'a', + 'text' => $url, + 'attributes' => array( + 'href' => $url, + ), + ), + ); + } + } + + # ~ + + protected function unmarkedText($text) + { + if ($this->breaksEnabled) + { + $text = preg_replace('/[ ]*\n/', "
\n", $text); + } + else + { + $text = preg_replace('/(?:[ ][ ]+|[ ]*\\\\)\n/', "
\n", $text); + $text = str_replace(" \n", "\n", $text); + } + + return $text; + } + + # + # Handlers + # + + protected function element(array $Element) + { + if ($this->safeMode) + { + $Element = $this->sanitiseElement($Element); + } + + $markup = '<'.$Element['name']; + + if (isset($Element['attributes'])) + { + foreach ($Element['attributes'] as $name => $value) + { + if ($value === null) + { + continue; + } + + $markup .= ' '.$name.'="'.self::escape($value).'"'; + } + } + + $permitRawHtml = false; + + if (isset($Element['text'])) + { + $text = $Element['text']; + } + // very strongly consider an alternative if you're writing an + // extension + elseif (isset($Element['rawHtml'])) + { + $text = $Element['rawHtml']; + $allowRawHtmlInSafeMode = isset($Element['allowRawHtmlInSafeMode']) && $Element['allowRawHtmlInSafeMode']; + $permitRawHtml = !$this->safeMode || $allowRawHtmlInSafeMode; + } + + if (isset($text)) + { + $markup .= '>'; + + if (!isset($Element['nonNestables'])) + { + $Element['nonNestables'] = array(); + } + + if (isset($Element['handler'])) + { + $markup .= $this->{$Element['handler']}($text, $Element['nonNestables']); + } + elseif (!$permitRawHtml) + { + $markup .= self::escape($text, true); + } + else + { + $markup .= $text; + } + + $markup .= ''; + } + else + { + $markup .= ' />'; + } + + return $markup; + } + + protected function elements(array $Elements) + { + $markup = ''; + + foreach ($Elements as $Element) + { + $markup .= "\n" . $this->element($Element); + } + + $markup .= "\n"; + + return $markup; + } + + # ~ + + protected function li($lines) + { + $markup = $this->lines($lines); + + $trimmedMarkup = trim($markup); + + if ( ! in_array('', $lines) and substr($trimmedMarkup, 0, 3) === '

') + { + $markup = $trimmedMarkup; + $markup = substr($markup, 3); + + $position = strpos($markup, "

"); + + $markup = substr_replace($markup, '', $position, 4); + } + + return $markup; + } + + # + # Deprecated Methods + # + + function parse($text) + { + $markup = $this->text($text); + + return $markup; + } + + protected function sanitiseElement(array $Element) + { + static $goodAttribute = '/^[a-zA-Z0-9][a-zA-Z0-9-_]*+$/'; + static $safeUrlNameToAtt = array( + 'a' => 'href', + 'img' => 'src', + ); + + if (isset($safeUrlNameToAtt[$Element['name']])) + { + $Element = $this->filterUnsafeUrlInAttribute($Element, $safeUrlNameToAtt[$Element['name']]); + } + + if ( ! empty($Element['attributes'])) + { + foreach ($Element['attributes'] as $att => $val) + { + # filter out badly parsed attribute + if ( ! preg_match($goodAttribute, $att)) + { + unset($Element['attributes'][$att]); + } + # dump onevent attribute + elseif (self::striAtStart($att, 'on')) + { + unset($Element['attributes'][$att]); + } + } + } + + return $Element; + } + + protected function filterUnsafeUrlInAttribute(array $Element, $attribute) + { + foreach ($this->safeLinksWhitelist as $scheme) + { + if (self::striAtStart($Element['attributes'][$attribute], $scheme)) + { + return $Element; + } + } + + $Element['attributes'][$attribute] = str_replace(':', '%3A', $Element['attributes'][$attribute]); + + return $Element; + } + + # + # Static Methods + # + + protected static function escape($text, $allowQuotes = false) + { + return htmlspecialchars($text, $allowQuotes ? ENT_NOQUOTES : ENT_QUOTES, 'UTF-8'); + } + + protected static function striAtStart($string, $needle) + { + $len = strlen($needle); + + if ($len > strlen($string)) + { + return false; + } + else + { + return strtolower(substr($string, 0, $len)) === strtolower($needle); + } + } + + static function instance($name = 'default') + { + if (isset(self::$instances[$name])) + { + return self::$instances[$name]; + } + + $instance = new static(); + + self::$instances[$name] = $instance; + + return $instance; + } + + private static $instances = array(); + + # + # Fields + # + + protected $DefinitionData; + + # + # Read-Only + + protected $specialCharacters = array( + '\\', '`', '*', '_', '{', '}', '[', ']', '(', ')', '>', '#', '+', '-', '.', '!', '|', + ); + + protected $StrongRegex = array( + '*' => '/^[*]{2}((?:\\\\\*|[^*]|[*][^*]*[*])+?)[*]{2}(?![*])/s', + '_' => '/^__((?:\\\\_|[^_]|_[^_]*_)+?)__(?!_)/us', + ); + + protected $EmRegex = array( + '*' => '/^[*]((?:\\\\\*|[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', + '_' => '/^_((?:\\\\_|[^_]|__[^_]*__)+?)_(?!_)\b/us', + ); + + protected $regexHtmlAttribute = '[a-zA-Z_:][\w:.-]*(?:\s*=\s*(?:[^"\'=<>`\s]+|"[^"]*"|\'[^\']*\'))?'; + + protected $voidElements = array( + 'area', 'base', 'br', 'col', 'command', 'embed', 'hr', 'img', 'input', 'link', 'meta', 'param', 'source', + ); + + protected $textLevelElements = array( + 'a', 'br', 'bdo', 'abbr', 'blink', 'nextid', 'acronym', 'basefont', + 'b', 'em', 'big', 'cite', 'small', 'spacer', 'listing', + 'i', 'rp', 'del', 'code', 'strike', 'marquee', + 'q', 'rt', 'ins', 'font', 'strong', + 's', 'tt', 'kbd', 'mark', + 'u', 'xm', 'sub', 'nobr', + 'sup', 'ruby', + 'var', 'span', + 'wbr', 'time', + ); +} diff --git a/README b/README new file mode 100644 index 0000000..ef120d8 --- /dev/null +++ b/README @@ -0,0 +1,3 @@ +This includes the PHP code providing the functionality of the concealed.world website. It isn't intended seriously as a piece of standalone software, but it can serve as a reference point, or proof that the server-side code does nothing malicious. + +The repository only provides the minimum necessary to replicate the functionality, and the "look and feel" of the website. This does not include the content of articles or assets associated with them, unless otherwise stated they are my own. There will be broken links. The code is free to redistribute. Image files are also free to redistribute, but credit would be appreciated. diff --git a/Technology/_index.php b/Technology/_index.php new file mode 100644 index 0000000..5cba012 --- /dev/null +++ b/Technology/_index.php @@ -0,0 +1,9 @@ + diff --git a/about.php b/about.php new file mode 100644 index 0000000..13f1598 --- /dev/null +++ b/about.php @@ -0,0 +1,12 @@ + diff --git a/config.php b/config.php new file mode 100644 index 0000000..623c115 --- /dev/null +++ b/config.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/favicon.ico b/favicon.ico new file mode 100644 index 0000000..9b1c7fa Binary files /dev/null and b/favicon.ico differ diff --git a/home.php b/home.php new file mode 100644 index 0000000..8cff132 --- /dev/null +++ b/home.php @@ -0,0 +1,10 @@ + diff --git a/images/404.gif b/images/404.gif new file mode 100644 index 0000000..b690ec5 Binary files /dev/null and b/images/404.gif differ diff --git a/images/back.gif b/images/back.gif new file mode 100644 index 0000000..264ea58 Binary files /dev/null and b/images/back.gif differ diff --git a/images/backgrounds/arcade-bg.gif b/images/backgrounds/arcade-bg.gif new file mode 100644 index 0000000..1fdc356 Binary files /dev/null and b/images/backgrounds/arcade-bg.gif differ diff --git a/images/backgrounds/flowers-bg.gif b/images/backgrounds/flowers-bg.gif new file mode 100644 index 0000000..3019964 Binary files /dev/null and b/images/backgrounds/flowers-bg.gif differ diff --git a/images/backgrounds/lake-bg.gif b/images/backgrounds/lake-bg.gif new file mode 100644 index 0000000..2745646 Binary files /dev/null and b/images/backgrounds/lake-bg.gif differ diff --git a/images/backgrounds/moon-bg.gif b/images/backgrounds/moon-bg.gif new file mode 100644 index 0000000..f45f728 Binary files /dev/null and b/images/backgrounds/moon-bg.gif differ diff --git a/images/backgrounds/mountain-bg.gif b/images/backgrounds/mountain-bg.gif new file mode 100644 index 0000000..eeca29a Binary files /dev/null and b/images/backgrounds/mountain-bg.gif differ diff --git a/images/backgrounds/stars-bg.gif b/images/backgrounds/stars-bg.gif new file mode 100644 index 0000000..3b7fbe6 Binary files /dev/null and b/images/backgrounds/stars-bg.gif differ diff --git a/images/backgrounds/street-bg.gif b/images/backgrounds/street-bg.gif new file mode 100644 index 0000000..7d72f38 Binary files /dev/null and b/images/backgrounds/street-bg.gif differ diff --git a/images/backgrounds/window-bg.gif b/images/backgrounds/window-bg.gif new file mode 100644 index 0000000..8ef4691 Binary files /dev/null and b/images/backgrounds/window-bg.gif differ diff --git a/images/banner-small.gif b/images/banner-small.gif new file mode 100644 index 0000000..1994683 Binary files /dev/null and b/images/banner-small.gif differ diff --git a/images/banner.gif b/images/banner.gif new file mode 100644 index 0000000..913a889 Binary files /dev/null and b/images/banner.gif differ diff --git a/images/clearnet.gif b/images/clearnet.gif new file mode 100644 index 0000000..22faeec Binary files /dev/null and b/images/clearnet.gif differ diff --git a/images/cursor-default.gif b/images/cursor-default.gif new file mode 100644 index 0000000..330879c Binary files /dev/null and b/images/cursor-default.gif differ diff --git a/images/cursor-hover.gif b/images/cursor-hover.gif new file mode 100644 index 0000000..660d0f4 Binary files /dev/null and b/images/cursor-hover.gif differ diff --git a/images/ext.gif b/images/ext.gif new file mode 100644 index 0000000..0c08567 Binary files /dev/null and b/images/ext.gif differ diff --git a/images/forward.gif b/images/forward.gif new file mode 100644 index 0000000..20f45d0 Binary files /dev/null and b/images/forward.gif differ diff --git a/images/front.gif b/images/front.gif new file mode 100644 index 0000000..48fe240 Binary files /dev/null and b/images/front.gif differ diff --git a/images/frontsmall.gif b/images/frontsmall.gif new file mode 100644 index 0000000..422437b Binary files /dev/null and b/images/frontsmall.gif differ diff --git a/images/git.gif b/images/git.gif new file mode 100644 index 0000000..676762b Binary files /dev/null and b/images/git.gif differ diff --git a/images/heads/head.gif b/images/heads/head.gif new file mode 100644 index 0000000..5bfcc09 Binary files /dev/null and b/images/heads/head.gif differ diff --git a/images/heads/head2.gif b/images/heads/head2.gif new file mode 100644 index 0000000..c104664 Binary files /dev/null and b/images/heads/head2.gif differ diff --git a/images/heads/head3.gif b/images/heads/head3.gif new file mode 100644 index 0000000..484b6ea Binary files /dev/null and b/images/heads/head3.gif differ diff --git a/images/heads/head4.gif b/images/heads/head4.gif new file mode 100644 index 0000000..0059c39 Binary files /dev/null and b/images/heads/head4.gif differ diff --git a/images/heads/head5.gif b/images/heads/head5.gif new file mode 100644 index 0000000..5d556a3 Binary files /dev/null and b/images/heads/head5.gif differ diff --git a/images/heads/head6.gif b/images/heads/head6.gif new file mode 100644 index 0000000..075af7a Binary files /dev/null and b/images/heads/head6.gif differ diff --git a/images/heads/head7.gif b/images/heads/head7.gif new file mode 100644 index 0000000..2671a1b Binary files /dev/null and b/images/heads/head7.gif differ diff --git a/images/heads/head8.gif b/images/heads/head8.gif new file mode 100644 index 0000000..1986d3a Binary files /dev/null and b/images/heads/head8.gif differ diff --git a/images/heads/head9.gif b/images/heads/head9.gif new file mode 100644 index 0000000..b9d3f7b Binary files /dev/null and b/images/heads/head9.gif differ diff --git a/images/list.gif b/images/list.gif new file mode 100644 index 0000000..fdae517 Binary files /dev/null and b/images/list.gif differ diff --git a/images/listsmall.gif b/images/listsmall.gif new file mode 100644 index 0000000..1678ef6 Binary files /dev/null and b/images/listsmall.gif differ diff --git a/images/rainchan.gif b/images/rainchan.gif new file mode 100644 index 0000000..d542d4c Binary files /dev/null and b/images/rainchan.gif differ diff --git a/images/rss.gif b/images/rss.gif new file mode 100644 index 0000000..7108271 Binary files /dev/null and b/images/rss.gif differ diff --git a/images/tor.gif b/images/tor.gif new file mode 100644 index 0000000..5f0355a Binary files /dev/null and b/images/tor.gif differ diff --git a/includes/archive.php b/includes/archive.php new file mode 100644 index 0000000..c72b67b --- /dev/null +++ b/includes/archive.php @@ -0,0 +1,60 @@ +'; + echo ''; + $file = $_SERVER['PHP_SELF']; + if ($file == "/home.php") { + echo 'Search All Posts'; + } else { + echo 'Search All Posts in '.$_SESSION['title'].''; + } + echo ''; + echo ''; +} + +function archive ($includearr) { + $searches = isset($_GET['search']) ? explode(" ", trim($_GET['search'])) : null; + echo '
'; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + foreach ($includearr as $post) { + $link = $post[0]; + $mod = $post[1]; + $title = file_get_contents($link); + $linkarr = explode("/", $link); + $linkarr[sizeof($linkarr) - 1] = "_index.php?post=" . $linkarr[sizeof($linkarr) - 1]; + $link = implode("/", $linkarr); + $title = explode('

', $title)[1]; + $title = explode(''; + echo '

'; + echo ''; + echo ''; + } + echo '
TitleDate
'.$title.''.$mod.'
'; + echo '
'; + echo ''; +} +?> diff --git a/includes/archivesearchbar.php b/includes/archivesearchbar.php new file mode 100644 index 0000000..fbd3485 --- /dev/null +++ b/includes/archivesearchbar.php @@ -0,0 +1,22 @@ +'; + echo '
'; + foreach ($_GET as $name => $value) { + if ($name == 'search') { + continue; + } + $name = htmlspecialchars($name); + $value = htmlspecialchars($value); + echo ''; + } + echo 'Search: '; + echo ''; + if (isset($_GET['search'])) { + $searching = str_replace(" ", "', '", trim($_GET['search'])); + echo '

Searching for \''.$searching.'\'.'; + echo '
Clear Search'; + } + echo '
'; +echo ''; +?> diff --git a/includes/article-end.php b/includes/article-end.php new file mode 100644 index 0000000..0d3c46e --- /dev/null +++ b/includes/article-end.php @@ -0,0 +1,4 @@ +'; +require $root."includes/end.php"; +?> diff --git a/includes/article-start.php b/includes/article-start.php new file mode 100644 index 0000000..76048a1 --- /dev/null +++ b/includes/article-start.php @@ -0,0 +1,40 @@ +'; + echo '
'; + echo ''; + echo 'Navigation'; + echo ''; + echo '
'; + echo '
'; + require "".$root."includes/aside.php"; + echo '
'; + echo '
'; + echo '
'; + echo ''; + $dirs=explode("/", $_SERVER['REQUEST_URI']); + + echo 'Home '; + + $i = 1; + $newroot = $root; + while ($i < sizeof($dirs) - 1){ + echo '> '; + $dirlink = $dirs[$i]; + + if ($dirlink == "Other") { + $dirlink = ""; + $indexfile = "other.php"; + echo ''.$dirs[$i].' '; + } else { + echo ''.$dirs[$i].' '; + } + + $newroot = "/$dirlink/"; + + $i++; + } + echo ''; + echo '
'; + echo '
'; +?> diff --git a/includes/aside.php b/includes/aside.php new file mode 100644 index 0000000..8d1bb11 --- /dev/null +++ b/includes/aside.php @@ -0,0 +1,66 @@ +'.$linkname.''; + } else { + echo '
  • '.$linkname.'
  • '; + } +} + +function asideSubLink ($linkname, $root, $indexfile, $strike) { + $workingdirarr = explode('/', getcwd()); + $workingdir = end($workingdirarr); + if ($workingdir == $linkname && !isset($_GET['post'])) { + if ($strike == true) { + echo '
  • '.$linkname.'
  • '; + } else { + echo '
  • '.$linkname.'
  • '; + } + } else { + if ($strike == true) { + echo '
  • '.$linkname.'
  • '; + } else { + echo '
  • '.$linkname.'
  • '; + } + } +} + +echo '
    Home
    '; +echo 'Home'; +echo '
      '; + asideSubLink('Media', $root, $indexfile, false); + asideSubLink('Technology', $root, $indexfile, false); + asideSubLink('News', $root, $indexfile, false); +echo '
    '; +echo '
      '; + asideLink('Other Pages', 'other.php', $root); + asideLink('About', 'about.php', $root); + asideLink('Contact', 'contact.php', $root); + echo '
    • Return
    • '; +echo '
    '; +echo '
    '; + //echo 'RSS'; + if ($host == 'onion') { + /*echo 'Git Server'; + echo 'Rainchan Imageboard'; + echo 'Browse Site on Clearnet';*/ + echo '

    Currently not on TOR! If you are seeing this, thats an error!

    '; + } else { + echo 'Git Server'; + // echo 'Rainchan Imageboard'; + // echo 'Browse Site on Tor'; + echo '

    Wow, this is empty!

    '; + } +echo '
    '; +?> diff --git a/includes/bg.php b/includes/bg.php new file mode 100644 index 0000000..84f9b6e --- /dev/null +++ b/includes/bg.php @@ -0,0 +1,22 @@ + diff --git a/includes/blogpanel.php b/includes/blogpanel.php new file mode 100644 index 0000000..6a4b7df --- /dev/null +++ b/includes/blogpanel.php @@ -0,0 +1,19 @@ +'; + echo ''; + echo 'Return to '.$message.''; + echo ''; + echo '
    '; + include $root.'includes/archivesearchbar.php'; + } else { + echo '
    '; + echo ''; + echo ''.$message.''; + echo ''; + echo '
    '; + echo ''.$submessage.''; + echo '
    '; + } +?> diff --git a/includes/custompanelMD.php b/includes/custompanelMD.php new file mode 100644 index 0000000..dd59137 --- /dev/null +++ b/includes/custompanelMD.php @@ -0,0 +1,8 @@ +'; + echo $Parsedown->text($text); +echo '
    '; +?> diff --git a/includes/custompanelPHP.php b/includes/custompanelPHP.php new file mode 100644 index 0000000..0d33426 --- /dev/null +++ b/includes/custompanelPHP.php @@ -0,0 +1,7 @@ +'; + require $page; + echo ''; +} +?> diff --git a/includes/default-end.php b/includes/default-end.php new file mode 100644 index 0000000..6fcf42c --- /dev/null +++ b/includes/default-end.php @@ -0,0 +1,3 @@ + diff --git a/includes/default-start.php b/includes/default-start.php new file mode 100644 index 0000000..32a8a24 --- /dev/null +++ b/includes/default-start.php @@ -0,0 +1,84 @@ +read())) { + // skip hidden files + if($entry[0] == ".") continue; + if(is_dir("{$dir}{$entry}")) { + $retval[] = [ + 'name' => "{$dir}{$entry}/", + 'type' => filetype("{$dir}{$entry}"), + //'size' => 0, + //'lastmod' => filemtime("{$dir}{$entry}") + ]; + } elseif(is_readable("{$dir}{$entry}")) { + $retval[] = [ + 'name' => "{$dir}{$entry}", + 'type' => mime_content_type("{$dir}{$entry}"), + //'size' => filesize("{$dir}{$entry}"), + //'lastmod' => filemtime("{$dir}{$entry}") + ]; + } + } + $d->close(); + + return $retval; +} + +$inc = 0; +if (!isset($scanfiles) && getcwd() != $_SERVER['DOCUMENT_ROOT']) { + $scanfiles = array("./"); +} + +if (isset($scanfiles)){ + foreach ($scanfiles as $scan) { + $filearr = getFileList($scan); + foreach ($filearr as $file) { + if (!preg_match("/{$indexfile}/", $file['name']) && preg_match("/.php/", $file['name'])) { + $filedate = file_get_contents('./'.$file['name']); + $filedate = explode('

    ', $filedate)[1]; + $filedate = explode('

    ', $filedate)[0]; + if ($filedate == '') { + $filedate = 0; + } + $includearr[$inc] = array($file['name'], $filedate); + $inc = $inc + 1; + } + } + } + + usort ($includearr, function($a, $b) { + return $b[1] <=> $a[1]; + }); +} + +require "".$root."includes/start.php"; +echo ''; + echo '
    '; + echo ''; + echo 'Navigation'; + echo ''; + echo '
    '; + echo '
    '; + require "".$root."includes/aside.php"; + echo '
    '; + echo '
    '; + if (basename($_SERVER['PHP_SELF']) == "home.php") { + require "homepanel.php"; + } elseif (basename($_SERVER['PHP_SELF']) == "_index.php") { + require "blogpanel.php"; + } +?> diff --git a/includes/end.php b/includes/end.php new file mode 100644 index 0000000..541c675 --- /dev/null +++ b/includes/end.php @@ -0,0 +1,10 @@ +'; + echo '
    '; + echo '
    '; + echo '

    Send me something interesting: netadmin@broken-moon.net

    '; + echo '
    '; + echo '
    '; +echo ''; +echo ''; +?> diff --git a/includes/formatindex.php b/includes/formatindex.php new file mode 100644 index 0000000..dea2629 --- /dev/null +++ b/includes/formatindex.php @@ -0,0 +1,32 @@ +'; + echo ''; + echo '404 - File Not Found. Press left mouse button to continue.

    '; + echo 'Guru Meditation #4C4F5354.46494C45
    '; + echo '
    '; + echo '
    '; + } else { + require $_GET['post']; + } +} else { + require $root."includes/default-start.php"; + require $root."includes/seemore.php"; + require $root."includes/listing-content.php"; +} + +if (isset($_GET['post']) == 1 && $_GET['post'] != 'archive') { + if (!file_exists($_GET['post'])) { + echo ''; + } + require $root."includes/article-end.php"; +} else { + require $root."includes/default-end.php"; +} +?> diff --git a/includes/homepanel.php b/includes/homepanel.php new file mode 100644 index 0000000..64efdb3 --- /dev/null +++ b/includes/homepanel.php @@ -0,0 +1,28 @@ +'; + echo ''; + echo 'Welcome Image - Large'; + echo 'Welcome Image - Small'; + echo ''.$message.''; + echo ''; + echo '
    '; + echo ''.$submessages[$motd].''; + echo ''; + } elseif (isset($_GET['post']) && $_GET['post'] == 'archive') { + $file = basename($_SERVER['PHP_SELF']); + echo '
    '; + echo ''; + echo 'Return Home'; + echo ''; + echo '
    '; + include $root.'includes/archivesearchbar.php'; + } +?> diff --git a/includes/listing-content.php b/includes/listing-content.php new file mode 100644 index 0000000..123d522 --- /dev/null +++ b/includes/listing-content.php @@ -0,0 +1,107 @@ +'; + if ($totalpages > 1) { + echo '
    '; + echo ''; + if ($page != 1) { + $prev = $page - 1; + echo 'Prev '; + } + $firstdotflag = 0; + $lastdotflag = 0; + for ($i = 1; $i <= $totalpages; $i++) { + if ($page - $i < 4 && $page - $i > -4 || $i == 1 || $i == $totalpages) { + if ($page == $i) { + echo ''.$i.' '; + } else { + echo ''.$i.' '; + } + } elseif ($page - $i >= 4 && $firstdotflag == 0) { + echo ".. "; + $firstdotflag = 1; + } elseif ($page - $i <= -4 && $lastdotflag == 0) { + echo ".. "; + $lastdotflag = 1; + } + } + if ($page != $totalpages) { + $next = $page + 1; + echo 'Next'; + } + echo ''; + echo '
    '; + } + if ($incbanner == '1') { + echo '
    '; + echo '

    Part of the Lainchan Webring.

    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
    Clearnet:<?>
    Onion:<?>
    '; + echo '
    '; + } + echo ''; + } + + require $root."includes/archive.php"; + + if (!isset($includearr)) { + echo '
    '; + echo 'Looks like there\'s nothing here yet.
    That\'s probably not good.'; + echo '
    Return'; + echo '
    '; + } elseif (isset($_GET['post']) && $_GET['post'] == 'archive') { + archive($includearr); + } else { + $incbanner = 0; + numberLinks($page,$totalpages, $incbanner); + + while ($inc <= $incend && $inc < sizeof($includearr)) { + include $root."includes/section-start.php"; + include $includearr[$inc][0]; + include $root."includes/section-end.php"; + if ($stype == 3) { + $stype = 1; + } else { + $stype = $stype + 1; + } + $inc++; + } + archiveLink(); + $incbanner = 0; + numberLinks($page,$totalpages, $incbanner); + echo ''; + } +?> diff --git a/includes/mdutils.php b/includes/mdutils.php new file mode 100644 index 0000000..5c59201 --- /dev/null +++ b/includes/mdutils.php @@ -0,0 +1,20 @@ +text($text); +} +//Loads a given file, outputs as HTML. + +function md($text) { + $root = $_SERVER["DOCUMENT_ROOT"]; + include_once $root."/Parsedown.php"; + $Parsedown = new Parsedown(); + echo $Parsedown->text($text); +} + +?> \ No newline at end of file diff --git a/includes/old-listing-content.php b/includes/old-listing-content.php new file mode 100644 index 0000000..c1b3653 --- /dev/null +++ b/includes/old-listing-content.php @@ -0,0 +1,105 @@ +'; + if ($totalpages > 1) { + echo '
    '; + echo ''; + if ($page != 1) { + $prev = $page - 1; + echo 'Prev '; + } + $firstdotflag = 0; + $lastdotflag = 0; + for ($i = 1; $i <= $totalpages; $i++) { + if ($page - $i < 4 && $page - $i > -4 || $i == 1 || $i == $totalpages) { + if ($page == $i) { + echo ''.$i.' '; + } else { + echo ''.$i.' '; + } + } elseif ($page - $i >= 4 && $firstdotflag == 0) { + echo ".. "; + $firstdotflag = 1; + } elseif ($page - $i <= -4 && $lastdotflag == 0) { + echo ".. "; + $lastdotflag = 1; + } + } + if ($page != $totalpages) { + $next = $page + 1; + echo 'Next'; + } + echo ''; + echo '
    '; + } + if ($incbanner == '1') { + /*echo '
    '; + echo '

    Part of the Lainchan Webring.

    '; + echo '
    '; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo '
    Clearnet:<?>
    Onion:<?>
    '; + echo '
    ';*/ + } + echo ''; + } + + require $root."includes/archive.php"; + + if (!isset($includearr)) { + echo '
    '; + echo 'Looks like there\'s nothing here yet.
    That\'s probably not good.'; + echo '
    Return'; + echo '
    '; + } elseif (isset($_GET['post']) && $_GET['post'] == 'archive') { + archive($includearr); + } else { + $incbanner = 0; + numberLinks($page,$totalpages, $incbanner); + + while ($inc <= $incend && $inc < sizeof($includearr)) { + include $root."includes/section-start.php"; + include $includearr[$inc][0]; + include $root."includes/section-end.php"; + if ($stype == 3) { + $stype = 1; + } else { + $stype = $stype + 1; + } + $inc++; + } + archiveLink(); + $incbanner = 1; + numberLinks($page,$totalpages, $incbanner); + echo ''; + } +?> diff --git a/includes/section-end.php b/includes/section-end.php new file mode 100644 index 0000000..f0e735c --- /dev/null +++ b/includes/section-end.php @@ -0,0 +1,8 @@ +'; + echo ''.$includearr[$inc][1].''; + echo 'Article Page'; +echo ''; +echo ''; +$seemorepath = "#"; +?> diff --git a/includes/section-start.php b/includes/section-start.php new file mode 100644 index 0000000..bf74e0b --- /dev/null +++ b/includes/section-start.php @@ -0,0 +1,3 @@ +'; +?> diff --git a/includes/seemore.php b/includes/seemore.php new file mode 100644 index 0000000..39e6fbd --- /dev/null +++ b/includes/seemore.php @@ -0,0 +1,12 @@ + diff --git a/includes/start-meta.php b/includes/start-meta.php new file mode 100644 index 0000000..0522cee --- /dev/null +++ b/includes/start-meta.php @@ -0,0 +1,11 @@ +'; +echo ''; +echo ''; + echo ''.$title.''; + echo ''; + echo ''; + echo ''; + echo ''; +?> diff --git a/includes/start.php b/includes/start.php new file mode 100644 index 0000000..904799d --- /dev/null +++ b/includes/start.php @@ -0,0 +1,29 @@ +'; + $usragent=$_SERVER['HTTP_USER_AGENT']; + if (!strpos($usragent, 'PaleMoon') !== false && (!isset($_COOKIE['scrollbar']) || $_COOKIE['scrollbar'] !== "true")) { + echo ''; + } else { + echo ''; + } + echo ''; + echo ''; + echo ''; + if (isset($_GET['post']) && $_GET['post'] != 'archive') { + $ogtype = 'article'; + $ogtitle = file_get_contents('./'.$_GET['post']); + $ogtitle = explode('

    ', $ogtitle)[1]; + $ogtitle = explode(''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; +echo ''; +?> diff --git a/index.php b/index.php new file mode 100644 index 0000000..f329e8b --- /dev/null +++ b/index.php @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + +

    ~$>connect

    + + Display Scrollbar on this Site

    '; + } + ?> + + diff --git a/mobile-menu.php b/mobile-menu.php new file mode 100644 index 0000000..281f403 --- /dev/null +++ b/mobile-menu.php @@ -0,0 +1,12 @@ + + +
    + +
    + + diff --git a/scrollbar.php b/scrollbar.php new file mode 100644 index 0000000..a3f6ca7 --- /dev/null +++ b/scrollbar.php @@ -0,0 +1,30 @@ + + + + + + + +

    Display Scrollbar on this Site

    + +
    +

    This site hides the scrollbar by default as a stylistic choice.

    + +

    I have found Pale Moon cannot properly render my site because of this. I have attempted to fix this via detecting their user-agent and serving specific CSS, but some users may spoof their user-agent. If you are one of these people, or you use a browser I'm not aware of with the same problem, or you just like it better with one - using this allows you to view the site normally, with a scrollbar.

    + +

    Warning: This implementation uses cookies. Your browser must be capable of at least utilising first-party cookies. This cookie tells me absolutely nothing about you, and is not logged anywhere - it merely means that you have visited this page.

    + +

    You can unset this option by entering 'document.cookies="scrollbar=false"' into your browser's JavaScript console, or otherwise clearing the cookies. It will automatically expire 30 days after your last visit of this page.

    + + Continue to Homepage +
    + + diff --git a/styles/404.css b/styles/404.css new file mode 100644 index 0000000..c5acbad --- /dev/null +++ b/styles/404.css @@ -0,0 +1,56 @@ +:root { + --fg-col: #FFFFFF; + --main-col: #d2738a; + --grey-col: #CCCCCC; + --bg-col: #000000; +} + +body { + background: var(--bg-col); +} + +h1 { + border: unset; + text-align: unset; +} + +p { + letter-spacing: 3px; + animation: lost 10s ease-in-out infinite; + animation-play-state: running; +} + +.lostimg { + position: fixed; + bottom: 0; + left: 35%; + min-width: 350px; +} + +.lostimglink { + position: absolute; + top: 0; + left: 0; +} + +.lostimg img { + bottom: 0; + right: 0; +} + +@keyframes lost { + 0% { + letter-spacing: 3px; + } + 50% { + letter-spacing: 12px; + } + 0% { + letter-spacing: 3px; + } +} + +.notfound { + font-weight: bold; + color: var(--main-col); +} diff --git a/styles/cursor.css b/styles/cursor.css new file mode 100644 index 0000000..cdd5c71 --- /dev/null +++ b/styles/cursor.css @@ -0,0 +1,7 @@ +* { + cursor: url("../images/cursor-default.gif"), default; +} + +a, a > * { + cursor: url("../images/cursor-hover.gif"), default; +} diff --git a/styles/default.css b/styles/default.css new file mode 100644 index 0000000..e6aeec8 --- /dev/null +++ b/styles/default.css @@ -0,0 +1,578 @@ +:root { + --fg-col: #FFFFFF; + --main-col: #d2738a; + --grey-col: #CCCCCC; + --bg-col: #000000; + --ver: calc(95vh - 50px); + --ver-btm: 10vh; + --ver-upr: 18px; + --shade: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,0.8), rgba(0,0,0,0)); +} + +body { + background: url("/includes/bg.php") no-repeat var(--bg-col); + background-attachment: fixed; + background-position: bottom left; + word-break: break-word; +} + +ul { + list-style: none; + margin: 4px 0; +} + +li { + margin: 4px 0; +} + +img { + padding: 2px; + border: 3px double var(--main-col); +} + +table { + padding: 2px; + margin: 20px 0 20px 0; + border: 1px solid var(--main-col); +} + +th { + color: var(--fg-col); + font-weight: bold; +} + +tr:nth-child(odd) { + background-color: #111111; +} +tr:nth-child(even) { + background-color: #222222; +} + +input[type="submit" i] { + background: unset; + border: 3px double var(--main-col); + margin-left: 10px; + color: var(--main-col); + font-size: 1.5em; +} + +.aside, .article, .section, .mobilemenu, .banner { + opacity: 0.9; + transition: 0.3s; +} +.banner { + border: none; + width: 240px; + max-width: 100%; +} +.banner:hover { + opacity: 1; +} + +.bannerother, .bannergrave { + border: none; + height: 60px; + width: 240px; + max-width: 100%; +} + +.bannergrave { + filter: grayscale(1); + transition: 0.3s; +} + +.bannergrave:hover { + filter: grayscale(0); +} + +.bannerlarge { + border: none; + max-width: 100%; +} + +.imgnoborder { + max-width: 100%; + border: none; +} + +.aside, .article, .section, .mobilemenu { + background: var(--bg-col); + padding: 10px; + border: 1px solid var(--main-col); + box-shadow: 3px 3px 2px var(--main-col); +} + +.aside:hover, .article:hover, .section:hover, .mobilemenu:hover { + opacity: 1; + box-shadow: 6px 6px 4px var(--main-col); +} + +.aside { + width: 250px; + position: fixed; + margin: 2px; + max-height: var(--ver); + overflow-x: hidden; +} + +.aside > ul { + padding-inline-start: 20px; +} + +.aside > ul > ul { + padding-inline-start: 25px; +} + +.asideitem { + list-style-image: url("../images/list.gif"); + list-style-position: inside; + font-size: 1.2em; +} + +.asidesubitem { + list-style-image: url("../images/listsmall.gif"); + list-style-position: inside; + font-size: 1em; +} + +.openaside { + display: none; + position: fixed !important; + height: 1.5em; + padding: 6px 0 0 0 !important; + width: 100%; + top: 0; + left: 0; + right: 0; + background: var(--bg-col); + border-bottom: 3px double var(--main-col) !important; + border-top: none !important; + border-left: none !important; + border-right: none !important; + text-align: center; + box-shadow: none !important; + z-index: 1; +} + +.openaside a { + font-size: 1.2em; + letter-spacing: 8px; + margin-top: 4px; +} + +.bottom { + height: var(--ver-btm); + width: 100%; + bottom: 0; + left: 0; + position: fixed; + background-image: var(--shade); + display: table; +} + +.bottomcell { + display: table-cell; + vertical-align: bottom; + text-align: center; + opacity: 0.7; + transition: 0.3s; +} + +.bottomcell:hover { + opacity: 1; +} + +.cell { + width: 45%; + text-align: center; +} + +.cell > p { + height: 24px; + margin: 16px 0 0 0; +} + +.cell > h3 { + height: 48px; + margin: 16px 0 0 0; +} + +.mobilemenu { + width: 250px; + overflow-x: hidden; + padding-right: 25px; + margin-bottom: 80px; +} + +.mobilemenu > ul { + text-align: left; + position: relative; + right: 9px; +} + +.mobilemenu > ul > ul > p { + left: 25% !important; +} + +.content { + margin-left: 280px; + margin-bottom: var(--ver-btm); + margin-top: 2px; + position: absolute; + margin-bottom: 0; +} + +.article { + margin: 2px 20px 0 20px; + padding: 25px !important; + margin-top: 60px; + margin-bottom: 55px; +} + +.article-headerless { + margin: 0 20px 55px 20px !important; +} + +.section { + max-height: 50vh; + overflow: hidden; + position: relative; +} + +.section1 { + margin: 20px 20px 20px 80px; +} + +.section2 { + margin: 20px 80px 20px 20px; +} + +.section3 { + margin: 20px 60px 20px 60px; +} + +.homesection { + margin-top: 20px; + margin-bottom: 60px; + width: 540px; + text-align: center; + max-height: unset; +} + +.homemessage, .homesubmessage { + font-style: italic; +} + +.homemessage { + font-size: 2em; +} + +.homesubmessage { + font-size: 1.2em; +} + +.homesmallimg { + display: none; +} + +.upperdirs { + width: 80%; + height: var(--ver-upr); + margin-bottom: 20px; + position: absolute; + left: 0; + right: 0; + margin-left: auto; + margin-right: auto; + text-align: center; +} + +.numlist { + display: table; + margin-bottom: 20px; + margin-left: auto; + margin-right: auto; +} + +.seemore { + position: absolute; + bottom: 0; + width: calc(100% - 20px); + height: 60px; + background-image: var(--shade); +} + +.seedate { + float: left; + margin-top: 40px; +} + +.seemorelink { + float: right; + margin-top: 40px; +} + +.greyed { + color: var(--grey-col); +} + +.archivereturn { + margin: 20px 60px 20px 60px; + display: table; +} + +.search { + width: 25vw; + min-width: 300px; +} + +.titlecol { + width: 65%; +} + +.datecol { + width: 35%; +} + +.nothinghere { + width: 50vw; + height: 10vh; + margin: 20px 10vw 0 10vw; + text-align: center; +} + +.nothinghere > .notgood { + letter-spacing: 2px; + animation: notgood 4s ease-in-out infinite; + animation-play-state: running; +} + +.nothingreturn { + position: absolute; + bottom: 0; + right: 0; + font-size: 1.2em; + padding: 6px; +} + +.extlink { + background: url("../images/ext.gif") no-repeat; + background-position: right; + padding-right: 13px; +} + +.leftimg, .rightimg, .centerimg { + filter: grayscale(1); + transition: 0.2s; +} + +.leftimg:hover, .rightimg:hover, .centerimg:hover { + filter: none; +} + +.leftimg, .rightimg { + max-width: 50%; + max-height: 25em; + display: block; + margin: 10px; +} + +.leftimg { + float: left; +} + +.rightimg { + float: right; +} + +.centerimg { + max-width: 70%; + max-height: 30em; + display: block; + margin: 10px auto; +} + +.quote { + display: inline-block; + margin: 5px; + color: var(--grey-col); +} + +.quote:before { + content: "「"; + color: var(--main-col); + letter-spacing: 10px; +} + +.quote:after { + content: "」"; + color: var(--main-col); + letter-spacing: 10px; +} + +.scrollingcontentbtm { + margin-bottom: var(--ver-btm); + display: inline-block; +} + +.blogbox { + position: relative; + right: 11px; + border: 1px solid var(--main-col); + margin-left: 20px; + margin-bottom: 10px; +} + +.asidehometext { + font-size: 1.2em; + position: relative; + display: none; + text-align: center; +} + +.asidebottomimage { + height: 30px; + max-width: 30px; + margin: 0 3px; + transition: 0.5s; +} + +.asidebottomimage:hover { + box-shadow: var(--main-col) 1px 4px 5px; +} + +.archivespan { + margin: 30px; +} + +.codeblock { + font-family: 'pxplus_ibm_vga9regular', monospace; + border: 1px solid var(--main-col); + background-color: #1b1b1d; + color: #ffcccc; + font-size: 0.9em; + padding: 10px; + white-space: pre-wrap; + margin: 10px; + overflow-wrap: break-word; + word-break: break-all; +} + +.largefont { + font-size: 2em; +} + +.centre { + text-align: center; + margin-left: auto; + margin-right: auto; +} + +.arrow { + border: none; + padding: 2px 0 0 0; +} + +.datetext { + text-align: center; + font-weight: bold; +} + +.webring-panel { + width: fit-content; + margin-left: auto; + margin-right: auto; +} + +.webring-text { + margin: 6px; +} + +.webring-table { + margin-top: 0; + margin-bottom: 0; +} + +@keyframes notgood { + 0% { + letter-spacing: 2px; + } + 50% { + letter-spacing: 4px; + } + 100% { + letter-spacing: 2px; + } +} + +@media (max-width: 900px) { + .aside > .asidehomeimage { + display: none; + } + + .aside > .asidehometext { + display: block; + } + + .aside { + width: 200px; + } + + .content { + margin-left: 240px; + } +} + +@media (max-height: 580px) { + .aside > .asidehomeimage { + display: none; + } + + .aside > .asidehometext { + display: block; + } +} + +@media (max-width: 850px) { + .homesection { + width: 220px; + } + .homelargeimg { + display: none; + } + .homesmallimg { + display: block; + } +} + +@media (max-width: 660px) { + .aside { + display: none; + } + + .openaside { + display: block; + } + + body { + margin: 3em 8px 8px 8px; + } + + .content { + margin-left: unset; + } +} + +@media (max-width: 600px) { + .seedate { + display: none; + } + + .seemorelink { + float: left; + } + + .bottomcell > p { + font-size: 0.7em; + } +} diff --git a/styles/fonts.css b/styles/fonts.css new file mode 100644 index 0000000..942e4bb --- /dev/null +++ b/styles/fonts.css @@ -0,0 +1,82 @@ +:root { + --fg-col: #FFFFFF; + --main-col: #d2738a; + --bg-col: #000000; +} + +@font-face { + font-family: 'pxplus_ibm_vga9regular'; + src: url('/styles/pxplus_ibm_vga9-webfont.woff2') format('woff2'), + url('/styles/pxplus_ibm_vga9-webfont.woff') format('woff'); + font-weight: normal; + font-style: normal; +} + +body { + color: var(--fg-col); + font-family: 'pxplus_ibm_vga9regular', monospace; +} + +h1 { + font-size: 1.8em; + text-align: center; + border-bottom: 1px solid var(--main-col); +} + +h2, h3 { + color: var(--fg-col); + font-style: italic; + font-weight: 500; + text-shadow: 0 0 5px var(--main-col); + clear: both; + margin-top: 50px; +} + +h2 { + font-size: 1.6em; + margin-left: 5%; + margin-right: 5%; +} + +h3 { + font-size: 1.3em; + margin-left: 10%; + margin-right: 10%; +} + +@keyframes wiredlink { + 50% { + color: var(--fg-col); + text-shadow: var(--main-col) 1px 4px 5px; + } +} + +a { + text-decoration: none; +} + +a:hover { + animation: wiredlink 1s ease-in-out infinite; +} + +a:link { + color: var(--main-col); +} + +a:visited { + color: var(--main-col); +} + +a:hover { + color: var(--main-col); +} + +@keyframes wiredarrow { + 50% { + filter: grayscale(1) brightness(2) blur(1px); + } +} + +.arrow:hover { + animation: wiredarrow 1s ease-in-out infinite; +} diff --git a/styles/noscroll.css b/styles/noscroll.css new file mode 100644 index 0000000..8ffdefd --- /dev/null +++ b/styles/noscroll.css @@ -0,0 +1,9 @@ +::-webkit-scrollbar { + display: none; +} + +* { + -ms-overflow-style: none; + scrollbar-width: none; + overflow: -moz-scrollbars-none; +} diff --git a/styles/pxplus_ibm_vga9-webfont.woff b/styles/pxplus_ibm_vga9-webfont.woff new file mode 100644 index 0000000..bacfc4a Binary files /dev/null and b/styles/pxplus_ibm_vga9-webfont.woff differ diff --git a/styles/pxplus_ibm_vga9-webfont.woff2 b/styles/pxplus_ibm_vga9-webfont.woff2 new file mode 100644 index 0000000..8d45d96 Binary files /dev/null and b/styles/pxplus_ibm_vga9-webfont.woff2 differ diff --git a/styles/scroll.css b/styles/scroll.css new file mode 100644 index 0000000..cab331f --- /dev/null +++ b/styles/scroll.css @@ -0,0 +1,22 @@ +:root { + --main-col: #d2738a; +} + +/* Chromium-based */ +::-webkit-scrollbar { + width: 12px; +} +::-webkit-scrollbar-thumb { + background-color: var(--main-col); +} +::-webkit-scrollbar-track { + background-color: #000; +} +::-webkit-scrollbar-corner { + background-color: #000; +} + +/* Firefox-based */ +* { + scrollbar-color: var(--main-col) #000; +} diff --git a/styles/splash.css b/styles/splash.css new file mode 100644 index 0000000..1308402 --- /dev/null +++ b/styles/splash.css @@ -0,0 +1,32 @@ +:root { + --fg-col: #FFFFFF; + --main-col: #d2738a; + --bg-col: #000000; +} + +body { + /* background-image: url("../images/splash.gif"); + background-repeat: no-repeat; + background-size: 100% 100%; + background-attachment: fixed; */ + + background: var(--bg-col); +} + +h1 { + font-size: 2.4em !important; + border: none !important; + animation: none !important; + margin-top: 100px; +} + +h1 > span { + border-right: .5em solid var(--main-col); + animation: + blink-caret 1.5s step-end infinite; +} + +@keyframes blink-caret { + from, to { border-color: transparent } + 50% { border-color: var(--main-col); } +}