forked from retoor/devplacepy
docs: document server-side rendering pipeline, response timing middleware, and Telegram pairing API
- Add comprehensive documentation for backend content rendering in AGENTS.md, detailing the new `render_content` and `render_title` Jinja globals built on mistune with media processing, emoji shortcodes, and XSS protection
- Document the `X-Response-Time` header and bottom-left render time indicator in README.md
- Update bot token pricing documentation to clarify fallback vs gateway cost headers
- Add `email_accounts` to soft-delete tables and `idx_users_role` composite index in database schema
- Implement `telegram_pairings` and `telegram_links` table creation with column migration and indexes
- Add `/profile/{username}/telegram` endpoint to docs API with request/unpair actions
- Register `TelegramService` in main.py lifespan and add `response_timing` middleware emitting `X-Response-Time` header
- Introduce `TelegramPairForm` model and `guard_public_host_sync` synchronous host validation function
This commit is contained in:
@@ -1225,3 +1225,31 @@ body:has(.page-messages) {
|
||||
color: var(--text-muted);
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.response-time-indicator {
|
||||
position: fixed;
|
||||
left: 0.5rem;
|
||||
bottom: 0.5rem;
|
||||
z-index: 50;
|
||||
padding: 0.15rem 0.45rem;
|
||||
font-family: var(--font-mono);
|
||||
font-size: 0.6875rem;
|
||||
line-height: 1;
|
||||
color: var(--text-muted);
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-input);
|
||||
opacity: 0.55;
|
||||
pointer-events: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.response-time-indicator:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.response-time-indicator {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -133,6 +133,10 @@ dp-content {
|
||||
display: block;
|
||||
}
|
||||
|
||||
dp-title {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
dp-upload {
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -550,29 +550,8 @@ pre.code-pre > .code-gutter {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
pre.code-has-copy {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
pre.code-has-copy > .code-copy-btn {
|
||||
position: absolute;
|
||||
top: 0.4rem;
|
||||
right: 0.4rem;
|
||||
z-index: 1;
|
||||
padding: 0.2rem 0.6rem;
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-secondary);
|
||||
background: rgba(40, 44, 52, 0.9);
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
pre.code-has-copy > .code-copy-btn:hover {
|
||||
color: var(--white);
|
||||
border-color: var(--accent, #6366f1);
|
||||
}
|
||||
/* The generic `pre.code-has-copy` copy-button styles moved to markdown.css so they
|
||||
apply to backend-rendered content everywhere, not only on docs pages. */
|
||||
|
||||
/* ---- Docs search ---- */
|
||||
.docs-search-form {
|
||||
|
||||
@@ -150,6 +150,30 @@ dp-content:hover .content-copy-btn,
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
pre.code-has-copy {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
pre.code-has-copy > .code-copy-btn {
|
||||
position: absolute;
|
||||
top: 0.4rem;
|
||||
right: 0.4rem;
|
||||
z-index: 1;
|
||||
padding: 0.2rem 0.6rem;
|
||||
font-size: 0.7rem;
|
||||
color: var(--text-secondary);
|
||||
background: rgba(40, 44, 52, 0.9);
|
||||
border: 1px solid rgba(255, 255, 255, 0.14);
|
||||
border-radius: var(--radius);
|
||||
cursor: pointer;
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
pre.code-has-copy > .code-copy-btn:hover {
|
||||
color: var(--white);
|
||||
border-color: var(--accent, #6366f1);
|
||||
}
|
||||
|
||||
.embed-youtube {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user