Add bag and recipe favicons to dashboard

This commit is contained in:
Jeremy Ruston 2024-01-20 21:50:12 +00:00
parent 11ecaff7db
commit f7914db019
2 changed files with 43 additions and 36 deletions

View File

@ -47,40 +47,42 @@ title: MultiWikiServer Administration
\end createRecipeButton
<div class="mws-admin-container">
<h1>Recipes</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/recipes/]]">
<li>
<a href=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<$text text={{!!recipe-name}}/>
</a>
<ol>
<$list filter="[list<currentTiddler>]">
<li>
<$text text=<<currentTiddler>>/>
</li>
</$list>
</ol>
</li>
</$list>
</ul>
<div>
<<createRecipeButton>>
<h1>Recipes</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/recipes/]]">
<li>
<a href=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<img src=`/wiki/${ [{!!recipe-name}encodeuricomponent[]] }$/recipes/${ [{!!recipe-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon"/>
<$text text={{!!recipe-name}}/>
</a>
<ol>
<$list filter="[list<currentTiddler>]">
<li>
<$text text=<<currentTiddler>>/>
</li>
</$list>
</ol>
</li>
</$list>
</ul>
<div>
<<createRecipeButton>>
</div>
<div>
Higher numbered bags take priority if a tiddler with the same title is in more than one bag
</div>
<h1>Bags</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/bags/]]">
<li>
<a href=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<img src=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$/tiddlers/%24%3A%2Ffavicon.ico` class="mws-favicon"/>
<$text text={{!!bag-name}}/>
</a>
</li>
</$list>
</ul>
<div>
<<createBagButton>>
</div>
</div>
<div>
Higher numbered bags take priority if a tiddler with the same title is in more than one bag
</div>
<h1>Bags</h1>
<ul>
<$list filter="[prefix[$:/state/multiwikiserver/bags/]]">
<li>
<a href=`/wiki/${ [{!!bag-name}encodeuricomponent[]] }$/bags/${ [{!!bag-name}encodeuricomponent[]] }$` rel="noopener noreferrer" target="_blank">
<$text text={{!!bag-name}}/>
</a>
</li>
</$list>
</ul>
<div>
<<createBagButton>>
</div>
</div>

View File

@ -10,3 +10,8 @@ Styles specific to the full screen layout
.mws-admin-layout {
padding: 1rem;
}
.mws-favicon {
max-width: 2em;
max-height: 2em;
}