Add your eye candy here

Hi, I made two visualizations of info I wanted to have for quite long.
enjoy …
and dare to share tiny things you build to make TW look more beautiful
Jan

:warning: Edit: Small disclaimer: This is coded in a very reduced way, so that even Tiddlylinks do not work because so far they ruin the filters. Only <<macros>> work within. Perhaps I will do an Update!

\define snake-steps(content, linecolor:"#F00")
<style>
/* Container styling */
.snake-container {
  margin: 20px auto;
  counter-reset: snake-counter;
  padding: 20px;
}
/* Base Step Style */
.snake-step {
  position: relative;
  padding: 20px 20px 20px 20px;
  margin: 0;
  box-sizing: border-box;
  color: <<linecolor>>;
  overflow: visible;   /* ensure circles aren't clipped */
}
.snake-step h2{
margin-right:10px;
margin-left:10px;
}
/* The Numbered Circle */
.snake-step::before {
  counter-increment: snake-counter;
  content: counter(snake-counter);
  position: absolute;
  width: 50px;
  height: 50px;
  background: <<__linecolor__>>;
  color: #453c38;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 200%;
  z-index: 10;
  /* adjusted vertical position – was -10px, now 15px */
  top: 15px;
}
/* ODD STEPS (1, 3, 5) - Curves at top-left and bottom-left */
.snake-step:nth-child(odd) {
border-top: 4px solid <<__linecolor__>>;  
border-left: 4px solid <<__linecolor__>>;
  border-bottom: 4px solid <<__linecolor__>>;
  border-top-left-radius: 40px;
  border-bottom-left-radius: 40px;
  margin-right: 40px;
  text-align: left;
margin-top:-4px;
}
.snake-step:nth-child(odd)::before {
  left: -27px;        /* center on left border */
}
/* EVEN STEPS (2, 4, 6) - Curves at top-right and bottom-right */
.snake-step:nth-child(even) {
border-top: 4px solid <<__linecolor__>>;   
border-right: 4px solid <<__linecolor__>>;
  border-bottom: 4px solid <<__linecolor__>>;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
  margin-left: 40px;
  text-align: right;
margin-top:-4px;
}
.snake-step:nth-child(even)::before {
  right: -27px;       /* center on right border */
}
/* Last step: remove bottom border */
.snake-step:last-child {
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.snake-step:first-child {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
/* Typography */
.snake-step h1, .snake-step h2, .snake-step h3 {
  color: <<linecolor>>;
  margin-top: 0;
  font-size: 1.5em;
}
.snake-step p {
  color: <<linecolor>>;
  opacity: 0.8;
  font-size: 0.95em;
  margin: 0.5em 0;
}
@media screen and (max-width: 900px){
.snake-step {
padding-left: 20px 0px 20px 0px;
transform: translate(-20px);
}
.snake-step:nth-child(odd) .innerstep, .snake-container{
transform: translate(20px);
}
.snake-step:nth-child(even) .innerstep {
transform: translate(-20px);
}
}
</style>
<div class="snake-container">
<$list filter="[[$content$]split[!#]butfirst[]]">
  <div class="snake-step">
<div class="innerstep">
<$list filter="[{!!title}splitregexp[\n]first[]]">

!!{{!!title}}
</$list>
<$list filter="[{!!title}splitregexp[\n]butfirst[]]">

{{!!title}}
</$list>
</div>
</div>
\end

<<snake-steps """
!# A red thread 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.
!# Easy Peasy
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.
!# Responsive
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.
!# Final Step
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.
""">> 

\define chat-bubbles(content, procolor:"#4CAF50", concolor:"#F44336")
<div class="chat-container">
<$list filter="[[$content$]splitregexp[\n:]search-replace:g:regexp[\n],[<br>]search-replace:g[<br><br>],[<br>]]">
<$list filter="[{!!title}removeprefix[+]]">
      <div class="chat-message pro">
        <div class="bubble">{{!!title}}</div>
      </div>
</$list>
<$list filter="[{!!title}removeprefix[-]]">
      <div class="chat-message con">
        <div class="bubble">{{!!title}}</div>
      </div>
</$list>
</$list>
</div>
<style>
.chat-container {
  max-width: 600px;
  margin: 20px auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 10px;
}
.chat-message {
  display: flex;
  max-width: 80%;
  word-wrap: break-word;
}
.chat-message.pro {
  align-self: flex-start;  /* pro on left */
}
.chat-message.con {
  align-self: flex-end;    /* con on right */
}
.bubble {
  padding: 12px 18px;
  border-radius: 20px;
  background: <<__procolor__>>;
  color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  font-size: 1em;
  line-height: 1.4;
}
.chat-message.con .bubble {
  background: <<__concolor__>>;
}
.bubble::before {
  content: '';
  position: absolute;
  bottom: 0;
  width: 0;
  height: 0;
  border-style: solid;
}
.chat-message.pro .bubble::before {
  left: -10px;
  border-width: 10px 10px 0 0;
  border-color: <<__procolor__>> transparent transparent transparent;
}
.chat-message.con .bubble::before {
  right: -10px;
  border-width: 10px 0 0 10px;
  border-color: <<__concolor__>> transparent transparent transparent;
}
</style>
\end

<<chat-bubbles """
:+ I think this is a great idea!

Really!

:- I’m not so sure – there are risks.
:+ We can mitigate them with proper planning.
:- Still, the cost might be too high.
:+ Let’s run a small pilot first.
""">>
10 Likes

Looks nice. Thanks for sharing.

I made a slightly better version: I shows links and is better on small screens:

\define snakebutton(label, actions, style:"snake-btn")
<$button class="$style$" actions=<<__actions__>> >
$label$
</$button>
\end
\define snake-steps(content, linecolor:"#F00")
<style>
/* Container styling */
.snake-container {
  margin: 20px auto;
  counter-reset: snake-counter;
  padding: 20px;
}
/* Base Step Style */
.snake-step {
  position: relative;
  padding: 20px 20px 20px 20px;
  margin: 0;
  box-sizing: border-box;
  color: <<linecolor>>;
  overflow: visible;   /* ensure circles aren't clipped */
}
.snake-step h2{
margin-right:10px;
margin-left:10px;
}
/* The Numbered Circle */
.snake-step::before {
  counter-increment: snake-counter;
  content: counter(snake-counter);
  position: absolute;
  width: 50px;
  height: 50px;
  background: <<__linecolor__>>;
  color: #453c38;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 200%;
  z-index: 10;
  /* adjusted vertical position – was -10px, now 15px */
  top: 15px;
}
/* ODD STEPS (1, 3, 5) - Curves at top-left and bottom-left */
.snake-step:nth-child(odd) {
border-top: 4px solid <<__linecolor__>>;  
border-left: 4px solid <<__linecolor__>>;
  border-bottom: 4px solid <<__linecolor__>>;
  border-top-left-radius: 40px;
  border-bottom-left-radius: 40px;
  margin-right: 40px;
  text-align: left;
margin-top:-4px;
}
.snake-step:nth-child(odd)::before {
  left: -27px;        /* center on left border */
}
/* EVEN STEPS (2, 4, 6) - Curves at top-right and bottom-right */
.snake-step:nth-child(even) {
border-top: 4px solid <<__linecolor__>>;   
border-right: 4px solid <<__linecolor__>>;
  border-bottom: 4px solid <<__linecolor__>>;
  border-top-right-radius: 40px;
  border-bottom-right-radius: 40px;
  margin-left: 40px;
  text-align: right;
margin-top:-4px;
}
.snake-step:nth-child(even)::before {
  right: -27px;       /* center on right border */
}
/* Last step: remove bottom border */
.snake-step:last-child {
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.snake-step:first-child {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}
/* Typography */
.snake-step h1, .snake-step h2, .snake-step h3 {
  color: <<linecolor>>;
  margin-top: 0;
  font-size: 1.5em;
}
.snake-step p {
  color: <<linecolor>>;
  opacity: 0.8;
  font-size: 0.95em;
  margin: 0.5em 0;
}
@media screen and (max-width: 900px){
.snake-step {
padding-left: 20px 0px 20px 0px;
transform: translate(-20px);
}
.snake-container{
transform: translate(20px);
}
}
@media screen and (max-width: 700px){
.snake-step:nth-child(odd) .innersnakestep {
width:110%;
}
.snake-step:nth-child(even) .innersnakestep {
width:110%;
transform: translate(-50px);
}
}
@media screen and (max-width: 500px){
.snake-step:nth-child(odd) .innersnakestep {
width:120%;
}
.snake-step:nth-child(even) .innersnakestep {
width:120%;
}
}
@media screen and (max-width: 400px){
.snake-step:nth-child(odd) .innersnakestep {
width:135%;
}
.snake-step:nth-child(even) .innersnakestep {
width:135%;
}
}
.snake-btn {
display: inline-block;
  padding: 12px 24px;
  border: 3px solid <<__linecolor__>>;
  border-radius: 40px;          /* gleicher Radius wie snake-step */
  background: transparent;
  color: <<__linecolor__>>;
  font-weight: bold;
  font-size: 1em;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1.2;
  box-sizing: border-box;
}
.snake-btn:hover {
  background: <<__linecolor__>>;
  color: #453c38;               /* dunkler Farbton wie Kreiszahl */
  border-color: <<color>>;
}
/* Fokus-Stil für Barrierefreiheit */
.snake-btn:focus {
  outline: 2px solid <<__linecolor__>>;
  outline-offset: 2px;
}
</style>
<div class="snake-container">
<$list filter="[<__content__>encodehtml[]split[!#]butfirst[]decodehtml[]]">
  <div class="snake-step">
<div class="innersnakestep">
<$list filter="[{!!title}splitregexp[\n]first[]decodehtml[]]">

!!{{!!title}}
</$list>
<$list filter="[{!!title}splitregexp[\n]butfirst[]decodehtml[]]">

{{!!title}}
</$list>
</div>
</div>
\end
\define snakelink(label,target,tooltip, class:"snake-btn" )  <$link overrideClass="$class$" to="$target$" tooltip="$tooltip$">$label$</$link>

<<snake-steps """
!# A red thread 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor [[gravida aliquam]]. Morbi orci urna, iaculis in ligula et, posuere interdum lectus. 

<<snakebutton Test>>
!# Easy Peasy
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.

<<fold "Fachspezifische Prompts">>
!# Responsive
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.

<center><<snakelink 'snakelink' 'target'>>

!# Final Step
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed porttitor gravida aliquam. Morbi orci urna, iaculis in ligula et, posuere interdum lectus.
""">> 

3 Likes

Very nice!

And it could be very useful for “binary directive flows”.

I’ve taken a copy for later use.
Thanks!

TT


UPDATE — To ensure that later I can honor @JanJo I added these fields to my theft …

\define pros-cons(label:"Vorteile", color:"blue", icon:"✔", content)
<style>
.pct-row{display:flex;align-items:stretch;flex-wrap:wrap;gap:32px;margin:0px 0 20px;align-items:stretch;align-content:stretch}
.pct-box{flex:1 1 280px;position:relative;border:3px solid;border-radius:2px;padding:18px 20px 20px;margin-top:18px;box-sizing:border-box;}
.pct-box-head{position:absolute;top:-19px;left:14px;display:flex;align-items:center;line-height:1}
.pct-box-head-label{font:800 .95em/1 sans-serif;letter-spacing:.12em;text-transform:uppercase;background:#fff;padding:0 8px 0 2px}
.pct-box-head-icon{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font:900 15px/1 sans-serif;flex-shrink:0}
.pct-content h2{font:800 .88em/1.3 sans-serif;text-transform:uppercase;letter-spacing:.05em;margin:14px 0 2px;padding:0;color:#111;border:none}
.pct-content h2:first-child{margin-top:6px}
.pct-content p{font:.87em/1.45 sans-serif;color:#555;margin:0}
.pct-box-blue {border-color:#2e9fd4}.pct-box-blue  .pct-box-head-label{color:#2e9fd4}.pct-box-blue  .pct-box-head-icon{background:#2e9fd4;color:#fff}
.pct-box-gray {border-color:#9e9e9e}.pct-box-gray  .pct-box-head-label{color:#9e9e9e}.pct-box-gray  .pct-box-head-icon{background:#9e9e9e;color:#fff}
.pct-box-green{border-color:#27ae60}.pct-box-green .pct-box-head-label{color:#27ae60}.pct-box-green .pct-box-head-icon{background:#27ae60;color:#fff}
.pct-box-red  {border-color:#c0392b}.pct-box-red   .pct-box-head-label{color:#c0392b}.pct-box-red   .pct-box-head-icon{background:#c0392b;color:#fff}
</style>
<div class="pct-box pct-box-$color$"><div class="pct-box-head"><span class="pct-box-head-label">$label$</span><span class="pct-box-head-icon">$icon$</span></div><div class="pct-content">

$content$
</div></div>
\end

!!<center>Beispiel</center>
<div class="pct-row">
<<pros-cons label:"Dos" color:"green" icon:"✔" content:"""
!!Buddy-System
Erfahrene Kollegen als Ansprechpartner zuweisen.

!!Regelmäßiges Feedback
Kurze Check-ins in den ersten Wochen einplanen.

!!Offene Kommunikation
Fragen aktiv einladen und zeitnah beantworten.""">>
<<pros-cons label:"Dont's" color:"red" icon:"✘" content:"""
!!Keine Vorbereitung
Arbeitsplatz und Zugänge erst am ersten Tag einrichten.

!!Informationsflut
Alles auf einmal erklären überfordert neue Mitarbeiter.

!!Isolation
Neuen Mitarbeitern keine Ansprechpartner benennen.

!!Fehlende Ziele
Unklare Erwartungen führen zu Unsicherheit und Demotivation.""">>
</div>

<div class="pct-row">
<<pros-cons label:"Vorteile" color:"blue" icon:"✔" content:"""
!!Buddy-System
Erfahrene Kollegen als Ansprechpartner zuweisen.

!!Regelmäßiges Feedback
Kurze Check-ins in den ersten Wochen einplanen.

!!Offene Kommunikation
Fragen aktiv einladen und zeitnah beantworten.""">>
<<pros-cons label:"Nachteile" color:"gray" icon:"✘" content:"""
!!Keine Vorbereitung
Arbeitsplatz und Zugänge erst am ersten Tag einrichten.

!!Informationsflut
Alles auf einmal erklären überfordert neue Mitarbeiter.

!!Isolation
Neuen Mitarbeitern keine Ansprechpartner benennen.

!!Fehlende Ziele
Unklare Erwartungen führen zu Unsicherheit und Demotivation.""">>
</div>
2 Likes

ALL very nice. And very adaptive.

In my wiki after import …

TT