mirror of
https://codeberg.org/mayx/pages
synced 2026-01-02 02:03:40 +08:00
update
This commit is contained in:
351
2022/03/27/radio.html
Normal file
351
2022/03/27/radio.html
Normal file
@@ -0,0 +1,351 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
<!-- Begin Jekyll SEO tag v2.8.0 -->
|
||||
<title>用树莓派自制FM电台 | Mayx的博客</title>
|
||||
<meta name="generator" content="Jekyll v3.9.5" />
|
||||
<meta property="og:title" content="用树莓派自制FM电台" />
|
||||
<meta name="author" content="mayx" />
|
||||
<meta property="og:locale" content="zh_CN" />
|
||||
<meta name="description" content="无线电还挺有意思啊。" />
|
||||
<meta property="og:description" content="无线电还挺有意思啊。" />
|
||||
<meta property="og:site_name" content="Mayx的博客" />
|
||||
<meta property="og:type" content="article" />
|
||||
<meta property="article:published_time" content="2022-03-27T00:00:00+08:00" />
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta property="twitter:title" content="用树莓派自制FM电台" />
|
||||
<meta name="google-site-verification" content="huTYdEesm8NaFymixMNqflyCp6Jfvd615j5Wq1i2PHc" />
|
||||
<meta name="msvalidate.01" content="0ADFCE64B3557DC4DC5F2DC224C5FDDD" />
|
||||
<meta name="yandex-verification" content="fc0e535abed800be" />
|
||||
<script type="application/ld+json">
|
||||
{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"mayx"},"dateModified":"2022-03-27T00:00:00+08:00","datePublished":"2022-03-27T00:00:00+08:00","description":"无线电还挺有意思啊。","headline":"用树莓派自制FM电台","mainEntityOfPage":{"@type":"WebPage","@id":"/2022/03/27/radio.html"},"publisher":{"@type":"Organization","logo":{"@type":"ImageObject","url":"https://avatars0.githubusercontent.com/u/17966333"},"name":"mayx"},"url":"/2022/03/27/radio.html"}</script>
|
||||
<!-- End Jekyll SEO tag -->
|
||||
|
||||
<link rel="canonical" href="https://mabbs.github.io/2022/03/27/radio.html" />
|
||||
<link type="application/atom+xml" rel="alternate" href="/atom.xml" title="Mayx的博客" />
|
||||
<link rel="alternate" type="application/rss+xml" title="Mayx的博客(RSS)" href="/rss.xml" />
|
||||
<link rel="alternate" type="application/json" title="Mayx的博客(JSON Feed)" href="/feed.json" />
|
||||
<link rel="stylesheet" href="/assets/css/style.css?v=1767196818" />
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/Live2dHistoire/live2d/css/live2d.css" />
|
||||
<!-- <![endif]-->
|
||||
<link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="Mayx的博客" />
|
||||
<link rel="webmention" href="https://webmention.io/mabbs.github.io/webmention" />
|
||||
<link rel="pingback" href="https://webmention.io/mabbs.github.io/xmlrpc" />
|
||||
<link rel="preconnect" href="https://summary.mayx.eu.org" crossorigin="anonymous" />
|
||||
<link rel="prefetch" href="https://www.blogsclub.org/badge/mabbs.github.io" as="image" />
|
||||
<link rel="blogroll" type="text/xml" href="/blogroll.opml" />
|
||||
<link rel="me" href="https://github.com/Mabbs" />
|
||||
<script src="/assets/js/jquery.min.js"></script>
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js"></script>
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
<script>
|
||||
var lastUpdated = new Date("Thu, 01 Jan 2026 00:00:18 +0800");
|
||||
var BlogAPI = "https://summary.mayx.eu.org";
|
||||
</script>
|
||||
<script src="/assets/js/main.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
|
||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||
<script async="async" src="https://www.googletagmanager.com/gtag/js?id=UA-137710294-1"></script>
|
||||
<script>
|
||||
window.dataLayer = window.dataLayer || [];
|
||||
function gtag(){dataLayer.push(arguments);}
|
||||
gtag('js', new Date());
|
||||
gtag('config', 'UA-137710294-1');
|
||||
</script>
|
||||
|
||||
<script src="/assets/js/instant.page.js" type="module"></script>
|
||||
<!-- <![endif]-->
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<!--[if !IE]> --><noscript><marquee style="top: -15px; position: relative;"><small>发现当前浏览器没有启用JavaScript,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee></noscript><!-- <![endif]-->
|
||||
<!--[if IE]><marquee style="top: -15px; position: relative;"><small>发现当前浏览器为Internet Explorer,这不影响你的浏览,但可能会有一些功能无法使用……</small></marquee><![endif]-->
|
||||
<div class="wrapper">
|
||||
<header class="h-card">
|
||||
<h1><a class="u-url u-uid p-name" rel="me" href="/">Mayx的博客</a></h1>
|
||||
|
||||
|
||||
<img src="https://avatars0.githubusercontent.com/u/17966333" fetchpriority="high" class="u-photo" alt="Logo" style="width: 90%; max-width: 300px; max-height: 300px;" />
|
||||
|
||||
|
||||
<p class="p-note">Mayx's Home Page</p>
|
||||
|
||||
<form action="/search.html">
|
||||
<input type="text" name="keyword" id="search-input-all" placeholder="Search blog posts.." /> <input type="submit" value="搜索" />
|
||||
</form>
|
||||
<br />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<p class="view"><a class="u-url" href="/Mabbs/">About me</a></p>
|
||||
|
||||
<ul class="downloads">
|
||||
|
||||
<li style="width: 270px; border-right: none;"><a href="/MayxBlog.tgz">Download <strong>TGZ File</strong></a></li>
|
||||
|
||||
</ul>
|
||||
</header>
|
||||
<section class="h-entry">
|
||||
|
||||
<small><time class="date dt-published" datetime="2022-03-27T00:00:00+08:00">27 March 2022</time> - 字数统计:2543 - 阅读大约需要9分钟 - Hits: <span id="/2022/03/27/radio.html" class="visitors">Loading...</span></small>
|
||||
<h1 class="p-name">用树莓派自制FM电台</h1>
|
||||
|
||||
<p class="view">by <a class="p-author h-card" href="//github.com/Mabbs">mayx</a></p>
|
||||
<div id="outdate" style="display:none;">
|
||||
<hr /><p>
|
||||
这是一篇创建于 <span id="outime"></span> 天前的文章,其中的信息可能已经有所发展或是发生改变。
|
||||
</p>
|
||||
</div>
|
||||
<script>
|
||||
daysold = Math.floor((new Date().getTime() - new Date("Sun, 27 Mar 2022 00:00:00 +0800").getTime()) / (24 * 60 * 60 * 1000));
|
||||
if (daysold > 90) {
|
||||
document.getElementById("outdate").style.display = "block";
|
||||
document.getElementById("outime").innerHTML = daysold;
|
||||
}
|
||||
</script>
|
||||
|
||||
<hr />
|
||||
|
||||
<b>AI摘要</b>
|
||||
<p id="ai-output">这篇文章介绍了作者如何用树莓派自制FM电台的过程,从一开始没有尝试官方系统,到选择RPiTX和fm_transmitter,最终找到并改进了PiFmAdv项目。作者通过实验发现PiFmAdv在音质和信号范围上有所提升,并提醒了可能的法律风险,如功率限制和频率使用规定。文章结尾作者表达了对无线电技术的兴趣,但也提到了法律限制和专业认证的要求。</p>
|
||||
|
||||
<hr />
|
||||
|
||||
|
||||
|
||||
<ul><li><a href="#起因">起因</a></li><li><a href="#树莓派电台软件的选择">树莓派电台软件的选择</a></li><li><a href="#pifmadv的体验">PiFmAdv的体验</a></li><li><a href="#可能的风险与危害">可能的风险与危害</a></li><li><a href="#来点阴谋论">来点阴谋论</a></li><li><a href="#感想">感想</a></li></ul>
|
||||
<hr />
|
||||
|
||||
|
||||
<main class="post-content e-content" role="main"><p>无线电还挺有意思啊。<!--more--></p>
|
||||
<h1 id="起因">
|
||||
|
||||
|
||||
<a href="#起因"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 起因
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>其实我在很早以前就知道树莓派可以当广播电台了,但是我由于我作死的最早开始用的系统是<a href="/2020/12/07/picore.html">piCore</a>,而且感觉它功能够用就再没换回成官方系统。然而树莓派很多有趣的项目都是基于官方系统而不是不知名的发行版制作的,所以实际上虽然我知道树莓派有能力成为电台但是从来没有试过。然后最近突然想试试看,所以就把Raspberry Pi OS lite又下载回来刷到卡里,想试试看做个电台怎么样。</p>
|
||||
<h1 id="树莓派电台软件的选择">
|
||||
|
||||
|
||||
<a href="#树莓派电台软件的选择"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 树莓派电台软件的选择
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>一般从网上找教程的话好像推荐直接安装<a href="https://github.com/F5OEO/rpitx">rpitx</a>,不过我看这个项目有段时间没有更新了,虽然功能好像更强大吧……不过我目前就只用的是FM电台的功能,我更希望它的电台功能更强大,所以我又看了看别的项目。我最先看的是<a href="https://github.com/markondej/fm_transmitter">fm_transmitter</a>这个项目,根据文档所述的方法安装之后确实能用,不过在整这个项目的时候因为我没有杜邦线传输距离很短,大概信号范围也就1m左右吧。后来我又搜了一下找到了<a href="https://github.com/miegl/PiFmAdv">PiFmAdv</a>这个项目,它看起来是基于<a href="https://github.com/ChristopheJacquet/PiFmRds">PiFmRds</a>项目改编升级的,功能多了很多,但是我不知道这个作者是怎么想的,原来的项目还支持ARM64(aarch64),结果改完之后反倒不支持了😓,最开始我怎么编译都不通过,后来看了一眼Makefile发现不太对劲,然后我就简单改了一下参数总算可以编译通过了。这一点我已经<a href="https://github.com/miegl/PiFmAdv/issues/93">提了issue</a>,不知道作者会不会改,如果不会改的话大家要是想在64位的树莓派系统上运行需要注意改一下Makefile。</p>
|
||||
<h1 id="pifmadv的体验">
|
||||
|
||||
|
||||
<a href="#pifmadv的体验"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> PiFmAdv的体验
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>用了一下PiFmAdv之后发现这个清晰度真的和项目描述一样音质比fm_transmitter好了很多,也没有杂音了。后来我又看了看文档,发现它最多支持同时通过3个GPIO接口发射信号,于是我试了试用以下命令启动:</p>
|
||||
<div class="language-shell highlighter-rouge"><div class="highlight"><pre class="highlight"><code>sox audio.mp3 <span class="nt">-t</span> wav - repeat - | <span class="nb">sudo</span> ./pi_fm_adv <span class="nt">--audio</span> - <span class="nt">--freq</span> 108.0 <span class="nt">--power</span> 7 <span class="nt">--gpio</span> 4 <span class="nt">--gpio</span> 20 <span class="nt">--gpio</span> 32 <span class="nt">--rds</span> 0
|
||||
</code></pre></div></div>
|
||||
<p>信号也真的好了很多。这下一下就让我起了兴趣,于是就去淘宝上买了点杜邦线回来当天线。按照说明来看,这个程序只能在GPIO的4、20和32号口输出信号,貌似是用到了GPCLK的功能,所以只能用这些针脚。4号和20号口很容易找,具体位置可以看下面我打”x”的位置:</p>
|
||||
<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>,--------------------------------.
|
||||
| ooooooooooooooooooxo J8 +====
|
||||
| 1ooxoooooooooooooooo | USB
|
||||
| +====
|
||||
| Pi Model 3B V1.2 |
|
||||
| +----+ +====
|
||||
| |D| |SoC | | USB
|
||||
| |S| | | +====
|
||||
| |I| +----+ |
|
||||
| |C| +======
|
||||
| |S| | Net
|
||||
| pwr |HDMI| |I||A| +======
|
||||
`-| |--------| |----|V|-------'
|
||||
</code></pre></div></div>
|
||||
<p>但是32号口我是怎么找都没找到,在网上各种查资料都没有找到32号GPIO口……可能它是走的板子内的某根线吧…… </p><p>
|
||||
具体要接多长的天线呢?我看一般人推荐就接一节杜邦线就行了(大概10cm),当然这我肯定不会满足,我查了一下相关原理,好像说4号口理论上接1.5m长的天线可以最大化利用它的能力,所以我就直接买的公对母的线,接了2条大概1.4m的线,接到了4号和20号口,打开一试,信号真的一下就扩展到了将近1km的样子,我用手机的收音机功能测试在只有1道墙隔开的情况基本上1km没有任何问题,如果隔得墙多了大概只能到50m左右。不过这个发射信号的能力倒是比WiFi强了不少,估计是因为频率比较低吧。 </p><p>
|
||||
这个程序不仅支持发射音频信号,还能发射RDS数据,不过很遗憾我没有接收RDS数据的设备,所以我也测不了……</p>
|
||||
<h1 id="可能的风险与危害">
|
||||
|
||||
|
||||
<a href="#可能的风险与危害"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 可能的风险与危害
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>首先,个人发射无线电波在很多国家都是违法的,我搜了一下大多数国家在电台频段个人发射的功率限制基本上连1mW都不到,树莓派一个针脚最大发射电流是16mA,和电压3.3V相乘就要接近50mW了,所以要想玩的话要么就不要接天线,或者说不要接太长的天线,或者不要开时间太长,免得被别人搜到,还有就是不要占用有信号的频道,一是自己听着也乱,二是这样如果有人在用更容易被发现。另外不推荐设置超过87-108Mhz的频率,一是这样中国的收音机也接收不到,二是再往上就要到航空用频道,再往下就可能到军用频道的,那些频道占用的话还是挺危险的,所以一般给无线电爱好者分的频段好像都在300-400Mhz的样子,当然这样那就不是FM电台了,在那个频段的好像都是对讲机啥的。所以最终还是推荐别开时间太长,而且不推荐播小广告啥的,放音乐一般好像没人管,播广告那就是妥妥的“黑广播”了。 </p><p>
|
||||
另外还有可能的危害比如说假如有人在飞机上在航空频段开广播,这个程序可是没有限制频率的,那可能真的可以让飞机驾驶舱播广播,这可就不是小问题了。严重的可能飞行员就只能迫降了,毕竟要是听不清塔台的信号那还是有大问题的。</p>
|
||||
<h1 id="来点阴谋论">
|
||||
|
||||
|
||||
<a href="#来点阴谋论"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 来点阴谋论
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>综上所述,我觉得从权力机构的层面可能因此有限制无线电知识的情况。其实普通人想发射无线电是非常容易的事情,有电流通过的地方就有电磁波,这么说来那我觉得不只是树莓派这种连接虚拟与现实的设备能做得到发射无线电,但凡是有导线,能改变通电状态的设备理论上应该都可以。那我是不是用扬声器,USB线等能传输信号的设备都可以发射?这让我想起了Fabrice Bellard大神写的一个<a href="https://bellard.org/dvbt/">用VGA显卡来发射DVB-T信号的程序</a>,那个程序应该说是非常厉害了,我觉得理论上我用扬声器发射FM信号这种事情应该是能做到的,就是不知道声卡能不能不解码直接向扬声器发射电流,另外还有个好处就是树莓派实际上是用PMW模拟的FM信号,而扬声器是可以调整电流大小的,理论上实现可能更简单吧……其实要是说呢以前的手机是支持当作FM电台的,现在就都不支持了,所以我觉得说不定不是大家做不出来这样的程序,而是做出来的人都消失了😂。希望能有大佬给点力吧,能把这种软件多开源点出来。</p>
|
||||
<h1 id="感想">
|
||||
|
||||
|
||||
<a href="#感想"><svg class='octicon' viewBox='0 0 16 16' version='1.1' width='16' height='32' aria-hidden='true'><path fill-rule='evenodd' d='M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z'></path></svg></a> 感想
|
||||
|
||||
|
||||
</h1>
|
||||
|
||||
<p>感觉无线电还挺有意思的,要不然回头学一学考个业余电台操作证书?我之前还看过一位大佬<a href="https://blog.aoaoao.me/p/amateur-satellite/">用卫星和世界各地的人通信</a>,感觉真的非常厉害。不过在这里面有好多法律的限制还挺麻烦的……可能也就只能自己玩玩了吧。</p></main>
|
||||
|
||||
|
||||
<small style="display: block">tags: <a rel="category tag" class="p-category" href="/search.html?keyword=%E6%A0%91%E8%8E%93%E6%B4%BE"><em>树莓派</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=%E7%94%B5%E5%8F%B0"><em>电台</em></a> - <a rel="category tag" class="p-category" href="/search.html?keyword=FM"><em>FM</em></a> <span style="float: right;"><a href="https://gitlab.com/mayx/mayx.gitlab.io/tree/master/_posts/2022-03-27-radio.md">查看原始文件</a></span></small>
|
||||
|
||||
|
||||
<h4 style="border-bottom: 1px solid #e5e5e5;margin: 2em 0 5px;">推荐文章</h4>
|
||||
<p id="suggest-container">Loading...</p>
|
||||
<script>
|
||||
var suggest = $("#suggest-container");
|
||||
$.get(BlogAPI + "/suggest?id=/2022/03/27/radio.html&update=" + lastUpdated.valueOf(), function (data) {
|
||||
if (data.length) {
|
||||
getSearchJSON(function (search) {
|
||||
suggest.empty();
|
||||
var searchMap = {};
|
||||
for (var i = 0; i < search.length; i++) {
|
||||
searchMap[search[i].url] = search[i];
|
||||
}
|
||||
|
||||
var tooltip = $('<div class="content-tooltip"></div>').appendTo('body').hide();
|
||||
for (var j = 0; j < data.length; j++) {
|
||||
var item = searchMap[data[j].id];
|
||||
if (item) {
|
||||
var link = $('<a href="' + item.url + '">' + item.title + '</a>');
|
||||
var contentPreview = item.content.substring(0, 100);
|
||||
if (item.content.length > 100) {
|
||||
contentPreview += "……";
|
||||
}
|
||||
link.hover(
|
||||
function(e) {
|
||||
tooltip.text($(this).data('content'))
|
||||
.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
})
|
||||
.show();
|
||||
},
|
||||
function() {
|
||||
tooltip.hide();
|
||||
}
|
||||
).mousemove(function(e) {
|
||||
tooltip.css({
|
||||
top: e.pageY + 10,
|
||||
left: e.pageX + 10
|
||||
});
|
||||
}).data('content', contentPreview);
|
||||
|
||||
suggest.append(link);
|
||||
suggest.append(' - ' + item.date + '<br />');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else {
|
||||
suggest.html("暂无推荐文章……");
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<br />
|
||||
<div class="pagination">
|
||||
|
||||
<span class="prev">
|
||||
<a href="/2022/03/12/alpine.html">
|
||||
上一篇:Alpine的使用体验
|
||||
</a>
|
||||
</span>
|
||||
|
||||
<br />
|
||||
|
||||
<span class="next">
|
||||
<a href="/2022/04/17/pcdn.html">
|
||||
下一篇:体验成为PCDN的节点
|
||||
</a>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<!--[if !IE]> -->
|
||||
<link rel="stylesheet" href="/assets/css/gitalk.css">
|
||||
<script src="/assets/js/gitalk.min.js"></script>
|
||||
|
||||
<div id="gitalk-container"></div>
|
||||
|
||||
<script>
|
||||
var gitalk = new Gitalk({
|
||||
clientID: '36557aec4c3cb04f7ac6',
|
||||
clientSecret: 'ac32993299751cb5a9ba81cf2b171cca65879cdb',
|
||||
repo: 'mabbs.github.io',
|
||||
owner: 'Mabbs',
|
||||
admin: ['Mabbs'],
|
||||
id: '/2022/03/27/radio', // Ensure uniqueness and length less than 50
|
||||
distractionFreeMode: false, // Facebook-like distraction free mode
|
||||
proxy: "https://cors-anywhere.mayx.eu.org/?https://github.com/login/oauth/access_token"
|
||||
})
|
||||
gitalk.render('gitalk-container')
|
||||
</script>
|
||||
<!-- <![endif]-->
|
||||
|
||||
</section>
|
||||
<!--[if !IE]> -->
|
||||
<div id="landlord" style="left:5px;bottom:0px;">
|
||||
<div class="message" style="opacity:0"></div>
|
||||
<canvas id="live2d" width="500" height="560" class="live2d"></canvas>
|
||||
<div class="live_talk_input_body">
|
||||
<form id="live_talk_input_form">
|
||||
<div class="live_talk_input_name_body" >
|
||||
<input type="checkbox" id="load_this" />
|
||||
<input type="hidden" id="post_id" value="/2022/03/27/radio.html" />
|
||||
<label for="load_this">
|
||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="live_talk_input_text_body">
|
||||
<input name="talk" type="text" class="live_talk_talk white_input" id="AIuserText" autocomplete="off" placeholder="要和我聊什么呀?" />
|
||||
<button type="submit" class="live_talk_send_btn" id="talk_send">发送</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<input name="live_talk" id="live_talk" value="1" type="hidden" />
|
||||
<div class="live_ico_box" style="display:none;">
|
||||
<div class="live_ico_item type_info" id="showInfoBtn"></div>
|
||||
<div class="live_ico_item type_talk" id="showTalkBtn"></div>
|
||||
<div class="live_ico_item type_music" id="musicButton"></div>
|
||||
<div class="live_ico_item type_youdu" id="youduButton"></div>
|
||||
<div class="live_ico_item type_quit" id="hideButton"></div>
|
||||
<input name="live_statu_val" id="live_statu_val" value="0" type="hidden" />
|
||||
<audio src="" style="display:none;" id="live2d_bgm" data-bgm="0" preload="none"></audio>
|
||||
<input id="duType" value="douqilai" type="hidden" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="open_live2d">召唤伊斯特瓦尔</div>
|
||||
<!-- <![endif]-->
|
||||
<footer>
|
||||
<p>
|
||||
<small>Made with ❤ by Mayx<br />Last updated at 2026-01-01 00:00:18<br /> 总字数:614622 - 文章数:178 - <a href="/atom.xml" >Atom</a> - <a href="/README.html" >About</a></small>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
<script src="/assets/js/scale.fix.js"></script>
|
||||
<!--[if !IE]> -->
|
||||
<script src="/assets/js/main_new.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/live2d.js"></script>
|
||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||
<!-- <![endif]-->
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user