mirror of
https://github.com/Mabbs/mabbs.github.io
synced 2026-01-11 14:01:46 +08:00
Update 4 files
- /_layouts/xslt_container.html - /_layouts/default.html - /_layouts/xslt.html - /feed.xslt.xml
This commit is contained in:
@ -1,5 +1,6 @@
|
|||||||
<!DOCTYPE html>
|
---
|
||||||
<html lang="{{ site.lang | default: "zh-CN" }}">
|
layout: xslt_container
|
||||||
|
---
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
@ -34,7 +35,7 @@
|
|||||||
<!--[if !IE]> -->
|
<!--[if !IE]> -->
|
||||||
{% if site.google_analytics %}
|
{% if site.google_analytics %}
|
||||||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||||||
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
<script async="async" src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
|
||||||
<script>
|
<script>
|
||||||
window.dataLayer = window.dataLayer || [];
|
window.dataLayer = window.dataLayer || [];
|
||||||
function gtag(){dataLayer.push(arguments);}
|
function gtag(){dataLayer.push(arguments);}
|
||||||
@ -101,7 +102,7 @@
|
|||||||
<input type="checkbox" id="load_this" />
|
<input type="checkbox" id="load_this" />
|
||||||
<input type="hidden" id="post_id" value="{{ page.url }}" />
|
<input type="hidden" id="post_id" value="{{ page.url }}" />
|
||||||
<label for="load_this">
|
<label for="load_this">
|
||||||
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
<span style="font-size: 11px; color: #fff;"> 想问这篇文章</span>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="live_talk_input_text_body">
|
<div class="live_talk_input_text_body">
|
||||||
@ -137,5 +138,3 @@
|
|||||||
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
<script src="/Live2dHistoire/live2d/js/message.js"></script>
|
||||||
<!-- <![endif]-->
|
<!-- <![endif]-->
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
|
||||||
7
_layouts/xslt.html
Normal file
7
_layouts/xslt.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
---
|
||||||
|
layout: default
|
||||||
|
---
|
||||||
|
|
||||||
|
{{ content }}
|
||||||
|
<xsl:apply-templates select="atom:feed/atom:entry" />
|
||||||
|
<xsl:apply-templates select="/rss/channel/item" />
|
||||||
53
_layouts/xslt_container.html
Normal file
53
_layouts/xslt_container.html
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
{% if page.layout == "xslt" %}
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<xsl:stylesheet
|
||||||
|
version="3.0"
|
||||||
|
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:atom="http://www.w3.org/2005/Atom">
|
||||||
|
<xsl:output method="html" version="4.0" encoding="UTF-8" indent="yes"/>
|
||||||
|
<xsl:template match="/">
|
||||||
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ site.lang | default: "zh-CN" }}">
|
||||||
|
{{ content }}
|
||||||
|
</html>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="atom:feed/atom:entry">
|
||||||
|
<div class="item">
|
||||||
|
<h2>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="atom:link/@href"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="atom:title"/>
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<small class="gray">
|
||||||
|
Published at <xsl:value-of select="substring(atom:published, 0, 11)" />
|
||||||
|
</small>
|
||||||
|
<p><xsl:value-of select="atom:summary"/></p>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
<xsl:template match="/rss/channel/item">
|
||||||
|
<div class="item">
|
||||||
|
<h2>
|
||||||
|
<a>
|
||||||
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="link"/>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="title"/>
|
||||||
|
</a>
|
||||||
|
</h2>
|
||||||
|
<small class="gray">
|
||||||
|
Published at <xsl:value-of select="substring(pubDate, 0, 17)" />
|
||||||
|
</small>
|
||||||
|
<p><xsl:value-of select="description"/></p>
|
||||||
|
<hr />
|
||||||
|
</div>
|
||||||
|
</xsl:template>
|
||||||
|
</xsl:stylesheet>
|
||||||
|
{% else %}
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="{{ site.lang | default: "zh-CN" }}">
|
||||||
|
{{ content }}
|
||||||
|
</html>
|
||||||
|
{% endif %}
|
||||||
116
feed.xslt.xml
116
feed.xslt.xml
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user