💻 TRKForum Kod Hub & Gist Vitrini
Topluluk tarafından paylaşılan TypeScript, Rust, Python, Go ve SQL kod parçaları.
smf_github_theme.ts — Live Theme Switcher
typescript
export interface SMFThemeConfig {
mode: "smf_classic" | "github_dark";
syntaxHighlighting: boolean;
}
export function applySMFTheme(theme: SMFThemeConfig) {
document.documentElement.setAttribute("data-smf-theme", theme.mode);
}
Fix proposal: index.css diff
css
- Önceki Hali (Before)
.prism-code {
background: #ffffff;
}+ Sonraki Hali (After)
.prism-code {
background: var(--smf-code-bg, #0d1117);
}
main.rs — Tokio WebSocket Broadcaster
rust
use tokio::net::TcpListener;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std.error::Error>> {
let listener = TcpListener::bind("127.0.0.1:8080").await?;
println!("🚀 SMF Rust WebSocket Server running on :8080");
Ok(())
}