Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
victorstanciu committed Feb 24, 2013
1 parent a2b88cf commit 063f1bf
Show file tree
Hide file tree
Showing 33 changed files with 11,655 additions and 0 deletions.
32 changes: 32 additions & 0 deletions index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

define('LIBRARY', __DIR__ . DIRECTORY_SEPARATOR . 'library' . DIRECTORY_SEPARATOR);

$request_uri = parse_url($_SERVER['REQUEST_URI']);
$request_uri = explode("/", $request_uri['path']);
$script_name = explode("/", dirname($_SERVER['SCRIPT_NAME']));

$app_dir = array();
foreach ($request_uri as $key => $value) {
if (isset($script_name[$key]) && $script_name[$key] == $value) {
$app_dir[] = $script_name[$key];
}
}

define('APP_DIR', rtrim(implode('/', $app_dir), "/"));

$https = false;
if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") {
$https = true;
}

define('BASE_URL', "http" . ($https ? "s" : "") . "://" . $_SERVER['HTTP_HOST'] . APP_DIR);

unset($request_uri, $script_name, $app_dir, $https);

define('APP_NAME', 'Wikitten');

require_once __DIR__ . DIRECTORY_SEPARATOR . 'wiki.php';

Wiki::instance()->dispatch();

Empty file added library/.gitkeep
Empty file.
111 changes: 111 additions & 0 deletions library/Sample HTML document.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
<blockquote>This is a sample HTML document. Unlike Markdown documents, HTML is simply displayed as-is, so make sure you don't add tags that would interfere with the HTML of the wiki itself.</blockquote>

<h2>This is 2nd level heading</h2>
<p>This is a test paragraph.</p>
<h3>This is 3rd level heading</h3>
<p>This is a test paragraph.</p>
<h4>This is 4th level heading</h4>
<p>This is a test paragraph.</p>
<h5>This is 5th level heading</h5>
<p>This is a test paragraph.</p>
<h6>This is 6th level heading</h6>
<p>This is a test paragraph.</p>
<h2>Basic block level elements</h2>
<p>This is a normal paragraph (<code>p</code> element). To add some length to it, let us mention that this page was primarily written for testing the effect of <strong>user style sheets</strong>. You can use it for various other purposes as well, like just checking how your browser displays various HTML elements.</p>
<p>This is another paragraph. I think it needs to be added that the set of elements tested is not exhaustive in any sense. I have selected those elements for which it can make sense to write user style sheet rules, in my opionion.</p>
<div>This is a <code>div</code> element. Authors may use such elements instead of paragraph markup for various reasons. (End of <code>div</code>.)</div>
<blockquote>
<p>This is a block quotation containing a single paragraph. Well, not quite, since this is not <em>really</em> quoted text, but I hope you understand the point. After all, this page does not use HTML markup very normally anyway.</p>
</blockquote>
<h2>Lists</h2>
<p>This is a paragraph before an <strong>unnumbered</strong> list (<code>ul</code>). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".</p>
<ul>
<li> One. </li>
<li> Two. </li>
<li> Three. Well, probably this list item should be longer. Note that for short items lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items. </li>
<li> Four. This is the last item in this list. Let us terminate the list now without making any more fuss about it. </li>
</ul>
<p>This is a paragraph before a <strong>numbered</strong> list (<code>ol</code>). Note that the spacing between a paragraph and a list before or after that is hard to tune in a user style sheet. You can't guess which paragraphs are logically related to a list, e.g. as a "list header".</p>
<ol>
<li> One. </li>
<li> Two. </li>
<li> Three. Well, probably this list item should be longer. Note that if items are short, lists look better if they are compactly presented, whereas for long items, it would be better to have more vertical spacing between items. </li>
<li> Four. This is the last item in this list. Let us terminate the list now without making any more fuss about it. </li>
</ol>
<p>This is a paragraph before a <strong>definition</strong> list (<code>dl</code>). In principle, such a list should consist of <em>terms</em> and associated definitions. But many authors use <code>dl</code> elements for fancy "layout" things. Usually the effect is not <em>too</em> bad, if you design user style sheet rules for <code>dl</code> which are suitable for real definition lists.</p>
<dl><dt> recursion </dt><dd> see recursion </dd><dt> recursion, indirect </dt><dd> see indirect recursion </dd><dt> indirect recursion </dt><dd> see recursion, indirect </dd><dt> term </dt><dd> a word or other expression taken into specific use in a well-defined meaning, which is often defined rather rigorously, even formally, and may differ quite a lot from an everyday meaning </dd></dl>
<h2>Text-level markup</h2>
<ul>
<li> <abbr title="Cascading Style Sheets">CSS</abbr> (an abbreviation; <code>abbr</code> markup used) </li>
<li> <acronym title="radio detecting and ranging">radar</acronym> (an acronym; <code>acronym</code> markup used) </li>
<li> <strong>bolded</strong> (<code>b</code> markup used - just bolding with unspecified semantics) </li>
<li> <big>big thing</big> (<code>big</code> markup used) </li>
<li> <span style="font-size:x-large;">large size</span> (<code>font size=6</code> markup used) </li>
<li> <span style="font-family:Courier;">Courier font</span> (<code>font face=Courier</code> markup used) </li>
<li> <span style="color:#FF0000;">red text</span> (<code>font color=red</code> markup used) </li>
<li> <cite>Origin of Species</cite> (a book title; <code>cite</code> markup used) </li>
<li> <code>a[i] = b[i] + c[i);</code> (computer code; <code>code</code> markup used) </li>
<li> here we have some <del>deleted</del> text (<code>del</code> markup used) </li>
<li> an <dfn>octet</dfn> is an entity consisting of eight bits (<code>dfn</code> markup used for the term being defined) </li>
<li> this is <em>very</em> simple (<code>em</code> markup used for emphasizing a word) </li>
<li> <em lang="la" xml:lang="la">Homo sapiens</em> (should appear in italics; <code>i</code> markup used) </li>
<li> here we have some <ins>inserted</ins> text (<code>ins</code> markup used) </li>
<li> type <kbd>yes</kbd> when prompted for an answer (<code>kbd</code> markup used for text indicating keyboard input) </li>
<li> <q>Hello!</q> (<code>q</code> markup used for quotation) </li>
<li> He said: <q>She said <q>Hello!</q></q> (a quotation inside a quotation) </li>
<li> you may get the message <samp>Core dumped</samp> at times (<code>samp</code> markup used for sample output) </li>
<li> <small>this is not that important</small> (<code>small</code> markup used) </li>
<li> <span style="text-decoration: line-through;">overstruck</span> (<code>strike</code> markup used; note: <code>s</code> is a nonstandard synonym for <code>strike</code>) </li>
<li> <strong>this is highlighted text</strong> (<code>strong</code> markup used) </li>
<li> In order to test how subscripts and superscripts (<code>sub</code> and <code>sup</code> markup) work inside running text, we need some dummy text around constructs like x<sub>1</sub> and H<sub>2</sub>O (where subscripts occur). So here is some fill so that you will (hopefully) see whether and how badly the subscripts and superscripts mess up vertical spacing between lines. Now superscripts: M<sup>lle</sup>, 1<sup>st</sup>, and then some mathematical notations: e<sup>x</sup>, sin<sup>2</sup><em>x</em>, and some nested superscripts (exponents) too: e<sup>x<sup>2</sup></sup> and f(x)<sup>g(x)<sup>a+b+c</sup></sup> (where 2 and a+b+c should appear as exponents of exponents). </li>
<li> <tt>text in monospace font</tt> (<code>tt</code> markup used) </li>
<li> <span style="text-decoration: underline;">underlined</span> text (<code>u</code> markup used) </li>
<li> the command <code>cat</code> <var>filename</var> displays the file specified by the <var>filename</var> (<code>var</code> markup used to indicate a word as a variable). </li>
</ul>
<p>Some of the elements tested above are typically displayed in a monospace font, often using the <em>same</em> presentation for all of them. This tests whether that is the case on your browser:</p>
<ul>
<li> <code>This is sample text inside code markup</code> </li>
<li> <kbd>This is sample text inside kbd markup</kbd> </li>
<li> <samp>This is sample text inside samp markup</samp> </li>
<li> <tt>This is sample text inside tt markup</tt> </li>
</ul>
<h2>Links</h2>
<ul>
<li> <a href="">main page</a> </li>
<li> <a title="Writing Systems and Punctuation" href="http://www.unicode.org/versions/Unicode4.0.0/ch06.pdf">Unicode Standard, chapter&nbsp;6</a> </li>
</ul>
<p>This is a text paragraph that contains some inline links. Generally, inline links (as opposite to e.g. links lists) are problematic from the <a href="http://www.useit.com">usability</a> perspective, but they may have use as &ldquo;incidental&rdquo;, less relevant links.</p>
<h2>Tables</h2>
<p>The first row and the first column contain table header cells (<code>th</code> elements) only; other cells are data cells (<code>td</code> elements), with <code>align="right"</code> attributes:</p>
<table class="table table-condensed table-bordered table-striped" summary="Each row names a Nordic country and specifies its total area and land area, in square kilometers">
<tbody>
<tr>
<th>Country</th> <th>Total area</th> <th>Land area</th>
</tr>
<tr>
<th>Denmark</th>
<td align="right">43,070</td>
<td align="right">42,370</td>
</tr>
<tr>
<th>Finland</th>
<td align="right">337,030</td>
<td align="right">305,470</td>
</tr>
<tr>
<th>Iceland</th>
<td align="right">103,000</td>
<td align="right">100,250</td>
</tr>
<tr>
<th>Norway</th>
<td align="right">324,220</td>
<td align="right">307,860</td>
</tr>
<tr>
<th>Sweden</th>
<td align="right">449,964</td>
<td align="right">410,928</td>
</tr>
</tbody>
</table>
Loading

0 comments on commit 063f1bf

Please sign in to comment.