1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-05-28 08:12:19 +00:00

Introduce procedure for displaying teams

And some styling tweaks
This commit is contained in:
Jeremy Ruston
2025-05-23 12:20:03 +01:00
parent 6afa41a52d
commit fb8f01ee89
7 changed files with 70 additions and 56 deletions
+13 -6
View File
@@ -3,17 +3,24 @@ tags: Community Cards
modified: 20250522155415023
created: 20250522155415023
This is an inline card for <<community-card-pill title:"@Jermolene">> and <<community-card-pill title:"@ericshulman">> which can be used in the middle of a sentence.
!! Cards for people
This is an inline card for <<community-card-pill-person title:"@Jermolene">> and <<community-card-pill-person title:"@ericshulman">> which can be used in the middle of a sentence.
This is a stack of inline cards:
<<community-card-pill-stack>>
<<community-card-pill-stack-person>>
Here are a couple of full format cards:
Here is a full format card:
<<community-card title:"@MissingPerson">>
<<community-card-person title:"@Jermolene">>
<<community-card title:"@Jermolene">>
This is how the card looks when there is no such person:
<<community-card title:"@ericshulman">>
<<community-card-person title:"@MissingPerson">>
!! Cards for teams
This is a card for a project team:
<<community-card-team title:"Project Team">>
+1 -25
View File
@@ -5,28 +5,4 @@ tags: Community
The TiddlyWiki Project is the coordinated, ongoing effort to maintain and improve TiddlyWiki, and to support the TiddlyWiki community.
<$list filter="[tag[Community/Team]]">
<div class="tc-community-card tc-community-card-team">
<$link to=<<currentTiddler>> class="tc-community-card-header-link">
<div class="tc-community-card-header">
<<display-jpeg-field "avatar">>
<<display-text-field "title" showLabel:"no">>
</div>
</$link>
<div class="tc-community-card-info">
<div class="tc-community-card-field-text">
<span class="tc-community-card-field-text-name">leader</span>
<span class="tc-community-card-field-text-value"><$transclude $variable="community-card-pill" title={{!!leader}}/></span>
</div>
<div class="tc-community-card-field-text">
<span class="tc-community-card-field-text-name">team</span>
<span class="tc-community-card-field-text-value"><$transclude $variable="community-card-pill-stack" personFilter={{!!team}}/></span>
</div>
</div>
<div class="tc-community-card-body">
<$transclude $tiddler=<<currentTiddler>> $field="text" $mode="block"/>
</div>
</div>
</$list>
<$list filter="[tag[Community/Team]]" template="$:/tiddlywiki/community/cards/ViewTemplateBodyTemplateTeam"/>
+49 -23
View File
@@ -1,7 +1,7 @@
title: $:/tiddlywiki/community/cards/Procedures
tags: $:/tags/Global
\procedure display-jpeg-field(fieldName,mode:"block")
\procedure community-card-display-jpeg-field(fieldName,mode:"block")
<$genesis $type={{{ [<mode>match[block]then[div]else[span]] }}} class={{{ tc-community-card-field-image [[tc-community-card-field-image-]addsuffix<fieldName>] +[join[ ]] }}}>
<%if [<currentTiddler>has<fieldName>] %>
<img src={{{ [<currentTiddler>get<fieldName>addprefix[data:image/jpeg;base64,]] }}} width="32"/>
@@ -9,9 +9,9 @@ tags: $:/tags/Global
{{$:/core/images/warning}}
<%endif%>
</$genesis>
\end display-jpeg-field
\end community-card-display-jpeg-field
\procedure display-text-field(fieldName,showLabel:"yes",linkPrefix,displayPrefix,mode:"block")
\procedure community-card-display-text-field(fieldName,showLabel:"yes",linkPrefix,displayPrefix,mode:"block")
<%if [<currentTiddler>has<fieldName>] :or[<fieldName>match[title]] %>
<$genesis $type={{{ [<mode>match[block]then[div]else[span]] }}} class={{{ tc-community-card-field-text [[tc-community-card-field-text-]addsuffix<fieldName>] +[join[ ]] }}}>
<%if [<showLabel>match[yes]] %>
@@ -33,47 +33,73 @@ tags: $:/tags/Global
<%endif%>
</$genesis>
<%endif%>
\end display-text-field
\end community-card-display-text-field
\procedure community-card(title)
\procedure community-card-person(title)
<$let currentTiddler=<<title>>>
<div class="tc-community-card">
<$link to=<<currentTiddler>> class="tc-community-card-header-link">
<div class="tc-community-card-header">
<<display-jpeg-field "avatar">>
<<display-text-field "title" showLabel:"no">>
<<community-card-display-jpeg-field "avatar">>
<<community-card-display-text-field "title" showLabel:"no">>
</div>
</$link>
<div class="tc-community-card-info">
<<display-text-field "fullname">>
<<display-text-field "first-sighting">>
<<display-text-field "talk.tiddlywiki.org" linkPrefix:"https://talk.tiddlywiki.org/u/" displayPrefix:"@">>
<<display-text-field "github" linkPrefix:"https://github.com/" displayPrefix:"@">>
<<display-text-field "linkedin" linkPrefix:"https://">>
<<display-text-field "flickr" linkPrefix:"https://">>
<<display-text-field "homepage" linkPrefix:"https://">>
<<display-text-field "email" linkPrefix:"mailto:">>
<<community-card-display-text-field "fullname">>
<<community-card-display-text-field "first-sighting">>
<<community-card-display-text-field "talk.tiddlywiki.org" linkPrefix:"https://talk.tiddlywiki.org/u/" displayPrefix:"@">>
<<community-card-display-text-field "github" linkPrefix:"https://github.com/" displayPrefix:"@">>
<<community-card-display-text-field "linkedin" linkPrefix:"https://">>
<<community-card-display-text-field "flickr" linkPrefix:"https://">>
<<community-card-display-text-field "homepage" linkPrefix:"https://">>
<<community-card-display-text-field "email" linkPrefix:"mailto:">>
</div>
<div class="tc-community-card-body">
<$transclude $tiddler=<<currentTiddler>> $field="text" $mode="block"/>
</div>
</div>
</$let>
\end community-card
\end community-card-person
\procedure community-card-pill(title)
\procedure community-card-team(title)
<$let currentTiddler=<<title>>>
<div class="tc-community-card tc-community-card-team">
<$link to=<<currentTiddler>> class="tc-community-card-header-link">
<div class="tc-community-card-header">
<<community-card-display-jpeg-field "avatar">>
<<community-card-display-text-field "title" showLabel:"no">>
</div>
</$link>
<div class="tc-community-card-info">
<div class="tc-community-card-field-text">
<span class="tc-community-card-field-text-name">leader</span>
<span class="tc-community-card-field-text-value"><$transclude $variable="community-card-pill-person" title={{!!leader}}/></span>
</div>
<div class="tc-community-card-field-text">
<span class="tc-community-card-field-text-name">team</span>
<span class="tc-community-card-field-text-value"><$transclude $variable="community-card-pill-stack-person" personFilter={{!!team}}/></span>
</div>
</div>
<div class="tc-community-card-body">
<$transclude $tiddler=<<currentTiddler>> $field="text" $mode="block"/>
</div>
</div>
</$let>
\end community-card-team
\procedure community-card-pill-person(title)
<$let currentTiddler=<<title>>>
<$link to=<<currentTiddler>> class="tc-community-card-pill">
<<display-jpeg-field "avatar" mode:"inline">>
<<display-text-field "title" showLabel:"no" mode:"inline">>
<<community-card-display-jpeg-field "avatar" mode:"inline">>
<<community-card-display-text-field "title" showLabel:"no" mode:"inline">>
</$link>
</$let>
\end community-card-pill
\end community-card-pill-person
\procedure community-card-pill-stack(personFilter:"[tag[Community/Person]]")
\procedure community-card-pill-stack-person(personFilter:"[tag[Community/Person]]")
<div class="tc-community-card-pill-stack">
<$list filter=<<personFilter>>>
<$transclude $variable="community-card-pill" title=<<currentTiddler>> mode="block"/>
<$transclude $variable="community-card-pill-person" title=<<currentTiddler>> mode="block"/>
</$list>
</div>
\end community-card-pill-stack
\end community-card-pill-stack-person
+1
View File
@@ -8,6 +8,7 @@ tags: $:/tags/Stylesheet
justify-content: center;
border-radius: 8px;
width: 100%;
margin-bottom: 8px;
background: <<colour community-card-background>>;
color: <<colour community-card-foreground>>;
box-shadow: 0 1px 3px 0 <<colour community-card-shadow>>, 0 0 0 1px <<colour community-card-shadow>>;
@@ -2,4 +2,5 @@ title: $:/tiddlywiki/community/cards/ViewTemplateBodyCascade
tags: $:/tags/ViewTemplateBodyFilter
list-before:
[tag[Community/Person]then[$:/tiddlywiki/community/cards/ViewTemplateBodyTemplatePerson]]
[tag[Community/Person]then[$:/tiddlywiki/community/cards/ViewTemplateBodyTemplatePerson]]
[tag[Community/Team]then[$:/tiddlywiki/community/cards/ViewTemplateBodyTemplateTeam]]
@@ -1,3 +1,3 @@
title: $:/tiddlywiki/community/cards/ViewTemplateBodyTemplatePerson
<$transclude $variable="community-card" title=<<currentTiddler>>/>
<$transclude $variable="community-card-person" title=<<currentTiddler>>/>
@@ -0,0 +1,3 @@
title: $:/tiddlywiki/community/cards/ViewTemplateBodyTemplateTeam
<$transclude $variable="community-card-team" title=<<currentTiddler>>/>