Skip to content

Commit

Permalink
历史上的今天第一次提交
Browse files Browse the repository at this point in the history
  • Loading branch information
Vogadero committed Apr 27, 2022
0 parents commit dcd8920
Show file tree
Hide file tree
Showing 21 changed files with 769 additions and 0 deletions.
Binary file added 01.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
118 changes: 118 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
[![](https://img.shields.io/badge/[email protected]?style=plastic)](https://github.com/Vogadero/todayInHistory)
![](https://img.shields.io/badge/language-Jquery-yellow.svg?style=plastic)
![](https://img.shields.io/badge/language-JavaScript-orange.svg?style=plastic)
![](https://img.shields.io/badge/language-Html-9cf.svg?style=plastic)
![](https://img.shields.io/badge/language-Css-blueviolet.svg?style=plastic)
![](https://img.shields.io/npm/l/express?style=plastic)

# 项目简介🚩

- 历史上的今天
- 演示地址:https://vogadero.github.io/todayInHistory/

## 1. 功能模块🎨

#### 1.1 首页🛫

| 功能 |
| ---------------------- |
| 展示历史上的今天大事件 |
| 查询当前事件的百度百科 |
| 显示当前设备的信息 |

## 2. 截图⭐

![](01.jpeg)

## 3. 项目架构🍽️

| 系统分层 | 使用技术 |
| -------- | --------------------------- |
| 客户端 | Art-template、jQuery、layui |

## 4. 项目运行环境搭建🌈

- 克隆远端数据仓库到本地:`git clone 仓库地址`
- 拉取远程仓库中最新的版本:`git pull 远程仓库地址 分支名称`
- 双击index.html

# 功能介绍🦷

## 🕵️‍♀️历史上的今天

- 展示内容:历史上的今天大事件

- API

- 地址:https://query.asilu.com/today/list

- 方式:GET

- 参数类型:jsonp




## :card_index:**查询**

- 展示内容:当前事件的百度百科

- API

- 地址:https://query.asilu.com/today/list

- 方式:GET

- 参数类型:jsonp




## :woman_technologist:**设备信息**

- 展示内容:当前设备的基础信息

- API

- 地址:https://api.asilu.com/user-agent/
- 方式:GET
- 参数类型:jsonp



# Tree🌵

```
历史上的今天
├─ 01.jpeg
├─ index.html
├─ js
│ ├─ jquery-3.6.0.min.js
│ └─ template-web.js
├─ layui-v2.6.8
│ └─ layui
│ ├─ css
│ │ ├─ layui.css
│ │ └─ modules
│ │ ├─ code.css
│ │ ├─ laydate
│ │ │ └─ default
│ │ │ └─ laydate.css
│ │ └─ layer
│ │ └─ default
│ │ ├─ icon-ext.png
│ │ ├─ icon.png
│ │ ├─ layer.css
│ │ ├─ loading-0.gif
│ │ ├─ loading-1.gif
│ │ └─ loading-2.gif
│ ├─ font
│ │ ├─ iconfont.eot
│ │ ├─ iconfont.svg
│ │ ├─ iconfont.ttf
│ │ ├─ iconfont.woff
│ │ └─ iconfont.woff2
│ └─ layui.js
├─ README.md
└─ 时间.ico
```
83 changes: 83 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="utf-8">
<title>历史上的今天</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="shortcut icon" href="时间.ico" type="image/x-icon">
<link rel="stylesheet" href="layui-v2.6.8/layui/css/layui.css">
<script src="js/jquery-3.6.0.min.js"></script>
</head>

<body>
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
<legend class="layui-bg-cyan">历史上的今天</legend>
</fieldset>
<!-- 历史容器 -->
<ul class="layui-timeline" id="history-box">
</ul>
<!-- 设备容器 -->
<fieldset class="layui-elem-field layui-field-title" style="margin:20px;">
<legend style="text-align: center;">设备信息</legend>
</fieldset>
<span class="layui-breadcrumb" id="user-agent" style="text-align: center;display: block;"></span>

<script src="layui-v2.6.8/layui/layui.js"></script>
<!-- 引入template-web模版库文件 -->
<script src="js/template-web.js"></script>
<!-- 模版内容 -->
<script type="text/html" id="history-tpl">
{{each info}}
<li class="layui-timeline-item">
<i class="layui-icon layui-icon-flag" style="font-size: 20px; color: #5FB878;"></i>
<div class="layui-timeline-content layui-text">
<h3 class="layui-timeline-title">{{$value.year}}{{data.month}}{{data.day}}</h3>
<p>
{{$value.title}}<a href={{$value.link}} title="百度百科" style="text-decoration: none;"><i
class="layui-icon layui-icon-search"
style="margin-left: 4px; font-size: 30px; color: #1E9FFF; vertical-align: baseline;"></i></a>
</p>
</div>
</li>
{{/each}}
</script>
<script type="text/html" id="ua-tpl">
<a href={{info.platform.link}} style="font-size: 20px;">{{info.platform.title}} <i
class="layui-icon layui-icon-windows" style="font-size: 30px; color: #ff0080;"></i></a><i
class="layui-icon layui-icon-subtraction"></i></a>
<a href={{info.browser.link}} style="font-size: 20px;">{{info.browser.title}} <i
class="layui-icon layui-icon-android" style="font-size: 30px; color: #667eea;"></i></a>
</script>
<script type="text/javascript">
var historyBox = document.getElementById("history-box");
var userAgentBox = document.getElementById("user-agent");
$.ajax({
type: "get",
url: "https://query.asilu.com/today/list",
dataType: "jsonp",
success: function (data) {
var html = template("history-tpl", {
info: data.data,
data: data
});
historyBox.innerHTML = html;
}
});
$.ajax({
type: "get",
url: "https://api.asilu.com/user-agent/",
dataType: "jsonp",
success: function (data) {
var html = template("ua-tpl", {
info: data
});
userAgentBox.innerHTML = html;
}
})
</script>
</body>

</html>
2 changes: 2 additions & 0 deletions js/jquery-3.6.0.min.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions js/template-web.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions layui-v2.6.8/layui/css/layui.css

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions layui-v2.6.8/layui/css/modules/code.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions layui-v2.6.8/layui/css/modules/laydate/default/laydate.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dcd8920

Please sign in to comment.