feat: add ssg open services list

This commit is contained in:
Colin
2022-06-16 11:59:35 +08:00
parent cec9d1d715
commit cda0005008
4 changed files with 42 additions and 2 deletions

View File

@@ -6,4 +6,4 @@ framed = true
Welcome to my blog👋 Check these
[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [📖 My Readings](https://reading.colinx.one) | [💡 My Github](https://github.com/Colin-XKL/)
[💻 技术文章](/categories/%E6%8A%80%E6%9C%AF/) | [📖 My Readings](https://reading.colinx.one) | [💡 My Github](https://github.com/Colin-XKL/) | [💎 公开服务](/services/)

View File

@@ -8,7 +8,7 @@ lastmod: 2021-05-10
## About Me
00 后性别男爱好女CS 在读,准软件工程师业余摄影师、音乐制作人RSS 爱好者
00 后性别男爱好女CS专业,软件攻城狮一枚业余摄影师、音乐制作人RSS 爱好者
### I Like

10
content/services.md Normal file
View File

@@ -0,0 +1,10 @@
---
title: 公开服务
date: 2022-06-16
---
这里是一些开放的服务以及一些个人作品
{{< service_list name="aaa" url="http://pro.colinx.oldnine.xyz:10055/items/OpenServices" >}}

View File

@@ -0,0 +1,30 @@
<!--
Params:
name: css #id
url: path or url of your data.json
-->
{{ with .Get "url" }}
{{ $url := . }}
{{ with $.Get "name" }}
{{ $name := . }}
{{ $data := getJSON $url }}
{{ range $data.data }}
{{ $item := . }}
<h3 id="{{$item.name}}">{{$item.name}}</h3>
{{ $link := urls.Parse $item.link }}
<p>{{$item.type}} - {{$item.subtitle}}</p>
<p>地址:
{{ if (gt (len $link.Host) 1) }}
<a href="{{$item.link}}" >{{$link.Host}}</a>
{{ else }}
{{$item.link}}
{{ end }}
</p>
{{ if (gt (len $item.StartServingAt) 1) }}
<p>上线于{{$item.StartServingAt}}</p>
{{ end }}
{{ end }}
{{ end }}
{{ end }}