mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-06 15:48:47 +00:00
[map] overhaul the maps, fewer parts, fewer paths, fewer knobs; same great results
This commit is contained in:
@@ -25,36 +25,6 @@
|
||||
</div>
|
||||
<div class="page_content">
|
||||
<h1 class="title">Blog</h1><input autofocus id="lister_search_0" class="lister_search" oninput="SearchInput(event, 0)" onkeydown="SearchKeyDown(event, 0)" placeholder="Filter..."></input><ul id="lister_0" class="lister">
|
||||
<a class="lister_item_link" href="blog1.html">
|
||||
<li class="lister_item">
|
||||
<div class="lister_item_text">
|
||||
<div class="lister_item_title">
|
||||
Test Blog #1
|
||||
</div>
|
||||
<div class="lister_item_date">
|
||||
30 November 2020
|
||||
</div>
|
||||
<div class="lister_item_desc">
|
||||
This is my test blog.
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
<a class="lister_item_link" href="blog2.html">
|
||||
<li class="lister_item">
|
||||
<div class="lister_item_text">
|
||||
<div class="lister_item_title">
|
||||
Hello, Again!
|
||||
</div>
|
||||
<div class="lister_item_date">
|
||||
28 November 2020
|
||||
</div>
|
||||
<div class="lister_item_desc">
|
||||
This is another test blog.
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ int main(int argument_count, char **arguments)
|
||||
{
|
||||
for(MD_EachNode(index_string, node->first_child))
|
||||
{
|
||||
MD_StringMap_Insert(&index_table, MD_MapCollisionRule_Chain, index_string->string, root);
|
||||
MD_MapInsert(&index_table, MD_MapKeyStr(index_string->string), root);
|
||||
}
|
||||
goto end_index_build;
|
||||
}
|
||||
@@ -515,14 +515,15 @@ GeneratePageContent(MD_Map *index_table, SiteInfo *site_info, PageInfo *page_inf
|
||||
MD_Node *index_string = 0;
|
||||
for(MD_u64 idx = 0; !MD_NodeIsNil(index_string = MD_ChildFromIndex(node, idx)); idx += 1)
|
||||
{
|
||||
for(MD_MapSlot *slot = MD_StringMap_Lookup(index_table, index_string->string);
|
||||
for(MD_MapSlot *slot = MD_MapLookup(index_table, MD_MapKeyStr(index_string->string));
|
||||
slot; slot = slot->next)
|
||||
{
|
||||
if(slot->value)
|
||||
if(slot->val)
|
||||
{
|
||||
PageInfo info = ParsePageInfo((MD_Node *)slot->value);
|
||||
MD_Node *node = slot->val;
|
||||
PageInfo info = ParsePageInfo(node);
|
||||
|
||||
MD_String8 filename = ((MD_Node *)slot->value)->filename;
|
||||
MD_String8 filename = node->filename;
|
||||
MD_String8 filename_no_ext = MD_ChopExtension(MD_SkipFolder(filename));
|
||||
MD_String8 link = MD_PushStringF("%.*s.html", MD_StringExpand(filename_no_ext));
|
||||
MD_String8 name = info.title->string;
|
||||
|
||||
Reference in New Issue
Block a user