-
Notifications
You must be signed in to change notification settings - Fork 4
/
styleMe.html
140 lines (138 loc) · 3.57 KB
/
styleMe.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>Test</title>
<script src="https://libs.baidu.com/jquery/2.0.3/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clipboard@2/dist/clipboard.min.js"></script>
<!--{{{-->
<style type="text/css" media="screen">
.infoUniversity{
border-radius: 21px;
box-shadow: 5px 5px 5px #888888;
color: #fff;
text-shadow: 1px 1px 3px #000;
font-size: 16px;
position: absolute;
width: 70%;
max-width: 400px;
height: 30%;
top: 60%;
left: 50%;
transform: translate(-50%, 0%);
overflow: hidden;
}
#open_map_trigger{
position: absolute;
right: 20px;
}
#open_maps{
display: none;
text-align: right;
padding-right: 10px;
}
#open_maps a{
color: white;
text-decoration: none;
font-size: 16px
}
#title_bar{
width: 100%;
height: 16%;
padding-top: 3%;
padding-bottom: 0%;
background-color: #fe8c0f;
opacity: 0.8;
}
#student_ul{
font-size: 15px;
width: 100%;
height: 84%;
overflow-y: scroll;
background-color: #f7b56a;
opacity: 0.9;
}
#student_ul ul{
padding-left: 30px
}
#student_ul ul li{
position: relative;
}
#student_ul ul ul{
padding-left: 25px;
}
#student_hilite{
color: yellow;
}
</style>
<!-- }}} -->
<style type="text/css" media="screen">
textarea {
position: absolute;
width: 80%;
height: 30%;
top: 10%;
left: 10%;
font-size: 18px;
word-break: break-all;
}
</style>
</head>
<body>
<script charset="utf-8">
var topn=8;left=-2;angle=-30;
$(function (){
new ClipboardJS('#copyit');
loadh()
update()
})
function loadh(newtext){
$("#html_input").val(`<li>张三\n<img style=\"position:absolute;top:${topn}px;left:${left}px;transform:rotateZ(${angle}deg);" width="50px" src="data/TG2019302/朱越.gif"/>\n<ul>\n<li>专业:一流专业</li>\n<li>电话:12345678901</li>\n</ul></li>`)
}
function update(){
$(".your_info").text("")
$($.parseHTML($("#html_input").val())).appendTo(".your_info")
$("#copyit").attr("data-clipboard-text", $("#html_input").val().replace(/(\r\n|\n|\r)/gm,"").replace(/"/gm, "\\\""))
}
function toggleOpenMap(){
$("#open_maps").slideToggle()
$("#student_ul").scrollTop(0);
}
function trans(dir){
if(dir==0){
topn-=1
}else if(dir==1){
topn+=1
}else if(dir==2){
left-=1
}else if(dir==3){
left+=1
}else{
angle=dir
}
loadh()
update()
}
</script>
<textarea id="html_input" onkeydown="setTimeout(update, 00)">
</textarea>
<button id="copyit" data-clipboard-action="copy">Copy</button>
<button style="position:relative;left:30px;" onClick="trans(0)">UP</button>
<button style="position:relative;left:35px;" onClick="trans(1)">DOWN</button>
<button style="position:relative;left:40px;" onClick="trans(2)">LEFT</button>
<button style="position:relative;left:45px;" onClick="trans(3)">RIGHT</button>
<input style="position:relative;left:55px;" type="range" min="-180" max="180" value="0" onchange="trans(this.value)" />
<div class="infoUniversity">
<div id="title_bar"><span> 清华大学</span><span id="open_map_trigger" onclick="toggleOpenMap()"><b>· · ·</b></span></div>
<div id="student_ul"><div id="open_maps"><a href="#">直接去蹭饭</a><br><a href="#">百度地图App</a><br><a href="#" target="blank">百度地图网页版</a></div>
<ul>
<span class="your_info"> </span>
<span class="your_info"> </span>
<span class="your_info"> </span>
</ul>
<p style="font-size: 12px; text-align: center"><br>轻触关闭窗口</p><br>
</div>
</div>
</body>
</html>