Browse Source

默认主题优化

pull/4/merge
xiaoz 4 years ago
parent
commit
e653a8cfb1
  1. 4
      .htaccess
  2. 10
      templates/admin/static/style.css
  3. 3
      templates/default/index.php
  4. 27
      templates/default/static/embed.js

4
.htaccess

@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
RewriteEngine On
RewriteRule '^click\/(.*)$' /index.php?c=click&id=$1 [L]
RewriteRule '^api\/(.*)?(.*)$' /index.php?c=api&method=$1&$2 [L]
RewriteRule login /index.php?c=login [NC,L]

10
templates/admin/static/style.css

@ -50,4 +50,14 @@ @@ -50,4 +50,14 @@
}
.item i{
font-size: 1em;
}
/* msg弹窗提醒 */
.msg{
width:auto;
line-height: 16px;
position: fixed;
top:2em;
border: 1px #009933 solid;
border-radius: 3px;
display: none;
}

3
templates/default/index.php

@ -115,7 +115,7 @@ @@ -115,7 +115,7 @@
//var_dump($link);
?>
<div class="mdui-col-lg-3 mdui-col-md-4 mdui-col-xs-12 link-space" id = "id_<?php echo $link['id']; ?>" link-title = "<?php echo $link['title']; ?>">
<div class="mdui-col-lg-3 mdui-col-md-4 mdui-col-xs-12 link-space" id = "id_<?php echo $link['id']; ?>" link-title = "<?php echo $link['title']; ?>" link-url = "<?php echo $link['url']; ?>">
<!--定义一个卡片-->
<div class="mdui-card link-line mdui-hoverable">
<!-- 如果是私有链接,则显示角标 -->
@ -162,6 +162,7 @@ @@ -162,6 +162,7 @@
</script>
<script src = 'https://libs.xiaoz.top/jquery/2.2.4/jquery.min.js'></script>
<script src = 'https://libs.xiaoz.top/jQuery-contextMenu/2.9.2/jquery.contextMenu.min.js'></script>
<script src = 'https://libs.xiaoz.top/clipBoard.js/clipBoard.min.js'></script>
<script src = "templates/<?php echo TEMPLATE; ?>/static/holmes.js"></script>
<script src="templates/<?php echo TEMPLATE; ?>/static/embed.js?v=<?php echo $version; ?>"></script>
<script>

27
templates/default/static/embed.js

@ -54,6 +54,14 @@ function get_domain(){ @@ -54,6 +54,14 @@ function get_domain(){
domain = protocol + port + hostname;
return domain;
}
//弹窗
function msg(text){
$html = '<div class = "msg">' + text + '</div>';
$("body").append($html);
$(".msg").fadeIn();
$(".msg").fadeOut(5000);
$(".msg").remove();
}
function admin_menu() {
// 加载管理员右键菜单
@ -140,6 +148,25 @@ $.contextMenu({ @@ -140,6 +148,25 @@ $.contextMenu({
tempwindow.location='index.php?c=click&id='+link_id;
}},
"sep1": "---------",
"copy":{name:"复制链接",icon:"copy",callback:function(){
link_url = $(this).attr('link-url');
// 复制按钮
var copy = new clipBoard($(".context-menu-icon-copy"), {
beforeCopy: function() {
},
copy: function() {
return link_url;
},
afterCopy: function() {
// msg('链接已复制!');
mdui.alert('链接已复制!');
}
});
// 复制按钮END
}},
"qrcode": {name: "二维码", icon:"fa-qrcode",callback:function(data,status){
var link_title = $(this).attr('link-title');

Loading…
Cancel
Save