Skip to content

Commit 853e423

Browse files
committed
add random prague facts
1 parent be10543 commit 853e423

1 file changed

Lines changed: 19 additions & 1 deletion

File tree

public/node.templ

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import "time"
88
import "net/url"
99
import "net/http"
1010
import "github.com/ethereum/node-crawler/pkg/common"
11+
import "math/rand"
1112

1213
templ NotFound() {
1314
<div style="margin: 1em;">
@@ -884,6 +885,23 @@ css buttonDisabled() {
884885
pointer-events: none;
885886
}
886887

888+
func randomPragueFact() string {
889+
pragueFacts := []string{
890+
"Prague Castle: Founded in 880 AD, Prague Castle is recognized by the Guinness Book of World Records as the largest ancient castle complex globally, covering approximately 70,000 square metres.",
891+
"Astronomical Clock: Installed in 1410, the Prague Astronomical Clock, or \"Orloj,\" is the world's oldest operational astronomical clock. Located in the Old Town Square, it features intricate dials representing the sun, moon, and zodiac signs.",
892+
"Charles Bridge: Commissioned by King Charles IV in 1357, Charles Bridge is adorned with 30 baroque statues and offers picturesque views of the Vltava River and the city's skyline.",
893+
"Beer Consumption: The Czech Republic, with Prague as its capital, leads the world in beer consumption per capita. The city boasts numerous historic pubs and breweries, reflecting its rich beer culture.",
894+
"Architectural Diversity: Prague's skyline showcases a blend of Gothic, Baroque, Renaissance, and Art Nouveau architecture, earning it the nickname \"The City of a Hundred Spires.\"",
895+
"John Lennon Wall: Since the 1980s, the John Lennon Wall has been a symbol of peace and freedom, continuously covered with Beatles-inspired graffiti and messages of love.",
896+
"Kafka's Birthplace: Renowned writer Franz Kafka was born in Prague in 1883. The city honors his legacy with a dedicated museum and various statues.",
897+
"UNESCO Heritage: Prague's historic center was designated a UNESCO World Heritage site in 1992, recognized for its well-preserved medieval architecture and cultural significance.",
898+
"Defenestrations of Prague: The city is known for two historical defenestrations (the act of throwing someone out of a window) in 1419 and 1618, events that significantly influenced European history.",
899+
"Prague Zoo: Ranked among the top zoos worldwide, Prague Zoo is home to over 5,000 animals across 676 species, contributing significantly to wildlife conservation efforts.",
900+
}
901+
902+
return pragueFacts[rand.Intn(10)]
903+
}
904+
887905
templ supportsForkLinks(name string, key string, title string, url URL, supportsForkName string, disabled bool) {
888906
<div style="display: flex; flex-direction: row; gap: 0.5em;">
889907
<a
@@ -916,7 +934,7 @@ templ supportsForkLinks(name string, key string, title string, url URL, supports
916934
templ SupportsForkLinks(url URL, networkID int64, supportsForkName string) {
917935
switch networkID {
918936
case 17000, 11155111:
919-
@supportsForkLinks("Prague", "prague", "", url, supportsForkName, false)
937+
@supportsForkLinks("Prague", "prague", randomPragueFact(), url, supportsForkName, false)
920938
default:
921939
if url.GetParam("supports-fork-name") != "" {
922940
<div style="display: flex; flex-direction: row; gap: 0.5em;">

0 commit comments

Comments
 (0)