搜索文章

×

输入关键词并回车进行搜索

{{ $iconfont := resources.Get "js/libs/iconfont.js" }} {{ $uikit := resources.Get "js/libs/uikit.min.js" }} {{ $easylazyload := resources.Get "js/modules/lazyload.js" }} {{ $viewimage := resources.Get "js/libs/view-image.min.js" }} {{ $main := resources.Get "js/main.js" }} {{ $mypjax := resources.Get "js/modules/mypjax.js" }} {{ $nprogress := resources.Get "js/libs/nprogress.js" }} {{ $tiaozhuan := resources.Get "js/modules/tiaozhuan.js" }} {{ $toast := resources.Get "js/modules/toast.js" }} {{ $reward := resources.Get "js/modules/reward.js" }} {{/* Modules */}} {{ $utils := resources.Get "js/modules/utils.js" }} {{ $loader := resources.Get "js/modules/loader.js" }} {{ $cache := resources.Get "js/modules/cache.js" }} {{ $search := resources.Get "js/modules/search.js" }} {{ $floatingTools := resources.Get "js/modules/floating-tools.js" }} {{ $paragraphComments := resources.Get "js/modules/paragraph-comments.js" }} {{ $infiniteScroll := resources.Get "js/modules/infinite-scroll.js" }} {{ $artalkModule := resources.Get "js/modules/artalk.js" }} {{ $pjaxLib := resources.Get "js/libs/pjax.js" }} {{ $linkify := resources.Get "js/modules/linkify.js" }} {{ $pangu := resources.Get "js/modules/pangu.js" }} {{ $scripts := slice $iconfont $uikit $easylazyload $viewimage $utils $loader $cache $search $floatingTools $paragraphComments $infiniteScroll $artalkModule $nprogress $pjaxLib $pangu $linkify $main $mypjax $toast $tiaozhuan $reward | resources.Concat "js/bundle.js" | resources.Minify | resources.Fingerprint }} {{/* Fetch friend data at build time — no runtime network requests */}} {{ $linkHosts := slice }} {{ $linkNames := slice }} {{ with resources.GetRemote "https://api.usj.cc/api/links?all=1" }} {{ with .Err }} {{ warnf "Links API fetch failed: %s" . }} {{ else }} {{ with .Content | transform.Unmarshal }} {{ range .links }} {{ $host := "" }} {{ with .url | urls.Parse }} {{ $host = .Host | strings.TrimPrefix "www." }} {{ end }} {{ $title := .name | default "" }} {{ if $host }} {{ $linkHosts = $linkHosts | append (dict "host" $host "title" $title) }} {{ end }} {{ if $title }} {{ $linkNames = $linkNames | append (dict "lower" (lower $title) "title" $title) }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }} {{ $feedHosts := slice }} {{ $feedNames := slice }} {{ with resources.GetRemote "https://api.usj.cc/api/feeds" }} {{ with .Err }} {{ warnf "Feeds API fetch failed: %s" . }} {{ else }} {{ with .Content | transform.Unmarshal }} {{ range .feeds }} {{ $host := "" }} {{ with .url | urls.Parse }} {{ $host = .Host | strings.TrimPrefix "www." }} {{ end }} {{ $title := .feedTitle | default "" }} {{ if $host }} {{ $feedHosts = $feedHosts | append (dict "host" $host "title" $title) }} {{ end }} {{ if $title }} {{ $feedNames = $feedNames | append (dict "lower" (lower $title) "title" $title) }} {{ end }} {{ end }} {{ end }} {{ end }} {{ end }}