mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-12 00:07:44 +00:00
Lexica Botania Online MMORPG Free To Play!
This commit is contained in:
1 parent
a5f3964620
commit
f488be6595
4 files changed
+90
-1
No files matched your search
@@ -7,6 +7,7 @@
|
||||
<link rel="stylesheet" href="css/ripples.min.css">
|
||||
<link rel="stylesheet" href="css/material-wfont.min.css">
|
||||
<link rel="stylesheet" href="css/botania.css">
|
||||
<link rel="stylesheet" href="css/minecraft-pallette.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
@@ -193,6 +193,19 @@ iframe {
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.entry-text {
|
||||
padding-left: 12px;
|
||||
}
|
||||
|
||||
.entry-bookmark {
|
||||
color: #33691E;
|
||||
}
|
||||
|
||||
.entry-bookmark:hover, .entry-bookmark:focus {
|
||||
text-decoration: none;
|
||||
color: #4AA825;
|
||||
}
|
||||
|
||||
.footer {
|
||||
text-align: center;
|
||||
padding-top: 5px;
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
.mc-color-0 { color: #000000; }
|
||||
.mc-color-1 { color: #0000AA; }
|
||||
.mc-color-2 { color: #00AA00; }
|
||||
.mc-color-3 { color: #00AAAA; }
|
||||
.mc-color-4 { color: #AA0000; }
|
||||
.mc-color-5 { color: #AA00AA; }
|
||||
.mc-color-6 { color: #FFAA00; }
|
||||
.mc-color-7 { color: #AAAAAA; }
|
||||
.mc-color-8 { color: #555555; }
|
||||
.mc-color-9 { color: #5555FF; }
|
||||
.mc-color-a { color: #55FF55; }
|
||||
.mc-color-b { color: #55FFFF; }
|
||||
.mc-color-c { color: #FF5555; }
|
||||
.mc-color-d { color: #FF55FF; }
|
||||
.mc-color-e { color: #FFFF55; }
|
||||
.mc-color-f { color: #FFFFFF; }
|
||||
|
||||
.mc-color-l { font-weight: bold; }
|
||||
.mc-color-m { text-decoration: line-through; }
|
||||
.mc-color-n { text-decoration: underline; }
|
||||
.mc-color-o { font-style: italic; }
|
||||
+55
-1
@@ -3,4 +3,58 @@
|
||||
Lexica Botania Online
|
||||
</div>
|
||||
|
||||
Lorem ipsum dolor sit...
|
||||
<div class='warning-txt'>
|
||||
<ul>
|
||||
<li>This page is a verbatim copy of the Lexica Botania you can craft ingame by combining a Book with any type of Sapling. It, however, does not contain any recipes or images. Usage of the ingame guide is encouraged.</li>
|
||||
<li>The contents of this page are fed from the <a href="https://github.com/Vazkii/Botania/blob/master/src/main/resources/assets/botania/lang/en_US.lang"> bleeding-edge lang file</a> and may be ahead of the Botania version currently out.</li>
|
||||
<li>This page contains spoilers for unlockables!</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
$file = file('https://raw.githubusercontent.com/Vazkii/Botania/master/src/main/resources/assets/botania/lang/en_US.lang');
|
||||
|
||||
$started_docs = false;
|
||||
$opened_div = false;
|
||||
|
||||
$current_entry = '';
|
||||
foreach($file as $line) {
|
||||
if($started_docs || trim($line) == '# LEXICON ENTRIES') {
|
||||
$started_docs = true;
|
||||
$entry_match = match_entry($line);
|
||||
$page_match = match_page($line, $current_entry);
|
||||
|
||||
if(sizeof($entry_match) > 0) {
|
||||
$current_entry = $entry_match[1];
|
||||
if($opened_div)
|
||||
echo('</div>');
|
||||
|
||||
echo("<br><a href='#$current_entry' class='entry-bookmark glyphicon glyphicon-bookmark' title='Permalink'></a> <b id='$current_entry-fake'>$entry_match[2]</b><div class='entry-text'>");
|
||||
$opened_div = true;
|
||||
}
|
||||
|
||||
if(sizeof($page_match) > 0) {
|
||||
$page = preg_replace('/&(.)((?:[^&])+)(?:(?:&(?:0|r))|$)/', "<span class='mc-color-$1'>$2</span>", $page_match[1]) . '<br>';
|
||||
$no_control = preg_replace('/&./', '', $page_match[1]);
|
||||
if(strlen($no_control) > 50)
|
||||
echo($page);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
echo('</div>');
|
||||
|
||||
function match($regex, $line) {
|
||||
$matches = array();
|
||||
preg_match("/$regex/", $line, $matches);
|
||||
return $matches;
|
||||
}
|
||||
|
||||
function match_entry($line) {
|
||||
return match('botania\.entry\.(\w+)=(.+)', $line);
|
||||
}
|
||||
|
||||
function match_page($line, $entry_name) {
|
||||
return match("botania\.page\.$entry_name\d+=(.+)", $line);
|
||||
}
|
||||
?>
|
||||
Reference in new issue
Block a user