Compare commits
592 Commits
v1.0-14.10
...
v1.2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4be93f2741 | ||
|
|
6100695d87 | ||
|
|
0bdf8721e1 | ||
|
|
ce7af58367 | ||
|
|
1b673e06ff | ||
|
|
0edb48fae0 | ||
|
|
17fcb2f08b | ||
|
|
5f943d48b5 | ||
|
|
b23277267a | ||
|
|
b0d78a81dc | ||
|
|
f34d14280d | ||
|
|
13dc5e87dd | ||
|
|
0b021e5e7d | ||
|
|
00c75d2f75 | ||
|
|
1eedc481ad | ||
|
|
75899e287d | ||
|
|
047bd17f19 | ||
|
|
9c075dcdf0 | ||
|
|
157fc05265 | ||
|
|
c047669900 | ||
|
|
eee0228fed | ||
|
|
389b46635e | ||
|
|
919911e288 | ||
|
|
dd4bf889de | ||
|
|
0dcf45a152 | ||
|
|
ceaa545c7d | ||
|
|
01d9d0c3f5 | ||
|
|
6b46dd9c50 | ||
|
|
cb4457ab52 | ||
|
|
8a57b91343 | ||
|
|
c66b6e20ec | ||
|
|
b33a9c4d02 | ||
|
|
cac1c650a1 | ||
|
|
42e192340d | ||
|
|
b677f7db92 | ||
|
|
2fbc56dead | ||
|
|
d174cc5732 | ||
|
|
5557f6dd91 | ||
|
|
42fe6f7bf5 | ||
|
|
1f1019ba5b | ||
|
|
13d18e02cc | ||
|
|
e46acd815d | ||
|
|
432b69f70d | ||
|
|
0e750771ae | ||
|
|
fc9aaf66f3 | ||
|
|
ec495d7e24 | ||
|
|
f6b02ebe24 | ||
|
|
64b8e68688 | ||
|
|
4e5b88821d | ||
|
|
a003cffbbb | ||
|
|
7ef5fcabd5 | ||
|
|
3c4a0022c3 | ||
|
|
780c3b61f4 | ||
|
|
1d21ecac16 | ||
|
|
2d777ec061 | ||
|
|
5d20d57be9 | ||
|
|
3f14d6e138 | ||
|
|
1ee18ad532 | ||
|
|
419183ae2f | ||
|
|
0916631ae2 | ||
|
|
4186cdec6a | ||
|
|
cbb270ea89 | ||
|
|
d839f390ee | ||
|
|
26e8077e0a | ||
|
|
b5167dbe5d | ||
|
|
a1bf3d037b | ||
|
|
ed30a99655 | ||
|
|
bf2cb07e4b | ||
|
|
729dcf729a | ||
|
|
58cb9105d4 | ||
|
|
eb77897ab6 | ||
|
|
4ad930a31d | ||
|
|
fa222ba7a2 | ||
|
|
519e84e74c | ||
|
|
57106d85c9 | ||
|
|
a4883be588 | ||
|
|
96eb56fc35 | ||
|
|
a3d698c09e | ||
|
|
9bd4eaeae8 | ||
|
|
a31da6880d | ||
|
|
0759a9414a | ||
|
|
ee00fc567f | ||
|
|
5303124431 | ||
|
|
74b0f45a72 | ||
|
|
0f3f15c0ca | ||
|
|
cbfe180d8b | ||
|
|
d24a16ad23 | ||
|
|
6123f3ae62 | ||
|
|
89649522c7 | ||
|
|
675efe1e43 | ||
|
|
f40c5c178e | ||
|
|
5a2833c5aa | ||
|
|
c279ef1443 | ||
|
|
6cedf6a0a1 | ||
|
|
7068b2bbe1 | ||
|
|
4791cd978e | ||
|
|
403f96fdc0 | ||
|
|
86587d40ce | ||
|
|
7bd37f7d8c | ||
|
|
ecd21c2557 | ||
|
|
50dea3fc24 | ||
|
|
7db5f3c873 | ||
|
|
4f13adcadd | ||
|
|
ba0bfd3551 | ||
|
|
2fad7cc398 | ||
|
|
49eed7b437 | ||
|
|
d72d4ea2ab | ||
|
|
7ca696ce90 | ||
|
|
806409496a | ||
|
|
e2ca6a1fa7 | ||
|
|
e15c2966a9 | ||
|
|
93b5656109 | ||
|
|
539ef5e111 | ||
|
|
7a1b74b351 | ||
|
|
540fba3122 | ||
|
|
28f687e7fe | ||
|
|
91a970521c | ||
|
|
926ec3e117 | ||
|
|
23d52d44a1 | ||
|
|
cf9776ee43 | ||
|
|
a2e784113a | ||
|
|
38184ba5ba | ||
|
|
c422952c89 | ||
|
|
75672fe259 | ||
|
|
82fe09cf52 | ||
|
|
b0df985d66 | ||
|
|
09a320bf5d | ||
|
|
5163c43610 | ||
|
|
e20e6804e9 | ||
|
|
eeb893485b | ||
|
|
80746465c7 | ||
|
|
0e4391006c | ||
|
|
c84fa39c4f | ||
|
|
687a4c8e26 | ||
|
|
92cb7834e2 | ||
|
|
88fff899b8 | ||
|
|
5d2aef0dac | ||
|
|
75d5677d7d | ||
|
|
687ab6260a | ||
|
|
30baad977c | ||
|
|
c8c4d9e079 | ||
|
|
92debef3e3 | ||
|
|
1c189588db | ||
|
|
0177a0557a | ||
|
|
6855e9f1f3 | ||
|
|
478ec92491 | ||
|
|
256fff6b24 | ||
|
|
31ed159312 | ||
|
|
b3b9255c69 | ||
|
|
22cadcc884 | ||
|
|
df854a3bf0 | ||
|
|
5b58d71b61 | ||
|
|
fc0485c891 | ||
|
|
78a4cc9f84 | ||
|
|
29cf8a070d | ||
|
|
45c8b22ba7 | ||
|
|
d0cedde7c0 | ||
|
|
efc5bf5c51 | ||
|
|
24bd3ab367 | ||
|
|
954e710013 | ||
|
|
4b97110087 | ||
|
|
3d0b5d5f6c | ||
|
|
44aef6c707 | ||
|
|
8f61e2155c | ||
|
|
467471c9c3 | ||
|
|
423c99f3bd | ||
|
|
7f3cd2b9e8 | ||
|
|
12bd32babf | ||
|
|
3dabb7b8d8 | ||
|
|
10dd9344b8 | ||
|
|
3ad7b06c6f | ||
|
|
e157b47336 | ||
|
|
63dc87e7e3 | ||
|
|
2731e34db0 | ||
|
|
0d4299d99e | ||
|
|
bac7340c2a | ||
|
|
21a57903a9 | ||
|
|
39fcd8d513 | ||
|
|
371b88f9f8 | ||
|
|
a1168057a8 | ||
|
|
a38571bc64 | ||
|
|
79179fb65a | ||
|
|
27e6801e15 | ||
|
|
3dd592ae59 | ||
|
|
454302b3a1 | ||
|
|
3da4d660ec | ||
|
|
cb4778d6c4 | ||
|
|
d7a48ce086 | ||
|
|
ca1dcbf8da | ||
|
|
98bf0a3b6c | ||
|
|
70068ed5a1 | ||
|
|
db6825a33d | ||
|
|
f6d0627a77 | ||
|
|
50c23c44c5 | ||
|
|
ac74c6e0cb | ||
|
|
4861a40b9e | ||
|
|
0e49d186f5 | ||
|
|
13ac6f1c70 | ||
|
|
6164d92173 | ||
|
|
2f6a0c6f36 | ||
|
|
b2f1f46528 | ||
|
|
54af368084 | ||
|
|
0dbc14da02 | ||
|
|
60fdcae8e5 | ||
|
|
27ebdf09f0 | ||
|
|
6558fd5e03 | ||
|
|
5afcfbf3df | ||
|
|
b80bce520c | ||
|
|
cc078d6f6a | ||
|
|
a85c242e09 | ||
|
|
714e8788e8 | ||
|
|
bd4ffc5e1d | ||
|
|
95ef1d562e | ||
|
|
3fdaed97e3 | ||
|
|
f775a3e490 | ||
|
|
eba20a69f0 | ||
|
|
452be71d87 | ||
|
|
99df2bae64 | ||
|
|
834e4722a0 | ||
|
|
3b7d2dc319 | ||
|
|
e563687451 | ||
|
|
ab6284abf7 | ||
|
|
63b71df244 | ||
|
|
f8d39927ce | ||
|
|
f9dfb1bb85 | ||
|
|
1cc3066569 | ||
|
|
cee119eb4d | ||
|
|
269832aa85 | ||
|
|
74c8143825 | ||
|
|
bba332531b | ||
|
|
06876225c1 | ||
|
|
a26e2d5a33 | ||
|
|
cacb854d42 | ||
|
|
a387458fc6 | ||
|
|
b8f8c4c489 | ||
|
|
d8fe9e0463 | ||
|
|
0b68fa8b14 | ||
|
|
65455bc67e | ||
|
|
a4bcd37dae | ||
|
|
31072a0726 | ||
|
|
75227b3bac | ||
|
|
38f959890d | ||
|
|
77ef00e1a0 | ||
|
|
09a81d394c | ||
|
|
78e2dfbde8 | ||
|
|
3413dfd7ce | ||
|
|
371e6c9884 | ||
|
|
6398551ac3 | ||
|
|
beeeab869d | ||
|
|
408cb56ce1 | ||
|
|
029579be4d | ||
|
|
5ba2f03206 | ||
|
|
691b43bc48 | ||
|
|
3cc75893da | ||
|
|
3afd22c12c | ||
|
|
3bba7cd9dd | ||
|
|
0020814e18 | ||
|
|
8d2aa236b1 | ||
|
|
d695ce3ce5 | ||
|
|
ac1527ce43 | ||
|
|
9948a62557 | ||
|
|
75237e6a44 | ||
|
|
c17bdaf606 | ||
|
|
147f7ede98 | ||
|
|
5abd915678 | ||
|
|
64a66be475 | ||
|
|
71c72c7926 | ||
|
|
6d27a24fb8 | ||
|
|
2e2835ce6b | ||
|
|
664d8bcb23 | ||
|
|
4df129b01c | ||
|
|
32c2f8217d | ||
|
|
91d83d40b1 | ||
|
|
0cf11bb933 | ||
|
|
4155491719 | ||
|
|
8045a0d403 | ||
|
|
57a5857c1f | ||
|
|
632ac977ee | ||
|
|
247aa9e043 | ||
|
|
9f8491076f | ||
|
|
f4a34e0d7b | ||
|
|
b6626e42d8 | ||
|
|
26b70e2af8 | ||
|
|
586492e1b8 | ||
|
|
430649df81 | ||
|
|
3050aa98ab | ||
|
|
1e7e7e7997 | ||
|
|
235888cc3e | ||
|
|
0b1096c588 | ||
|
|
ad10000aca | ||
|
|
a6fe58e5b2 | ||
|
|
e492f9df4d | ||
|
|
350b2edb2b | ||
|
|
b70d240d3a | ||
|
|
6fbb65487c | ||
|
|
b497004516 | ||
|
|
a920bffd77 | ||
|
|
df7aeda761 | ||
|
|
2a8b11f48b | ||
|
|
c2a71c2f19 | ||
|
|
94ddb69311 | ||
|
|
27dce21870 | ||
|
|
e942452197 | ||
|
|
d93af07d31 | ||
|
|
3303b435ad | ||
|
|
03f237b32f | ||
|
|
cbc08861f4 | ||
|
|
df5f747975 | ||
|
|
02929ea4f5 | ||
|
|
ee409f1ee1 | ||
|
|
1d56948c4d | ||
|
|
8d4c8698de | ||
|
|
e72e723c1e | ||
|
|
68db3cd2ab | ||
|
|
a2d21f1042 | ||
|
|
c0965ad200 | ||
|
|
6530443e41 | ||
|
|
93a4bbdc20 | ||
|
|
92a40c87a5 | ||
|
|
d745863e54 | ||
|
|
717a3b1afa | ||
|
|
dd2876f484 | ||
|
|
10593d8172 | ||
|
|
7900c1b740 | ||
|
|
13c1986f02 | ||
|
|
76c7eb757b | ||
|
|
09d9c3a944 | ||
|
|
1e0b2bca4b | ||
|
|
9e78add245 | ||
|
|
143eeaa7b5 | ||
|
|
a622aa41d7 | ||
|
|
307f0e0823 | ||
|
|
04ff4b4c9c | ||
|
|
b04996d917 | ||
|
|
eae806390b | ||
|
|
96570e93b9 | ||
|
|
4ce7490b3b | ||
|
|
3848176990 | ||
|
|
02dd3f997f | ||
|
|
82212edba0 | ||
|
|
2ff40c4869 | ||
|
|
8c5f967f86 | ||
|
|
c3abcccf35 | ||
|
|
42495b36a3 | ||
|
|
2e9f64a7f7 | ||
|
|
72ebc723b7 | ||
|
|
b59785563f | ||
|
|
88b1aa465c | ||
|
|
1e82962b37 | ||
|
|
f2731b7263 | ||
|
|
f3dab3996d | ||
|
|
dd79918d2e | ||
|
|
c57f34b3eb | ||
|
|
19450df26b | ||
|
|
1a2dd1a812 | ||
|
|
1faf5b2199 | ||
|
|
d70998ac81 | ||
|
|
ab180aa385 | ||
|
|
b8788c9e7e | ||
|
|
452fac4099 | ||
|
|
97390a2af5 | ||
|
|
77df79871b | ||
|
|
f180e8452d | ||
|
|
5f3620e058 | ||
|
|
abcecb124d | ||
|
|
4a5f1aece1 | ||
|
|
10a40c4683 | ||
|
|
dabbdc8af9 | ||
|
|
72c236f651 | ||
|
|
36742a6fdb | ||
|
|
fee8bcc63c | ||
|
|
cf002bb0c0 | ||
|
|
425add976d | ||
|
|
5da128b0c7 | ||
|
|
20732c1e89 | ||
|
|
5c2276c73f | ||
|
|
f2dc80592e | ||
|
|
79dfede306 | ||
|
|
827a085c5e | ||
|
|
bf4408d6da | ||
|
|
a48f7ea48b | ||
|
|
b68c45ca93 | ||
|
|
adfbc6ca28 | ||
|
|
b3dbef1377 | ||
|
|
9e1b61e0f0 | ||
|
|
c056f6c895 | ||
|
|
ac1c62a07d | ||
|
|
93bcd46d55 | ||
|
|
a214977c83 | ||
|
|
01d3badc9b | ||
|
|
9884a2fc76 | ||
|
|
7a2b374526 | ||
|
|
92f81b3004 | ||
|
|
95e62ce30a | ||
|
|
3517eff4de | ||
|
|
8191c8fcea | ||
|
|
ed0af49767 | ||
|
|
adafe05caf | ||
|
|
da1e1b8d3b | ||
|
|
ef4ee2f9b0 | ||
|
|
f955076905 | ||
|
|
fefedb3866 | ||
|
|
7d229b55ee | ||
|
|
e277141c97 | ||
|
|
242fc1a4cb | ||
|
|
eeedef972a | ||
|
|
0e7b399ba8 | ||
|
|
eaa7d28823 | ||
|
|
b97289f7eb | ||
|
|
6005d80b20 | ||
|
|
55c676d6a5 | ||
|
|
b1c0185d85 | ||
|
|
ed8a847ae6 | ||
|
|
f3a28f38e2 | ||
|
|
ae684c3a82 | ||
|
|
3c171785d2 | ||
|
|
949b487445 | ||
|
|
d953e32003 | ||
|
|
c3c6723d7b | ||
|
|
bcfbc07bac | ||
|
|
0ba45f1006 | ||
|
|
13fc1b7169 | ||
|
|
ac11ff4cc9 | ||
|
|
a5c3e5aca7 | ||
|
|
f2ba3071fd | ||
|
|
c1584509e2 | ||
|
|
aa2eac4dcc | ||
|
|
3d8fbc8a61 | ||
|
|
43995a346d | ||
|
|
4ac142ce9e | ||
|
|
2849cc089d | ||
|
|
2627638192 | ||
|
|
43653242ed | ||
|
|
d486a30a6d | ||
|
|
80b5323fe2 | ||
|
|
41751a3625 | ||
|
|
eb68b52800 | ||
|
|
24cc1f5a5e | ||
|
|
9bcfc8141a | ||
|
|
776e45473c | ||
|
|
62d0013d41 | ||
|
|
3bf5d07fa2 | ||
|
|
597ff5ec11 | ||
|
|
a1b1915dfb | ||
|
|
56dfd2f093 | ||
|
|
8043d96d03 | ||
|
|
f88cd44d52 | ||
|
|
98ed395962 | ||
|
|
966ecf74f1 | ||
|
|
5cb34a6e82 | ||
|
|
16a74d5cc9 | ||
|
|
b3ce12c575 | ||
|
|
a159292173 | ||
|
|
93a3229c6d | ||
|
|
9122d2ab49 | ||
|
|
7cdc244d95 | ||
|
|
1366f44ada | ||
|
|
47e10dcf53 | ||
|
|
9b03f1b5a2 | ||
|
|
909145058f | ||
|
|
b008bfbc96 | ||
|
|
2f2c2d5910 | ||
|
|
8ac2087abc | ||
|
|
694a22a295 | ||
|
|
44497599f6 | ||
|
|
14f75b001c | ||
|
|
cca12d16e3 | ||
|
|
3a438d1084 | ||
|
|
2fe30b0837 | ||
|
|
e241ff09b0 | ||
|
|
e39183915b | ||
|
|
43f3e686c6 | ||
|
|
3b9ae9c498 | ||
|
|
f2ebf4b10a | ||
|
|
b9dc6a61ad | ||
|
|
03f928d4d9 | ||
|
|
8ac87dd5b2 | ||
|
|
c5e1e3c6df | ||
|
|
1372cc4242 | ||
|
|
6bcae91008 | ||
|
|
134a300861 | ||
|
|
8150e1a6a0 | ||
|
|
42eb5c4744 | ||
|
|
7653c5e0ff | ||
|
|
325f0e3486 | ||
|
|
cca53464df | ||
|
|
f28e909987 | ||
|
|
e25022ecc1 | ||
|
|
820828757a | ||
|
|
a40767a01d | ||
|
|
12c4b8fe98 | ||
|
|
627e5cf54e | ||
|
|
cc8449b67e | ||
|
|
280bc71c0c | ||
|
|
d2631fde2b | ||
|
|
c968abae08 | ||
|
|
b675161c79 | ||
|
|
0a04ab9924 | ||
|
|
cd65eaf6cb | ||
|
|
89293e80aa | ||
|
|
437ba872c1 | ||
|
|
8d04c20ed5 | ||
|
|
a2e519beeb | ||
|
|
37ab647895 | ||
|
|
0464ad729c | ||
|
|
7195666f09 | ||
|
|
1ab9e68f0f | ||
|
|
8553a8b6b9 | ||
|
|
0d371d4816 | ||
|
|
0082816f53 | ||
|
|
26745edeb5 | ||
|
|
394b93bbd2 | ||
|
|
2903f6a191 | ||
|
|
59bc86ff46 | ||
|
|
ed974cd9fe | ||
|
|
87a0479324 | ||
|
|
93a3bc5c4c | ||
|
|
30cbefc453 | ||
|
|
2613916d15 | ||
|
|
55dff6347a | ||
|
|
86ae20bfbb | ||
|
|
44141c5727 | ||
|
|
d6fc7f182f | ||
|
|
2200d86e8a | ||
|
|
1c140a563a | ||
|
|
c58a9530b1 | ||
|
|
eca450855e | ||
|
|
43087d6370 | ||
|
|
d10701f743 | ||
|
|
3955ccd85b | ||
|
|
50b2b9c591 | ||
|
|
32249ab897 | ||
|
|
e311837418 | ||
|
|
35d2908934 | ||
|
|
925daaeb63 | ||
|
|
a498669ad8 | ||
|
|
e3cdc44edc | ||
|
|
1d1b79b6cf | ||
|
|
1ccd804a40 | ||
|
|
6f6cf15674 | ||
|
|
a98472c1bb | ||
|
|
cc622f9ccc | ||
|
|
6ad6511762 | ||
|
|
fe76665687 | ||
|
|
2666641560 | ||
|
|
37be2afa98 | ||
|
|
b257d053f6 | ||
|
|
ce8bb8c349 | ||
|
|
9e2a8214a9 | ||
|
|
ae7b2f49b0 | ||
|
|
f5944fa138 | ||
|
|
6ef4219b2a | ||
|
|
3d4b7babb4 | ||
|
|
53a2ce64b4 | ||
|
|
e4e0ace9a9 | ||
|
|
5f72999a44 | ||
|
|
2aaaf9df05 | ||
|
|
e6e3cec3f1 | ||
|
|
65637a33d1 | ||
|
|
5c0ed25684 | ||
|
|
a867645e45 | ||
|
|
bcbb02b81e | ||
|
|
b54c3fb085 | ||
|
|
a0dedafc10 | ||
|
|
4bb88fa79b | ||
|
|
8fa7ddca6d | ||
|
|
b0c4cc77a7 | ||
|
|
c904005498 | ||
|
|
8fd7492840 | ||
|
|
59f4604eb6 | ||
|
|
2b120ded77 | ||
|
|
f062a78768 | ||
|
|
6e8c0f6c89 | ||
|
|
cd971ea91e | ||
|
|
63b5e48805 | ||
|
|
9d84c8f596 | ||
|
|
11bb981c99 | ||
|
|
2b2a7e907b | ||
|
|
93be22e596 | ||
|
|
57947d05e4 | ||
|
|
49cae68578 | ||
|
|
381574c1c9 | ||
|
|
ac47e05b93 | ||
|
|
72eedcdf14 | ||
|
|
1225b0c0fd | ||
|
|
9c5c404c71 | ||
|
|
4fc76a4dc3 | ||
|
|
410c603cbd | ||
|
|
09ba4cdde4 | ||
|
|
f1726cf815 | ||
|
|
1e69fdbb53 | ||
|
|
04b1ef83d2 |
14
.editorconfig
Normal file
@@ -0,0 +1,14 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.yml]
|
||||
indent_size = 2
|
||||
|
||||
[*.scss]
|
||||
indent_size = 2
|
||||
|
||||
[*.php]
|
||||
insert_final_newline = true
|
||||
14
.github/ISSUE_TEMPLATE.md
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
### 1. 该问题的重现步骤是什么?
|
||||
|
||||
### 2. 你期待的结果是什么?实际看到的又是什么?
|
||||
|
||||
### 3. 问题出现的环境
|
||||
|
||||
- 操作系统版本:
|
||||
- Apache/NGINX 版本:
|
||||
- 数据库版本:
|
||||
- PHP 版本:
|
||||
- Typecho 版本:
|
||||
- 浏览器版本:
|
||||
|
||||
[//]: # (如有图片请附上截图)
|
||||
64
.github/workflows/Typecho-dev-Ci.yml
vendored
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Typecho Dev Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
php:
|
||||
name: PHP ${{ matrix.php }} Tests
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci')"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
php: ['7.2', '7.3', '7.4', '8.0', '8.1']
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP only
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
- name: Test
|
||||
run: |
|
||||
find . -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" )
|
||||
build:
|
||||
name: Typecho Build
|
||||
runs-on: ubuntu-latest
|
||||
if: "!contains(github.event.head_commit.message, 'skip ci') && github.event_name != 'pull_request'"
|
||||
needs:
|
||||
- php
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cp -r LICENSE.txt index.php install.php admin install usr var build/
|
||||
mkdir build/usr/uploads/
|
||||
chmod 755 build/usr/uploads/
|
||||
rm -rf build/admin/src
|
||||
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
|
||||
- name: Upload a Build Artifact
|
||||
uses: WebFreak001/deploy-nightly@v1.1.0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: https://uploads.github.com/repos/typecho/typecho/releases/49532662/assets{?name,label}
|
||||
release_id: 49532662
|
||||
asset_path: ./typecho.zip
|
||||
asset_name: typecho.zip
|
||||
asset_content_type: application/zip
|
||||
max_releases: 1
|
||||
- name: Trigger build
|
||||
run: |
|
||||
curl -XPOST -H "Authorization: token ${{ secrets.WORKFLOW_TOKEN }}" \
|
||||
-H "Accept: application/vnd.github.everest-preview+json" \
|
||||
-H "Content-Type: application/json" \
|
||||
https://api.github.com/repos/typecho/languages/actions/workflows/update.yml/dispatches --data '{"ref": "master"}'
|
||||
|
||||
39
.github/workflows/Typecho-release-Ci.yml
vendored
Normal file
@@ -0,0 +1,39 @@
|
||||
name: Typecho Build Release Ci
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cp -r LICENSE.txt index.php install.php admin install usr var build/
|
||||
mkdir build/usr/uploads/
|
||||
chmod 755 build/usr/uploads/
|
||||
rm -rf build/admin/src
|
||||
cd build && zip -q -r typecho.zip * && mv typecho.zip ../ && cd -
|
||||
- name: Create Release
|
||||
id: create_release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
draft: true
|
||||
prerelease: false
|
||||
- name: Upload Release Asset
|
||||
id: upload-release-asset
|
||||
uses: actions/upload-release-asset@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
||||
asset_path: ./typecho.zip
|
||||
asset_name: typecho.zip
|
||||
asset_content_type: application/zip
|
||||
8
.gitignore
vendored
@@ -24,5 +24,13 @@
|
||||
*.sublime*
|
||||
.sass-cache
|
||||
config.rb
|
||||
prepros.config
|
||||
/config.inc.php
|
||||
/usr/uploads/
|
||||
/usr/*.db
|
||||
/usr/plugins/
|
||||
!/usr/plugins/HelloWorld
|
||||
/usr/themes/
|
||||
!/usr/themes/default
|
||||
node_modules/
|
||||
/tools/tmp/
|
||||
|
||||
48
.phpstorm.meta.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace PHPSTORM_META {
|
||||
override(\Typecho\Widget::widget(0), map([
|
||||
'' => '@'
|
||||
]));
|
||||
|
||||
exitPoint(\Typecho\Widget\Response::redirect());
|
||||
exitPoint(\Typecho\Widget\Response::throwContent());
|
||||
exitPoint(\Typecho\Widget\Response::throwFile());
|
||||
exitPoint(\Typecho\Widget\Response::throwJson());
|
||||
exitPoint(\Typecho\Widget\Response::throwXml());
|
||||
exitPoint(\Typecho\Widget\Response::goBack());
|
||||
|
||||
override(\Widget\Options::__get(0), map([
|
||||
'feedUrl' => string,
|
||||
'feedRssUrl' => string,
|
||||
'feedAtomUrl' => string,
|
||||
'commentsFeedUrl' => string,
|
||||
'commentsFeedRssUrl' => string,
|
||||
'commentsFeedAtomUrl' => string,
|
||||
'xmlRpcUrl' => string,
|
||||
'index' => string,
|
||||
'siteUrl' => string,
|
||||
'routingTable' => \ArrayObject::class,
|
||||
'rootUrl' => string,
|
||||
'themeUrl' => string,
|
||||
'pluginUrl' => string,
|
||||
'adminUrl' => string,
|
||||
'loginUrl' => string,
|
||||
'loginAction' => string,
|
||||
'registerUrl' => string,
|
||||
'registerAction' => string,
|
||||
'profileUrl' => string,
|
||||
'logoutUrl' => string,
|
||||
'serverTimezone' => int,
|
||||
'contentType' => string,
|
||||
'software' => string,
|
||||
'version' => string,
|
||||
'markdown' => int,
|
||||
'allowedAttachmentTypes'=> \ArrayObject::class
|
||||
]));
|
||||
|
||||
override(\Typecho\Widget::__get(0), map([
|
||||
'sequence' => int,
|
||||
'length' => int
|
||||
]));
|
||||
}
|
||||
12
.travis.yml
@@ -1,12 +0,0 @@
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 5.6
|
||||
- 5.5
|
||||
- 5.4
|
||||
- 5.3
|
||||
- 5.2
|
||||
- hhvm
|
||||
|
||||
script: cd ./tools/ && set -e && make test
|
||||
|
||||
128
CODE_OF_CONDUCT.md
Normal file
@@ -0,0 +1,128 @@
|
||||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
admin@typecho.org.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
||||
14
README.md
@@ -1,15 +1,19 @@
|
||||
Typecho Blogging Platform
|
||||
=========================
|
||||
|
||||
####Homepage
|
||||
Typecho is a PHP Blogging Platform. Simple and Powerful.
|
||||
|
||||
#### Telegram Channel
|
||||
https://t.me/typechodev
|
||||
|
||||
#### Homepage
|
||||
http://typecho.org/
|
||||
|
||||
####Document
|
||||
#### Documents
|
||||
http://docs.typecho.org/
|
||||
|
||||
####Forum
|
||||
#### Community
|
||||
http://forum.typecho.org/
|
||||
|
||||
####Download
|
||||
#### Download
|
||||
http://typecho.org/download
|
||||
|
||||
|
||||
106
admin/backup.php
Normal file
@@ -0,0 +1,106 @@
|
||||
<?php
|
||||
include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$actionUrl = $security->getTokenUrl(
|
||||
\Typecho\Router::url('do', array('action' => 'backup', 'widget' => 'Backup'),
|
||||
\Typecho\Common::url('index.php', $options->rootUrl)));
|
||||
|
||||
$backupFiles = \Widget\Backup::alloc()->listFiles();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 col-tb-8">
|
||||
<div id="typecho-welcome">
|
||||
<form action="<?php echo $actionUrl; ?>" method="post">
|
||||
<h3><?php _e('备份您的数据'); ?></h3>
|
||||
<ul>
|
||||
<li><?php _e('此备份操作仅包含<strong>内容数据</strong>, 并不会涉及任何<strong>设置信息</strong>'); ?></li>
|
||||
<li><?php _e('如果您的数据量过大, 为了避免操作超时, 建议您直接使用数据库提供的备份工具备份数据'); ?></li>
|
||||
<li><strong class="warning"><?php _e('为了缩小备份文件体积, 建议您在备份前删除不必要的数据'); ?></strong></li>
|
||||
</ul>
|
||||
<p><button class="btn primary" type="submit"><?php _e('开始备份 »'); ?></button></p>
|
||||
<input tabindex="1" type="hidden" name="do" value="export">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="backup-secondary" class="col-mb-12 col-tb-4" role="form">
|
||||
<h3><?php _e('恢复数据'); ?></h3>
|
||||
<ul class="typecho-option-tabs clearfix">
|
||||
<li class="active w-50"><a href="#from-upload"><?php _e('上传'); ?></a></li>
|
||||
<li class="w-50"><a href="#from-server"><?php _e('从服务器'); ?></a></li>
|
||||
</ul>
|
||||
|
||||
<form action="<?php echo $actionUrl; ?>" id="from-upload" class="tab-content" method="post" enctype="multipart/form-data">
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<input tabindex="2" id="backup-upload-file" name="file" type="file" class="file">
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="typecho-option typecho-option-submit">
|
||||
<li>
|
||||
<button tabindex="4" type="submit" class="btn primary"><?php _e('上传并恢复 »'); ?></button>
|
||||
<input type="hidden" name="do" value="import">
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
|
||||
<form action="<?php echo $actionUrl; ?>" id="from-server" class="tab-content hidden" method="post">
|
||||
<?php if (empty($backupFiles)): ?>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<p class="description"><?php _e('将备份文件手动上传至服务器的 %s 目录下后, 这里会出现文件选项', __TYPECHO_BACKUP_DIR__); ?></p>
|
||||
</li>
|
||||
</ul>
|
||||
<?php else: ?>
|
||||
<ul class="typecho-option">
|
||||
<li>
|
||||
<label class="typecho-label" for="backup-select-file"><?php _e('选择一个备份文件恢复数据'); ?></label>
|
||||
<select tabindex="5" name="file" id="backup-select-file">
|
||||
<?php foreach ($backupFiles as $file): ?>
|
||||
<option value="<?php echo $file; ?>"><?php echo $file; ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</li>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<ul class="typecho-option typecho-option-submit">
|
||||
<li>
|
||||
<button tabindex="7" type="submit" class="btn primary"><?php _e('选择并恢复 »'); ?></button>
|
||||
<input type="hidden" name="do" value="import">
|
||||
</li>
|
||||
</ul>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
?>
|
||||
<script>
|
||||
$('#backup-secondary .typecho-option-tabs li').click(function() {
|
||||
$('#backup-secondary .typecho-option-tabs li').removeClass('active');
|
||||
$(this).addClass('active');
|
||||
$(this).parents('#backup-secondary').find('.tab-content').addClass('hidden');
|
||||
|
||||
var selected_tab = $(this).find('a').attr('href');
|
||||
$(selected_tab).removeClass('hidden');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#backup-secondary form').submit(function (e) {
|
||||
if (!confirm('<?php _e('恢复操作将清除所有现有数据, 是否继续?'); ?>')) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-6 col-tb-offset-3">
|
||||
<?php Typecho_Widget::widget('Widget_Metas_Category_Edit')->form()->render(); ?>
|
||||
<?php \Widget\Metas\Category\Edit::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery-ui.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'typecho.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'jquery-ui.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'typecho.js'); ?>"></script>
|
||||
<script>
|
||||
(function () {
|
||||
$(document).ready(function() {
|
||||
// 处理消息机制
|
||||
(function () {
|
||||
var prefix = '<?php echo Typecho_Cookie::getPrefix(); ?>',
|
||||
var prefix = '<?php echo \Typecho\Cookie::getPrefix(); ?>',
|
||||
cookies = {
|
||||
notice : $.cookie(prefix + '__typecho_notice'),
|
||||
noticeType : $.cookie(prefix + '__typecho_notice_type'),
|
||||
highlight : $.cookie(prefix + '__typecho_notice_highlight')
|
||||
},
|
||||
path = '<?php echo Typecho_Cookie::getPath(); ?>';
|
||||
path = '<?php echo \Typecho\Cookie::getPath(); ?>';
|
||||
|
||||
if (!!cookies.notice && 'success|notice|error'.indexOf(cookies.noticeType) >= 0) {
|
||||
var head = $('.typecho-head-nav'),
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
|
||||
t.effect('highlight', {color : color})
|
||||
.delay(5000).slideUp(function () {
|
||||
.delay(5000).fadeOut(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
});
|
||||
@@ -76,16 +76,33 @@
|
||||
|
||||
|
||||
// 导航菜单 tab 聚焦时展开下拉菜单
|
||||
(function () {
|
||||
$('#typecho-nav-list').find('.parent a').focus(function() {
|
||||
$('#typecho-nav-list').find('.child').hide();
|
||||
$(this).parents('.root').find('.child').show();
|
||||
});
|
||||
$('.operate').find('a').focus(function() {
|
||||
$('#typecho-nav-list').find('.child').hide();
|
||||
});
|
||||
})();
|
||||
const menuBar = $('.menu-bar').click(function () {
|
||||
const nav = $(this).next('#typecho-nav-list');
|
||||
if (!$(this).toggleClass('focus').hasClass('focus')) {
|
||||
nav.removeClass('expanded noexpanded');
|
||||
}
|
||||
});
|
||||
|
||||
$('.main, .typecho-foot').on('click touchstart', function () {
|
||||
if (menuBar.hasClass('focus')) {
|
||||
menuBar.trigger('click');
|
||||
}
|
||||
});
|
||||
|
||||
$('#typecho-nav-list ul.root').each(function () {
|
||||
const ul = $(this), nav = ul.parent();
|
||||
|
||||
ul.on('click touchend', '.parent a', function (e) {
|
||||
nav.removeClass('noexpanded').addClass('expanded');
|
||||
if ($(window).width() < 576 && e.type == 'click') {
|
||||
return false;
|
||||
}
|
||||
}).find('.child')
|
||||
.append($('<li class="return"><a><?php _e('返回'); ?></a></li>').click(function () {
|
||||
nav.removeClass('expanded').addClass('noexpanded');
|
||||
return false;
|
||||
}));
|
||||
});
|
||||
|
||||
if ($('.typecho-login').length == 0) {
|
||||
$('a').each(function () {
|
||||
@@ -93,13 +110,18 @@
|
||||
|
||||
if ((href && href[0] == '#')
|
||||
|| /^<?php echo preg_quote($options->adminUrl, '/'); ?>.*$/.exec(href)
|
||||
|| /^<?php echo substr(preg_quote(Typecho_Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
|
||||
|| /^<?php echo substr(preg_quote(\Typecho\Common::url('s', $options->index), '/'), 0, -1); ?>action\/[_a-zA-Z0-9\/]+.*$/.exec(href)) {
|
||||
return;
|
||||
}
|
||||
|
||||
t.attr('target', '_blank');
|
||||
t.attr('target', '_blank')
|
||||
.attr('rel', 'noopener noreferrer');
|
||||
});
|
||||
}
|
||||
|
||||
$('.main form').submit(function () {
|
||||
$('button[type=submit]', this).attr('disabled', 'disabled');
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
|
||||
@@ -12,15 +12,15 @@ if (!defined('__TYPECHO_ROOT_DIR__') && !@include_once __DIR__ . '/../config.inc
|
||||
}
|
||||
|
||||
/** 初始化组件 */
|
||||
Typecho_Widget::widget('Widget_Init');
|
||||
\Widget\Init::alloc();
|
||||
|
||||
/** 注册一个初始化插件 */
|
||||
Typecho_Plugin::factory('admin/common.php')->begin();
|
||||
\Typecho\Plugin::factory('admin/common.php')->begin();
|
||||
|
||||
Typecho_Widget::widget('Widget_Options')->to($options);
|
||||
Typecho_Widget::widget('Widget_User')->to($user);
|
||||
Typecho_Widget::widget('Widget_Security')->to($security);
|
||||
Typecho_Widget::widget('Widget_Menu')->to($menu);
|
||||
\Widget\Options::alloc()->to($options);
|
||||
\Widget\User::alloc()->to($user);
|
||||
\Widget\Security::alloc()->to($security);
|
||||
\Widget\Menu::alloc()->to($menu);
|
||||
|
||||
/** 初始化上下文 */
|
||||
$request = $options->request;
|
||||
@@ -28,32 +28,27 @@ $response = $options->response;
|
||||
|
||||
/** 检测是否是第一次登录 */
|
||||
$currentMenu = $menu->getCurrentMenu();
|
||||
list($prefixVersion, $suffixVersion) = explode('/', $options->version);
|
||||
$params = parse_url($currentMenu[2]);
|
||||
$adminFile = basename($params['path']);
|
||||
|
||||
if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) {
|
||||
|
||||
if ('welcome.php' != $adminFile) {
|
||||
$response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl));
|
||||
} else {
|
||||
Typecho_Cookie::set('__typecho_first_run', 1);
|
||||
}
|
||||
|
||||
} else {
|
||||
if (!empty($currentMenu)) {
|
||||
$params = parse_url($currentMenu[2]);
|
||||
$adminFile = basename($params['path']);
|
||||
|
||||
/** 检测版本是否升级 */
|
||||
if ($user->pass('administrator', true) && !empty($currentMenu)) {
|
||||
$mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION),
|
||||
str_replace('/', '.', $options->version), '>'));
|
||||
if (!$user->logged && !\Typecho\Cookie::get('__typecho_first_run')) {
|
||||
if ('welcome.php' != $adminFile) {
|
||||
$response->redirect(\Typecho\Common::url('welcome.php', $options->adminUrl));
|
||||
} else {
|
||||
\Typecho\Cookie::set('__typecho_first_run', 1);
|
||||
}
|
||||
} elseif ($user->pass('administrator', true)) {
|
||||
/** 检测版本是否升级 */
|
||||
$mustUpgrade = version_compare(\Typecho\Common::VERSION, $options->version, '>');
|
||||
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile) {
|
||||
$response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl));
|
||||
} else if (!$mustUpgrade && 'upgrade.php' == $adminFile) {
|
||||
if ($mustUpgrade && 'upgrade.php' != $adminFile && 'backup.php' != $adminFile) {
|
||||
$response->redirect(\Typecho\Common::url('upgrade.php', $options->adminUrl));
|
||||
} elseif (!$mustUpgrade && 'upgrade.php' == $adminFile) {
|
||||
$response->redirect($options->adminUrl);
|
||||
} else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
|
||||
} elseif (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
<div class="typecho-foot" role="contentinfo">
|
||||
<div class="copyright">
|
||||
<a href="http://typecho.org" class="i-logo-s">Typecho</a>
|
||||
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s (%s)', $options->software, $prefixVersion, $suffixVersion); ?></p>
|
||||
<p><?php _e('由 <a href="http://typecho.org">%s</a> 强力驱动, 版本 %s', $options->software, $options->version); ?></p>
|
||||
</div>
|
||||
<nav class="resource">
|
||||
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> •
|
||||
<a href="http://forum.typecho.org"><?php _e('支持论坛'); ?></a> •
|
||||
<a href="https://github.com/typecho/typecho/issues"><?php _e('报告错误'); ?></a> •
|
||||
<a href="http://extends.typecho.org"><?php _e('资源下载'); ?></a>
|
||||
<a href="http://typecho.org/download"><?php _e('资源下载'); ?></a>
|
||||
</nav>
|
||||
</div>
|
||||
|
||||
@@ -1,748 +1,211 @@
|
||||
/*
|
||||
* Bento Grid System
|
||||
* Source: https://github.com/fenbox/bento
|
||||
* Version: 1.2.8
|
||||
* Update: 2013.11.25
|
||||
*/
|
||||
/* line 23, ../scss/grid.scss */
|
||||
.container, .row [class*="col-"] {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
|
||||
/* line 31, ../scss/grid.scss */
|
||||
.container {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding-left: 10px;
|
||||
padding-right: 10px; }
|
||||
|
||||
/* line 40, ../scss/grid.scss */
|
||||
.row {
|
||||
margin-right: -10px;
|
||||
margin-left: -10px; }
|
||||
|
||||
/* line 46, ../scss/grid.scss */
|
||||
.row [class*="col-"] {
|
||||
float: left;
|
||||
min-height: 1px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px; }
|
||||
|
||||
/* line 54, ../scss/grid.scss */
|
||||
.row [class*="-push-"],
|
||||
.row [class*="-pull-"] {
|
||||
position: relative; }
|
||||
|
||||
/*
|
||||
* Mobile and up
|
||||
*/
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-3 {
|
||||
width: 25%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-6 {
|
||||
width: 50%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-9 {
|
||||
width: 75%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
/* line 65, ../scss/grid.scss */
|
||||
.col-mb-12 {
|
||||
width: 100%; }
|
||||
|
||||
/*
|
||||
* Tablet and up
|
||||
*/
|
||||
@media (min-width: 768px) {
|
||||
/* line 76, ../scss/grid.scss */
|
||||
.container {
|
||||
max-width: 728px; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-3 {
|
||||
width: 25%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-6 {
|
||||
width: 50%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-9 {
|
||||
width: 75%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
/* line 82, ../scss/grid.scss */
|
||||
.col-tb-12 {
|
||||
width: 100%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
/* line 89, ../scss/grid.scss */
|
||||
.col-tb-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
/* line 96, ../scss/grid.scss */
|
||||
.col-tb-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
/* line 103, ../scss/grid.scss */
|
||||
.col-tb-push-12 {
|
||||
left: 100%; } }
|
||||
/*
|
||||
* Desktop and up
|
||||
*/
|
||||
@media (min-width: 992px) {
|
||||
/* line 115, ../scss/grid.scss */
|
||||
.container {
|
||||
max-width: 952px; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-3 {
|
||||
width: 25%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-6 {
|
||||
width: 50%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-9 {
|
||||
width: 75%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
/* line 121, ../scss/grid.scss */
|
||||
.col-12 {
|
||||
width: 100%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
/* line 128, ../scss/grid.scss */
|
||||
.col-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
/* line 135, ../scss/grid.scss */
|
||||
.col-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
/* line 142, ../scss/grid.scss */
|
||||
.col-push-12 {
|
||||
left: 100%; } }
|
||||
/*
|
||||
* Widescreen and up
|
||||
*/
|
||||
@media (min-width: 1200px) {
|
||||
/* line 154, ../scss/grid.scss */
|
||||
.container {
|
||||
max-width: 1160px; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-1 {
|
||||
width: 8.33333%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-2 {
|
||||
width: 16.66667%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-3 {
|
||||
width: 25%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-4 {
|
||||
width: 33.33333%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-5 {
|
||||
width: 41.66667%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-6 {
|
||||
width: 50%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-7 {
|
||||
width: 58.33333%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-8 {
|
||||
width: 66.66667%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-9 {
|
||||
width: 75%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-10 {
|
||||
width: 83.33333%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-11 {
|
||||
width: 91.66667%; }
|
||||
|
||||
/* line 160, ../scss/grid.scss */
|
||||
.col-wd-12 {
|
||||
width: 100%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-0 {
|
||||
margin-left: 0%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-1 {
|
||||
margin-left: 8.33333%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-2 {
|
||||
margin-left: 16.66667%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-3 {
|
||||
margin-left: 25%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-4 {
|
||||
margin-left: 33.33333%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-5 {
|
||||
margin-left: 41.66667%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-6 {
|
||||
margin-left: 50%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-7 {
|
||||
margin-left: 58.33333%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-8 {
|
||||
margin-left: 66.66667%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-9 {
|
||||
margin-left: 75%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-10 {
|
||||
margin-left: 83.33333%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-11 {
|
||||
margin-left: 91.66667%; }
|
||||
|
||||
/* line 167, ../scss/grid.scss */
|
||||
.col-wd-offset-12 {
|
||||
margin-left: 100%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-0 {
|
||||
right: 0%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-1 {
|
||||
right: 8.33333%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-2 {
|
||||
right: 16.66667%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-3 {
|
||||
right: 25%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-4 {
|
||||
right: 33.33333%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-5 {
|
||||
right: 41.66667%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-6 {
|
||||
right: 50%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-7 {
|
||||
right: 58.33333%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-8 {
|
||||
right: 66.66667%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-9 {
|
||||
right: 75%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-10 {
|
||||
right: 83.33333%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-11 {
|
||||
right: 91.66667%; }
|
||||
|
||||
/* line 174, ../scss/grid.scss */
|
||||
.col-wd-pull-12 {
|
||||
right: 100%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-0 {
|
||||
left: 0%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-1 {
|
||||
left: 8.33333%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-2 {
|
||||
left: 16.66667%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-3 {
|
||||
left: 25%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-4 {
|
||||
left: 33.33333%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-5 {
|
||||
left: 41.66667%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-6 {
|
||||
left: 50%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-7 {
|
||||
left: 58.33333%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-8 {
|
||||
left: 66.66667%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-9 {
|
||||
left: 75%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-10 {
|
||||
left: 83.33333%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-11 {
|
||||
left: 91.66667%; }
|
||||
|
||||
/* line 181, ../scss/grid.scss */
|
||||
.col-wd-push-12 {
|
||||
left: 100%; } }
|
||||
/*
|
||||
* Responsive kit
|
||||
*/
|
||||
@media (max-width: 767px) {
|
||||
/* line 194, ../scss/grid.scss */
|
||||
.kit-hidden-mb {
|
||||
display: none; } }
|
||||
@media (max-width: 991px) {
|
||||
/* line 201, ../scss/grid.scss */
|
||||
.kit-hidden-tb {
|
||||
display: none; } }
|
||||
@media (max-width: 1199px) {
|
||||
/* line 208, ../scss/grid.scss */
|
||||
.kit-hidden {
|
||||
display: none; } }
|
||||
/*
|
||||
* Clearfix
|
||||
*/
|
||||
/* line 217, ../scss/grid.scss */
|
||||
.clearfix, .row {
|
||||
zoom: 1; }
|
||||
/* line 219, ../scss/grid.scss */
|
||||
.clearfix:before, .row:before, .clearfix:after, .row:after {
|
||||
content: " ";
|
||||
display: table; }
|
||||
/* line 223, ../scss/grid.scss */
|
||||
.clearfix:after, .row:after {
|
||||
clear: both; }
|
||||
/* Bento Grid System Source: https://github.com/fenbox/bento Version: 1.2.8 Update: 2013.11.25 */
|
||||
.container, .row [class*="col-"] { box-sizing: border-box; }
|
||||
|
||||
.container { margin-left: auto; margin-right: auto; padding-left: 10px; padding-right: 10px; }
|
||||
|
||||
.row { margin-right: -10px; margin-left: -10px; }
|
||||
|
||||
.row [class*="col-"] { float: left; min-height: 1px; padding-right: 10px; padding-left: 10px; }
|
||||
|
||||
.row [class*="-push-"], .row [class*="-pull-"] { position: relative; }
|
||||
|
||||
/* Mobile and up */
|
||||
.col-mb-1 { width: 8.33333%; }
|
||||
|
||||
.col-mb-2 { width: 16.66667%; }
|
||||
|
||||
.col-mb-3 { width: 25%; }
|
||||
|
||||
.col-mb-4 { width: 33.33333%; }
|
||||
|
||||
.col-mb-5 { width: 41.66667%; }
|
||||
|
||||
.col-mb-6 { width: 50%; }
|
||||
|
||||
.col-mb-7 { width: 58.33333%; }
|
||||
|
||||
.col-mb-8 { width: 66.66667%; }
|
||||
|
||||
.col-mb-9 { width: 75%; }
|
||||
|
||||
.col-mb-10 { width: 83.33333%; }
|
||||
|
||||
.col-mb-11 { width: 91.66667%; }
|
||||
|
||||
.col-mb-12 { width: 100%; }
|
||||
|
||||
/* Tablet and up */
|
||||
@media (min-width: 768px) { .container { max-width: 728px; }
|
||||
.col-tb-1 { width: 8.33333%; }
|
||||
.col-tb-2 { width: 16.66667%; }
|
||||
.col-tb-3 { width: 25%; }
|
||||
.col-tb-4 { width: 33.33333%; }
|
||||
.col-tb-5 { width: 41.66667%; }
|
||||
.col-tb-6 { width: 50%; }
|
||||
.col-tb-7 { width: 58.33333%; }
|
||||
.col-tb-8 { width: 66.66667%; }
|
||||
.col-tb-9 { width: 75%; }
|
||||
.col-tb-10 { width: 83.33333%; }
|
||||
.col-tb-11 { width: 91.66667%; }
|
||||
.col-tb-12 { width: 100%; }
|
||||
.col-tb-offset-0 { margin-left: 0%; }
|
||||
.col-tb-offset-1 { margin-left: 8.33333%; }
|
||||
.col-tb-offset-2 { margin-left: 16.66667%; }
|
||||
.col-tb-offset-3 { margin-left: 25%; }
|
||||
.col-tb-offset-4 { margin-left: 33.33333%; }
|
||||
.col-tb-offset-5 { margin-left: 41.66667%; }
|
||||
.col-tb-offset-6 { margin-left: 50%; }
|
||||
.col-tb-offset-7 { margin-left: 58.33333%; }
|
||||
.col-tb-offset-8 { margin-left: 66.66667%; }
|
||||
.col-tb-offset-9 { margin-left: 75%; }
|
||||
.col-tb-offset-10 { margin-left: 83.33333%; }
|
||||
.col-tb-offset-11 { margin-left: 91.66667%; }
|
||||
.col-tb-offset-12 { margin-left: 100%; }
|
||||
.col-tb-pull-0 { right: 0%; }
|
||||
.col-tb-pull-1 { right: 8.33333%; }
|
||||
.col-tb-pull-2 { right: 16.66667%; }
|
||||
.col-tb-pull-3 { right: 25%; }
|
||||
.col-tb-pull-4 { right: 33.33333%; }
|
||||
.col-tb-pull-5 { right: 41.66667%; }
|
||||
.col-tb-pull-6 { right: 50%; }
|
||||
.col-tb-pull-7 { right: 58.33333%; }
|
||||
.col-tb-pull-8 { right: 66.66667%; }
|
||||
.col-tb-pull-9 { right: 75%; }
|
||||
.col-tb-pull-10 { right: 83.33333%; }
|
||||
.col-tb-pull-11 { right: 91.66667%; }
|
||||
.col-tb-pull-12 { right: 100%; }
|
||||
.col-tb-push-0 { left: 0%; }
|
||||
.col-tb-push-1 { left: 8.33333%; }
|
||||
.col-tb-push-2 { left: 16.66667%; }
|
||||
.col-tb-push-3 { left: 25%; }
|
||||
.col-tb-push-4 { left: 33.33333%; }
|
||||
.col-tb-push-5 { left: 41.66667%; }
|
||||
.col-tb-push-6 { left: 50%; }
|
||||
.col-tb-push-7 { left: 58.33333%; }
|
||||
.col-tb-push-8 { left: 66.66667%; }
|
||||
.col-tb-push-9 { left: 75%; }
|
||||
.col-tb-push-10 { left: 83.33333%; }
|
||||
.col-tb-push-11 { left: 91.66667%; }
|
||||
.col-tb-push-12 { left: 100%; } }
|
||||
|
||||
/* Desktop and up */
|
||||
@media (min-width: 992px) { .container { max-width: 952px; }
|
||||
.col-1 { width: 8.33333%; }
|
||||
.col-2 { width: 16.66667%; }
|
||||
.col-3 { width: 25%; }
|
||||
.col-4 { width: 33.33333%; }
|
||||
.col-5 { width: 41.66667%; }
|
||||
.col-6 { width: 50%; }
|
||||
.col-7 { width: 58.33333%; }
|
||||
.col-8 { width: 66.66667%; }
|
||||
.col-9 { width: 75%; }
|
||||
.col-10 { width: 83.33333%; }
|
||||
.col-11 { width: 91.66667%; }
|
||||
.col-12 { width: 100%; }
|
||||
.col-offset-0 { margin-left: 0%; }
|
||||
.col-offset-1 { margin-left: 8.33333%; }
|
||||
.col-offset-2 { margin-left: 16.66667%; }
|
||||
.col-offset-3 { margin-left: 25%; }
|
||||
.col-offset-4 { margin-left: 33.33333%; }
|
||||
.col-offset-5 { margin-left: 41.66667%; }
|
||||
.col-offset-6 { margin-left: 50%; }
|
||||
.col-offset-7 { margin-left: 58.33333%; }
|
||||
.col-offset-8 { margin-left: 66.66667%; }
|
||||
.col-offset-9 { margin-left: 75%; }
|
||||
.col-offset-10 { margin-left: 83.33333%; }
|
||||
.col-offset-11 { margin-left: 91.66667%; }
|
||||
.col-offset-12 { margin-left: 100%; }
|
||||
.col-pull-0 { right: 0%; }
|
||||
.col-pull-1 { right: 8.33333%; }
|
||||
.col-pull-2 { right: 16.66667%; }
|
||||
.col-pull-3 { right: 25%; }
|
||||
.col-pull-4 { right: 33.33333%; }
|
||||
.col-pull-5 { right: 41.66667%; }
|
||||
.col-pull-6 { right: 50%; }
|
||||
.col-pull-7 { right: 58.33333%; }
|
||||
.col-pull-8 { right: 66.66667%; }
|
||||
.col-pull-9 { right: 75%; }
|
||||
.col-pull-10 { right: 83.33333%; }
|
||||
.col-pull-11 { right: 91.66667%; }
|
||||
.col-pull-12 { right: 100%; }
|
||||
.col-push-0 { left: 0%; }
|
||||
.col-push-1 { left: 8.33333%; }
|
||||
.col-push-2 { left: 16.66667%; }
|
||||
.col-push-3 { left: 25%; }
|
||||
.col-push-4 { left: 33.33333%; }
|
||||
.col-push-5 { left: 41.66667%; }
|
||||
.col-push-6 { left: 50%; }
|
||||
.col-push-7 { left: 58.33333%; }
|
||||
.col-push-8 { left: 66.66667%; }
|
||||
.col-push-9 { left: 75%; }
|
||||
.col-push-10 { left: 83.33333%; }
|
||||
.col-push-11 { left: 91.66667%; }
|
||||
.col-push-12 { left: 100%; } }
|
||||
|
||||
/* Widescreen and up */
|
||||
@media (min-width: 1200px) { .container { max-width: 1160px; }
|
||||
.col-wd-1 { width: 8.33333%; }
|
||||
.col-wd-2 { width: 16.66667%; }
|
||||
.col-wd-3 { width: 25%; }
|
||||
.col-wd-4 { width: 33.33333%; }
|
||||
.col-wd-5 { width: 41.66667%; }
|
||||
.col-wd-6 { width: 50%; }
|
||||
.col-wd-7 { width: 58.33333%; }
|
||||
.col-wd-8 { width: 66.66667%; }
|
||||
.col-wd-9 { width: 75%; }
|
||||
.col-wd-10 { width: 83.33333%; }
|
||||
.col-wd-11 { width: 91.66667%; }
|
||||
.col-wd-12 { width: 100%; }
|
||||
.col-wd-offset-0 { margin-left: 0%; }
|
||||
.col-wd-offset-1 { margin-left: 8.33333%; }
|
||||
.col-wd-offset-2 { margin-left: 16.66667%; }
|
||||
.col-wd-offset-3 { margin-left: 25%; }
|
||||
.col-wd-offset-4 { margin-left: 33.33333%; }
|
||||
.col-wd-offset-5 { margin-left: 41.66667%; }
|
||||
.col-wd-offset-6 { margin-left: 50%; }
|
||||
.col-wd-offset-7 { margin-left: 58.33333%; }
|
||||
.col-wd-offset-8 { margin-left: 66.66667%; }
|
||||
.col-wd-offset-9 { margin-left: 75%; }
|
||||
.col-wd-offset-10 { margin-left: 83.33333%; }
|
||||
.col-wd-offset-11 { margin-left: 91.66667%; }
|
||||
.col-wd-offset-12 { margin-left: 100%; }
|
||||
.col-wd-pull-0 { right: 0%; }
|
||||
.col-wd-pull-1 { right: 8.33333%; }
|
||||
.col-wd-pull-2 { right: 16.66667%; }
|
||||
.col-wd-pull-3 { right: 25%; }
|
||||
.col-wd-pull-4 { right: 33.33333%; }
|
||||
.col-wd-pull-5 { right: 41.66667%; }
|
||||
.col-wd-pull-6 { right: 50%; }
|
||||
.col-wd-pull-7 { right: 58.33333%; }
|
||||
.col-wd-pull-8 { right: 66.66667%; }
|
||||
.col-wd-pull-9 { right: 75%; }
|
||||
.col-wd-pull-10 { right: 83.33333%; }
|
||||
.col-wd-pull-11 { right: 91.66667%; }
|
||||
.col-wd-pull-12 { right: 100%; }
|
||||
.col-wd-push-0 { left: 0%; }
|
||||
.col-wd-push-1 { left: 8.33333%; }
|
||||
.col-wd-push-2 { left: 16.66667%; }
|
||||
.col-wd-push-3 { left: 25%; }
|
||||
.col-wd-push-4 { left: 33.33333%; }
|
||||
.col-wd-push-5 { left: 41.66667%; }
|
||||
.col-wd-push-6 { left: 50%; }
|
||||
.col-wd-push-7 { left: 58.33333%; }
|
||||
.col-wd-push-8 { left: 66.66667%; }
|
||||
.col-wd-push-9 { left: 75%; }
|
||||
.col-wd-push-10 { left: 83.33333%; }
|
||||
.col-wd-push-11 { left: 91.66667%; }
|
||||
.col-wd-push-12 { left: 100%; } }
|
||||
|
||||
/* Responsive kit */
|
||||
@media (max-width: 575px) { .kit-hidden-mb { display: none; } }
|
||||
|
||||
@media (max-width: 767px) { .kit-hidden-tb { display: none; } }
|
||||
|
||||
@media (max-width: 991px) { .kit-hidden { display: none; } }
|
||||
|
||||
/* Clearfix */
|
||||
.clearfix, .row { zoom: 1; }
|
||||
|
||||
.clearfix:before, .row:before, .clearfix:after, .row:after { content: " "; display: table; }
|
||||
|
||||
.clearfix:after, .row:after { clear: both; }
|
||||
|
||||
24
admin/css/install.css
Normal file
@@ -0,0 +1,24 @@
|
||||
h1 { text-align: center; }
|
||||
|
||||
details summary { cursor: pointer; }
|
||||
|
||||
@keyframes fadein { from { opacity: 0; }
|
||||
to { opacity: 1; } }
|
||||
|
||||
.fresh .keep-word { display: none; }
|
||||
|
||||
.keep .fresh-word { display: none; }
|
||||
|
||||
form > .message { display: none; padding: 20px; border-radius: 5px; }
|
||||
|
||||
.message textarea { width: 100%; height: 200px; resize: none; margin: 10px 0; }
|
||||
|
||||
.message.fade { display: block; animation: fadein .5s linear; }
|
||||
|
||||
.message *:last-child { margin-bottom: 0; }
|
||||
|
||||
.message p { margin-top: 10px; }
|
||||
|
||||
.message p button { margin-left: 5px; }
|
||||
|
||||
.message p button:first-child { margin-left: 0; }
|
||||
521
admin/css/normalize.css
vendored
@@ -1,406 +1,341 @@
|
||||
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */
|
||||
/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */
|
||||
|
||||
/* ==========================================================================
|
||||
HTML5 display definitions
|
||||
/* Document
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Correct `block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
article,
|
||||
aside,
|
||||
details,
|
||||
figcaption,
|
||||
figure,
|
||||
footer,
|
||||
header,
|
||||
hgroup,
|
||||
main,
|
||||
nav,
|
||||
section,
|
||||
summary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct `inline-block` display not defined in IE 8/9.
|
||||
*/
|
||||
|
||||
audio,
|
||||
canvas,
|
||||
video {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent modern browsers from displaying `audio` without controls.
|
||||
* Remove excess height in iOS 5 devices.
|
||||
*/
|
||||
|
||||
audio:not([controls]) {
|
||||
display: none;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `[hidden]` styling not present in IE 8/9.
|
||||
* Hide the `template` element in IE, Safari, and Firefox < 22.
|
||||
*/
|
||||
|
||||
[hidden],
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Base
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Set default font family to sans-serif.
|
||||
* 2. Prevent iOS text size adjust after orientation change, without disabling
|
||||
* user zoom.
|
||||
* 1. Correct the line height in all browsers.
|
||||
* 2. Prevent adjustments of font size after orientation changes in iOS.
|
||||
*/
|
||||
|
||||
html {
|
||||
font-family: sans-serif; /* 1 */
|
||||
-ms-text-size-adjust: 100%; /* 2 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
line-height: 1.15; /* 1 */
|
||||
-webkit-text-size-adjust: 100%; /* 2 */
|
||||
}
|
||||
|
||||
/* Sections
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove default margin.
|
||||
* Remove the margin in all browsers.
|
||||
*/
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Links
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background color from active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background: transparent;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address `outline` inconsistency between Chrome and other browsers.
|
||||
*/
|
||||
|
||||
a:focus {
|
||||
outline: thin dotted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability when focused and also mouse hovered in all browsers.
|
||||
*/
|
||||
|
||||
a:active,
|
||||
a:hover {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Typography
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address variable `h1` font-size and margin within `section` and `article`
|
||||
* contexts in Firefox 4+, Safari 5, and Chrome.
|
||||
* Correct the font size and margin on `h1` elements within `section` and
|
||||
* `article` contexts in Chrome, Firefox, and Safari.
|
||||
*/
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
/* Grouping content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* 1. Add the correct box sizing in Firefox.
|
||||
* 2. Show the overflow in Edge and IE.
|
||||
*/
|
||||
|
||||
hr {
|
||||
box-sizing: content-box; /* 1 */
|
||||
height: 0; /* 1 */
|
||||
overflow: visible; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9, Safari 5, and Chrome.
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/* Text-level semantics
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove the gray background on active links in IE 10.
|
||||
*/
|
||||
|
||||
a {
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove the bottom border in Chrome 57-
|
||||
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
|
||||
*/
|
||||
|
||||
abbr[title] {
|
||||
border-bottom: 1px dotted;
|
||||
border-bottom: none; /* 1 */
|
||||
text-decoration: underline; /* 2 */
|
||||
text-decoration: underline dotted; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address style set to `bolder` in Firefox 4+, Safari 5, and Chrome.
|
||||
* Add the correct font weight in Chrome, Edge, and Safari.
|
||||
*/
|
||||
|
||||
b,
|
||||
strong {
|
||||
font-weight: bold;
|
||||
font-weight: bolder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in Safari 5 and Chrome.
|
||||
*/
|
||||
|
||||
dfn {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address differences between Firefox and other browsers.
|
||||
*/
|
||||
|
||||
hr {
|
||||
-moz-box-sizing: content-box;
|
||||
box-sizing: content-box;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address styling not present in IE 8/9.
|
||||
*/
|
||||
|
||||
mark {
|
||||
background: #ff0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct font family set oddly in Safari 5 and Chrome.
|
||||
* 1. Correct the inheritance and scaling of font size in all browsers.
|
||||
* 2. Correct the odd `em` font sizing in all browsers.
|
||||
*/
|
||||
|
||||
code,
|
||||
kbd,
|
||||
pre,
|
||||
samp {
|
||||
font-family: monospace, serif;
|
||||
font-size: 1em;
|
||||
font-family: monospace, monospace; /* 1 */
|
||||
font-size: 1em; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Improve readability of pre-formatted text in all browsers.
|
||||
*/
|
||||
|
||||
pre {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set consistent quote types.
|
||||
*/
|
||||
|
||||
q {
|
||||
quotes: "\201C" "\201D" "\2018" "\2019";
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent and variable font size in all browsers.
|
||||
* Add the correct font size in all browsers.
|
||||
*/
|
||||
|
||||
small {
|
||||
font-size: 80%;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prevent `sub` and `sup` affecting `line-height` in all browsers.
|
||||
* Prevent `sub` and `sup` elements from affecting the line height in
|
||||
* all browsers.
|
||||
*/
|
||||
|
||||
sub,
|
||||
sup {
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sup {
|
||||
top: -0.5em;
|
||||
font-size: 75%;
|
||||
line-height: 0;
|
||||
position: relative;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
sub {
|
||||
bottom: -0.25em;
|
||||
bottom: -0.25em;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Embedded content
|
||||
sup {
|
||||
top: -0.5em;
|
||||
}
|
||||
|
||||
/* Embedded content
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove border when inside `a` element in IE 8/9.
|
||||
* Remove the border on images inside links in IE 10.
|
||||
*/
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
border-style: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct overflow displayed oddly in IE 9.
|
||||
*/
|
||||
|
||||
svg:not(:root) {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Figures
|
||||
/* Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Address margin not present in IE 8/9 and Safari 5.
|
||||
*/
|
||||
|
||||
figure {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Forms
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Define consistent border, margin, and padding.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
border: 1px solid #c0c0c0;
|
||||
margin: 0 2px;
|
||||
padding: 0.35em 0.625em 0.75em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct `color` not being inherited in IE 8/9.
|
||||
* 2. Remove padding so people aren't caught out if they zero out fieldsets.
|
||||
*/
|
||||
|
||||
legend {
|
||||
border: 0; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct font family not being inherited in all browsers.
|
||||
* 2. Correct font size not being inherited in all browsers.
|
||||
* 3. Address margins set differently in Firefox 4+, Safari 5, and Chrome.
|
||||
* 1. Change the font styles in all browsers.
|
||||
* 2. Remove the margin in Firefox and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
input,
|
||||
optgroup,
|
||||
select,
|
||||
textarea {
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 2 */
|
||||
margin: 0; /* 3 */
|
||||
font-family: inherit; /* 1 */
|
||||
font-size: 100%; /* 1 */
|
||||
line-height: 1.15; /* 1 */
|
||||
margin: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Address Firefox 4+ setting `line-height` on `input` using `!important` in
|
||||
* the UA stylesheet.
|
||||
* Show the overflow in IE.
|
||||
* 1. Show the overflow in Edge.
|
||||
*/
|
||||
|
||||
button,
|
||||
input {
|
||||
line-height: normal;
|
||||
input { /* 1 */
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
/**
|
||||
* Address inconsistent `text-transform` inheritance for `button` and `select`.
|
||||
* All other form control elements do not inherit `text-transform` values.
|
||||
* Correct `button` style inheritance in Chrome, Safari 5+, and IE 8+.
|
||||
* Correct `select` style inheritance in Firefox 4+ and Opera.
|
||||
* Remove the inheritance of text transform in Edge, Firefox, and IE.
|
||||
* 1. Remove the inheritance of text transform in Firefox.
|
||||
*/
|
||||
|
||||
button,
|
||||
select {
|
||||
text-transform: none;
|
||||
select { /* 1 */
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio`
|
||||
* and `video` controls.
|
||||
* 2. Correct inability to style clickable `input` types in iOS.
|
||||
* 3. Improve usability and consistency of cursor style between image-type
|
||||
* `input` and others.
|
||||
* Correct the inability to style clickable types in iOS and Safari.
|
||||
*/
|
||||
|
||||
button,
|
||||
html input[type="button"], /* 1 */
|
||||
input[type="reset"],
|
||||
input[type="submit"] {
|
||||
-webkit-appearance: button; /* 2 */
|
||||
cursor: pointer; /* 3 */
|
||||
[type="button"],
|
||||
[type="reset"],
|
||||
[type="submit"] {
|
||||
-webkit-appearance: button;
|
||||
}
|
||||
|
||||
/**
|
||||
* Re-set default cursor for disabled elements.
|
||||
*/
|
||||
|
||||
button[disabled],
|
||||
html input[disabled] {
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address box sizing set to `content-box` in IE 8/9/10.
|
||||
* 2. Remove excess padding in IE 8/9/10.
|
||||
*/
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Address `appearance` set to `searchfield` in Safari 5 and Chrome.
|
||||
* 2. Address `box-sizing` set to `border-box` in Safari 5 and Chrome
|
||||
* (include `-moz` to future-proof).
|
||||
*/
|
||||
|
||||
input[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
-moz-box-sizing: content-box;
|
||||
-webkit-box-sizing: content-box; /* 2 */
|
||||
box-sizing: content-box;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and search cancel button in Safari 5 and Chrome
|
||||
* on OS X.
|
||||
*/
|
||||
|
||||
input[type="search"]::-webkit-search-cancel-button,
|
||||
input[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove inner padding and border in Firefox 4+.
|
||||
* Remove the inner border and padding in Firefox.
|
||||
*/
|
||||
|
||||
button::-moz-focus-inner,
|
||||
input::-moz-focus-inner {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
[type="button"]::-moz-focus-inner,
|
||||
[type="reset"]::-moz-focus-inner,
|
||||
[type="submit"]::-moz-focus-inner {
|
||||
border-style: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Remove default vertical scrollbar in IE 8/9.
|
||||
* 2. Improve readability and alignment in all browsers.
|
||||
* Restore the focus styles unset by the previous rule.
|
||||
*/
|
||||
|
||||
button:-moz-focusring,
|
||||
[type="button"]:-moz-focusring,
|
||||
[type="reset"]:-moz-focusring,
|
||||
[type="submit"]:-moz-focusring {
|
||||
outline: 1px dotted ButtonText;
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the padding in Firefox.
|
||||
*/
|
||||
|
||||
fieldset {
|
||||
padding: 0.35em 0.75em 0.625em;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the text wrapping in Edge and IE.
|
||||
* 2. Correct the color inheritance from `fieldset` elements in IE.
|
||||
* 3. Remove the padding so developers are not caught out when they zero out
|
||||
* `fieldset` elements in all browsers.
|
||||
*/
|
||||
|
||||
legend {
|
||||
box-sizing: border-box; /* 1 */
|
||||
color: inherit; /* 2 */
|
||||
display: table; /* 1 */
|
||||
max-width: 100%; /* 1 */
|
||||
padding: 0; /* 3 */
|
||||
white-space: normal; /* 1 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
|
||||
*/
|
||||
|
||||
progress {
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the default vertical scrollbar in IE 10+.
|
||||
*/
|
||||
|
||||
textarea {
|
||||
overflow: auto; /* 1 */
|
||||
vertical-align: top; /* 2 */
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
/* ==========================================================================
|
||||
Tables
|
||||
/**
|
||||
* 1. Add the correct box sizing in IE 10.
|
||||
* 2. Remove the padding in IE 10.
|
||||
*/
|
||||
|
||||
[type="checkbox"],
|
||||
[type="radio"] {
|
||||
box-sizing: border-box; /* 1 */
|
||||
padding: 0; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Correct the cursor style of increment and decrement buttons in Chrome.
|
||||
*/
|
||||
|
||||
[type="number"]::-webkit-inner-spin-button,
|
||||
[type="number"]::-webkit-outer-spin-button {
|
||||
height: auto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the odd appearance in Chrome and Safari.
|
||||
* 2. Correct the outline style in Safari.
|
||||
*/
|
||||
|
||||
[type="search"] {
|
||||
-webkit-appearance: textfield; /* 1 */
|
||||
outline-offset: -2px; /* 2 */
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the inner padding in Chrome and Safari on macOS.
|
||||
*/
|
||||
|
||||
[type="search"]::-webkit-search-decoration {
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* 1. Correct the inability to style clickable types in iOS and Safari.
|
||||
* 2. Change font properties to `inherit` in Safari.
|
||||
*/
|
||||
|
||||
::-webkit-file-upload-button {
|
||||
-webkit-appearance: button; /* 1 */
|
||||
font: inherit; /* 2 */
|
||||
}
|
||||
|
||||
/* Interactive
|
||||
========================================================================== */
|
||||
|
||||
/*
|
||||
* Add the correct display in Edge, IE 10+, and Firefox.
|
||||
*/
|
||||
|
||||
details {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add the correct display in all browsers.
|
||||
*/
|
||||
|
||||
summary {
|
||||
display: list-item;
|
||||
}
|
||||
|
||||
/* Misc
|
||||
========================================================================== */
|
||||
|
||||
/**
|
||||
* Remove most spacing between table cells.
|
||||
* Add the correct display in IE 10+.
|
||||
*/
|
||||
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
template {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the correct display in IE 10.
|
||||
*/
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
2656
admin/css/style.css
@@ -19,6 +19,8 @@ $(document).ready(function () {
|
||||
$(this).parents('tr').fadeOut(function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
$(this).parents('form').trigger('field');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -38,6 +40,10 @@ $(document).ready(function () {
|
||||
+ '<td><button type="button" class="btn btn-xs"><?php _e('删除'); ?></button></td></tr>',
|
||||
el = $(html).hide().appendTo('#custom-field table tbody').fadeIn();
|
||||
|
||||
$(':input', el).bind('input change', function () {
|
||||
$(this).parents('form').trigger('field');
|
||||
});
|
||||
|
||||
attachDeleteEvent(el);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,73 +1,82 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php
|
||||
$fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
|
||||
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems();
|
||||
?>
|
||||
<section id="custom-field" class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><a href="##"><i class="i-caret-right"></i> <?php _e('自定义字段'); ?></a></label>
|
||||
<table class="typecho-list-table mono">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="10%"/>
|
||||
<col width="55%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
<?php foreach ($defaultFields as $field): ?>
|
||||
<?php list ($label, $input) = $field; ?>
|
||||
<tr>
|
||||
<td><?php $label->render(); ?></td>
|
||||
<td colspan="3"><?php $input->render(); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>" id="fieldname" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字符'); ?></option>
|
||||
<option value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
|
||||
<option value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" id="fieldvalue" class="text-s w-100" rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($defaultFields) && empty($fields)): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" id="fieldname" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option value="str"><?php _e('字符'); ?></option>
|
||||
<option value="int"><?php _e('整数'); ?></option>
|
||||
<option value="float"><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" id="fieldvalue" class="text-s w-100" rows="2"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="description clearfix">
|
||||
<button type="button" class="btn btn-xs operate-add"><?php _e('+添加字段'); ?></button>
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="http://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
|
||||
</div>
|
||||
</section>
|
||||
<section id="custom-field"
|
||||
class="typecho-post-option<?php if (empty($defaultFields) && empty($fields)): ?> fold<?php endif; ?>">
|
||||
<label id="custom-field-expand" class="typecho-label"><a href="##"><i
|
||||
class="i-caret-right"></i> <?php _e('自定义字段'); ?></a></label>
|
||||
<table class="typecho-list-table mono">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="10%"/>
|
||||
<col width="55%"/>
|
||||
<col width="10%"/>
|
||||
</colgroup>
|
||||
<?php foreach ($defaultFields as $field): ?>
|
||||
<?php [$label, $input] = $field; ?>
|
||||
<tr>
|
||||
<td><?php $label->render(); ?></td>
|
||||
<td colspan="3"><?php $input->render(); ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($fields as $field): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" value="<?php echo htmlspecialchars($field['name']); ?>"
|
||||
id="fieldname" class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option
|
||||
value="str"<?php if ('str' == $field['type']): ?> selected<?php endif; ?>><?php _e('字符'); ?></option>
|
||||
<option
|
||||
value="int"<?php if ('int' == $field['type']): ?> selected<?php endif; ?>><?php _e('整数'); ?></option>
|
||||
<option
|
||||
value="float"<?php if ('float' == $field['type']): ?> selected<?php endif; ?>><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" id="fieldvalue" class="text-s w-100"
|
||||
rows="2"><?php echo htmlspecialchars($field[$field['type'] . '_value']); ?></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php if (empty($defaultFields) && empty($fields)): ?>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="fieldname" class="sr-only"><?php _e('字段名称'); ?></label>
|
||||
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" id="fieldname"
|
||||
class="text-s w-100">
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldtype" class="sr-only"><?php _e('字段类型'); ?></label>
|
||||
<select name="fieldTypes[]" id="fieldtype">
|
||||
<option value="str"><?php _e('字符'); ?></option>
|
||||
<option value="int"><?php _e('整数'); ?></option>
|
||||
<option value="float"><?php _e('小数'); ?></option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<label for="fieldvalue" class="sr-only"><?php _e('字段值'); ?></label>
|
||||
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" id="fieldvalue"
|
||||
class="text-s w-100" rows="2"></textarea>
|
||||
</td>
|
||||
<td>
|
||||
<button type="button" class="btn btn-xs"><?php _e('删除'); ?></button>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</table>
|
||||
<div class="description clearfix">
|
||||
<button type="button" class="btn btn-xs operate-add"><?php _e('+添加字段'); ?></button>
|
||||
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="http://docs.typecho.org/help/custom-fields">帮助文档</a>'); ?>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php $content = !empty($post) ? $post : $page; if ($options->markdown): ?>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'pagedown.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'stmd.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'diff.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'hyperdown.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'pagedown.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'paste.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'purify.js'); ?>"></script>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var textarea = $('#text'),
|
||||
isFullScreen = false,
|
||||
toolbar = $('<div class="editor" id="wmd-button-bar" />').insertBefore(textarea.parent()),
|
||||
preview = $('<div id="wmd-preview" class="wmd-hidetab" />').insertAfter('.editor');
|
||||
|
||||
@@ -57,28 +59,18 @@ $(document).ready(function () {
|
||||
help: '<?php _e('Markdown语法帮助'); ?>'
|
||||
};
|
||||
|
||||
var converter = new Typecho.Markdown,
|
||||
editor = new Markdown.Editor(converter, '', options),
|
||||
diffMatch = new diff_match_patch(), last = '', preview = $('#wmd-preview'),
|
||||
mark = '@mark' + Math.ceil(Math.random() * 100000000) + '@',
|
||||
span = '<span class="diff" />',
|
||||
cache = {};
|
||||
|
||||
var converter = new HyperDown(),
|
||||
editor = new Markdown.Editor(converter, '', options);
|
||||
|
||||
// 自动跟随
|
||||
converter.hooks.chain('postConversion', function (html) {
|
||||
// clear special html tags
|
||||
html = html.replace(/<\/?(\!doctype|html|head|body|link|title|input|select|button|textarea|style|noscript)[^>]*>/ig, function (all) {
|
||||
return all.replace(/&/g, '&')
|
||||
.replace(/</g, '<')
|
||||
.replace(/>/g, '>')
|
||||
.replace(/'/g, ''')
|
||||
.replace(/"/g, '"');
|
||||
});
|
||||
|
||||
// clear hard breaks
|
||||
html = html.replace(/\s*((?:<br>\n)+)\s*(<\/?(?:p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|address|form|fieldset|iframe|hr|legend|article|section|nav|aside|hgroup|header|footer|figcaption|li|dd|dt)[^\w])/gm, '$2');
|
||||
converter.enableHtml(true);
|
||||
converter.enableLine(true);
|
||||
reloadScroll = scrollableEditor(textarea, preview);
|
||||
|
||||
// 修正白名单
|
||||
converter.hook('makeHtml', function (html) {
|
||||
html = html.replace('<p><!--more--></p>', '<!--more-->');
|
||||
|
||||
if (html.indexOf('<!--more-->') > 0) {
|
||||
var parts = html.split(/\s*<\!\-\-more\-\->\s*/),
|
||||
summary = parts.shift(),
|
||||
@@ -88,136 +80,38 @@ $(document).ready(function () {
|
||||
+ '<div class="details">' + details + '</div>';
|
||||
}
|
||||
|
||||
|
||||
var diffs = diffMatch.diff_main(last, html);
|
||||
last = html;
|
||||
|
||||
if (diffs.length > 0) {
|
||||
var stack = [], markStr = mark;
|
||||
|
||||
for (var i = 0; i < diffs.length; i ++) {
|
||||
var diff = diffs[i], op = diff[0], str = diff[1]
|
||||
sp = str.lastIndexOf('<'), ep = str.lastIndexOf('>');
|
||||
|
||||
if (op != 0) {
|
||||
if (sp >=0 && sp > ep) {
|
||||
if (op > 0) {
|
||||
stack.push(str.substring(0, sp) + markStr + str.substring(sp));
|
||||
} else {
|
||||
var lastStr = stack[stack.length - 1], lastSp = lastStr.lastIndexOf('<');
|
||||
stack[stack.length - 1] = lastStr.substring(0, lastSp) + markStr + lastStr.substring(lastSp);
|
||||
}
|
||||
} else {
|
||||
if (op > 0) {
|
||||
stack.push(str + markStr);
|
||||
} else {
|
||||
stack.push(markStr);
|
||||
}
|
||||
}
|
||||
|
||||
markStr = '';
|
||||
} else {
|
||||
stack.push(str);
|
||||
}
|
||||
}
|
||||
|
||||
html = stack.join('');
|
||||
|
||||
if (!markStr) {
|
||||
var pos = html.indexOf(mark), prev = html.substring(0, pos),
|
||||
next = html.substr(pos + mark.length),
|
||||
sp = prev.lastIndexOf('<'), ep = prev.lastIndexOf('>');
|
||||
|
||||
if (sp >= 0 && sp > ep) {
|
||||
html = prev.substring(0, sp) + span + prev.substring(sp) + next;
|
||||
} else {
|
||||
html = prev + span + next;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 替换img
|
||||
html = html.replace(/<(img)\s+([^>]*)\s*src="([^"]+)"([^>]*)>/ig, function (all, tag, prefix, src, suffix) {
|
||||
if (!cache[src]) {
|
||||
cache[src] = false;
|
||||
} else {
|
||||
return '<span class="cache" data-width="' + cache[src][0] + '" data-height="' + cache[src][1] + '" '
|
||||
+ 'style="background:url(' + src + ') no-repeat left top; width:'
|
||||
+ cache[src][0] + 'px; height:' + cache[src][1] + 'px; display: inline-block; max-width: 100%;'
|
||||
+ '-webkit-background-size: contain;-moz-background-size: contain;-o-background-size: contain;background-size: contain;" />';
|
||||
}
|
||||
|
||||
return all;
|
||||
});
|
||||
|
||||
// 替换block
|
||||
html = html.replace(/<(iframe|embed)\s+([^>]*)>/ig, function (all, tag, src) {
|
||||
if (src[src.length - 1] == '/') {
|
||||
src = src.substring(0, src.length - 1);
|
||||
}
|
||||
|
||||
return '<div style="background: #ddd; height: 40px; overflow: hidden; line-height: 40px; text-align: center; font-size: 12px; color: #777">'
|
||||
+ tag + ' : ' + $.trim(src) + '</div>';
|
||||
return '<div class="embed"><strong>'
|
||||
+ tag + '</strong> : ' + $.trim(src) + '</div>';
|
||||
});
|
||||
|
||||
return html;
|
||||
return DOMPurify.sanitize(html, {USE_PROFILES: {html: true}});
|
||||
});
|
||||
|
||||
function cacheResize() {
|
||||
var t = $(this), w = parseInt(t.data('width')), h = parseInt(t.data('height')),
|
||||
ow = t.width();
|
||||
|
||||
t.height(h * ow / w);
|
||||
}
|
||||
|
||||
var to;
|
||||
editor.hooks.chain('onPreviewRefresh', function () {
|
||||
var diff = $('.diff', preview), scrolled = false;
|
||||
var images = $('img', preview), count = images.length;
|
||||
|
||||
if (to) {
|
||||
clearTimeout(to);
|
||||
}
|
||||
if (count == 0) {
|
||||
reloadScroll(true);
|
||||
} else {
|
||||
images.bind('load error', function () {
|
||||
count --;
|
||||
|
||||
$('img', preview).load(function () {
|
||||
var t = $(this), src = t.attr('src');
|
||||
|
||||
if (scrolled) {
|
||||
preview.scrollTo(diff, {
|
||||
offset : - 50
|
||||
});
|
||||
}
|
||||
|
||||
if (!!src && !cache[src]) {
|
||||
cache[src] = [this.width, this.height];
|
||||
}
|
||||
});
|
||||
|
||||
$('.cache', preview).resize(cacheResize).each(cacheResize);
|
||||
|
||||
var changed = $('.diff', preview).parent();
|
||||
if (!changed.is(preview)) {
|
||||
changed.css('background-color', 'rgba(255,230,0,0.5)');
|
||||
to = setTimeout(function () {
|
||||
changed.css('background-color', 'transparent');
|
||||
}, 4500);
|
||||
}
|
||||
|
||||
if (diff.length > 0) {
|
||||
var p = diff.position(), lh = diff.parent().css('line-height');
|
||||
lh = !!lh ? parseInt(lh) : 0;
|
||||
|
||||
if (p.top < 0 || p.top > preview.height() - lh) {
|
||||
preview.scrollTo(diff, {
|
||||
offset : - 50
|
||||
});
|
||||
scrolled = true;
|
||||
}
|
||||
if (count == 0) {
|
||||
reloadScroll(true);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
<?php Typecho_Plugin::factory('admin/editor-js.php')->markdownEditor($content); ?>
|
||||
<?php \Typecho\Plugin::factory('admin/editor-js.php')->markdownEditor($content); ?>
|
||||
|
||||
var input = $('#text'), th = textarea.height(), ph = preview.height(),
|
||||
var th = textarea.height(), ph = preview.height(),
|
||||
uploadBtn = $('<button type="button" id="btn-fullscreen-upload" class="btn btn-link">'
|
||||
+ '<i class="i-upload"><?php _e('附件'); ?></i></button>')
|
||||
.prependTo('.submit .right')
|
||||
@@ -239,6 +133,7 @@ $(document).ready(function () {
|
||||
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
isFullScreen = true;
|
||||
});
|
||||
|
||||
editor.hooks.chain('enterFullScreen', function () {
|
||||
@@ -247,12 +142,18 @@ $(document).ready(function () {
|
||||
var h = window.screen.height - toolbar.outerHeight();
|
||||
textarea.css('height', h);
|
||||
preview.css('height', h);
|
||||
isFullScreen = true;
|
||||
});
|
||||
|
||||
editor.hooks.chain('exitFullScreen', function () {
|
||||
$(document.body).removeClass('fullscreen');
|
||||
textarea.height(th);
|
||||
preview.height(ph);
|
||||
isFullScreen = false;
|
||||
});
|
||||
|
||||
editor.hooks.chain('commandExecuted', function () {
|
||||
textarea.trigger('input');
|
||||
});
|
||||
|
||||
function initMarkdown() {
|
||||
@@ -304,6 +205,17 @@ $(document).ready(function () {
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// 剪贴板复制图片
|
||||
textarea.pastableTextarea().on('pasteImage', function (e, data) {
|
||||
var name = data.name ? data.name.replace(/[\(\)\[\]\*#!]/g, '') : (new Date()).toISOString().replace(/\..+$/, '');
|
||||
if (!name.match(/\.[a-z0-9]{2,}$/i)) {
|
||||
var ext = data.blob.type.split('/').pop();
|
||||
name += '.' + ext;
|
||||
}
|
||||
|
||||
Typecho.uploadFile(new File([data.blob], name), name);
|
||||
});
|
||||
}
|
||||
|
||||
if (isMarkdown) {
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
<?php
|
||||
|
||||
include 'common.php';
|
||||
|
||||
$panel = $request->get('panel');
|
||||
$panelTable = unserialize($options->panelTable);
|
||||
|
||||
if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) {
|
||||
throw new Typecho_Plugin_Exception(_t('页面不存在'), 404);
|
||||
throw new \Typecho\Plugin\Exception(_t('页面不存在'), 404);
|
||||
}
|
||||
|
||||
list ($pluginName, $file) = explode('/', trim($panel, '/'), 2);
|
||||
[$pluginName, $file] = explode('/', trim($panel, '/'), 2);
|
||||
|
||||
require_once $options->pluginDir($pluginName) . '/' . $panel;
|
||||
require_once $options->pluginDir($pluginName) . '/' . $file;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php
|
||||
if (isset($post) && $post instanceof Typecho_Widget && $post->have()) {
|
||||
if (isset($post) && $post instanceof \Typecho\Widget && $post->have()) {
|
||||
$fileParentContent = $post;
|
||||
} else if (isset($page) && $page instanceof Typecho_Widget && $page->have()) {
|
||||
} elseif (isset($page) && $page instanceof \Typecho\Widget && $page->have()) {
|
||||
$fileParentContent = $page;
|
||||
}
|
||||
|
||||
@@ -13,8 +13,8 @@ if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) {
|
||||
}
|
||||
?>
|
||||
|
||||
<script src="<?php $options->adminStaticUrl('js', 'moxie.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'plupload.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'moxie.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'plupload.js'); ?>"></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
function updateAttacmentNumber () {
|
||||
@@ -94,6 +94,9 @@ $(document).ready(function() {
|
||||
li.effect('highlight', {color : '#FBC2C4'}, 2000, function () {
|
||||
$(this).remove();
|
||||
});
|
||||
|
||||
// fix issue #341
|
||||
this.removeFile(file);
|
||||
}
|
||||
|
||||
var completeFile = null;
|
||||
@@ -117,8 +120,8 @@ $(document).ready(function() {
|
||||
}
|
||||
}
|
||||
|
||||
$('#tab-files').bind('init', function () {
|
||||
var uploader = new plupload.Uploader({
|
||||
var uploader = null, tabFilesEl = $('#tab-files').bind('init', function () {
|
||||
uploader = new plupload.Uploader({
|
||||
browse_button : $('.upload-file').get(0),
|
||||
url : '<?php $security->index('/action/upload'
|
||||
. (isset($fileParentContent) ? '?cid=' . $fileParentContent->cid : '')); ?>',
|
||||
@@ -133,9 +136,9 @@ $(document).ready(function() {
|
||||
|
||||
init : {
|
||||
FilesAdded : function (up, files) {
|
||||
plupload.each(files, function(file) {
|
||||
fileUploadStart(file);
|
||||
});
|
||||
for (var i = 0; i < files.length; i ++) {
|
||||
fileUploadStart(files[i]);
|
||||
}
|
||||
|
||||
completeFile = null;
|
||||
uploader.start();
|
||||
@@ -153,18 +156,19 @@ $(document).ready(function() {
|
||||
|
||||
if (data) {
|
||||
fileUploadComplete(file.id, data[0], data[1]);
|
||||
uploader.removeFile(file);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fileUploadError({
|
||||
fileUploadError.call(uploader, {
|
||||
code : plupload.HTTP_ERROR,
|
||||
file : file
|
||||
});
|
||||
},
|
||||
|
||||
Error : function (up, error) {
|
||||
fileUploadError(error);
|
||||
fileUploadError.call(uploader, error);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -172,6 +176,23 @@ $(document).ready(function() {
|
||||
uploader.init();
|
||||
});
|
||||
|
||||
Typecho.uploadFile = function (file, name) {
|
||||
if (!uploader) {
|
||||
$('#tab-files-btn').parent().trigger('click');
|
||||
}
|
||||
|
||||
var timer = setInterval(function () {
|
||||
if (!uploader) {
|
||||
return;
|
||||
}
|
||||
|
||||
clearInterval(timer);
|
||||
timer = null;
|
||||
|
||||
uploader.addFile(file, name);
|
||||
}, 50);
|
||||
};
|
||||
|
||||
function attachInsertEvent (el) {
|
||||
$('.insert', el).click(function () {
|
||||
var t = $(this), p = t.parents('li');
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
<?php
|
||||
if (isset($post) || isset($page)) {
|
||||
$cid = isset($post) ? $post->cid : $page->cid;
|
||||
|
||||
|
||||
if ($cid) {
|
||||
Typecho_Widget::widget('Widget_Contents_Attachment_Related', 'parentId=' . $cid)->to($attachment);
|
||||
\Widget\Contents\Attachment\Related::alloc(['parentId' => $cid])->to($attachment);
|
||||
} else {
|
||||
Typecho_Widget::widget('Widget_Contents_Attachment_Unattached')->to($attachment);
|
||||
\Widget\Contents\Attachment\Unattached::alloc()->to($attachment);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
</html>
|
||||
<?php
|
||||
/** 注册一个结束插件 */
|
||||
Typecho_Plugin::factory('admin/footer.php')->end();
|
||||
\Typecho\Plugin::factory('admin/footer.php')->end();
|
||||
|
||||
@@ -3,29 +3,21 @@ if (!defined('__TYPECHO_ADMIN__')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
$header = '<link rel="stylesheet" href="' . Typecho_Common::url('normalize.css?v=' . $suffixVersion, $options->adminStaticUrl('css')) . '">
|
||||
<link rel="stylesheet" href="' . Typecho_Common::url('grid.css?v=' . $suffixVersion, $options->adminStaticUrl('css')) . '">
|
||||
<link rel="stylesheet" href="' . Typecho_Common::url('style.css?v=' . $suffixVersion, $options->adminStaticUrl('css')) . '">
|
||||
<!--[if lt IE 9]>
|
||||
<script src="' . Typecho_Common::url('html5shiv.js?v=' . $suffixVersion, $options->adminStaticUrl('js')) . '"></script>
|
||||
<script src="' . Typecho_Common::url('respond.js?v=' . $suffixVersion, $options->adminStaticUrl('js')) . '"></script>
|
||||
<![endif]-->';
|
||||
$header = '<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'normalize.css', true) . '">
|
||||
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'grid.css', true) . '">
|
||||
<link rel="stylesheet" href="' . $options->adminStaticUrl('css', 'style.css', true) . '">';
|
||||
|
||||
/** 注册一个初始化插件 */
|
||||
$header = Typecho_Plugin::factory('admin/header.php')->header($header);
|
||||
$header = \Typecho\Plugin::factory('admin/header.php')->header($header);
|
||||
|
||||
?><!DOCTYPE HTML>
|
||||
<html class="no-js">
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="<?php $options->charset(); ?>">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge, chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<title><?php _e('%s - %s - Powered by Typecho', $menu->title, $options->title); ?></title>
|
||||
<meta name="robots" content="noindex, nofollow">
|
||||
<?php echo $header; ?>
|
||||
</head>
|
||||
<body<?php if (isset($bodyClass)) {echo ' class="' . $bodyClass . '"';} ?>>
|
||||
<!--[if lt IE 9]>
|
||||
<div class="message error browsehappy" role="dialog"><?php _e('当前网页 <strong>不支持</strong> 你正在使用的浏览器. 为了正常的访问, 请 <a href="http://browsehappy.com/">升级你的浏览器</a>'); ?>.</div>
|
||||
<![endif]-->
|
||||
|
||||
|
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 4.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
BIN
admin/img/icons.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
admin/img/icons@2x.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
184
admin/index.php
@@ -3,7 +3,7 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="container typecho-dashboard">
|
||||
@@ -11,64 +11,60 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 welcome-board" role="main">
|
||||
<p><?php _e('目前有 <em>%s</em> 篇文章, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
|
||||
<br><?php _e('点击下面的链接快速开始:'); ?></p>
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>
|
||||
<br><?php _e('点击下面的链接快速开始:'); ?></p>
|
||||
|
||||
<ul id="start-link" class="clearfix">
|
||||
<?php if($user->pass('contributor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif($stat->mySpamCommentsNum > 0): ?>
|
||||
<li><a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('plugins.php'); ?>"><?php _e('插件管理'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('系统设置'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($user->pass('contributor', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('write-post.php'); ?>"><?php _e('撰写新文章'); ?></a></li>
|
||||
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->waitingCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核的评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->waitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif ($stat->myWaitingCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=waiting'); ?>"><?php _e('待审核评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->myWaitingCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if ($user->pass('editor', true) && 'on' == $request->get('__typecho_all_comments') && $stat->spamCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->spamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php elseif ($stat->mySpamCommentsNum > 0): ?>
|
||||
<li>
|
||||
<a href="<?php $options->adminUrl('manage-comments.php?status=spam'); ?>"><?php _e('垃圾评论'); ?></a>
|
||||
<span class="balloon"><?php $stat->mySpamCommentsNum(); ?></span>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php if ($user->pass('administrator', true)): ?>
|
||||
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('更换外观'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('plugins.php'); ?>"><?php _e('插件管理'); ?></a></li>
|
||||
<li><a href="<?php $options->adminUrl('options-general.php'); ?>"><?php _e('系统设置'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<!--<li><a href="<?php $options->adminUrl('profile.php'); ?>"><?php _e('更新我的资料'); ?></a></li>-->
|
||||
</ul>
|
||||
<?php $version = Typecho_Cookie::get('__typecho_check_version'); ?>
|
||||
<?php if ($version && $version['available']): ?>
|
||||
<div class="update-check">
|
||||
<p class="message notice">
|
||||
<?php _e('您当前使用的版本是'); ?> <?php echo $version['current']; ?> →
|
||||
<strong><a href="<?php echo $version['link']; ?>"><?php _e('官方最新版本是'); ?> <?php echo $version['latest']; ?></a></strong>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-4" role="complementary">
|
||||
<section class="latest-link">
|
||||
<h3><?php _e('最近发布的文章'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Post_Recent', 'pageSize=10')->to($posts); ?>
|
||||
<?php \Widget\Contents\Post\Recent::alloc('pageSize=10')->to($posts); ?>
|
||||
<ul>
|
||||
<?php if($posts->have()): ?>
|
||||
<?php while($posts->next()): ?>
|
||||
<li>
|
||||
<span><?php $posts->date('n.j'); ?></span>
|
||||
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有文章'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
<?php if ($posts->have()): ?>
|
||||
<?php while ($posts->next()): ?>
|
||||
<li>
|
||||
<span><?php $posts->date('n.j'); ?></span>
|
||||
<a href="<?php $posts->permalink(); ?>" class="title"><?php $posts->title(); ?></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php _e('暂时没有文章'); ?></em></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</section>
|
||||
</div>
|
||||
@@ -77,17 +73,18 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<section class="latest-link">
|
||||
<h3><?php _e('最近得到的回复'); ?></h3>
|
||||
<ul>
|
||||
<?php Typecho_Widget::widget('Widget_Comments_Recent', 'pageSize=10')->to($comments); ?>
|
||||
<?php if($comments->have()): ?>
|
||||
<?php while($comments->next()): ?>
|
||||
<li>
|
||||
<span><?php $comments->date('n.j'); ?></span>
|
||||
<a href="<?php $comments->permalink(); ?>" class="title"><?php $comments->author(true); ?></a>:
|
||||
<?php $comments->excerpt(35, '...'); ?>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php \Widget\Comments\Recent::alloc('pageSize=10')->to($comments); ?>
|
||||
<?php if ($comments->have()): ?>
|
||||
<?php while ($comments->next()): ?>
|
||||
<li>
|
||||
<span><?php $comments->date('n.j'); ?></span>
|
||||
<a href="<?php $comments->permalink(); ?>"
|
||||
class="title"><?php $comments->author(false); ?></a>:
|
||||
<?php $comments->excerpt(35, '...'); ?>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<li><?php _e('暂时没有回复'); ?></li>
|
||||
<li><?php _e('暂时没有回复'); ?></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</section>
|
||||
@@ -113,47 +110,46 @@ include 'common-js.php';
|
||||
?>
|
||||
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
var ul = $('#typecho-message ul'), cache = window.sessionStorage,
|
||||
html = cache ? cache.getItem('feed') : '',
|
||||
update = cache ? cache.getItem('update') : '';
|
||||
|
||||
if (!!html) {
|
||||
ul.html(html);
|
||||
} else {
|
||||
html = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
|
||||
for (var i = 0; i < o.length; i ++) {
|
||||
var item = o[i];
|
||||
html += '<li><span>' + item.date + '</span> <a href="' + item.link + '" target="_blank">' + item.title
|
||||
+ '</a></li>';
|
||||
}
|
||||
$(document).ready(function () {
|
||||
var ul = $('#typecho-message ul'), cache = window.sessionStorage,
|
||||
html = cache ? cache.getItem('feed') : '',
|
||||
update = cache ? cache.getItem('update') : '';
|
||||
|
||||
if (!!html) {
|
||||
ul.html(html);
|
||||
cache.setItem('feed', html);
|
||||
}, 'json');
|
||||
}
|
||||
} else {
|
||||
html = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=feed'); ?>', function (o) {
|
||||
for (var i = 0; i < o.length; i++) {
|
||||
var item = o[i];
|
||||
html += '<li><span>' + item.date + '</span> <a href="' + item.link + '" target="_blank">' + item.title
|
||||
+ '</a></li>';
|
||||
}
|
||||
|
||||
function applyUpdate(update) {
|
||||
if (update.available) {
|
||||
$('<div class="update-check"><p>'
|
||||
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
|
||||
+ '<strong><a href="' + update.link + '" target="_blank">'
|
||||
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
|
||||
.appendTo('.welcome-board').effect('highlight');
|
||||
ul.html(html);
|
||||
cache.setItem('feed', html);
|
||||
}, 'json');
|
||||
}
|
||||
}
|
||||
|
||||
if (!!update) {
|
||||
applyUpdate($.parseJSON(update));
|
||||
} else {
|
||||
update = '';
|
||||
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
|
||||
applyUpdate(o);
|
||||
cache.setItem('update', resp.responseText);
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
function applyUpdate(update) {
|
||||
if (update.available) {
|
||||
$('<div class="update-check message error"><p>'
|
||||
+ '<?php _e('您当前使用的版本是 %s'); ?>'.replace('%s', update.current) + '<br />'
|
||||
+ '<strong><a href="' + update.link + '" target="_blank">'
|
||||
+ '<?php _e('官方最新版本是 %s'); ?>'.replace('%s', update.latest) + '</a></strong></p></div>')
|
||||
.insertAfter('.typecho-page-title').effect('highlight');
|
||||
}
|
||||
}
|
||||
|
||||
if (!!update) {
|
||||
applyUpdate($.parseJSON(update));
|
||||
} else {
|
||||
$.get('<?php $options->index('/action/ajax?do=checkVersion'); ?>', function (o, status, resp) {
|
||||
applyUpdate(o);
|
||||
cache.setItem('update', resp.responseText);
|
||||
}, 'json');
|
||||
}
|
||||
});
|
||||
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
||||
BIN
admin/js/Moxie.swf
Normal file → Executable file
2193
admin/js/diff.js
301
admin/js/html5shiv.js
vendored
@@ -1,301 +0,0 @@
|
||||
/**
|
||||
* @preserve HTML5 Shiv v3.7.0 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||
*/
|
||||
;(function(window, document) {
|
||||
/*jshint evil:true */
|
||||
/** version */
|
||||
var version = '3.7.0';
|
||||
|
||||
/** Preset options */
|
||||
var options = window.html5 || {};
|
||||
|
||||
/** Used to skip problem elements */
|
||||
var reSkip = /^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i;
|
||||
|
||||
/** Not all elements can be cloned in IE **/
|
||||
var saveClones = /^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i;
|
||||
|
||||
/** Detect whether the browser supports default html5 styles */
|
||||
var supportsHtml5Styles;
|
||||
|
||||
/** Name of the expando, to work with multiple documents or to re-shiv one document */
|
||||
var expando = '_html5shiv';
|
||||
|
||||
/** The id for the the documents expando */
|
||||
var expanID = 0;
|
||||
|
||||
/** Cached data for each document */
|
||||
var expandoData = {};
|
||||
|
||||
/** Detect whether the browser supports unknown elements */
|
||||
var supportsUnknownElements;
|
||||
|
||||
(function() {
|
||||
try {
|
||||
var a = document.createElement('a');
|
||||
a.innerHTML = '<xyz></xyz>';
|
||||
//if the hidden property is implemented we can assume, that the browser supports basic HTML5 Styles
|
||||
supportsHtml5Styles = ('hidden' in a);
|
||||
|
||||
supportsUnknownElements = a.childNodes.length == 1 || (function() {
|
||||
// assign a false positive if unable to shiv
|
||||
(document.createElement)('a');
|
||||
var frag = document.createDocumentFragment();
|
||||
return (
|
||||
typeof frag.cloneNode == 'undefined' ||
|
||||
typeof frag.createDocumentFragment == 'undefined' ||
|
||||
typeof frag.createElement == 'undefined'
|
||||
);
|
||||
}());
|
||||
} catch(e) {
|
||||
// assign a false positive if detection fails => unable to shiv
|
||||
supportsHtml5Styles = true;
|
||||
supportsUnknownElements = true;
|
||||
}
|
||||
|
||||
}());
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Creates a style sheet with the given CSS text and adds it to the document.
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @param {String} cssText The CSS text.
|
||||
* @returns {StyleSheet} The style element.
|
||||
*/
|
||||
function addStyleSheet(ownerDocument, cssText) {
|
||||
var p = ownerDocument.createElement('p'),
|
||||
parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement;
|
||||
|
||||
p.innerHTML = 'x<style>' + cssText + '</style>';
|
||||
return parent.insertBefore(p.lastChild, parent.firstChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the value of `html5.elements` as an array.
|
||||
* @private
|
||||
* @returns {Array} An array of shived element node names.
|
||||
*/
|
||||
function getElements() {
|
||||
var elements = html5.elements;
|
||||
return typeof elements == 'string' ? elements.split(' ') : elements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the data associated to the given document
|
||||
* @private
|
||||
* @param {Document} ownerDocument The document.
|
||||
* @returns {Object} An object of data.
|
||||
*/
|
||||
function getExpandoData(ownerDocument) {
|
||||
var data = expandoData[ownerDocument[expando]];
|
||||
if (!data) {
|
||||
data = {};
|
||||
expanID++;
|
||||
ownerDocument[expando] = expanID;
|
||||
expandoData[expanID] = data;
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived element for the given nodeName and document
|
||||
* @memberOf html5
|
||||
* @param {String} nodeName name of the element
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived element.
|
||||
*/
|
||||
function createElement(nodeName, ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createElement(nodeName);
|
||||
}
|
||||
if (!data) {
|
||||
data = getExpandoData(ownerDocument);
|
||||
}
|
||||
var node;
|
||||
|
||||
if (data.cache[nodeName]) {
|
||||
node = data.cache[nodeName].cloneNode();
|
||||
} else if (saveClones.test(nodeName)) {
|
||||
node = (data.cache[nodeName] = data.createElem(nodeName)).cloneNode();
|
||||
} else {
|
||||
node = data.createElem(nodeName);
|
||||
}
|
||||
|
||||
// Avoid adding some elements to fragments in IE < 9 because
|
||||
// * Attributes like `name` or `type` cannot be set/changed once an element
|
||||
// is inserted into a document/fragment
|
||||
// * Link elements with `src` attributes that are inaccessible, as with
|
||||
// a 403 response, will cause the tab/window to crash
|
||||
// * Script elements appended to fragments will execute when their `src`
|
||||
// or `text` property is set
|
||||
return node.canHaveChildren && !reSkip.test(nodeName) ? data.frag.appendChild(node) : node;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns a shived DocumentFragment for the given document
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The context document.
|
||||
* @returns {Object} The shived DocumentFragment.
|
||||
*/
|
||||
function createDocumentFragment(ownerDocument, data){
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
if(supportsUnknownElements){
|
||||
return ownerDocument.createDocumentFragment();
|
||||
}
|
||||
data = data || getExpandoData(ownerDocument);
|
||||
var clone = data.frag.cloneNode(),
|
||||
i = 0,
|
||||
elems = getElements(),
|
||||
l = elems.length;
|
||||
for(;i<l;i++){
|
||||
clone.createElement(elems[i]);
|
||||
}
|
||||
return clone;
|
||||
}
|
||||
|
||||
/**
|
||||
* Shivs the `createElement` and `createDocumentFragment` methods of the document.
|
||||
* @private
|
||||
* @param {Document|DocumentFragment} ownerDocument The document.
|
||||
* @param {Object} data of the document.
|
||||
*/
|
||||
function shivMethods(ownerDocument, data) {
|
||||
if (!data.cache) {
|
||||
data.cache = {};
|
||||
data.createElem = ownerDocument.createElement;
|
||||
data.createFrag = ownerDocument.createDocumentFragment;
|
||||
data.frag = data.createFrag();
|
||||
}
|
||||
|
||||
|
||||
ownerDocument.createElement = function(nodeName) {
|
||||
//abort shiv
|
||||
if (!html5.shivMethods) {
|
||||
return data.createElem(nodeName);
|
||||
}
|
||||
return createElement(nodeName, ownerDocument, data);
|
||||
};
|
||||
|
||||
ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' +
|
||||
'var n=f.cloneNode(),c=n.createElement;' +
|
||||
'h.shivMethods&&(' +
|
||||
// unroll the `createElement` calls
|
||||
getElements().join().replace(/[\w\-]+/g, function(nodeName) {
|
||||
data.createElem(nodeName);
|
||||
data.frag.createElement(nodeName);
|
||||
return 'c("' + nodeName + '")';
|
||||
}) +
|
||||
');return n}'
|
||||
)(html5, data.frag);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* Shivs the given document.
|
||||
* @memberOf html5
|
||||
* @param {Document} ownerDocument The document to shiv.
|
||||
* @returns {Document} The shived document.
|
||||
*/
|
||||
function shivDocument(ownerDocument) {
|
||||
if (!ownerDocument) {
|
||||
ownerDocument = document;
|
||||
}
|
||||
var data = getExpandoData(ownerDocument);
|
||||
|
||||
if (html5.shivCSS && !supportsHtml5Styles && !data.hasCSS) {
|
||||
data.hasCSS = !!addStyleSheet(ownerDocument,
|
||||
// corrects block display not defined in IE6/7/8/9
|
||||
'article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}' +
|
||||
// adds styling not present in IE6/7/8/9
|
||||
'mark{background:#FF0;color:#000}' +
|
||||
// hides non-rendered elements
|
||||
'template{display:none}'
|
||||
);
|
||||
}
|
||||
if (!supportsUnknownElements) {
|
||||
shivMethods(ownerDocument, data);
|
||||
}
|
||||
return ownerDocument;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
/**
|
||||
* The `html5` object is exposed so that more elements can be shived and
|
||||
* existing shiving can be detected on iframes.
|
||||
* @type Object
|
||||
* @example
|
||||
*
|
||||
* // options can be changed before the script is included
|
||||
* html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false };
|
||||
*/
|
||||
var html5 = {
|
||||
|
||||
/**
|
||||
* An array or space separated string of node names of the elements to shiv.
|
||||
* @memberOf html5
|
||||
* @type Array|String
|
||||
*/
|
||||
'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output progress section summary template time video',
|
||||
|
||||
/**
|
||||
* current version of html5shiv
|
||||
*/
|
||||
'version': version,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the HTML5 style sheet should be inserted.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivCSS': (options.shivCSS !== false),
|
||||
|
||||
/**
|
||||
* Is equal to true if a browser supports creating unknown/HTML5 elements
|
||||
* @memberOf html5
|
||||
* @type boolean
|
||||
*/
|
||||
'supportsUnknownElements': supportsUnknownElements,
|
||||
|
||||
/**
|
||||
* A flag to indicate that the document's `createElement` and `createDocumentFragment`
|
||||
* methods should be overwritten.
|
||||
* @memberOf html5
|
||||
* @type Boolean
|
||||
*/
|
||||
'shivMethods': (options.shivMethods !== false),
|
||||
|
||||
/**
|
||||
* A string to describe the type of `html5` object ("default" or "default print").
|
||||
* @memberOf html5
|
||||
* @type String
|
||||
*/
|
||||
'type': 'default',
|
||||
|
||||
// shivs the document according to the specified `html5` object options
|
||||
'shivDocument': shivDocument,
|
||||
|
||||
//creates a shived element
|
||||
createElement: createElement,
|
||||
|
||||
//creates a shived documentFragment
|
||||
createDocumentFragment: createDocumentFragment
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
|
||||
// expose html5
|
||||
window.html5 = html5;
|
||||
|
||||
// shiv the document
|
||||
shivDocument(document);
|
||||
|
||||
}(this, document));
|
||||
1
admin/js/hyperdown.js
Normal file
4981
admin/js/jquery-ui.js
vendored
9185
admin/js/jquery.js
vendored
10685
admin/js/moxie.js
2645
admin/js/pagedown.js
1
admin/js/paste.js
Normal file
2274
admin/js/plupload.js
1
admin/js/purify.js
Normal file
@@ -1,237 +0,0 @@
|
||||
/*! Respond.js v1.4.2: min/max-width media query polyfill
|
||||
* Copyright 2013 Scott Jehl
|
||||
* Licensed under MIT
|
||||
* http://j.mp/respondjs */
|
||||
|
||||
/*! matchMedia() polyfill - Test a CSS media type/query in JS. Authors & copyright (c) 2012: Scott Jehl, Paul Irish, Nicholas Zakas. Dual MIT/BSD license */
|
||||
/*! NOTE: If you're already including a window.matchMedia polyfill via Modernizr or otherwise, you don't need this part */
|
||||
(function(w) {
|
||||
"use strict";
|
||||
w.matchMedia = w.matchMedia || function(doc, undefined) {
|
||||
var bool, docElem = doc.documentElement, refNode = docElem.firstElementChild || docElem.firstChild, fakeBody = doc.createElement("body"), div = doc.createElement("div");
|
||||
div.id = "mq-test-1";
|
||||
div.style.cssText = "position:absolute;top:-100em";
|
||||
fakeBody.style.background = "none";
|
||||
fakeBody.appendChild(div);
|
||||
return function(q) {
|
||||
div.innerHTML = '­<style media="' + q + '"> #mq-test-1 { width: 42px; }</style>';
|
||||
docElem.insertBefore(fakeBody, refNode);
|
||||
bool = div.offsetWidth === 42;
|
||||
docElem.removeChild(fakeBody);
|
||||
return {
|
||||
matches: bool,
|
||||
media: q
|
||||
};
|
||||
};
|
||||
}(w.document);
|
||||
})(this);
|
||||
|
||||
(function(w) {
|
||||
"use strict";
|
||||
var respond = {};
|
||||
w.respond = respond;
|
||||
respond.update = function() {};
|
||||
var requestQueue = [], xmlHttp = function() {
|
||||
var xmlhttpmethod = false;
|
||||
try {
|
||||
xmlhttpmethod = new w.XMLHttpRequest();
|
||||
} catch (e) {
|
||||
xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP");
|
||||
}
|
||||
return function() {
|
||||
return xmlhttpmethod;
|
||||
};
|
||||
}(), ajax = function(url, callback) {
|
||||
var req = xmlHttp();
|
||||
if (!req) {
|
||||
return;
|
||||
}
|
||||
req.open("GET", url, true);
|
||||
req.onreadystatechange = function() {
|
||||
if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) {
|
||||
return;
|
||||
}
|
||||
callback(req.responseText);
|
||||
};
|
||||
if (req.readyState === 4) {
|
||||
return;
|
||||
}
|
||||
req.send(null);
|
||||
}, isUnsupportedMediaQuery = function(query) {
|
||||
return query.replace(respond.regex.minmaxwh, "").match(respond.regex.other);
|
||||
};
|
||||
respond.ajax = ajax;
|
||||
respond.queue = requestQueue;
|
||||
respond.unsupportedmq = isUnsupportedMediaQuery;
|
||||
respond.regex = {
|
||||
media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi,
|
||||
keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi,
|
||||
comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi,
|
||||
urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g,
|
||||
findStyles: /@media *([^\{]+)\{([\S\s]+?)$/,
|
||||
only: /(only\s+)?([a-zA-Z]+)\s?/,
|
||||
minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
|
||||
maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/,
|
||||
minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi,
|
||||
other: /\([^\)]*\)/g
|
||||
};
|
||||
respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches;
|
||||
if (respond.mediaQueriesSupported) {
|
||||
return;
|
||||
}
|
||||
var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, eminpx, getEmValue = function() {
|
||||
var ret, div = doc.createElement("div"), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false;
|
||||
div.style.cssText = "position:absolute;font-size:1em;width:1em";
|
||||
if (!body) {
|
||||
body = fakeUsed = doc.createElement("body");
|
||||
body.style.background = "none";
|
||||
}
|
||||
docElem.style.fontSize = "100%";
|
||||
body.style.fontSize = "100%";
|
||||
body.appendChild(div);
|
||||
if (fakeUsed) {
|
||||
docElem.insertBefore(body, docElem.firstChild);
|
||||
}
|
||||
ret = div.offsetWidth;
|
||||
if (fakeUsed) {
|
||||
docElem.removeChild(body);
|
||||
} else {
|
||||
body.removeChild(div);
|
||||
}
|
||||
docElem.style.fontSize = originalHTMLFontSize;
|
||||
if (originalBodyFontSize) {
|
||||
body.style.fontSize = originalBodyFontSize;
|
||||
}
|
||||
ret = eminpx = parseFloat(ret);
|
||||
return ret;
|
||||
}, applyMedia = function(fromResize) {
|
||||
var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = new Date().getTime();
|
||||
if (fromResize && lastCall && now - lastCall < resizeThrottle) {
|
||||
w.clearTimeout(resizeDefer);
|
||||
resizeDefer = w.setTimeout(applyMedia, resizeThrottle);
|
||||
return;
|
||||
} else {
|
||||
lastCall = now;
|
||||
}
|
||||
for (var i in mediastyles) {
|
||||
if (mediastyles.hasOwnProperty(i)) {
|
||||
var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em";
|
||||
if (!!min) {
|
||||
min = parseFloat(min) * (min.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!!max) {
|
||||
max = parseFloat(max) * (max.indexOf(em) > -1 ? eminpx || getEmValue() : 1);
|
||||
}
|
||||
if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) {
|
||||
if (!styleBlocks[thisstyle.media]) {
|
||||
styleBlocks[thisstyle.media] = [];
|
||||
}
|
||||
styleBlocks[thisstyle.media].push(rules[thisstyle.rules]);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (var j in appendedEls) {
|
||||
if (appendedEls.hasOwnProperty(j)) {
|
||||
if (appendedEls[j] && appendedEls[j].parentNode === head) {
|
||||
head.removeChild(appendedEls[j]);
|
||||
}
|
||||
}
|
||||
}
|
||||
appendedEls.length = 0;
|
||||
for (var k in styleBlocks) {
|
||||
if (styleBlocks.hasOwnProperty(k)) {
|
||||
var ss = doc.createElement("style"), css = styleBlocks[k].join("\n");
|
||||
ss.type = "text/css";
|
||||
ss.media = k;
|
||||
head.insertBefore(ss, lastLink.nextSibling);
|
||||
if (ss.styleSheet) {
|
||||
ss.styleSheet.cssText = css;
|
||||
} else {
|
||||
ss.appendChild(doc.createTextNode(css));
|
||||
}
|
||||
appendedEls.push(ss);
|
||||
}
|
||||
}
|
||||
}, translate = function(styles, href, media) {
|
||||
var qs = styles.replace(respond.regex.comments, "").replace(respond.regex.keyframes, "").match(respond.regex.media), ql = qs && qs.length || 0;
|
||||
href = href.substring(0, href.lastIndexOf("/"));
|
||||
var repUrls = function(css) {
|
||||
return css.replace(respond.regex.urls, "$1" + href + "$2$3");
|
||||
}, useMedia = !ql && media;
|
||||
if (href.length) {
|
||||
href += "/";
|
||||
}
|
||||
if (useMedia) {
|
||||
ql = 1;
|
||||
}
|
||||
for (var i = 0; i < ql; i++) {
|
||||
var fullq, thisq, eachq, eql;
|
||||
if (useMedia) {
|
||||
fullq = media;
|
||||
rules.push(repUrls(styles));
|
||||
} else {
|
||||
fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1;
|
||||
rules.push(RegExp.$2 && repUrls(RegExp.$2));
|
||||
}
|
||||
eachq = fullq.split(",");
|
||||
eql = eachq.length;
|
||||
for (var j = 0; j < eql; j++) {
|
||||
thisq = eachq[j];
|
||||
if (isUnsupportedMediaQuery(thisq)) {
|
||||
continue;
|
||||
}
|
||||
mediastyles.push({
|
||||
media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all",
|
||||
rules: rules.length - 1,
|
||||
hasquery: thisq.indexOf("(") > -1,
|
||||
minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""),
|
||||
maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "")
|
||||
});
|
||||
}
|
||||
}
|
||||
applyMedia();
|
||||
}, makeRequests = function() {
|
||||
if (requestQueue.length) {
|
||||
var thisRequest = requestQueue.shift();
|
||||
ajax(thisRequest.href, function(styles) {
|
||||
translate(styles, thisRequest.href, thisRequest.media);
|
||||
parsedSheets[thisRequest.href] = true;
|
||||
w.setTimeout(function() {
|
||||
makeRequests();
|
||||
}, 0);
|
||||
});
|
||||
}
|
||||
}, ripCSS = function() {
|
||||
for (var i = 0; i < links.length; i++) {
|
||||
var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet";
|
||||
if (!!href && isCSS && !parsedSheets[href]) {
|
||||
if (sheet.styleSheet && sheet.styleSheet.rawCssText) {
|
||||
translate(sheet.styleSheet.rawCssText, href, media);
|
||||
parsedSheets[href] = true;
|
||||
} else {
|
||||
if (!/^([a-zA-Z:]*\/\/)/.test(href) && !base || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) {
|
||||
if (href.substring(0, 2) === "//") {
|
||||
href = w.location.protocol + href;
|
||||
}
|
||||
requestQueue.push({
|
||||
href: href,
|
||||
media: media
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
makeRequests();
|
||||
};
|
||||
ripCSS();
|
||||
respond.update = ripCSS;
|
||||
respond.getEmValue = getEmValue;
|
||||
function callMedia() {
|
||||
applyMedia(true);
|
||||
}
|
||||
if (w.addEventListener) {
|
||||
w.addEventListener("resize", callMedia, false);
|
||||
} else if (w.attachEvent) {
|
||||
w.attachEvent("onresize", callMedia);
|
||||
}
|
||||
})(this);
|
||||
1547
admin/js/stmd.js
878
admin/js/tokeninput.js
Executable file → Normal file
1258
admin/js/typecho.js
@@ -4,8 +4,8 @@ include 'common.php';
|
||||
if ($user->hasLogin()) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
$rememberName = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_name'));
|
||||
Typecho_Cookie::delete('__typecho_remember_name');
|
||||
$rememberName = htmlspecialchars(\Typecho\Cookie::get('__typecho_remember_name', ''));
|
||||
\Typecho\Cookie::delete('__typecho_remember_name');
|
||||
|
||||
$bodyClass = 'body-100';
|
||||
|
||||
@@ -25,10 +25,12 @@ include 'header.php';
|
||||
</p>
|
||||
<p class="submit">
|
||||
<button type="submit" class="btn btn-l w-100 primary"><?php _e('登录'); ?></button>
|
||||
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer')); ?>" />
|
||||
<input type="hidden" name="referer" value="<?php echo htmlspecialchars($request->get('referer') ?? ''); ?>" />
|
||||
</p>
|
||||
<p>
|
||||
<label for="remember"><input type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('下次自动登录'); ?></label>
|
||||
<label for="remember">
|
||||
<input<?php if(\Typecho\Cookie::get('__typecho_remember_remember')): ?> checked<?php endif; ?> type="checkbox" name="remember" class="checkbox" value="1" id="remember" /> <?php _e('下次自动登录'); ?>
|
||||
</label>
|
||||
</p>
|
||||
</form>
|
||||
|
||||
|
||||
@@ -3,27 +3,35 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
Typecho_Widget::widget('Widget_Metas_Category_Admin')->to($categories);
|
||||
\Widget\Metas\Category\Admin::alloc()->to($categories);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
|
||||
<div class="col-mb-12" role="main">
|
||||
|
||||
<form method="post" name="manage_categories" class="operate-form">
|
||||
|
||||
<div class="col-mb-12" role="main">
|
||||
|
||||
<form method="post" name="manage_categories" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('此分类下的所有内容将被删除, 你确认要删除这些分类吗?'); ?>" href="<?php $security->index('/action/metas-category-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
<li><a lang="<?php _e('刷新分类可能需要等待较长时间, 你确认要刷新这些分类吗?'); ?>" href="<?php $security->index('/action/metas-category-edit?do=refresh'); ?>"><?php _e('刷新'); ?></a></li>
|
||||
<li><a lang="<?php _e('此分类下的所有内容将被删除, 你确认要删除这些分类吗?'); ?>"
|
||||
href="<?php $security->index('/action/metas-category-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<li><a lang="<?php _e('刷新分类可能需要等待较长时间, 你确认要刷新这些分类吗?'); ?>"
|
||||
href="<?php $security->index('/action/metas-category-edit?do=refresh'); ?>"><?php _e('刷新'); ?></a>
|
||||
</li>
|
||||
<li class="multiline">
|
||||
<button type="button" class="btn merge btn-s" rel="<?php $security->index('/action/metas-category-edit?do=merge'); ?>"><?php _e('合并到'); ?></button>
|
||||
<button type="button" class="btn merge btn-s"
|
||||
rel="<?php $security->index('/action/metas-category-edit?do=merge'); ?>"><?php _e('合并到'); ?></button>
|
||||
<select name="merge">
|
||||
<?php $categories->parse('<option value="{mid}">{name}</option>'); ?>
|
||||
</select>
|
||||
@@ -39,61 +47,71 @@ Typecho_Widget::widget('Widget_Metas_Category_Admin')->to($categories);
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="30%"/>
|
||||
<col width="15%"/>
|
||||
<col width="25%"/>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
<col width="10%"/>
|
||||
<col width="15%" class="kit-hidden-mb"/>
|
||||
<col width="25%"/>
|
||||
<col width="15%"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th> </th>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('子分类'); ?></th>
|
||||
<th><?php _e('缩略名'); ?></th>
|
||||
<th> </th>
|
||||
<th><?php _e('文章数'); ?></th>
|
||||
</tr>
|
||||
<tr class="nodrag">
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('子分类'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('缩略名'); ?></th>
|
||||
<th></th>
|
||||
<th class="kit-hidden-mb"><?php _e('文章数'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if($categories->have()): ?>
|
||||
<?php if ($categories->have()): ?>
|
||||
<?php while ($categories->next()): ?>
|
||||
<tr id="mid-<?php $categories->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $categories->mid(); ?>" name="mid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('category.php?mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
|
||||
<a href="<?php $categories->permalink(); ?>" title="<?php _e('浏览 %s', $categories->name); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php if (count($categories->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-categories.php?parent=' . $categories->mid); ?>"><?php echo _n('一个分类', '%d个分类', count($categories->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('category.php?parent=' . $categories->mid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $categories->slug(); ?></td>
|
||||
<td>
|
||||
<?php if ($options->defaultCategory == $categories->mid): ?>
|
||||
<?php _e('默认'); ?>
|
||||
<?php else: ?>
|
||||
<a class="hidden-by-mouse" href="<?php $security->index('/action/metas-category-edit?do=default&mid=' . $categories->mid); ?>" title="<?php _e('设为默认'); ?>"><?php _e('默认'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><a class="balloon-button left size-<?php echo Typecho_Common::splitByCount($categories->count, 1, 10, 20, 50, 100); ?>" href="<?php $options->adminUrl('manage-posts.php?category=' . $categories->mid); ?>"><?php $categories->count(); ?></a></td>
|
||||
</tr>
|
||||
<tr id="mid-<?php $categories->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $categories->mid(); ?>"
|
||||
name="mid[]"/></td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('category.php?mid=' . $categories->mid); ?>"><?php $categories->name(); ?></a>
|
||||
<a href="<?php $categories->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $categories->name); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td>
|
||||
|
||||
<?php if (count($categories->children) > 0): ?>
|
||||
<a href="<?php $options->adminUrl('manage-categories.php?parent=' . $categories->mid); ?>"><?php echo _n('一个分类', '%d个分类', count($categories->children)); ?></a>
|
||||
<?php else: ?>
|
||||
<a href="<?php $options->adminUrl('category.php?parent=' . $categories->mid); ?>"><?php echo _e('新增'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $categories->slug(); ?></td>
|
||||
<td>
|
||||
<?php if ($options->defaultCategory == $categories->mid): ?>
|
||||
<?php _e('默认'); ?>
|
||||
<?php else: ?>
|
||||
<a class="hidden-by-mouse"
|
||||
href="<?php $security->index('/action/metas-category-edit?do=default&mid=' . $categories->mid); ?>"
|
||||
title="<?php _e('设为默认'); ?>"><?php _e('默认'); ?></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($categories->count, 1, 10, 20, 50, 100); ?>"
|
||||
href="<?php $options->adminUrl('manage-posts.php?category=' . $categories->mid); ?>"><?php $categories->count(); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何分类'); ?></h6></td>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何分类'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -104,51 +122,51 @@ include 'common-js.php';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var table = $('.typecho-list-table').tableDnD({
|
||||
onDrop : function () {
|
||||
var ids = [];
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var table = $('.typecho-list-table').tableDnD({
|
||||
onDrop: function () {
|
||||
var ids = [];
|
||||
|
||||
$('input[type=checkbox]', table).each(function () {
|
||||
ids.push($(this).val());
|
||||
});
|
||||
$('input[type=checkbox]', table).each(function () {
|
||||
ids.push($(this).val());
|
||||
});
|
||||
|
||||
$.post('<?php $security->index('/action/metas-category-edit?do=sort'); ?>',
|
||||
$.param({mid : ids}));
|
||||
$.post('<?php $security->index('/action/metas-category-edit?do=sort'); ?>',
|
||||
$.param({mid: ids}));
|
||||
|
||||
$('tr', table).each(function (i) {
|
||||
if (i % 2) {
|
||||
$(this).addClass('even');
|
||||
} else {
|
||||
$(this).removeClass('even');
|
||||
}
|
||||
});
|
||||
}
|
||||
$('tr', table).each(function (i) {
|
||||
if (i % 2) {
|
||||
$(this).addClass('even');
|
||||
} else {
|
||||
$(this).removeClass('even');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
table.tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'tr',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function () {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
<?php if (isset($request->mid)): ?>
|
||||
$('.typecho-mini-panel').effect('highlight', '#AACB36');
|
||||
<?php endif; ?>
|
||||
});
|
||||
|
||||
table.tableSelectable({
|
||||
checkEl : 'input[type=checkbox]',
|
||||
rowEl : 'tr',
|
||||
selectAllEl : '.typecho-table-select-all',
|
||||
actionEl : '.dropdown-menu a'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl : '.dropdown-toggle',
|
||||
menuEl : '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function () {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
<?php if (isset($request->mid)): ?>
|
||||
$('.typecho-mini-panel').effect('highlight', '#AACB36');
|
||||
<?php endif; ?>
|
||||
});
|
||||
})();
|
||||
})();
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$comments = Typecho_Widget::widget('Widget_Comments_Admin');
|
||||
$isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typecho_Cookie::get('__typecho_all_comments'));
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$comments = \Widget\Comments\Admin::alloc();
|
||||
$isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == \Typecho\Cookie::get('__typecho_all_comments'));
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
@@ -69,7 +69,7 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typ
|
||||
(isset($request->status) ? 'status=' . htmlspecialchars($request->get('status')) : '') .
|
||||
(isset($request->cid) ? (isset($request->status) ? '&' : '') . 'cid=' . htmlspecialchars($request->get('cid')) : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords); ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords ?? ''); ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<?php if(isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($request->get('status')); ?>" name="status" />
|
||||
<?php endif; ?>
|
||||
@@ -85,16 +85,16 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typ
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="3%"/>
|
||||
<col width="6%" />
|
||||
<col width="3%" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb" />
|
||||
<col width="20%"/>
|
||||
<col width="71%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"> </th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"> </th>
|
||||
<th><?php _e('内容'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -112,12 +112,12 @@ $isAllComments = ('on' == $request->get('__typecho_all_comments') || 'on' == Typ
|
||||
'text' => $comments->text
|
||||
);
|
||||
|
||||
echo htmlspecialchars(Json::encode($comment));
|
||||
echo htmlspecialchars(json_encode($comment));
|
||||
?>">
|
||||
<td valign="top">
|
||||
<td valign="top" class="kit-hidden-mb">
|
||||
<input type="checkbox" value="<?php $comments->coid(); ?>" name="coid[]"/>
|
||||
</td>
|
||||
<td valign="top">
|
||||
<td valign="top" class="kit-hidden-mb">
|
||||
<div class="comment-avatar">
|
||||
<?php if ('comment' == $comments->type): ?>
|
||||
<?php $comments->gravatar(40); ?>
|
||||
|
||||
@@ -3,112 +3,134 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$attachments = \Widget\Contents\Attachment\Admin::alloc();
|
||||
?>
|
||||
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Attachment_Admin')->to($attachments); ?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12">
|
||||
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>" href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<button class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>" lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-s btn-warn btn-operate"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>"
|
||||
lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-medias.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<a href="<?php $options->adminUrl('manage-medias.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords); ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo htmlspecialchars($request->keywords ?? ''); ?>"<?php if ('' == $request->keywords): ?> onclick="value='';name='keywords';" <?php else: ?> name="keywords"<?php endif; ?>/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
|
||||
<form method="post" name="manage_medias" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table draggable">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="6%"/>
|
||||
<col width="30%"/>
|
||||
<col width=""/>
|
||||
<col width="30%"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table draggable">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="30%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('文件名'); ?></th>
|
||||
<th><?php _e('上传者'); ?></th>
|
||||
<th><?php _e('所属文章'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('上传者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('所属文章'); ?></th>
|
||||
<th><?php _e('发布日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if($attachments->have()): ?>
|
||||
<?php while($attachments->next()): ?>
|
||||
<?php $mime = Typecho_Common::mimeIconType($attachments->attachment->mime); ?>
|
||||
<tr id="<?php $attachments->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $attachments->cid(); ?>" name="cid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a></td>
|
||||
<td>
|
||||
<i class="mime-<?php echo $mime; ?>"></i>
|
||||
<a href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
|
||||
<a href="<?php $attachments->permalink(); ?>" title="<?php _e('浏览 %s', $attachments->title); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td><?php $attachments->author(); ?></td>
|
||||
<td>
|
||||
<?php if ($attachments->parentPost->cid): ?>
|
||||
<a href="<?php $options->adminUrl('write-' . (0 === strpos($attachments->parentPost->type, 'post') ? 'post' : 'page') . '.php?cid=' . $attachments->parentPost->cid); ?>"><?php $attachments->parentPost->title(); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="description"><?php _e('未归档'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $attachments->dateWord(); ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<?php while ($attachments->next()): ?>
|
||||
<?php $mime = \Typecho\Common::mimeIconType($attachments->attachment->mime); ?>
|
||||
<tr id="<?php $attachments->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox"
|
||||
value="<?php $attachments->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $attachments->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($attachments->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $attachments->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<i class="mime-<?php echo $mime; ?>"></i>
|
||||
<a href="<?php $options->adminUrl('media.php?cid=' . $attachments->cid); ?>"><?php $attachments->title(); ?></a>
|
||||
<a href="<?php $attachments->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $attachments->title); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $attachments->author(); ?></td>
|
||||
<td class="kit-hidden-mb">
|
||||
<?php if ($attachments->parentPost->cid): ?>
|
||||
<a href="<?php $options->adminUrl('write-' . (0 === strpos($attachments->parentPost->type, 'post') ? 'post' : 'page') . '.php?cid=' . $attachments->parentPost->cid); ?>"><?php $attachments->parentPost->title(); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="description"><?php _e('未归档'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $attachments->dateWord(); ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文件'); ?></h6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文件'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>" href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些文件吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn btn-s btn-warn btn-operate" href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>" lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
<button class="btn btn-s btn-warn btn-operate"
|
||||
href="<?php $security->index('/action/contents-attachment-edit?do=clear'); ?>"
|
||||
lang="<?php _e('您确认要清理未归档的文件吗?'); ?>"><?php _e('清理未归档文件'); ?></button>
|
||||
</div>
|
||||
<?php if($attachments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $attachments->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php if ($attachments->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $attachments->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
|
||||
</div>
|
||||
</div><!-- end .typecho-page-main -->
|
||||
</div>
|
||||
|
||||
@@ -3,7 +3,8 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$pages = \Widget\Contents\Page\Admin::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
@@ -13,88 +14,112 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些页面吗?'); ?>" href="<?php $security->index('/action/contents-page-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些页面吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-page-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-page-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<a href="<?php $options->adminUrl('manage-pages.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords); ?>" name="keywords" />
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo htmlspecialchars($request->keywords ?? ''); ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
|
||||
<form method="post" name="manage_pages" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="6%"/>
|
||||
<col width="30%"/>
|
||||
<col width="30%"/>
|
||||
<col width=""/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr class="nodrag">
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th><?php _e('缩略名'); ?></th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Page_Admin')->to($pages); ?>
|
||||
<?php if($pages->have()): ?>
|
||||
<?php while($pages->next()): ?>
|
||||
<tr id="<?php $pages->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $pages->cid(); ?>" name="cid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $pages->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($pages->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $pages->commentsNum(); ?></a></td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php
|
||||
if ($pages->hasSaved || 'page_draft' == $pages->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} else if ('hidden' == $pages->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
}
|
||||
?>
|
||||
<?php if ('page_draft' != $pages->type): ?>
|
||||
<a href="<?php $pages->permalink(); ?>" title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"><i class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $pages->slug(); ?></td>
|
||||
<td><?php $pages->author(); ?></td>
|
||||
<td>
|
||||
<?php if ($pages->hasSaved): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new Typecho_Date($pages->modified); ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($pages->have()): ?>
|
||||
<?php while ($pages->next()): ?>
|
||||
<tr id="<?php $pages->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $pages->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . $pages->cid); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($pages->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $pages->commentsNum(); ?> <?php _e('评论'); ?>"><?php $pages->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"><?php $pages->title(); ?></a>
|
||||
<?php
|
||||
if ($pages->hasSaved || 'page_draft' == $pages->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
}
|
||||
|
||||
if ('hidden' == $pages->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-page.php?cid=' . $pages->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('page_draft' != $pages->type): ?>
|
||||
<a href="<?php $pages->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($pages->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $pages->slug(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $pages->author(); ?></td>
|
||||
<td>
|
||||
<?php if ($pages->hasSaved): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($pages->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $pages->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<?php $pages->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何页面'); ?></h6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何页面'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</tbody>
|
||||
</table>
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</form><!-- end .operate-form -->
|
||||
</div><!-- end .typecho-list -->
|
||||
</div><!-- end .typecho-page-main -->
|
||||
@@ -107,25 +132,25 @@ include 'common-js.php';
|
||||
include 'table-js.php';
|
||||
?>
|
||||
|
||||
<?php if(!isset($request->status) || 'publish' == $request->get('status')): ?>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var table = $('.typecho-list-table').tableDnD({
|
||||
onDrop : function () {
|
||||
var ids = [];
|
||||
<?php if (!isset($request->status) || 'publish' == $request->get('status')): ?>
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
var table = $('.typecho-list-table').tableDnD({
|
||||
onDrop: function () {
|
||||
var ids = [];
|
||||
|
||||
$('input[type=checkbox]', table).each(function () {
|
||||
ids.push($(this).val());
|
||||
$('input[type=checkbox]', table).each(function () {
|
||||
ids.push($(this).val());
|
||||
});
|
||||
|
||||
$.post('<?php $security->index('/action/contents-page-edit?do=sort'); ?>',
|
||||
$.param({cid: ids}));
|
||||
}
|
||||
});
|
||||
|
||||
$.post('<?php $security->index('/action/contents-page-edit?do=sort'); ?>',
|
||||
$.param({cid : ids}));
|
||||
}
|
||||
});
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php include 'footer.php'; ?>
|
||||
|
||||
@@ -3,139 +3,245 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
$posts = \Widget\Contents\Post\Admin::alloc();
|
||||
$isAllPosts = ('on' == $request->get('__typecho_all_posts') || 'on' == \Typecho\Cookie::get('__typecho_all_posts'));
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<div class="clearfix">
|
||||
<ul class="typecho-option-tabs right">
|
||||
<?php if ($user->pass('editor', true) && !isset($request->uid)): ?>
|
||||
<li class="<?php if ($isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=on&page=1'); ?>"><?php _e('所有'); ?></a>
|
||||
</li>
|
||||
<li class="<?php if (!$isAllPosts): ?> current<?php endif; ?>"><a
|
||||
href="<?php echo $request->makeUriByRequest('__typecho_all_posts=off&page=1'); ?>"><?php _e('我的'); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<ul class="typecho-option-tabs">
|
||||
<li<?php if (!isset($request->status) || 'all' == $request->get('status')): ?> class="current"<?php endif; ?>>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php'
|
||||
. (isset($request->uid) ? '?uid=' . $request->uid : '')); ?>"><?php _e('可用'); ?></a>
|
||||
</li>
|
||||
<li<?php if ('waiting' == $request->get('status')): ?> class="current"<?php endif; ?>><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?status=waiting'
|
||||
. (isset($request->uid) ? '&uid=' . $request->uid : '')); ?>"><?php _e('待审核'); ?>
|
||||
<?php if (!$isAllPosts && $stat->myWaitingPostsNum > 0 && !isset($request->uid)): ?>
|
||||
<span class="balloon"><?php $stat->myWaitingPostsNum(); ?></span>
|
||||
<?php elseif ($isAllPosts && $stat->waitingPostsNum > 0 && !isset($request->uid)): ?>
|
||||
<span class="balloon"><?php $stat->waitingPostsNum(); ?></span>
|
||||
<?php elseif (isset($request->uid) && $stat->currentWaitingPostsNum > 0): ?>
|
||||
<span class="balloon"><?php $stat->currentWaitingPostsNum(); ?></span>
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
<li<?php if ('draft' == $request->get('status')): ?> class="current"<?php endif; ?>><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?status=draft'
|
||||
. (isset($request->uid) ? '&uid=' . $request->uid : '')); ?>"><?php _e('草稿'); ?>
|
||||
<?php if (!$isAllPosts && $stat->myDraftPostsNum > 0 && !isset($request->uid)): ?>
|
||||
<span class="balloon"><?php $stat->myDraftPostsNum(); ?></span>
|
||||
<?php elseif ($isAllPosts && $stat->draftPostsNum > 0 && !isset($request->uid)): ?>
|
||||
<span class="balloon"><?php $stat->draftPostsNum(); ?></span>
|
||||
<?php elseif (isset($request->uid) && $stat->currentDraftPostsNum > 0): ?>
|
||||
<span class="balloon"><?php $stat->currentDraftPostsNum(); ?></span>
|
||||
<?php endif; ?>
|
||||
</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>" href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords || '' != $request->category): ?>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php' . (isset($request->uid) ? '?uid=' . htmlspecialchars($request->get('uid')) : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<a href="<?php $options->adminUrl('manage-posts.php'
|
||||
. (isset($request->status) || isset($request->uid) ? '?' .
|
||||
(isset($request->status) ? 'status=' . htmlspecialchars($request->get('status')) : '') .
|
||||
(isset($request->uid) ? '?uid=' . htmlspecialchars($request->get('uid')) : '') : '')); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords); ?>" name="keywords" />
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo htmlspecialchars($request->keywords ?? ''); ?>" name="keywords"/>
|
||||
<select name="category">
|
||||
<option value=""><?php _e('所有分类'); ?></option>
|
||||
<?php Typecho_Widget::widget('Widget_Metas_Category_List')->to($category); ?>
|
||||
<?php while($category->next()): ?>
|
||||
<option value="<?php $category->mid(); ?>"<?php if($request->get('category') == $category->mid): ?> selected="true"<?php endif; ?>><?php $category->name(); ?></option>
|
||||
<?php endwhile; ?>
|
||||
<option value=""><?php _e('所有分类'); ?></option>
|
||||
<?php \Widget\Metas\Category\Rows::alloc()->to($category); ?>
|
||||
<?php while ($category->next()): ?>
|
||||
<option
|
||||
value="<?php $category->mid(); ?>"<?php if ($request->get('category') == $category->mid): ?> selected="true"<?php endif; ?>><?php $category->name(); ?></option>
|
||||
<?php endwhile; ?>
|
||||
</select>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
<?php if(isset($request->uid)): ?>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($request->get('uid')); ?>" name="uid" />
|
||||
<?php if (isset($request->uid)): ?>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($request->get('uid')); ?>"
|
||||
name="uid"/>
|
||||
<?php endif; ?>
|
||||
<?php if (isset($request->status)): ?>
|
||||
<input type="hidden" value="<?php echo htmlspecialchars($request->get('status')); ?>"
|
||||
name="status"/>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
|
||||
<form method="post" name="manage_posts" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="6%"/>
|
||||
<col width="45%"/>
|
||||
<col width=""/>
|
||||
<col width="18%"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="45%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="18%" class="kit-hidden-mb"/>
|
||||
<col width="16%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('标题'); ?></th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th><?php _e('分类'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('分类'); ?></th>
|
||||
<th><?php _e('日期'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php Typecho_Widget::widget('Widget_Contents_Post_Admin')->to($posts); ?>
|
||||
<?php if($posts->have()): ?>
|
||||
<?php while($posts->next()): ?>
|
||||
<tr id="<?php $posts->theId(); ?>">
|
||||
<td><input type="checkbox" value="<?php $posts->cid(); ?>" name="cid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-comments.php?cid=' . $posts->cid); ?>" class="balloon-button size-<?php echo Typecho_Common::splitByCount($posts->commentsNum, 1, 10, 20, 50, 100); ?>"><?php $posts->commentsNum(); ?></a></td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"><?php $posts->title(); ?></a>
|
||||
<?php
|
||||
if ($posts->hasSaved || 'post_draft' == $posts->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
} else if ('hidden' == $posts->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
} else if ('waiting' == $posts->status) {
|
||||
echo '<em class="status">' . _t('待审核') . '</em>';
|
||||
} else if ('private' == $posts->status) {
|
||||
echo '<em class="status">' . _t('私密') . '</em>';
|
||||
} else if ($posts->password) {
|
||||
echo '<em class="status">' . _t('密码保护') . '</em>';
|
||||
}
|
||||
?>
|
||||
<?php if ('post_draft' != $posts->type): ?>
|
||||
<a href="<?php $posts->permalink(); ?>" title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>"><i class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><a href="<?php $options->adminUrl('manage-posts.php?uid=' . $posts->author->uid); ?>"><?php $posts->author(); ?></a></td>
|
||||
<td><?php $categories = $posts->categories; $length = count($categories); ?>
|
||||
<?php foreach ($categories as $key => $val): ?>
|
||||
<?php echo '<a href="';
|
||||
$options->adminUrl('manage-posts.php?category=' . $val['mid']
|
||||
. (isset($request->uid) ? '&uid=' . $request->uid : '')
|
||||
. (isset($request->status) ? '&status=' . $request->status : ''));
|
||||
echo '">' . $val['name'] . '</a>' . ($key < $length - 1 ? ', ' : ''); ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($posts->hasSaved): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new Typecho_Date($posts->modified); ?>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($posts->have()): ?>
|
||||
<?php while ($posts->next()): ?>
|
||||
<tr id="<?php $posts->theId(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $posts->cid(); ?>"
|
||||
name="cid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-comments.php?cid=' . ($posts->parentId ? $posts->parentId : $posts->cid)); ?>"
|
||||
class="balloon-button size-<?php echo \Typecho\Common::splitByCount($posts->commentsNum, 1, 10, 20, 50, 100); ?>"
|
||||
title="<?php $posts->commentsNum(); ?> <?php _e('评论'); ?>"><?php $posts->commentsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"><?php $posts->title(); ?></a>
|
||||
<?php
|
||||
if ($posts->hasSaved || 'post_draft' == $posts->type) {
|
||||
echo '<em class="status">' . _t('草稿') . '</em>';
|
||||
}
|
||||
|
||||
if ('hidden' == $posts->status) {
|
||||
echo '<em class="status">' . _t('隐藏') . '</em>';
|
||||
} elseif ('waiting' == $posts->status) {
|
||||
echo '<em class="status">' . _t('待审核') . '</em>';
|
||||
} elseif ('private' == $posts->status) {
|
||||
echo '<em class="status">' . _t('私密') . '</em>';
|
||||
} elseif ($posts->password) {
|
||||
echo '<em class="status">' . _t('密码保护') . '</em>';
|
||||
}
|
||||
?>
|
||||
<a href="<?php $options->adminUrl('write-post.php?cid=' . $posts->cid); ?>"
|
||||
title="<?php _e('编辑 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
<?php if ('post_draft' != $posts->type): ?>
|
||||
<a href="<?php $posts->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', htmlspecialchars($posts->title)); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?uid=' . $posts->author->uid); ?>"><?php $posts->author(); ?></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $categories = $posts->categories;
|
||||
$length = count($categories); ?>
|
||||
<?php foreach ($categories as $key => $val): ?>
|
||||
<?php echo '<a href="';
|
||||
$options->adminUrl('manage-posts.php?category=' . $val['mid']
|
||||
. (isset($request->uid) ? '&uid=' . $request->uid : '')
|
||||
. (isset($request->status) ? '&status=' . $request->status : ''));
|
||||
echo '">' . $val['name'] . '</a>' . ($key < $length - 1 ? ', ' : ''); ?>
|
||||
<?php endforeach; ?>
|
||||
</td>
|
||||
<td>
|
||||
<?php if ($posts->hasSaved): ?>
|
||||
<span class="description">
|
||||
<?php $modifyDate = new \Typecho\Date($posts->modified); ?>
|
||||
<?php _e('保存于 %s', $modifyDate->word()); ?>
|
||||
</span>
|
||||
<?php else: ?>
|
||||
<?php $posts->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<?php $posts->dateWord(); ?>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文章'); ?></h6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="6"><h6 class="typecho-list-table-title"><?php _e('没有任何文章'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>" href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
<li><a lang="<?php _e('你确认要删除这些文章吗?'); ?>"
|
||||
href="<?php $security->index('/action/contents-post-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<?php if ($user->pass('editor', true)): ?>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=publish'); ?>"><?php _e('标记为<strong>%s</strong>', _t('公开')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=waiting'); ?>"><?php _e('标记为<strong>%s</strong>', _t('待审核')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=hidden'); ?>"><?php _e('标记为<strong>%s</strong>', _t('隐藏')); ?></a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="<?php $security->index('/action/contents-post-edit?do=mark&status=private'); ?>"><?php _e('标记为<strong>%s</strong>', _t('私密')); ?></a>
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if($posts->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $posts->pageNav(); ?>
|
||||
</ul>
|
||||
<?php if ($posts->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $posts->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
@@ -3,54 +3,65 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
Typecho_Widget::widget('Widget_Metas_Tag_Admin')->to($tags);
|
||||
\Widget\Metas\Tag\Admin::alloc()->to($tags);
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main manage-metas">
|
||||
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
|
||||
<form method="post" name="manage_tags" class="operate-form">
|
||||
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
|
||||
<form method="post" name="manage_tags" class="operate-form">
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些标签吗?'); ?>" href="<?php $security->index('/action/metas-tag-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
<li><a lang="<?php _e('刷新标签可能需要等待较长时间, 你确认要刷新这些标签吗?'); ?>" href="<?php $security->index('/action/metas-tag-edit?do=refresh'); ?>"><?php _e('刷新'); ?></a></li>
|
||||
<li class="multiline">
|
||||
<button type="button" class="btn btn-s merge" rel="<?php $security->index('/action/metas-tag-edit?do=merge'); ?>"><?php _e('合并到'); ?></button>
|
||||
<input type="text" name="merge" class="text-s" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些标签吗?'); ?>"
|
||||
href="<?php $security->index('/action/metas-tag-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
<li><a lang="<?php _e('刷新标签可能需要等待较长时间, 你确认要刷新这些标签吗?'); ?>"
|
||||
href="<?php $security->index('/action/metas-tag-edit?do=refresh'); ?>"><?php _e('刷新'); ?></a>
|
||||
</li>
|
||||
<li class="multiline">
|
||||
<button type="button" class="btn btn-s merge"
|
||||
rel="<?php $security->index('/action/metas-tag-edit?do=merge'); ?>"><?php _e('合并到'); ?></button>
|
||||
<input type="text" name="merge" class="text-s"/>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<ul class="typecho-list-notable tag-list clearfix">
|
||||
<?php if($tags->have()): ?>
|
||||
<?php while ($tags->next()): ?>
|
||||
<li class="size-<?php $tags->split(5, 10, 20, 30); ?>" id="<?php $tags->theId(); ?>">
|
||||
<input type="checkbox" value="<?php $tags->mid(); ?>" name="mid[]"/>
|
||||
<span rel="<?php echo $request->makeUriByRequest('mid=' . $tags->mid); ?>"><?php $tags->name(); ?></span>
|
||||
<a class="tag-edit-link" href="<?php echo $request->makeUriByRequest('mid=' . $tags->mid); ?>"><i class="i-edit"></i></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php if ($tags->have()): ?>
|
||||
<?php while ($tags->next()): ?>
|
||||
<li class="size-<?php $tags->split(5, 10, 20, 30); ?>" id="<?php $tags->theId(); ?>">
|
||||
<input type="checkbox" value="<?php $tags->mid(); ?>" name="mid[]"/>
|
||||
<span
|
||||
rel="<?php echo $request->makeUriByRequest('mid=' . $tags->mid); ?>"><?php $tags->name(); ?></span>
|
||||
<a class="tag-edit-link"
|
||||
href="<?php echo $request->makeUriByRequest('mid=' . $tags->mid); ?>"><i
|
||||
class="i-edit"></i></a>
|
||||
</li>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<h6 class="typecho-list-table-title"><?php _e('没有任何标签'); ?></h6>
|
||||
<h6 class="typecho-list-table-title"><?php _e('没有任何标签'); ?></h6>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
<input type="hidden" name="do" value="delete" />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-4" role="form">
|
||||
<?php Typecho_Widget::widget('Widget_Metas_Tag_Edit')->form()->render(); ?>
|
||||
</div>
|
||||
<input type="hidden" name="do" value="delete"/>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-4" role="form">
|
||||
<?php \Widget\Metas\Tag\Edit::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -61,31 +72,31 @@ include 'common-js.php';
|
||||
?>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
(function () {
|
||||
$(document).ready(function () {
|
||||
|
||||
$('.typecho-list-notable').tableSelectable({
|
||||
checkEl : 'input[type=checkbox]',
|
||||
rowEl : 'li',
|
||||
selectAllEl : '.typecho-table-select-all',
|
||||
actionEl : '.dropdown-menu a'
|
||||
$('.typecho-list-notable').tableSelectable({
|
||||
checkEl: 'input[type=checkbox]',
|
||||
rowEl: 'li',
|
||||
selectAllEl: '.typecho-table-select-all',
|
||||
actionEl: '.dropdown-menu a'
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl: '.dropdown-toggle',
|
||||
menuEl: '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function () {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
<?php if (isset($request->mid)): ?>
|
||||
$('.typecho-mini-panel').effect('highlight', '#AACB36');
|
||||
<?php endif; ?>
|
||||
});
|
||||
|
||||
$('.btn-drop').dropdownMenu({
|
||||
btnEl : '.dropdown-toggle',
|
||||
menuEl : '.dropdown-menu'
|
||||
});
|
||||
|
||||
$('.dropdown-menu button.merge').click(function () {
|
||||
var btn = $(this);
|
||||
btn.parents('form').attr('action', btn.attr('rel')).submit();
|
||||
});
|
||||
|
||||
<?php if (isset($request->mid)): ?>
|
||||
$('.typecho-mini-panel').effect('highlight', '#AACB36');
|
||||
<?php endif; ?>
|
||||
});
|
||||
})();
|
||||
})();
|
||||
</script>
|
||||
<?php include 'footer.php'; ?>
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$users = \Widget\Users\Admin::alloc();
|
||||
?>
|
||||
<div class="main">
|
||||
<div class="body container">
|
||||
@@ -11,97 +13,116 @@ include 'menu.php';
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>" href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="search" role="search">
|
||||
<?php if ('' != $request->keywords): ?>
|
||||
<a href="<?php $options->adminUrl('manage-users.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<a href="<?php $options->adminUrl('manage-users.php'); ?>"><?php _e('« 取消筛选'); ?></a>
|
||||
<?php endif; ?>
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>" value="<?php echo htmlspecialchars($request->keywords); ?>" name="keywords" />
|
||||
<input type="text" class="text-s" placeholder="<?php _e('请输入关键字'); ?>"
|
||||
value="<?php echo htmlspecialchars($request->keywords ?? ''); ?>" name="keywords"/>
|
||||
<button type="submit" class="btn btn-s"><?php _e('筛选'); ?></button>
|
||||
</div>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
<form method="post" name="manage_users" class="operate-form">
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20"/>
|
||||
<col width="6%"/>
|
||||
<col width="30%"/>
|
||||
<col width=""/>
|
||||
<col width="25%"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="20" class="kit-hidden-mb"/>
|
||||
<col width="6%" class="kit-hidden-mb"/>
|
||||
<col width="30%"/>
|
||||
<col width="" class="kit-hidden-mb"/>
|
||||
<col width="25%" class="kit-hidden-mb"/>
|
||||
<col width="15%"/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th> </th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th class="kit-hidden-mb"></th>
|
||||
<th><?php _e('用户名'); ?></th>
|
||||
<th><?php _e('昵称'); ?></th>
|
||||
<th><?php _e('电子邮件'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('昵称'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('电子邮件'); ?></th>
|
||||
<th><?php _e('用户组'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php Typecho_Widget::widget('Widget_Users_Admin')->to($users); ?>
|
||||
<?php while($users->next()): ?>
|
||||
<tr id="user-<?php $users->uid(); ?>">
|
||||
<td><input type="checkbox" value="<?php $users->uid(); ?>" name="uid[]"/></td>
|
||||
<td><a href="<?php $options->adminUrl('manage-posts.php?uid=' . $users->uid); ?>" class="balloon-button left size-<?php echo Typecho_Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a></td>
|
||||
<td><a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
|
||||
<a href="<?php $users->permalink(); ?>" title="<?php _e('浏览 %s', $users->screenName); ?>"><i class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td><?php $users->screenName(); ?></td>
|
||||
<td><?php if($users->mail): ?><a href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?></td>
|
||||
<td><?php switch ($users->group) {
|
||||
case 'administrator':
|
||||
_e('管理员');
|
||||
break;
|
||||
case 'editor':
|
||||
_e('编辑');
|
||||
break;
|
||||
case 'contributor':
|
||||
_e('贡献者');
|
||||
break;
|
||||
case 'subscriber':
|
||||
_e('关注者');
|
||||
break;
|
||||
case 'visitor':
|
||||
_e('访问者');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} ?></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($users->next()): ?>
|
||||
<tr id="user-<?php $users->uid(); ?>">
|
||||
<td class="kit-hidden-mb"><input type="checkbox" value="<?php $users->uid(); ?>"
|
||||
name="uid[]"/></td>
|
||||
<td class="kit-hidden-mb"><a
|
||||
href="<?php $options->adminUrl('manage-posts.php?uid=' . $users->uid); ?>"
|
||||
class="balloon-button left size-<?php echo \Typecho\Common::splitByCount($users->postsNum, 1, 10, 20, 50, 100); ?>"><?php $users->postsNum(); ?></a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<?php $options->adminUrl('user.php?uid=' . $users->uid); ?>"><?php $users->name(); ?></a>
|
||||
<a href="<?php $users->permalink(); ?>"
|
||||
title="<?php _e('浏览 %s', $users->screenName); ?>"><i
|
||||
class="i-exlink"></i></a>
|
||||
</td>
|
||||
<td class="kit-hidden-mb"><?php $users->screenName(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php if ($users->mail): ?><a
|
||||
href="mailto:<?php $users->mail(); ?>"><?php $users->mail(); ?></a><?php else: _e('暂无'); endif; ?>
|
||||
</td>
|
||||
<td><?php switch ($users->group) {
|
||||
case 'administrator':
|
||||
_e('管理员');
|
||||
break;
|
||||
case 'editor':
|
||||
_e('编辑');
|
||||
break;
|
||||
case 'contributor':
|
||||
_e('贡献者');
|
||||
break;
|
||||
case 'subscriber':
|
||||
_e('关注者');
|
||||
break;
|
||||
case 'visitor':
|
||||
_e('访问者');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
} ?></td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</tbody>
|
||||
</table><!-- end .typecho-list-table -->
|
||||
</div><!-- end .typecho-table-wrap -->
|
||||
</form><!-- end .operate-form -->
|
||||
|
||||
<div class="typecho-list-operate clearfix">
|
||||
<form method="get">
|
||||
<div class="operate">
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox" class="typecho-table-select-all" /></label>
|
||||
<label><i class="sr-only"><?php _e('全选'); ?></i><input type="checkbox"
|
||||
class="typecho-table-select-all"/></label>
|
||||
<div class="btn-group btn-drop">
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>" href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn dropdown-toggle btn-s" type="button"><i
|
||||
class="sr-only"><?php _e('操作'); ?></i><?php _e('选中项'); ?> <i
|
||||
class="i-caret-down"></i></button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a lang="<?php _e('你确认要删除这些用户吗?'); ?>"
|
||||
href="<?php $security->index('/action/users-edit?do=delete'); ?>"><?php _e('删除'); ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<?php if($users->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $users->pageNav(); ?>
|
||||
</ul>
|
||||
<?php if ($users->have()): ?>
|
||||
<ul class="typecho-pager">
|
||||
<?php $users->pageNav(); ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
</form>
|
||||
</div><!-- end .typecho-list-operate -->
|
||||
|
||||
286
admin/media.php
@@ -9,7 +9,7 @@ if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) {
|
||||
$phpMaxFilesize = strtolower($matches[1] . $matches[2] . (1 == strlen($matches[2]) ? 'b' : ''));
|
||||
}
|
||||
|
||||
Typecho_Widget::widget('Widget_Contents_Attachment_Edit')->to($attachment);
|
||||
$attachment = \Widget\Contents\Attachment\Edit::alloc();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
@@ -18,22 +18,25 @@ Typecho_Widget::widget('Widget_Contents_Attachment_Edit')->to($attachment);
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-8" role="main">
|
||||
<?php if ($attachment->attachment->isImage): ?>
|
||||
<p><img src="<?php $attachment->attachment->url(); ?>" alt="<?php $attachment->attachment->name(); ?>" class="typecho-attachment-photo" /></p>
|
||||
<p><img src="<?php $attachment->attachment->url(); ?>"
|
||||
alt="<?php $attachment->attachment->name(); ?>" class="typecho-attachment-photo"/></p>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
<p>
|
||||
<?php $mime = Typecho_Common::mimeIconType($attachment->attachment->mime); ?>
|
||||
<?php $mime = \Typecho\Common::mimeIconType($attachment->attachment->mime); ?>
|
||||
<i class="mime-<?php echo $mime; ?>"></i>
|
||||
<a href=""><strong><?php $attachment->attachment->name(); ?></strong></a>
|
||||
<span><?php echo number_format(ceil($attachment->attachment->size / 1024)); ?> Kb</span>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<input id="attachment-url" type="text" class="mono w-100" value="<?php $attachment->attachment->url(); ?>" readonly />
|
||||
<input id="attachment-url" type="text" class="mono w-100"
|
||||
value="<?php $attachment->attachment->url(); ?>" readonly/>
|
||||
</p>
|
||||
|
||||
<div id="upload-panel" class="p">
|
||||
<div class="upload-area" draggable="true"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
|
||||
<div class="upload-area"
|
||||
draggable="true"><?php _e('拖放文件到这里<br>或者 %s选择文件上传%s', '<a href="###" class="upload-file">', '</a>'); ?></div>
|
||||
<ul id="file-list"></ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -48,146 +51,149 @@ Typecho_Widget::widget('Widget_Contents_Attachment_Edit')->to($attachment);
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
?>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'moxie.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'plupload.js?v=' . $suffixVersion); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'moxie.js'); ?>"></script>
|
||||
<script src="<?php $options->adminStaticUrl('js', 'plupload.js'); ?>"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#attachment-url').click(function () {
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
$('.operate-delete').click(function () {
|
||||
var t = $(this), href = t.attr('href');
|
||||
|
||||
if (confirm(t.attr('lang'))) {
|
||||
window.location.href = href;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.upload-area').bind({
|
||||
dragenter : function () {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
dragover : function (e) {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
drop : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragend : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragleave : function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
}
|
||||
});
|
||||
|
||||
function fileUploadStart (file) {
|
||||
$('<ul id="file-list"></ul>').appendTo('#upload-panel');
|
||||
$('<li id="' + file.id + '" class="loading">'
|
||||
+ file.name + '</li>').prependTo('#file-list');
|
||||
}
|
||||
|
||||
function fileUploadError (error) {
|
||||
var file = error.file, code = error.code, word;
|
||||
|
||||
switch (code) {
|
||||
case plupload.FILE_SIZE_ERROR:
|
||||
word = '<?php _e('文件大小超过限制'); ?>';
|
||||
break;
|
||||
case plupload.FILE_EXTENSION_ERROR:
|
||||
word = '<?php _e('文件扩展名不被支持'); ?>';
|
||||
break;
|
||||
case plupload.FILE_DUPLICATE_ERROR:
|
||||
word = '<?php _e('文件已经上传过'); ?>';
|
||||
break;
|
||||
case plupload.HTTP_ERROR:
|
||||
default:
|
||||
word = '<?php _e('上传出现错误'); ?>';
|
||||
break;
|
||||
}
|
||||
|
||||
var fileError = '<?php _e('%s 上传失败'); ?>'.replace('%s', file.name),
|
||||
li, exist = $('#' + file.id);
|
||||
|
||||
if (exist.length > 0) {
|
||||
li = exist.removeClass('loading').html(fileError);
|
||||
} else {
|
||||
$('<ul id="file-list"></ul>').appendTo('#upload-panel');
|
||||
li = $('<li>' + fileError + '<br />' + word + '</li>').prependTo('#file-list');
|
||||
}
|
||||
|
||||
li.effect('highlight', {color : '#FBC2C4'}, 2000, function () {
|
||||
$(this).remove();
|
||||
$(document).ready(function () {
|
||||
$('#attachment-url').click(function () {
|
||||
$(this).select();
|
||||
});
|
||||
}
|
||||
|
||||
function fileUploadComplete (id, url, data) {
|
||||
var img = $('.typecho-attachment-photo');
|
||||
$('.operate-delete').click(function () {
|
||||
var t = $(this), href = t.attr('href');
|
||||
|
||||
if (img.length > 0) {
|
||||
img.get(0).src = '<?php $attachment->attachment->url(); ?>?' + Math.random();
|
||||
}
|
||||
|
||||
$('#' + id).html('<?php _e('文件 %s 已经替换'); ?>'.replace('%s', data.title))
|
||||
.effect('highlight', 1000, function () {
|
||||
$(this).remove();
|
||||
$('#file-list').remove();
|
||||
});
|
||||
}
|
||||
|
||||
var uploader = new plupload.Uploader({
|
||||
browse_button : $('.upload-file').get(0),
|
||||
url : '<?php $security->index('/action/upload?do=modify&cid=' . $attachment->cid); ?>',
|
||||
runtimes : 'html5,flash,html4',
|
||||
flash_swf_url : '<?php $options->adminStaticUrl('js', 'Moxie.swf'); ?>',
|
||||
drop_element : $('.upload-area').get(0),
|
||||
filters : {
|
||||
max_file_size : '<?php echo $phpMaxFilesize ?>',
|
||||
mime_types : [{'title' : '<?php _e('允许上传的文件'); ?>', 'extensions' : '<?php $attachment->attachment->type(); ?>'}],
|
||||
prevent_duplicates : true
|
||||
},
|
||||
multi_selection : false,
|
||||
|
||||
init : {
|
||||
FilesAdded : function (up, files) {
|
||||
plupload.each(files, function(file) {
|
||||
fileUploadStart(file);
|
||||
});
|
||||
|
||||
uploader.start();
|
||||
},
|
||||
|
||||
FileUploaded : function (up, file, result) {
|
||||
if (200 == result.status) {
|
||||
var data = $.parseJSON(result.response);
|
||||
|
||||
if (data) {
|
||||
fileUploadComplete(file.id, data[0], data[1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fileUploadError({
|
||||
code : plupload.HTTP_ERROR,
|
||||
file : file
|
||||
});
|
||||
},
|
||||
|
||||
Error : function (up, error) {
|
||||
fileUploadError(error);
|
||||
if (confirm(t.attr('lang'))) {
|
||||
window.location.href = href;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uploader.init();
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.upload-area').bind({
|
||||
dragenter: function () {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
dragover: function (e) {
|
||||
$(this).parent().addClass('drag');
|
||||
},
|
||||
|
||||
drop: function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragend: function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
},
|
||||
|
||||
dragleave: function () {
|
||||
$(this).parent().removeClass('drag');
|
||||
}
|
||||
});
|
||||
|
||||
function fileUploadStart(file) {
|
||||
$('<ul id="file-list"></ul>').appendTo('#upload-panel');
|
||||
$('<li id="' + file.id + '" class="loading">'
|
||||
+ file.name + '</li>').prependTo('#file-list');
|
||||
}
|
||||
|
||||
function fileUploadError(error) {
|
||||
var file = error.file, code = error.code, word;
|
||||
|
||||
switch (code) {
|
||||
case plupload.FILE_SIZE_ERROR:
|
||||
word = '<?php _e('文件大小超过限制'); ?>';
|
||||
break;
|
||||
case plupload.FILE_EXTENSION_ERROR:
|
||||
word = '<?php _e('文件扩展名不被支持'); ?>';
|
||||
break;
|
||||
case plupload.FILE_DUPLICATE_ERROR:
|
||||
word = '<?php _e('文件已经上传过'); ?>';
|
||||
break;
|
||||
case plupload.HTTP_ERROR:
|
||||
default:
|
||||
word = '<?php _e('上传出现错误'); ?>';
|
||||
break;
|
||||
}
|
||||
|
||||
var fileError = '<?php _e('%s 上传失败'); ?>'.replace('%s', file.name),
|
||||
li, exist = $('#' + file.id);
|
||||
|
||||
if (exist.length > 0) {
|
||||
li = exist.removeClass('loading').html(fileError);
|
||||
} else {
|
||||
$('<ul id="file-list"></ul>').appendTo('#upload-panel');
|
||||
li = $('<li>' + fileError + '<br />' + word + '</li>').prependTo('#file-list');
|
||||
}
|
||||
|
||||
li.effect('highlight', {color: '#FBC2C4'}, 2000, function () {
|
||||
$(this).remove();
|
||||
});
|
||||
}
|
||||
|
||||
function fileUploadComplete(id, url, data) {
|
||||
var img = $('.typecho-attachment-photo');
|
||||
|
||||
if (img.length > 0) {
|
||||
img.get(0).src = '<?php $attachment->attachment->url(); ?>?' + Math.random();
|
||||
}
|
||||
|
||||
$('#' + id).html('<?php _e('文件 %s 已经替换'); ?>'.replace('%s', data.title))
|
||||
.effect('highlight', 1000, function () {
|
||||
$(this).remove();
|
||||
$('#file-list').remove();
|
||||
});
|
||||
}
|
||||
|
||||
var uploader = new plupload.Uploader({
|
||||
browse_button: $('.upload-file').get(0),
|
||||
url: '<?php $security->index('/action/upload?do=modify&cid=' . $attachment->cid); ?>',
|
||||
runtimes: 'html5,flash,html4',
|
||||
flash_swf_url: '<?php $options->adminStaticUrl('js', 'Moxie.swf'); ?>',
|
||||
drop_element: $('.upload-area').get(0),
|
||||
filters: {
|
||||
max_file_size: '<?php echo $phpMaxFilesize ?>',
|
||||
mime_types: [{
|
||||
'title': '<?php _e('允许上传的文件'); ?>',
|
||||
'extensions': '<?php $attachment->attachment->type(); ?>'
|
||||
}],
|
||||
prevent_duplicates: true
|
||||
},
|
||||
multi_selection: false,
|
||||
|
||||
init: {
|
||||
FilesAdded: function (up, files) {
|
||||
plupload.each(files, function (file) {
|
||||
fileUploadStart(file);
|
||||
});
|
||||
|
||||
uploader.start();
|
||||
},
|
||||
|
||||
FileUploaded: function (up, file, result) {
|
||||
if (200 == result.status) {
|
||||
var data = $.parseJSON(result.response);
|
||||
|
||||
if (data) {
|
||||
fileUploadComplete(file.id, data[0], data[1]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
fileUploadError({
|
||||
code: plupload.HTTP_ERROR,
|
||||
file: file
|
||||
});
|
||||
},
|
||||
|
||||
Error: function (up, error) {
|
||||
fileUploadError(error);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
uploader.init();
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
include 'footer.php';
|
||||
|
||||
@@ -1,15 +1,18 @@
|
||||
<?php if(!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<?php if (!defined('__TYPECHO_ADMIN__')) exit; ?>
|
||||
<div class="typecho-head-nav clearfix" role="navigation">
|
||||
<button class="menu-bar"><?php _e('菜单'); ?></button>
|
||||
<nav id="typecho-nav-list">
|
||||
<?php $menu->output(); ?>
|
||||
</nav>
|
||||
<div class="operate">
|
||||
<?php Typecho_Plugin::factory('admin/menu.php')->navBar(); ?>
|
||||
<a title="<?php
|
||||
if ($user->logged > 0) {
|
||||
_e('最后登录: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone));
|
||||
}
|
||||
?>" href="<?php $options->adminUrl('profile.php'); ?>" class="author"><?php $user->screenName(); ?></a><a class="exit" href="<?php $options->logoutUrl(); ?>"><?php _e('登出'); ?></a><a href="<?php $options->siteUrl(); ?>"><?php _e('网站'); ?></a>
|
||||
<?php \Typecho\Plugin::factory('admin/menu.php')->navBar(); ?><a title="<?php
|
||||
if ($user->logged > 0) {
|
||||
$logged = new \Typecho\Date($user->logged);
|
||||
_e('最后登录: %s', $logged->word());
|
||||
}
|
||||
?>" href="<?php $options->adminUrl('profile.php'); ?>" class="author"><?php $user->screenName(); ?></a><a
|
||||
class="exit" href="<?php $options->logoutUrl(); ?>"><?php _e('登出'); ?></a><a
|
||||
href="<?php $options->siteUrl(); ?>"><?php _e('网站'); ?></a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
|
||||
<?php Typecho_Widget::widget('Widget_Options_Discussion')->form()->render(); ?>
|
||||
<?php \Widget\Options\Discussion::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
|
||||
<?php Typecho_Widget::widget('Widget_Options_General')->form()->render(); ?>
|
||||
<?php \Widget\Options\General::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
|
||||
<?php Typecho_Widget::widget('Widget_Options_Permalink')->form()->render(); ?>
|
||||
<?php \Widget\Options\Permalink::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
|
||||
<?php Typecho_Widget::widget('Widget_Plugins_Config')->config()->render(); ?>
|
||||
<?php \Widget\Plugins\Config::alloc()->config()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="form">
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
|
||||
<?php Typecho_Widget::widget('Widget_Options_Reading')->form()->render(); ?>
|
||||
<?php \Widget\Options\Reading::alloc()->form()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -14,11 +14,12 @@ include 'menu.php';
|
||||
<?php if (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__): ?>
|
||||
<li><a href="<?php $options->adminUrl('theme-editor.php'); ?>"><?php _e('编辑当前外观'); ?></a></li>
|
||||
<?php endif; ?>
|
||||
<li class="current"><a href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
<li class="current"><a
|
||||
href="<?php $options->adminUrl('options-theme.php'); ?>"><?php _e('设置外观'); ?></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-mb-12 col-tb-8 col-tb-offset-2" role="form">
|
||||
<?php Typecho_Widget::widget('Widget_Themes_Config')->config()->render(); ?>
|
||||
<?php \Widget\Themes\Config::alloc()->config()->render(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -8,113 +8,119 @@ include 'menu.php';
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main" role="main">
|
||||
<div class="col-mb-12 typecho-list">
|
||||
<?php Typecho_Widget::widget('Widget_Plugins_List@activated', 'activated=1')->to($activatedPlugins); ?>
|
||||
<?php \Widget\Plugins\Rows::allocWithAlias('activated', 'activated=1')->to($activatedPlugins); ?>
|
||||
<?php if ($activatedPlugins->have() || !empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<h4 class="typecho-list-table-title"><?php _e('启用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%"/>
|
||||
<col width="10%"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<h4 class="typecho-list-table-title"><?php _e('启用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th><?php _e('版本'); ?></th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th><?php _e('操作'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while ($activatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $activatedPlugins->name(); ?>">
|
||||
<td><?php $activatedPlugins->title(); ?>
|
||||
<?php if (!$activatedPlugins->dependence): ?>
|
||||
<img src="<?php $options->adminUrl('images/notice.gif'); ?>" title="<?php _e('%s 无法在此版本的typecho下正常工作', $activatedPlugins->title); ?>" alt="<?php _e('%s 无法在此版本的typecho下正常工作', $activatedPlugins->title); ?>" class="tiny" />
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
<td><?php $activatedPlugins->description(); ?></td>
|
||||
<td><?php $activatedPlugins->version(); ?></td>
|
||||
<td><?php echo empty($activatedPlugins->homepage) ? $activatedPlugins->author : '<a href="' . $activatedPlugins->homepage
|
||||
. '">' . $activatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<?php if ($activatedPlugins->activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?>
|
||||
<?php if ($activatedPlugins->config): ?>
|
||||
<a href="<?php $options->adminUrl('options-plugin.php?config=' . $activatedPlugins->name); ?>"><?php _e('设置'); ?></a>
|
||||
•
|
||||
<tr id="plugin-<?php $activatedPlugins->name(); ?>">
|
||||
<td><?php $activatedPlugins->title(); ?>
|
||||
<?php if (!$activatedPlugins->dependence): ?>
|
||||
<i class="i-delete"
|
||||
title="<?php _e('%s 无法在此版本的typecho下正常工作', $activatedPlugins->title); ?>"></i>
|
||||
<?php endif; ?>
|
||||
<a lang="<?php _e('你确认要禁用插件 %s 吗?', $activatedPlugins->name); ?>" href="<?php $security->index('/action/plugins-edit?deactivate=' . $activatedPlugins->name); ?>"><?php _e('禁用'); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="important"><?php _e('即插即用'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
<td><?php $activatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $activatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($activatedPlugins->homepage) ? $activatedPlugins->author : '<a href="' . $activatedPlugins->homepage
|
||||
. '">' . $activatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<?php if ($activatedPlugins->activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?>
|
||||
<?php if ($activatedPlugins->config): ?>
|
||||
<a href="<?php $options->adminUrl('options-plugin.php?config=' . $activatedPlugins->name); ?>"><?php _e('设置'); ?></a>
|
||||
•
|
||||
<?php endif; ?>
|
||||
<a lang="<?php _e('你确认要禁用插件 %s 吗?', $activatedPlugins->name); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $activatedPlugins->name); ?>"><?php _e('禁用'); ?></a>
|
||||
<?php else: ?>
|
||||
<span class="important"><?php _e('即插即用'); ?></span>
|
||||
<?php endif; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
|
||||
|
||||
<?php if (!empty($activatedPlugins->activatedPlugins)): ?>
|
||||
<?php foreach ($activatedPlugins->activatedPlugins as $key => $val): ?>
|
||||
<tr>
|
||||
<td><?php echo $key; ?></td>
|
||||
<td colspan="3"><span class="warning"><?php _e('此插件文件已经损坏或者被不安全移除, 强烈建议你禁用它'); ?></span></td>
|
||||
<td><a lang="<?php _e('你确认要禁用插件 %s 吗?', $key); ?>" href="<?php $security->index('/action/plugins-edit?deactivate=' . $key); ?>"><?php _e('禁用'); ?></a></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php foreach ($activatedPlugins->activatedPlugins as $key => $val): ?>
|
||||
<tr>
|
||||
<td><?php echo $key; ?></td>
|
||||
<td colspan="3"><span
|
||||
class="warning"><?php _e('此插件文件已经损坏或者被不安全移除, 强烈建议你禁用它'); ?></span></td>
|
||||
<td><a lang="<?php _e('你确认要禁用插件 %s 吗?', $key); ?>"
|
||||
href="<?php $security->index('/action/plugins-edit?deactivate=' . $key); ?>"><?php _e('禁用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php Typecho_Widget::widget('Widget_Plugins_List@unactivated', 'activated=0')->to($deactivatedPlugins); ?>
|
||||
|
||||
<?php \Widget\Plugins\Rows::allocWithAlias('unactivated', 'activated=0')->to($deactivatedPlugins); ?>
|
||||
<?php if ($deactivatedPlugins->have() || !$activatedPlugins->have()): ?>
|
||||
<h4 class="typecho-list-table-title"><?php _e('禁用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table deactivate">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%"/>
|
||||
<col width="10%"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<h4 class="typecho-list-table-title"><?php _e('禁用的插件'); ?></h4>
|
||||
<div class="typecho-table-wrap">
|
||||
<table class="typecho-list-table deactivate">
|
||||
<colgroup>
|
||||
<col width="25%"/>
|
||||
<col width="45%"/>
|
||||
<col width="8%" class="kit-hidden-mb"/>
|
||||
<col width="10%" class="kit-hidden-mb"/>
|
||||
<col width=""/>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php _e('名称'); ?></th>
|
||||
<th><?php _e('描述'); ?></th>
|
||||
<th><?php _e('版本'); ?></th>
|
||||
<th><?php _e('作者'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('版本'); ?></th>
|
||||
<th class="kit-hidden-mb"><?php _e('作者'); ?></th>
|
||||
<th class="typecho-radius-topright"><?php _e('操作'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php if ($deactivatedPlugins->have()): ?>
|
||||
<?php while ($deactivatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $deactivatedPlugins->name(); ?>">
|
||||
<td><?php $deactivatedPlugins->title(); ?></td>
|
||||
<td><?php $deactivatedPlugins->description(); ?></td>
|
||||
<td><?php $deactivatedPlugins->version(); ?></td>
|
||||
<td><?php echo empty($deactivatedPlugins->homepage) ? $deactivatedPlugins->author : '<a href="' . $deactivatedPlugins->homepage
|
||||
. '">' . $deactivatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<a href="<?php $security->index('/action/plugins-edit?activate=' . $deactivatedPlugins->name); ?>"><?php _e('启用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php while ($deactivatedPlugins->next()): ?>
|
||||
<tr id="plugin-<?php $deactivatedPlugins->name(); ?>">
|
||||
<td><?php $deactivatedPlugins->title(); ?></td>
|
||||
<td><?php $deactivatedPlugins->description(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php $deactivatedPlugins->version(); ?></td>
|
||||
<td class="kit-hidden-mb"><?php echo empty($deactivatedPlugins->homepage) ? $deactivatedPlugins->author : '<a href="' . $deactivatedPlugins->homepage
|
||||
. '">' . $deactivatedPlugins->author . '</a>'; ?></td>
|
||||
<td>
|
||||
<a href="<?php $security->index('/action/plugins-edit?activate=' . $deactivatedPlugins->name); ?>"><?php _e('启用'); ?></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile; ?>
|
||||
<?php else: ?>
|
||||
<tr>
|
||||
<td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有安装插件'); ?></h6></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5"><h6 class="typecho-list-table-title"><?php _e('没有安装插件'); ?></h6>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
27
admin/preview.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
include 'common.php';
|
||||
|
||||
/** 获取内容 Widget */
|
||||
\Widget\Archive::alloc('type=single&checkPermalink=0&preview=1')->to($content);
|
||||
|
||||
/** 检测是否存在 */
|
||||
if (!$content->have()) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
|
||||
/** 检测权限 */
|
||||
if (!$user->pass('editor', true) && $content->authorId != $user->uid) {
|
||||
$response->redirect($options->adminUrl);
|
||||
}
|
||||
|
||||
/** 输出内容 */
|
||||
$content->render();
|
||||
?>
|
||||
<script>
|
||||
window.onbeforeunload = function () {
|
||||
if (!!window.parent) {
|
||||
window.parent.postMessage('cancelPreview', '<?php $options->rootUrl(); ?>');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -3,7 +3,7 @@ include 'common.php';
|
||||
include 'header.php';
|
||||
include 'menu.php';
|
||||
|
||||
$stat = Typecho_Widget::widget('Widget_Stat');
|
||||
$stat = \Widget\Stat::alloc();
|
||||
?>
|
||||
|
||||
<div class="main">
|
||||
@@ -11,39 +11,43 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
<?php include 'page-title.php'; ?>
|
||||
<div class="row typecho-page-main">
|
||||
<div class="col-mb-12 col-tb-3">
|
||||
<p><a href="http://gravatar.com/emails/" title="<?php _e('在 Gravatar 上修改头像'); ?>"><?php echo '<img class="profile-avatar" src="' . Typecho_Common::gravatarUrl($user->mail, 220, 'X', 'mm', $request->isSecure()) . '" alt="' . $user->screenName . '" />'; ?></a></p>
|
||||
<p><a href="https://gravatar.com/emails/"
|
||||
title="<?php _e('在 Gravatar 上修改头像'); ?>"><?php echo '<img class="profile-avatar" src="' . \Typecho\Common::gravatarUrl($user->mail, 220, 'X', 'mm', $request->isSecure()) . '" alt="' . $user->screenName . '" />'; ?></a>
|
||||
</p>
|
||||
<h2><?php $user->screenName(); ?></h2>
|
||||
<p><?php $user->name(); ?></p>
|
||||
<p><?php _e('目前有 <em>%s</em> 篇日志, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?></p>
|
||||
<p><?php _e('目前有 <em>%s</em> 篇日志, 并有 <em>%s</em> 条关于你的评论在 <em>%s</em> 个分类中.',
|
||||
$stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?></p>
|
||||
<p><?php
|
||||
if ($user->logged > 0) {
|
||||
_e('最后登录: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone));
|
||||
}
|
||||
?></p>
|
||||
if ($user->logged > 0) {
|
||||
$logged = new \Typecho\Date($user->logged);
|
||||
_e('最后登录: %s', $logged->word());
|
||||
}
|
||||
?></p>
|
||||
</div>
|
||||
|
||||
<div class="col-mb-12 col-tb-6 col-tb-offset-1 typecho-content-panel" role="form">
|
||||
<section>
|
||||
<h3><?php _e('个人资料'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Users_Profile')->profileForm()->render(); ?>
|
||||
<?php \Widget\Users\Profile::alloc()->profileForm()->render(); ?>
|
||||
</section>
|
||||
|
||||
<?php if($user->pass('contributor', true)): ?>
|
||||
<br>
|
||||
<section id="writing-option">
|
||||
<h3><?php _e('撰写设置'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Users_Profile')->optionsForm()->render(); ?>
|
||||
</section>
|
||||
<?php if ($user->pass('contributor', true)): ?>
|
||||
<br>
|
||||
<section id="writing-option">
|
||||
<h3><?php _e('撰写设置'); ?></h3>
|
||||
<?php \Widget\Users\Profile::alloc()->optionsForm()->render(); ?>
|
||||
</section>
|
||||
<?php endif; ?>
|
||||
|
||||
<br>
|
||||
|
||||
<section id="change-password">
|
||||
<h3><?php _e('密码修改'); ?></h3>
|
||||
<?php Typecho_Widget::widget('Widget_Users_Profile')->personalFormList(); ?>
|
||||
<?php Typecho_Widget::widget('Widget_Users_Profile')->passwordForm()->render(); ?>
|
||||
<?php \Widget\Users\Profile::alloc()->passwordForm()->render(); ?>
|
||||
</section>
|
||||
|
||||
<?php \Widget\Users\Profile::alloc()->personalFormList(); ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,6 +57,6 @@ $stat = Typecho_Widget::widget('Widget_Stat');
|
||||
include 'copyright.php';
|
||||
include 'common-js.php';
|
||||
include 'form-js.php';
|
||||
Typecho_Plugin::factory('admin/profile.php')->bottom();
|
||||
\Typecho\Plugin::factory('admin/profile.php')->bottom();
|
||||
include 'footer.php';
|
||||
?>
|
||||
|
||||
@@ -4,10 +4,10 @@ include 'common.php';
|
||||
if ($user->hasLogin() || !$options->allowRegister) {
|
||||
$response->redirect($options->siteUrl);
|
||||
}
|
||||
$rememberName = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_name'));
|
||||
$rememberMail = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_mail'));
|
||||
Typecho_Cookie::delete('__typecho_remember_name');
|
||||
Typecho_Cookie::delete('__typecho_remember_mail');
|
||||
$rememberName = htmlspecialchars(\Typecho\Cookie::get('__typecho_remember_name'));
|
||||
$rememberMail = htmlspecialchars(\Typecho\Cookie::get('__typecho_remember_mail'));
|
||||
\Typecho\Cookie::delete('__typecho_remember_name');
|
||||
\Typecho\Cookie::delete('__typecho_remember_mail');
|
||||
|
||||
$bodyClass = 'body-100';
|
||||
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
/**
|
||||
* 后台头部导航
|
||||
*/
|
||||
.typecho-head-nav {
|
||||
padding: 0 10px;
|
||||
background: #292D33;
|
||||
}
|
||||
|
||||
.typecho-head-nav a {
|
||||
color: #BBB;
|
||||
}
|
||||
.typecho-head-nav a:hover,
|
||||
.typecho-head-nav a:focus {
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#typecho-nav-list {
|
||||
float: left;
|
||||
ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
|
||||
#typecho-nav-list ul:first-child {
|
||||
border-left: 1px solid #383D45;
|
||||
}
|
||||
|
||||
#typecho-nav-list .root {
|
||||
position: relative;
|
||||
float: left;
|
||||
}
|
||||
|
||||
#typecho-nav-list .parent a {
|
||||
display: block;
|
||||
float: left;
|
||||
padding: 0 20px;
|
||||
border-right: 1px solid #383D45;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
color: #BBB;
|
||||
}
|
||||
|
||||
#typecho-nav-list .parent a:hover,
|
||||
#typecho-nav-list .focus .parent a,
|
||||
#typecho-nav-list .root:hover .parent a {
|
||||
background: #202328;
|
||||
color: #FFF;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
#typecho-nav-list .focus .parent a {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#typecho-nav-list .child {
|
||||
position: absolute;
|
||||
top: 36px;
|
||||
display: none;
|
||||
margin: 0;
|
||||
min-width: 160px;
|
||||
max-width: 240px;
|
||||
background: #202328;
|
||||
z-index: 250;
|
||||
}
|
||||
|
||||
#typecho-nav-list .root:hover .child {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#typecho-nav-list .child li a {
|
||||
color: #BBB;
|
||||
display: block;
|
||||
padding: 0 20px;
|
||||
overflow: hidden;
|
||||
text-overflow : ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
#typecho-nav-list .child li a:hover,
|
||||
#typecho-nav-list .child li a:focus {
|
||||
background: #292D33;
|
||||
color: #FFF;
|
||||
}
|
||||
#typecho-nav-list .child li.focus a {
|
||||
color: #6DA1BB;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.typecho-head-nav .operate {
|
||||
float: right;
|
||||
}
|
||||
.typecho-head-nav .operate a {
|
||||
display: inline-block;
|
||||
margin-left: -1px;
|
||||
padding: 0 20px;
|
||||
border: 1px solid #383D45;
|
||||
border-width: 0 1px;
|
||||
line-height: 36px;
|
||||
color: #BBB;
|
||||
}
|
||||
.typecho-head-nav .operate a:hover {
|
||||
background-color: #202328;
|
||||
color: #FFF;
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
@import "compass/css3/background-size";
|
||||
|
||||
@mixin image-2x($image, $width, $height) {
|
||||
@media (-webkit-min-device-pixel-ratio: 1.3),
|
||||
(min-resolution: 124.8dpi),
|
||||
(min-resolution: 1.3dppx) {
|
||||
& {
|
||||
background-image: url($image);
|
||||
@include background-size($width $height);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Before Width: | Height: | Size: 408 B After Width: | Height: | Size: 408 B |
|
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 697 B |
|
Before Width: | Height: | Size: 280 B After Width: | Height: | Size: 280 B |
|
Before Width: | Height: | Size: 298 B After Width: | Height: | Size: 298 B |
|
Before Width: | Height: | Size: 122 B After Width: | Height: | Size: 122 B |
|
Before Width: | Height: | Size: 132 B After Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 124 B After Width: | Height: | Size: 124 B |
|
Before Width: | Height: | Size: 131 B After Width: | Height: | Size: 131 B |
|
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 133 B After Width: | Height: | Size: 133 B |
|
Before Width: | Height: | Size: 118 B After Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 219 B After Width: | Height: | Size: 219 B |
|
Before Width: | Height: | Size: 329 B After Width: | Height: | Size: 329 B |
|
Before Width: | Height: | Size: 287 B After Width: | Height: | Size: 287 B |
|
Before Width: | Height: | Size: 488 B After Width: | Height: | Size: 488 B |
|
Before Width: | Height: | Size: 146 B After Width: | Height: | Size: 146 B |
|
Before Width: | Height: | Size: 188 B After Width: | Height: | Size: 188 B |
|
Before Width: | Height: | Size: 117 B After Width: | Height: | Size: 117 B |
|
Before Width: | Height: | Size: 127 B After Width: | Height: | Size: 127 B |
|
Before Width: | Height: | Size: 123 B After Width: | Height: | Size: 123 B |
|
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 137 B |
|
Before Width: | Height: | Size: 354 B After Width: | Height: | Size: 354 B |
|
Before Width: | Height: | Size: 587 B After Width: | Height: | Size: 587 B |
|
Before Width: | Height: | Size: 168 B After Width: | Height: | Size: 168 B |
|
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 237 B |
|
Before Width: | Height: | Size: 121 B After Width: | Height: | Size: 121 B |
|
Before Width: | Height: | Size: 143 B After Width: | Height: | Size: 143 B |