Skip to content

Commit 07927c7

Browse files
committed
cpytip
1 parent 1e319af commit 07927c7

File tree

8 files changed

+71
-45
lines changed

8 files changed

+71
-45
lines changed

README.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
11
![](res/logo/banner.png)
22

3-
## Get Started
3+
## PGFPlotsEdt - Faster to PGFPlot in LaTeX
4+
### A PGFPlots Statistic Graph Interactive Editor.
5+
<br>
6+
<a href="https://logcreative.github.io/PGFPlotsEdt/index.html?lang=en"><img src="https://img.shields.io/badge/lang-EN-9CF"></a>
7+
<a href="https://logcreative.github.io/PGFPlotsEdt/index.html?lang=cn"><img src="https://img.shields.io/badge/语言-中文-9CF"></a>
8+
<a href="https://github.com/LogCreative/PGFPlotsEdt/releases"><img src="https://img.shields.io/github/v/release/LogCreative/PGFPlotsEdt"></a>
9+
<a href="https://github.com/LogCreative/PGFPlotsEdt/blob/master/LICENSE"><img src="https://img.shields.io/github/license/LogCreative/PGFPlotsEdt"></a>
10+
<a href="https://github.com/LogCreative/PGFPlotsEdt/commits/master"><img src="https://img.shields.io/github/last-commit/LogCreative/PGFPlotsEdt"></a>
11+
<a href="https://logcreative.github.io/LaTeXSparkle/"><img src="https://img.shields.io/badge/Under-LaTeX%20Sparkle%20Project-yellowgreen"></a>
12+
13+
English <a href="https://logcreative.github.io/PGFPlotsEdt/"><img src="res/logo/logo.svg" width="16px">https://logcreative.github.io/PGFPlotsEdt/</a>
414

5-
<a href="https://logcreative.github.io/PGFPlotsEdt/"><img src="res/logo/logo.svg" width="16px">https://logcreative.github.io/PGFPlotsEdt/</a>
15+
中文 <a href="https://logcreative.github.io/PGFPlotsEdt/index.html?lang=cn"><img src="res/logo/logo.svg" width="16px">https://logcreative.github.io/PGFPlotsEdt/index.html?lang=cn</a>
616

717
PGFPlots is a remarkable package in LaTeX, to create precise, vectorized, and highly personalized statistic graphs. You could get more information about PGFPlots package on https://github.com/pgf-tikz/pgfplots, thank all those contributors for creating a useful package to plot in LaTeX natively.
818

@@ -16,6 +26,4 @@ TikzEdt is the inspiration of this project, to create LaTeX TikZ graph in WYSIWY
1626

1727
<a href="https://www.mathjax.org/" target="_blank"><img class="icon" src="res/poweredby/mathjax.ico" height="16px">MathJax</a> is the TeX typeset rendering machine for previewing the formula input.
1828

19-
<a href="https://github.com/LogCreative/PGFPlotsEdt/blob/master/LICENSE"><img src="https://img.shields.io/github/license/LogCreative/PGFPlotsEdt"></a>
20-
2129
>Copyright (c) 2020-2021 Log Creative & LaTeX Sparkle Project

index.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,9 +172,10 @@
172172
<div id="auto">
173173
<details id="codedetail">
174174
<summary>
175-
{{$t('Code')}} <button v-clipboard:copy="content" id="btnDrawCode" @mouseover="hintDrawCode" @mouseleave="blurDrawCode" :title="$t('code.cpydraw')"></button>
176-
<button v-clipboard:copy="file" id="btnAllCode" @mouseover="hintAllCode" @mouseleave="blurAllCode" :title="$t('code.cpyall')"></button>
175+
{{$t('Code')}} <button v-clipboard:copy="content" id="btnDrawCode" @mouseover="hintDrawCode" @mouseleave="blurDrawCode" :title="$t('code.cpydraw')" @click="copytip"></button>
176+
<button v-clipboard:copy="file" id="btnAllCode" @mouseover="hintAllCode" @mouseleave="blurAllCode" :title="$t('code.cpyall')" @click="copytip"></button>
177177
<button onclick="gomanual()" id="btnEdtCode" @mouseover="warnAllCode" @mouseleave="blurAllCode" :title="$t('code.manedt')"></button>
178+
<div id="cpytip">{{$t('cpytip')}}</div>
178179
</summary>
179180
<div id="texAllCode">
180181
<div class="texCode">
@@ -427,6 +428,8 @@
427428
<script src="https://cdn.bootcdn.net/ajax/libs/split.js/1.6.2/split.min.js"></script>
428429
<script src="https://cdn.bootcdn.net/ajax/libs/vue-i18n/8.24.3/vue-i18n.min.js"></script>
429430
<script src="js/style.js"></script>
431+
<script src="lang/cn.js"></script>
432+
<script src="lang/en.js"></script>
430433
<script src="lang/dict_en.js"></script>
431434
<script src="js/tpl.js"></script>
432435
<script src="main.js"></script>
@@ -444,6 +447,5 @@
444447
else
445448
document.getElementById('codedetail').open = false;
446449
</script>
447-
<script src="js/getVersion.js"></script>
448450
</body>
449451
</html>

js/getversion.js

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

js/style.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,4 +166,7 @@ var animforward = function(){
166166
clearInterval(waiter);
167167
},30);
168168
}
169-
};
169+
};
170+
171+
// Version
172+
document.getElementById("version").innerHTML = 'v2';

lang/cn.json renamed to lang/cn.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
const cn = {
22
"PGFPlotsEdt": "PGFPlots 统计绘图编辑器",
33
"Faster to PGFPlot in LaTeX": "PGFPlotsEdt",
44
"nav": {
@@ -117,5 +117,6 @@
117117
"tableparam": "表格参数",
118118
"col": "表列",
119119
"coord": "坐标数据"
120-
}
120+
},
121+
"cpytip": "复制成功",
121122
}

lang/en.json renamed to lang/en.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{
1+
const en = {
22
"PGFPlotsEdt": "PGFPlotsEdt",
33
"Faster to PGFPlot in LaTeX": "Faster to PGFPlot in LaTeX",
44
"nav": {
@@ -117,5 +117,6 @@
117117
"sort": "Sort",
118118
"tableparam": "Table Parameter",
119119
"coord": "Coordinate Data"
120-
}
120+
},
121+
"cpytip": "Copied to Clipboard",
121122
}

main.css

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,4 +612,33 @@ input[type=text]{
612612
.accordion .acccon{
613613
padding-top: 5px;
614614
vertical-align: text-top;
615+
}
616+
617+
#cpytip{
618+
display: inline-block;
619+
opacity: 0;
620+
color: white;
621+
background-color: green;
622+
padding: 5px;
623+
border-radius: 2px;
624+
font-size: small;
625+
}
626+
.playfadeout{
627+
animation-name: fadeout;
628+
}
629+
.restartfadeout{
630+
animation-name: fadeout1;
631+
}
632+
.playfadeout,
633+
.restartfadeout {
634+
animation-duration: 1s;
635+
animation-timing-function: cubic-bezier(0.785, 0.135, 0.15, 0.86);
636+
}
637+
@keyframes fadeout {
638+
from {opacity: 1; margin-left: 0px;}
639+
to {opacity: 0; margin-left: 30px;}
640+
}
641+
@keyframes fadeout1 {
642+
from {opacity: 1; margin-left: 0px;}
643+
to {opacity: 0; margin-left: 30px;}
615644
}

main.js

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,18 @@
22
var i18n = new VueI18n({
33
locale: in_lang,
44
messages:{
5-
cn: {},
6-
en: {}
5+
cn: cn,
6+
en: en
77
}
88
});
99

10-
i18n.cn = fetch('lang/cn.json').then(res=>res.json()).then(data=>{
11-
i18n.setLocaleMessage('cn',Object.assign(data));
12-
});
13-
i18n.en = fetch('lang/en.json').then(res=>res.json()).then(data=>{
14-
i18n.setLocaleMessage('en',Object.assign(data));
15-
});
10+
// Use JSON
11+
// i18n.cn = fetch('lang/cn.json').then(res=>res.json()).then(data=>{
12+
// i18n.setLocaleMessage('cn',Object.assign(data));
13+
// });
14+
// i18n.en = fetch('lang/en.json').then(res=>res.json()).then(data=>{
15+
// i18n.setLocaleMessage('en',Object.assign(data));
16+
// });
1617

1718
// 更新库列表
1819
var updatePkg = function(){
@@ -1326,6 +1327,12 @@ var app = new Vue({
13261327
head.appendChild(newscript);
13271328
if(oldscript) head.removeChild(oldscript);
13281329
},
1330+
copytip: function() {
1331+
var cpytip = document.getElementById('cpytip');
1332+
if(cpytip.classList.contains('playfadeout'))
1333+
cpytip.className = 'restartfadeout';
1334+
else cpytip.className = 'playfadeout';
1335+
},
13291336
compile: function() {
13301337
app.purl="";
13311338
var urlencoder = function(str){

0 commit comments

Comments
 (0)