<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>陈楚生 on 张有志的博客</title>
    <link>https://bianle.me/tags/%E9%99%88%E6%A5%9A%E7%94%9F/</link>
    <description>Recent content in 陈楚生 on 张有志的博客</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 12 Apr 2026 16:17:05 +0800</lastBuildDate>
    <atom:link href="https://bianle.me/tags/%E9%99%88%E6%A5%9A%E7%94%9F/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>陈楚生 - 庙堂之外</title>
      <link>https://bianle.me/posts/466/</link>
      <pubDate>Sun, 12 Apr 2026 16:17:05 +0800</pubDate>
      <guid>https://bianle.me/posts/466/</guid>
      <description>&lt;link rel=&#34;stylesheet&#34; href=&#34;https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css&#34;&gt;



    &lt;script src=&#34;https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js&#34;&gt;&lt;/script&gt;


&lt;div id=&#34;aplayer&#34;&gt;&lt;/div&gt;
&lt;div
  class=&#34;aplayer-lrc-full&#34;
  id=&#34;aplayer-flat-0&#34;
  data-aplayer-flat
  data-aplayer-flat-url=&#34;https://nexus-alioss.oss-cn-beijing.aliyuncs.com/_51bf122a9f.lrc&#34;
&gt;&lt;/div&gt;

&lt;script&gt;
    const ap = new APlayer({
        container: document.getElementById(&#39;aplayer&#39;),

        

        

        

        

        

        

        

        

        
            lrcType:  3 ,

        

        

        

        audio: [{
                        name: &#34;庙堂之外&#34;,
                        url: &#34;https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_2552ff6423.mp3&#34;,
                        artist: &#34;陈楚生&#34;,
                        cover: &#34;https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_ef7d2351ea.jpg&#34;,
                            lrc: &#34;https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_51bf122a9f.lrc&#34;}]

    });
    (function () {
      const container = document.getElementById(&#39;aplayer-flat-0&#39;);
      if (!container) return;
      const url = container.getAttribute(&#39;data-aplayer-flat-url&#39;);
      const scrollIntoView = container.getAttribute(&#39;data-aplayer-flat-scroll&#39;) === &#39;1&#39;;
      function parseLrc(text) {
        if (!text) return [];
        text = text.replace(/\r\n/g, &#39;\n&#39;);
        const lines = text.split(&#39;\n&#39;);
        const out = [];
        for (let i = 0; i &lt; lines.length; i++) {
          const line = lines[i];
          const times = line.match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
          if (!times) continue;
          let lyricText = line;
          for (let j = 0; j &lt; times.length; j++) {
            lyricText = lyricText.replace(times[j], &#39;&#39;);
          }
           
          lyricText = lyricText.replace(/&lt;\d{2}:\d{2}(?:\.\d{1,4})?&gt;/g, &#39;&#39;);
          lyricText = lyricText.replace(/^\s+|\s+$/g, &#39;&#39;);
          for (let j = 0; j &lt; times.length; j++) {
            const m = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(times[j]);
            if (!m) continue;
            const min = parseInt(m[1], 10);
            const sec = parseInt(m[2], 10);
            const frac = m[4] ? parseInt(m[4], 10) / (String(m[4]).length === 2 ? 100 : 1000) : 0;
            const t = min * 60 + sec + frac;
            out.push([t, lyricText]);
          }
        }
        out.sort(function (a, b) { return a[0] - b[0]; });
        return out.filter(function (x) { return x[1]; });
      }
      function render(parsed) {
        container.innerHTML = &#39;&#39;;
        const frag = document.createDocumentFragment();
        parsed.forEach(function (row, idx) {
          const p = document.createElement(&#39;p&#39;);
          p.className = &#39;aplayer-lrc-line&#39;;
          p.dataset.index = String(idx);
          p.dataset.time = String(row[0]);
          p.textContent = row[1];
          frag.appendChild(p);
        });
        container.appendChild(frag);
      }
      function currentIndex(parsed, t) {
        if (!parsed.length) return -1;
        let i = 0;
        for (; i &lt; parsed.length; i++) {
          if (parsed[i][0] &gt; t) break;
        }
        return Math.max(0, i - 1);
      }
      function attach(parsed) {
        const lines = container.querySelectorAll(&#39;.aplayer-lrc-line&#39;);
        let last = -1;
        function tick() {
          const t = ap.audio ? ap.audio.currentTime : 0;
          const idx = currentIndex(parsed, t);
          if (idx === last) return;
          last = idx;
          lines.forEach(function (el, j) {
            el.classList.toggle(&#39;is-active&#39;, j === idx);
          });
          if (scrollIntoView &amp;&amp; lines[idx]) {
            lines[idx].scrollIntoView({ block: &#39;nearest&#39;, behavior: &#39;smooth&#39; });
          }
        }
        if (ap.audio) {
          ap.audio.addEventListener(&#39;timeupdate&#39;, tick);
          tick();
        }
      }
      fetch(url, { credentials: &#39;omit&#39; })
        .then(function (r) {
          if (!r.ok) throw new Error(&#39;lrc http &#39; + r.status);
          return r.text();
        })
        .then(function (text) {
          const parsed = parseLrc(text);
          render(parsed);
          attach(parsed);
        })
        .catch(function (e) {
          container.innerHTML = &#39;&lt;p class=&#34;aplayer-lrc-error&#34;&gt;平铺歌词加载失败&lt;/p&gt;</description>
      <content:encoded><![CDATA[


    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css">



    <script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script>


<div id="aplayer"></div>
<div
  class="aplayer-lrc-full"
  id="aplayer-flat-0"
  data-aplayer-flat
  data-aplayer-flat-url="https://nexus-alioss.oss-cn-beijing.aliyuncs.com/_51bf122a9f.lrc"
></div>

<script>
    const ap = new APlayer({
        container: document.getElementById('aplayer'),

        

        

        

        

        

        

        

        

        
            lrcType:  3 ,

        

        

        

        audio: [{
                        name: "庙堂之外",
                        url: "https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_2552ff6423.mp3",
                        artist: "陈楚生",
                        cover: "https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_ef7d2351ea.jpg",
                            lrc: "https:\/\/nexus-alioss.oss-cn-beijing.aliyuncs.com\/_51bf122a9f.lrc"}]

    });
    (function () {
      const container = document.getElementById('aplayer-flat-0');
      if (!container) return;
      const url = container.getAttribute('data-aplayer-flat-url');
      const scrollIntoView = container.getAttribute('data-aplayer-flat-scroll') === '1';
      function parseLrc(text) {
        if (!text) return [];
        text = text.replace(/\r\n/g, '\n');
        const lines = text.split('\n');
        const out = [];
        for (let i = 0; i < lines.length; i++) {
          const line = lines[i];
          const times = line.match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/g);
          if (!times) continue;
          let lyricText = line;
          for (let j = 0; j < times.length; j++) {
            lyricText = lyricText.replace(times[j], '');
          }
           
          lyricText = lyricText.replace(/<\d{2}:\d{2}(?:\.\d{1,4})?>/g, '');
          lyricText = lyricText.replace(/^\s+|\s+$/g, '');
          for (let j = 0; j < times.length; j++) {
            const m = /\[(\d{2}):(\d{2})(\.(\d{2,3}))?]/.exec(times[j]);
            if (!m) continue;
            const min = parseInt(m[1], 10);
            const sec = parseInt(m[2], 10);
            const frac = m[4] ? parseInt(m[4], 10) / (String(m[4]).length === 2 ? 100 : 1000) : 0;
            const t = min * 60 + sec + frac;
            out.push([t, lyricText]);
          }
        }
        out.sort(function (a, b) { return a[0] - b[0]; });
        return out.filter(function (x) { return x[1]; });
      }
      function render(parsed) {
        container.innerHTML = '';
        const frag = document.createDocumentFragment();
        parsed.forEach(function (row, idx) {
          const p = document.createElement('p');
          p.className = 'aplayer-lrc-line';
          p.dataset.index = String(idx);
          p.dataset.time = String(row[0]);
          p.textContent = row[1];
          frag.appendChild(p);
        });
        container.appendChild(frag);
      }
      function currentIndex(parsed, t) {
        if (!parsed.length) return -1;
        let i = 0;
        for (; i < parsed.length; i++) {
          if (parsed[i][0] > t) break;
        }
        return Math.max(0, i - 1);
      }
      function attach(parsed) {
        const lines = container.querySelectorAll('.aplayer-lrc-line');
        let last = -1;
        function tick() {
          const t = ap.audio ? ap.audio.currentTime : 0;
          const idx = currentIndex(parsed, t);
          if (idx === last) return;
          last = idx;
          lines.forEach(function (el, j) {
            el.classList.toggle('is-active', j === idx);
          });
          if (scrollIntoView && lines[idx]) {
            lines[idx].scrollIntoView({ block: 'nearest', behavior: 'smooth' });
          }
        }
        if (ap.audio) {
          ap.audio.addEventListener('timeupdate', tick);
          tick();
        }
      }
      fetch(url, { credentials: 'omit' })
        .then(function (r) {
          if (!r.ok) throw new Error('lrc http ' + r.status);
          return r.text();
        })
        .then(function (text) {
          const parsed = parseLrc(text);
          render(parsed);
          attach(parsed);
        })
        .catch(function (e) {
          container.innerHTML = '<p class="aplayer-lrc-error">平铺歌词加载失败</p>';
          if (typeof console !== 'undefined' && console.warn) console.warn(e);
        });
    })();
</script>
<style>
  .aplayer-lrc-full {
    margin: 1.25em 0;
    padding: 1em 1.1em;
    border-radius: 8px;
    line-height: 1.75;
    font-size: 0.95rem;
    color: var(--secondary, #6b6b6b);
    background: var(--code-bg, rgba(120, 120, 120, 0.08));
  }
  .aplayer-lrc-full .aplayer-lrc-line {
    margin: 0.35em 0;
    transition: color 0.15s ease, font-weight 0.15s ease;
  }
  .aplayer-lrc-full .aplayer-lrc-line.is-active {
    color: var(--primary, #1a1a1a);
    font-weight: 600;
  }
  .aplayer-lrc-error {
    margin: 0.75em 0;
    color: #c45;
    font-size: 0.9rem;
  }
</style>

]]></content:encoded>
    </item>
  </channel>
</rss>
