Skip to content
This repository was archived by the owner on May 9, 2019. It is now read-only.

Commit b147be2

Browse files
authored
Merge pull request #28 from aiwb/develop
匹配 typecho 默认主题
2 parents c90f7c5 + 6cb1336 commit b147be2

12 files changed

Lines changed: 96 additions & 503 deletions

static/css/font-awesome.min.css

Lines changed: 0 additions & 4 deletions
This file was deleted.

static/css/pure.css

Lines changed: 0 additions & 11 deletions
This file was deleted.

static/fonts/FontAwesome.otf

-61.4 KB
Binary file not shown.
-37.3 KB
Binary file not shown.

static/fonts/fontawesome-webfont.svg

Lines changed: 0 additions & 414 deletions
This file was deleted.
-78.8 KB
Binary file not shown.
-43.4 KB
Binary file not shown.

views/js.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,24 +51,24 @@ function init()
5151
plugin: $card.data('name')
5252
},
5353
beforeSend: function() {
54-
$this.attr('disabled', true).text('正在安装');
54+
$this.attr('disabled', true).text('安装中');
5555
}
5656
}).always(function() {
5757
$this.attr('disabled', false);
5858
}).fail(function() {
5959
alert('安装失败');
6060
if ($card.data('existed')) {
61-
$this.text('重新安装');
61+
$this.text('重装');
6262
} else {
63-
$this.text('立即安装');
63+
$this.text('安装');
6464
}
6565
}).done(function(result) {
6666
if (result.status) {
6767
$card.data('existed', 1);
6868
$version.data('activated', result.activated);
6969
$this.next().children('i').addClass('as-existed active');
7070
alert('安装成功');
71-
$this.removeClass('pure-button-primary').text('重新安装');
71+
window.location.reload();
7272
} else {
7373
alert(result.error);
7474
}

views/list.php

Lines changed: 43 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,44 @@
1-
<?php if ($result): ?>
2-
<table class="pure-table pure-table-bordered">
3-
<thead>
4-
<tr>
5-
<th>#</th>
6-
<th><?php echo _t('应用名称'); ?></th>
7-
<th><?php echo _t('应用描述'); ?></th>
8-
<th><?php echo _t('作者'); ?></th>
9-
<th><?php echo _t('版本'); ?></th>
10-
<th><?php echo _t('版本要求'); ?></th>
11-
<th><?php echo _t('安装'); ?></th>
12-
</tr>
13-
</thead>
14-
<tbody>
15-
<?php $index = 0;
16-
foreach ($result->packages as $plugin):
17-
$index++; ?>
18-
<tr class="as-card" data-name="<?php echo $plugin->name; ?>" data-existed="<?php echo $plugin->existed ?>">
19-
<td><?php echo $index; ?></td>
20-
<td><?php echo $plugin->name; ?></td>
21-
<td class="as-description"><?php echo $plugin->versions[0]->description; ?></td>
22-
<td class="as-author"><?php echo $plugin->versions[0]->author; ?></td>
23-
<td class="as-versions">
24-
<select class="as-version-selector">
25-
<?php foreach ($plugin->versions as $version): ?>
26-
<option value="<?php echo $version->version; ?>" data-activated="<?php echo $version->activated; ?>" data-author="<?php echo $version->author; ?>" data-require="<?php echo $version->require; ?>" data-description="<?php echo $version->description; ?>"><?php echo $version->version; ?></option>
27-
<?php endforeach; ?>
28-
</select>
29-
</td>
30-
<td class="as-require" style="white-space:nowrap;"><?php echo $plugin->versions[0]->require; ?></td>
31-
<td class="as-operations">
32-
<?php if ($this->installale): ?>
33-
<?php if ($plugin->existed): ?>
34-
<button class="pure-button as-install button-small"><?php echo _t("重新安装"); ?></button>
35-
<?php else: ?>
36-
<button class="pure-button pure-button-primary as-install button-small"><?php echo _t("立即安装"); ?></button>
37-
<?php endif; ?>
38-
<?php else: ?>
39-
<a class="pure-button button-small" onclick="return confirm('没有写入权限或者运行在云平台中\n点击确认后将进行下载,请手动传到服务器上!');" href="<?php echo $this->server.'archive/'.$plugin->name.'/'.str_replace(' ', '%20', $version->version);?>"><?php echo _t('下载'); ?></a>
40-
<?php endif; ?>
41-
</td>
42-
</tr>
43-
<?php endforeach; ?>
44-
</tbody>
45-
</table>
46-
<?php else: ?>
47-
<div class="message" style="width:20em;text-align: center;margin:0 auto">
48-
<p><i class="fa fa-frown-o" style="font-size: 5em"></i></p>
49-
<h3 style="font-size: 2em">没有找到任何插件</h3>
1+
<div class="col-mb-12 typecho-list">
2+
<h4 class="typecho-list-table-title">已安装的插件</h4>
3+
<div class="typecho-table-wrap">
4+
<?php if ($result): ?>
5+
<table class="typecho-list-table">
6+
<thead>
7+
<?php include 'row-title.php'; ?>
8+
</thead>
9+
<tbody>
10+
<?php foreach ($result->packages as $plugin):
11+
if ($plugin->existed) {
12+
include 'row.php';
13+
}
14+
endforeach; ?>
15+
</tbody>
16+
</table>
17+
<?php else: ?>
18+
<div class="message" style="width:20em;text-align: center;margin:0 auto">
19+
<h3 style="font-size: 2em">没有找到任何插件</h3>
20+
</div>
21+
<?php endif; ?>
5022
</div>
51-
<?php endif; ?>
23+
<h4 class="typecho-list-table-title">未安装的插件</h4>
24+
<div class="typecho-table-wrap">
25+
<?php if ($result): ?>
26+
<table class="typecho-list-table">
27+
<thead>
28+
<?php include 'row-title.php'; ?>
29+
</thead>
30+
<tbody>
31+
<?php foreach ($result->packages as $plugin):
32+
if (!$plugin->existed) {
33+
include 'row.php';
34+
}
35+
endforeach; ?>
36+
</tbody>
37+
</table>
38+
<?php else: ?>
39+
<div class="message" style="width:20em;text-align: center;margin:0 auto">
40+
<h3 style="font-size: 2em">没有找到任何插件</h3>
41+
</div>
42+
<?php endif; ?>
43+
</div>
44+
</div>

views/market.php

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,50 +6,47 @@
66
list($version, $buildVersion) = explode('/', Typecho_Common::VERSION);
77
$typechoVersion = floatval($version);
88
?>
9-
<link rel="stylesheet" href="<?php echo $options->pluginUrl('AppStore/static/css/font-awesome.min.css'); ?>">
10-
<link rel="stylesheet" href="<?php echo $options->pluginUrl('AppStore/static/css/pure.css'); ?>">
119
<style>
12-
.button-small {
13-
font-size: 85%;
10+
.as-name,
11+
.as-require,
12+
.as-author,
13+
.as-operations {
14+
white-space: nowrap;
1415
}
1516
</style>
1617
<?php if ($typechoVersion <= 0.8): ?>
1718
<div class="main">
18-
<div class="body body-950">
19-
<div class="container typecho-page-title">
19+
<div class="body container">
20+
<div class="typecho-page-title">
2021
<div class="column-24">
2122
<h2><?php echo $menu->title; ?> <small><cite>The missing plugins' store for Typecho</cite></small></h2>
2223
<div>
23-
<i class="fa fa-heart" title="<?php echo _t('提建议/吐槽专用'); ?>"></i>
24-
<a href="http://chekun.me/typecho-app-store.html" target="_blank"><?php echo _t('提建议/吐槽专用'); ?></a>
24+
<a href="https://github.com/chekun/AppStore/issues" target="_blank"><?php echo _t('提建议/吐槽专用'); ?></a>
2525
</div>
2626
</div>
2727
</div>
28-
<div class="container typecho-page-main">
28+
<div class="row typecho-page-main" role="main">
2929
<?php include 'list.php'; ?>
3030
</div>
3131
</div>
3232
</div>
3333
<?php else: ?>
3434
<div class="main">
3535
<div class="body container">
36-
<div class="colgroup">
37-
<div class="typecho-page-title col-mb-12">
38-
<h2>
39-
<?php echo $menu->title; ?> <small><cite>The missing plugins' store for Typecho</cite></small>
40-
<div style="float:right">
41-
<a href="http://chekun.me/typecho-app-store.html" target="_blank"><i class="fa fa-heart" title="<?php echo _t('提建议/吐槽专用'); ?>"></i><?php echo _t('提建议/吐槽专用'); ?></a>
42-
</div>
43-
</h2>
44-
</div>
36+
<div class="typecho-page-title">
37+
<h2>
38+
<?php echo $menu->title; ?> <small><cite>The missing plugins' store for Typecho</cite></small>
39+
<div style="float:right">
40+
<a href="https://github.com/chekun/AppStore/issues" target="_blank"><?php echo _t('提建议/吐槽专用'); ?></a>
41+
</div>
42+
</h2>
4543
</div>
46-
<div class="colgroup typecho-page-main" role="main">
44+
<div class="row typecho-page-main" role="main">
4745
<?php include 'list.php'; ?>
4846
</div>
4947
</div>
5048
</div>
5149
<?php endif; ?>
52-
5350
<?php
5451
include TYPEHO_ADMIN_PATH.'copyright.php';
5552
include TYPEHO_ADMIN_PATH.'common-js.php';

0 commit comments

Comments
 (0)