Skip to content

Commit

Permalink
添加了一些文件
Browse files Browse the repository at this point in the history
  • Loading branch information
zybzbk authored Aug 7, 2024
0 parents commit 2b0049c
Show file tree
Hide file tree
Showing 9 changed files with 379 additions and 0 deletions.
40 changes: 40 additions & 0 deletions 404.html

Large diffs are not rendered by default.

Binary file added favicon.ico
Binary file not shown.
83 changes: 83 additions & 0 deletions index.html

Large diffs are not rendered by default.

40 changes: 40 additions & 0 deletions intro.html

Large diffs are not rendered by default.

Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

User-agent:*
Disallow:

Sitemap: https://mister-hope.github.io/sitemap.xml
3 changes: 3 additions & 0 deletions sitemap.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/sitemap.xsl"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1"><url><loc>https://mister-hope.github.io/intro.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/disable.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/encrypt.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/layout.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/markdown.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/page.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/demo/</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/cherry.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/dragonfruit.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/strawberry.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/tomato.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/banana/1.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/banana/2.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/banana/3.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/banana/4.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/apple/1.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/apple/2.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/apple/3.html</loc><changefreq>daily</changefreq></url><url><loc>https://mister-hope.github.io/posts/apple/4.html</loc><changefreq>daily</changefreq></url></urlset>
207 changes: 207 additions & 0 deletions sitemap.xsl
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:html="http://www.w3.org/TR/REC-html40"
xmlns:sitemap="http://www.sitemaps.org/schemas/sitemap/0.9"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" version="1.0" encoding="UTF-8" indent="yes" />
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>XML Sitemap</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0;" />
<style>
:root {
--bg-color: #f8f8f8;
--bg-color-secondary: #fff;
--text-color: #2c3e50;
--border-color: #eaecef;
--brand-color: #3eaf7c;

color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
:root {
--bg-color: #0d1117;
--bg-color-secondary: #161b22;
--text-color: #ccc;
--border-color: #30363d;
}
}

html,
body {
margin: 0;
padding: 0;
background: var(--bg-color);
}

html {
font-size: 14px;
}

body {
min-height: 100vh;
color: var(--text-color);
text-align: center;
}

#content {
max-width: 960px;
margin: 0 auto;
}

h1 {
margin-top: 1rem;
font-size: 2rem;
}

@media (max-width: 419px) {
h1 {
font-size: 1.5rem;
}
}

a {
color: var(--text-color);
font-weight: 500;
overflow-wrap: break-word;
}

table {
width: 100%;
border-radius: 8px;
border-collapse: collapse;
text-align: center;
overflow: hidden;
}

@media (max-width: 419px) {
table {
border-radius: 0;
}
}

th {
min-width: 56px;
padding: 0.6em 1em;

background-color: var(--brand-color);
color: var(--bg-color);

font-weight: bold;
font-size: 16px;
}

@media (max-width: 719px) {
th {
font-size: 14px;
}
}

th:first-child {
text-align: start;
}

tr:nth-child(odd) {
background: var(--bg-color-secondary);
}

tr:hover {
background-color: #e8e8e8;
}

@media (prefers-color-scheme: dark) {
tr:hover {
background-color: #333;
}
}

td {
padding: 0.6em 1em;
}

@media (max-width: 719px) {
td {
font-size: 12px;
}
}

td:first-child {
text-align: start;
}

footer {
margin-top: 10px;
padding: 4px;

color: #888;

font-size: 12px;
text-align: center;
}
</style>
</head>
<body>
<div id="content">
<h1>Sitemap</h1>
<table>
<thead>
<tr>
<th>
<xsl:value-of select="concat('URL (', count(sitemap:urlset/sitemap:url), ')')" />
</th>
<th>Priority</th>
<th>Change Frequency</th>
<th>Last Updated Time</th>
</tr>
</thead>
<tbody>
<xsl:variable name="lower" select="'abcdefghijklmnopqrstuvwxyz'" />
<xsl:variable name="upper" select="'ABCDEFGHIJKLMNOPQRSTUVWXYZ'" />
<xsl:for-each select="sitemap:urlset/sitemap:url">
<tr>
<td>
<xsl:variable name="itemURL">
<xsl:value-of select="sitemap:loc" />
</xsl:variable>
<a href="{$itemURL}" target="_blank">
<xsl:value-of select="sitemap:loc" />
</a>
</td>
<td>
<xsl:choose>
<xsl:when test="sitemap:priority">
<xsl:value-of select="concat(sitemap:priority*100,'%a')" />
</xsl:when>
<xsl:otherwise>
<xsl:text>0.5</xsl:text>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:choose>
<xsl:when test="sitemap:changefreq">
<xsl:value-of select="concat(translate(substring(sitemap:changefreq, 1, 1),concat($lower, $upper),concat($upper, $lower)),substring(sitemap:changefreq, 2))" />
</xsl:when>
<xsl:otherwise>
<xsl:text>-</xsl:text>
</xsl:otherwise>
</xsl:choose>
</td>
<td>
<xsl:value-of select="concat(substring(sitemap:lastmod,0,11),concat(' ', substring(sitemap:lastmod,12,5)))" />
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
<footer>
Generatd by <a href="https://ecosystem.vuejs.press/plugins/sitemap/">@vuepress/plugin-sitemap</a>
</footer>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

0 comments on commit 2b0049c

Please sign in to comment.