|
| 1 | +/* ============================================ |
| 2 | + Learning Mascot: Monty the Python |
| 3 | + Pedagogical agent for CoderDojo TC Python |
| 4 | + CoderDojo brand: primary #642580, accent #41BAC1 |
| 5 | + ============================================ */ |
| 6 | + |
| 7 | +:root { |
| 8 | + --mascot-primary: #642580; /* CoderDojo purple */ |
| 9 | + --mascot-secondary: #41BAC1; /* CoderDojo teal */ |
| 10 | + --mascot-bg: #f3eaf8; /* light purple tint */ |
| 11 | + --mascot-border: #7a2f9e; /* medium purple */ |
| 12 | + --mascot-size: 90px; |
| 13 | +} |
| 14 | + |
| 15 | +/* ---- Shared base: match body font size, not MkDocs' smaller admonition default ---- */ |
| 16 | +.md-typeset .admonition.mascot-welcome, |
| 17 | +.md-typeset .admonition.mascot-thinking, |
| 18 | +.md-typeset .admonition.mascot-tip, |
| 19 | +.md-typeset .admonition.mascot-warning, |
| 20 | +.md-typeset .admonition.mascot-celebration, |
| 21 | +.md-typeset .admonition.mascot-encourage, |
| 22 | +.md-typeset .admonition.mascot-neutral, |
| 23 | +.md-typeset details.mascot-welcome, |
| 24 | +.md-typeset details.mascot-thinking, |
| 25 | +.md-typeset details.mascot-tip, |
| 26 | +.md-typeset details.mascot-warning, |
| 27 | +.md-typeset details.mascot-celebration, |
| 28 | +.md-typeset details.mascot-encourage, |
| 29 | +.md-typeset details.mascot-neutral { |
| 30 | + font-size: inherit; |
| 31 | +} |
| 32 | + |
| 33 | +/* ---- Welcome (chapter openings) — CoderDojo purple ---- */ |
| 34 | +.md-typeset .admonition.mascot-welcome, |
| 35 | +.md-typeset details.mascot-welcome { |
| 36 | + border-color: var(--mascot-primary); |
| 37 | + background-color: var(--mascot-bg); |
| 38 | +} |
| 39 | +.md-typeset .mascot-welcome > .admonition-title, |
| 40 | +.md-typeset .mascot-welcome > summary { |
| 41 | + background-color: var(--mascot-primary); |
| 42 | + color: white; |
| 43 | +} |
| 44 | + |
| 45 | +/* ---- Thinking (key concepts) — CoderDojo teal ---- */ |
| 46 | +.md-typeset .admonition.mascot-thinking, |
| 47 | +.md-typeset details.mascot-thinking { |
| 48 | + border-color: var(--mascot-secondary); |
| 49 | + background-color: #e0f7fa; |
| 50 | +} |
| 51 | +.md-typeset .mascot-thinking > .admonition-title, |
| 52 | +.md-typeset .mascot-thinking > summary { |
| 53 | + background-color: var(--mascot-secondary); |
| 54 | + color: white; |
| 55 | +} |
| 56 | + |
| 57 | +/* ---- Tip (hints) — emerald green (nod to Monty's green scales) ---- */ |
| 58 | +.md-typeset .admonition.mascot-tip, |
| 59 | +.md-typeset details.mascot-tip { |
| 60 | + border-color: #2e7d32; |
| 61 | + background-color: #e8f5e9; |
| 62 | +} |
| 63 | +.md-typeset .mascot-tip > .admonition-title, |
| 64 | +.md-typeset .mascot-tip > summary { |
| 65 | + background-color: #2e7d32; |
| 66 | + color: white; |
| 67 | +} |
| 68 | + |
| 69 | +/* ---- Warning (common mistakes) — red ---- */ |
| 70 | +.md-typeset .admonition.mascot-warning, |
| 71 | +.md-typeset details.mascot-warning { |
| 72 | + border-color: #c62828; |
| 73 | + background-color: #ffebee; |
| 74 | +} |
| 75 | +.md-typeset .mascot-warning > .admonition-title, |
| 76 | +.md-typeset .mascot-warning > summary { |
| 77 | + background-color: #c62828; |
| 78 | + color: white; |
| 79 | +} |
| 80 | + |
| 81 | +/* ---- Celebration (achievements) — deep purple with light text ---- */ |
| 82 | +.md-typeset .admonition.mascot-celebration, |
| 83 | +.md-typeset details.mascot-celebration { |
| 84 | + border-color: #4a148c; |
| 85 | + background-color: #311b4f; |
| 86 | + color: #f3e5f5; |
| 87 | +} |
| 88 | +.md-typeset .mascot-celebration > .admonition-title, |
| 89 | +.md-typeset .mascot-celebration > summary { |
| 90 | + background-color: #4a148c; |
| 91 | + color: white; |
| 92 | +} |
| 93 | + |
| 94 | +/* ---- Encourage (difficult content) — blue ---- */ |
| 95 | +.md-typeset .admonition.mascot-encourage, |
| 96 | +.md-typeset details.mascot-encourage { |
| 97 | + border-color: #0277bd; |
| 98 | + background-color: #e1f5fe; |
| 99 | +} |
| 100 | +.md-typeset .mascot-encourage > .admonition-title, |
| 101 | +.md-typeset .mascot-encourage > summary { |
| 102 | + background-color: #0277bd; |
| 103 | + color: white; |
| 104 | +} |
| 105 | + |
| 106 | +/* ---- Neutral (general purpose) — slate gray ---- */ |
| 107 | +.md-typeset .admonition.mascot-neutral, |
| 108 | +.md-typeset details.mascot-neutral { |
| 109 | + border-color: #546e7a; |
| 110 | + background-color: #eceff1; |
| 111 | +} |
| 112 | +.md-typeset .mascot-neutral > .admonition-title, |
| 113 | +.md-typeset .mascot-neutral > summary { |
| 114 | + background-color: #546e7a; |
| 115 | + color: white; |
| 116 | +} |
| 117 | + |
| 118 | +/* ---- Title bar: left-align text, hide default MkDocs icon ---- */ |
| 119 | +.md-typeset [class*="mascot-"] > .admonition-title, |
| 120 | +.md-typeset [class*="mascot-"] > summary { |
| 121 | + text-align: left; |
| 122 | + padding-left: 0.8rem; |
| 123 | +} |
| 124 | +.md-typeset [class*="mascot-"] > .admonition-title::before, |
| 125 | +.md-typeset [class*="mascot-"] > summary::before { |
| 126 | + display: none; |
| 127 | +} |
| 128 | + |
| 129 | +/* ---- Mascot image floated left inside admonition body ---- */ |
| 130 | +.mascot-admonition-img { |
| 131 | + float: left; |
| 132 | + width: var(--mascot-size); |
| 133 | + height: var(--mascot-size); |
| 134 | + margin: 0 0.6em 0.2em 0; |
| 135 | + object-fit: contain; |
| 136 | + pointer-events: none; |
| 137 | +} |
0 commit comments