Skip to content

Commit ac61b79

Browse files
romanlutzCopilot
andauthored
DOC: Add scroll-triggered Roakey peeks to the landing page (#2099)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 46ad0b8 commit ac61b79

4 files changed

Lines changed: 91 additions & 0 deletions

File tree

doc/css/custom.css

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,3 +81,84 @@
8181
z-index: 0;
8282
pointer-events: none;
8383
}
84+
85+
/* --- Roakey scroll peeks ---------------------------------------------------
86+
Decorative mascots anchored at predefined points in the landing page. They
87+
sit absolutely (out of flow, so they never shift content) and slide in from
88+
the edge as you scroll past, stopping flush against the side. */
89+
.roakey-peek {
90+
position: absolute;
91+
height: auto;
92+
margin: 0;
93+
pointer-events: none;
94+
user-select: none;
95+
z-index: 5;
96+
}
97+
98+
/* Off-screen peeks must not create horizontal scroll. */
99+
html, body {
100+
overflow-x: clip;
101+
}
102+
103+
/* Anchor the peeks to the full-width content column. The landing block that
104+
wraps each directive is narrow and centered, so reaching the true screen
105+
edge from it would require a viewport-based offset that overshoots past the
106+
clip box (the vertical scrollbar makes the right side fall fully outside,
107+
hiding the tail). Promoting `main` to the containing block lets us anchor
108+
flush with a plain `left: 0` / `right: 0`, fully inside the clip box. */
109+
main:has(.roakey-peek) {
110+
position: relative;
111+
}
112+
.myst-landing-block:has(.roakey-peek) {
113+
position: static;
114+
}
115+
116+
/* Head peeks in from the left edge */
117+
.roakey-peek-left {
118+
left: 0;
119+
width: 170px;
120+
transform: translateX(-100%);
121+
}
122+
123+
/* Tail peeks in from the right edge */
124+
.roakey-peek-tail {
125+
right: 0;
126+
width: 190px;
127+
transform: translateX(100%);
128+
}
129+
130+
/* Slide in as the peek scrolls through the viewport (Chromium/Edge). */
131+
@supports (animation-timeline: view()) {
132+
/* Both peeks only reveal on wide viewports, where the gutters beside the
133+
centered content column have room for them. On narrower screens they would
134+
cover the content, so they stay hidden off-screen. */
135+
@media (min-width: 1536px) {
136+
.roakey-peek-left {
137+
animation: roakey-peek-left linear both;
138+
animation-timeline: view();
139+
animation-range: entry 0% entry 100%;
140+
}
141+
.roakey-peek-tail {
142+
animation: roakey-peek-tail linear both;
143+
animation-timeline: view();
144+
animation-range: entry 0% entry 100%;
145+
}
146+
}
147+
@keyframes roakey-peek-left {
148+
0% { transform: translateX(-100%); }
149+
100% { transform: translateX(0); }
150+
}
151+
/* Stop before the wooden board enters the viewport, so only the tail shows
152+
(the board occupies the right ~10% of the image). */
153+
@keyframes roakey-peek-tail {
154+
0% { transform: translateX(100%); }
155+
100% { transform: translateX(13%); }
156+
}
157+
}
158+
159+
@media (prefers-reduced-motion: reduce) {
160+
.roakey-peek-left,
161+
.roakey-peek-tail {
162+
animation: none;
163+
}
164+
}

doc/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ Run standardized evaluation scenarios at large scale — covering content harms,
4242
A graphical user interface for human-led red teaming. Interact with AI systems directly, track findings, and collaborate with your team — all from a modern web UI.
4343
::::
4444

45+
```{image} roakey_peek.png
46+
:alt: Roakey peeking in
47+
:class: roakey-peek roakey-peek-left
48+
```
49+
4550
::::{card}
4651
🔌 **Any Target**
4752

@@ -107,6 +112,11 @@ initializers:
107112
108113
:::::
109114
115+
```{image} roakey_tail.png
116+
:alt: Roakey's tail peeking in
117+
:class: roakey-peek roakey-peek-tail
118+
```
119+
110120
3. Use PyRIT in any mode that best fits your use case: Scanner, GUI, or Framework.
111121
112122
::::{tab-set}

doc/roakey_peek.png

966 KB
Loading

doc/roakey_tail.png

794 KB
Loading

0 commit comments

Comments
 (0)