Compare commits
511 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0974b7bbd8 | ||
|
|
f73d420957 | ||
|
|
17ef2aaf88 | ||
|
|
b70c8e8def | ||
|
|
f8752e69bc | ||
|
|
9d48f875a2 | ||
|
|
39e9cea7b0 | ||
|
|
e7b718f610 | ||
|
|
261aeccb3f | ||
|
|
a09c846700 | ||
|
|
8dbede3813 | ||
|
|
89d9f27b2a | ||
|
|
f21f257c1b | ||
|
|
48916943a1 | ||
|
|
3b185e5521 | ||
|
|
612af8f7fb | ||
|
|
dc9131e600 | ||
|
|
99af4d984d | ||
|
|
88f4fe3b89 | ||
|
|
851f2f77e8 | ||
|
|
975e15c9f8 | ||
|
|
d235d6ac47 | ||
|
|
f0d0942bfb | ||
|
|
cd9246ebed | ||
|
|
f7b23d854f | ||
|
|
104a1395e7 | ||
|
|
ceb4c3a9cc | ||
|
|
536757e8e2 | ||
|
|
00af1aa638 | ||
|
|
c2cf3e7b43 | ||
|
|
05c14d37b2 | ||
|
|
fc3614f291 | ||
|
|
e201c77696 | ||
|
|
f280cb5df4 | ||
|
|
29863d7109 | ||
|
|
b514ea7846 | ||
|
|
eeaf615d3b | ||
|
|
f003481c5e | ||
|
|
4d10ef389a | ||
|
|
726ffdced1 | ||
|
|
18c4071da8 | ||
|
|
fd7fa0c3ab | ||
|
|
2ba5b72242 | ||
|
|
fa5a2f7a1a | ||
|
|
ad042630b6 | ||
|
|
9cf35b9b52 | ||
|
|
4f69103b8c | ||
|
|
37c882780a | ||
|
|
6d5f97e1ba | ||
|
|
4b1063c699 | ||
|
|
b891674a6f | ||
|
|
1a65df6e36 | ||
|
|
6043be852c | ||
|
|
bb11bdf789 | ||
|
|
540fd588c9 | ||
|
|
278fad1f43 | ||
|
|
eadeb460f5 | ||
|
|
5da9ce64c0 | ||
|
|
40498b53f7 | ||
|
|
eaf97602ff | ||
|
|
987c262425 | ||
|
|
c33ee0a9e6 | ||
|
|
eb7665661f | ||
|
|
72ae1bf56f | ||
|
|
8f30ed8109 | ||
|
|
19e71f1180 | ||
|
|
9397a38394 | ||
|
|
17bd2d08cd | ||
|
|
47a5e81000 | ||
|
|
7bfe740fb2 | ||
|
|
6a324b59b9 | ||
|
|
23545006a5 | ||
|
|
65012eacbb | ||
|
|
91107143f3 | ||
|
|
cafda90555 | ||
|
|
32dfec102d | ||
|
|
c1cdca5f95 | ||
|
|
61dc928e33 | ||
|
|
d43fe3fab9 | ||
|
|
3acb572c0d | ||
|
|
0f6787d349 | ||
|
|
af287a1279 | ||
|
|
6bbd43f8a3 | ||
|
|
364d7c695b | ||
|
|
871af41881 | ||
|
|
4648bfbd83 | ||
|
|
129d02850b | ||
|
|
ee23ef509c | ||
|
|
7e865696b0 | ||
|
|
244d06ca3b | ||
|
|
1a59075b51 | ||
|
|
e0b3c18499 | ||
|
|
5434136a4d | ||
|
|
aeeb182dad | ||
|
|
4d6882ffc7 | ||
|
|
828482f439 | ||
|
|
2b6f2dfa0c | ||
|
|
413b43174c | ||
|
|
9709c87185 | ||
|
|
0cca358de2 | ||
|
|
acff0cb69f | ||
|
|
8d5956cb7f | ||
|
|
e9773ea694 | ||
|
|
7094ec098b | ||
|
|
04fe4d6991 | ||
|
|
570a6b1f07 | ||
|
|
4211d6aa03 | ||
|
|
5941fcd7e6 | ||
|
|
f3df2eb289 | ||
|
|
8b975cd5e5 | ||
|
|
850f292260 | ||
|
|
ced1252b9d | ||
|
|
c0a6bfebf2 | ||
|
|
36815767f3 | ||
|
|
2cba2d30b7 | ||
|
|
fded17520c | ||
|
|
46580a3958 | ||
|
|
d584899447 | ||
|
|
79c0a9fd02 | ||
|
|
c3f21d60c2 | ||
|
|
43221ea8a9 | ||
|
|
25350e93cb | ||
|
|
415a8aa9a8 | ||
|
|
a3d740aa67 | ||
|
|
1956335640 | ||
|
|
b89c8b99e8 | ||
|
|
4e4d8ee784 | ||
|
|
7ecd7b784e | ||
|
|
0d9764b0de | ||
|
|
5d7964977c | ||
|
|
d50cda9cea | ||
|
|
7257bfb6d5 | ||
|
|
f2470256ae | ||
|
|
3c7a56ba5a | ||
|
|
07d68b4400 | ||
|
|
51d2d3e0ca | ||
|
|
0a361873de | ||
|
|
6af02a8a1e | ||
|
|
dc283ea828 | ||
|
|
8e3917b933 | ||
|
|
5a2209a0c2 | ||
|
|
73b6949b95 | ||
|
|
771b07e661 | ||
|
|
629693e353 | ||
|
|
a45e13f74c | ||
|
|
a919f4b8fd | ||
|
|
6d37baabd9 | ||
|
|
41f18d0b3e | ||
|
|
8a5cce103e | ||
|
|
65cfd93de9 | ||
|
|
a67cac80f5 | ||
|
|
c73f224f2d | ||
|
|
f241d7cd77 | ||
|
|
a5f5607667 | ||
|
|
2d7451402f | ||
|
|
7e13816d40 | ||
|
|
c2231b9e39 | ||
|
|
58ecb96975 | ||
|
|
d24b7d8bd3 | ||
|
|
91e054cea4 | ||
|
|
be2abffde2 | ||
|
|
93b706dd28 | ||
|
|
8f43c818df | ||
|
|
8194d6bb81 | ||
|
|
dc203917b9 | ||
|
|
e7818ef43e | ||
|
|
37c4a19f1f | ||
|
|
864f294761 | ||
|
|
1534d6dd8f | ||
|
|
9ae728bf13 | ||
|
|
768244860f | ||
|
|
95e566ae97 | ||
|
|
040545269a | ||
|
|
c6b7d952bd | ||
|
|
06067dd1c1 | ||
|
|
6ee6b384cf | ||
|
|
7cdf2abe2d | ||
|
|
942d77f599 | ||
|
|
71baa51a54 | ||
|
|
8819183be3 | ||
|
|
0941a09c19 | ||
|
|
eae48212be | ||
|
|
4f9641c43f | ||
|
|
32fa6057c7 | ||
|
|
025907f65a | ||
|
|
a259edc0bb | ||
|
|
94fd9c0c2a | ||
|
|
0affd5a1b7 | ||
|
|
f27ab9a8a0 | ||
|
|
086a992b5a | ||
|
|
54cae9bc1d | ||
|
|
9d9c196441 | ||
|
|
9238e42cfd | ||
|
|
836f3abecb | ||
|
|
d669f783bb | ||
|
|
c18279ca4c | ||
|
|
bbd280abf9 | ||
|
|
c15e6041ef | ||
|
|
e4c84d9b3a | ||
|
|
a49afca3f7 | ||
|
|
883f07f926 | ||
|
|
b5d182582f | ||
|
|
fe26471abb | ||
|
|
96a3cbbb22 | ||
|
|
d303e5e955 | ||
|
|
dd6198ffca | ||
|
|
ae646290ed | ||
|
|
1a74dc9605 | ||
|
|
0c19bd13cd | ||
|
|
42bb4888a2 | ||
|
|
9a5e44aba3 | ||
|
|
78b5dd3737 | ||
|
|
b8717c4084 | ||
|
|
42f4816ae5 | ||
|
|
ff8d671787 | ||
|
|
e16cda46c1 | ||
|
|
431e792e52 | ||
|
|
c9f3060e42 | ||
|
|
ec4987e817 | ||
|
|
655d3b47c6 | ||
|
|
8b85c6e9dd | ||
|
|
ef35e4eda6 | ||
|
|
7bb1ca239b | ||
|
|
a7625b35f4 | ||
|
|
1d239aa9a6 | ||
|
|
3f1e5caaad | ||
|
|
bdbd6c8ba7 | ||
|
|
1a898ee589 | ||
|
|
9609adb575 | ||
|
|
34c10202b0 | ||
|
|
1457fad242 | ||
|
|
ce355499c7 | ||
|
|
2bb3d2f967 | ||
|
|
a301ab5e1c | ||
|
|
d74d29fa13 | ||
|
|
96c54d9d66 | ||
|
|
9a0700cac1 | ||
|
|
864890c168 | ||
|
|
a93873d1d4 | ||
|
|
b0a8fa2141 | ||
|
|
88799b3ebc | ||
|
|
4032aa563c | ||
|
|
2b9fd67dbd | ||
|
|
62056409de | ||
|
|
f45f4eb49f | ||
|
|
acd4d42561 | ||
|
|
8375c3a842 | ||
|
|
54138b7998 | ||
|
|
3816567543 | ||
|
|
c6954437ea | ||
|
|
f3725a4938 | ||
|
|
fc8f6b4a42 | ||
|
|
b6109e37ad | ||
|
|
b3b98e2b82 | ||
|
|
74f6a4b314 | ||
|
|
19a9ad3da0 | ||
|
|
2d99025024 | ||
|
|
63370f31d7 | ||
|
|
752daa81b5 | ||
|
|
429ead8c69 | ||
|
|
52f4aad356 | ||
|
|
4abd0a26cf | ||
|
|
c8173cac04 | ||
|
|
be4b141c43 | ||
|
|
f9d6258744 | ||
|
|
66234d7785 | ||
|
|
c67b4a7f12 | ||
|
|
4a94023be2 | ||
|
|
9535f45647 | ||
|
|
8f585bcd29 | ||
|
|
d95d7b0674 | ||
|
|
50fcd7eb0b | ||
|
|
e5b46fe1a4 | ||
|
|
28872646d0 | ||
|
|
d059e09104 | ||
|
|
545cd78805 | ||
|
|
1e7a7d2fa7 | ||
|
|
1b540fc294 | ||
|
|
493ddc233c | ||
|
|
07b3169c5b | ||
|
|
e73707a16f | ||
|
|
5323399bc8 | ||
|
|
13ac083542 | ||
|
|
3dee191328 | ||
|
|
e13524c1d3 | ||
|
|
dc82b7d64f | ||
|
|
d68163ee90 | ||
|
|
349ed2722c | ||
|
|
e01b39edf6 | ||
|
|
783325509a | ||
|
|
2db3736a70 | ||
|
|
22cf00c28f | ||
|
|
3fe2736ad4 | ||
|
|
03b38673f7 | ||
|
|
3590bb96dd | ||
|
|
5051b9602a | ||
|
|
af9da2be34 | ||
|
|
0c17454a0c | ||
|
|
d789bc40f0 | ||
|
|
3a97171320 | ||
|
|
110970f310 | ||
|
|
9986552ffb | ||
|
|
64277e26ed | ||
|
|
b35e867b55 | ||
|
|
67c6db4b03 | ||
|
|
eec5307bc3 | ||
|
|
6a3b9a9916 | ||
|
|
e6880ae469 | ||
|
|
40de3ea9a1 | ||
|
|
93d40b022f | ||
|
|
dec6acf354 | ||
|
|
062cd9b5b9 | ||
|
|
31574e3606 | ||
|
|
ca01d9d3d6 | ||
|
|
9c69322289 | ||
|
|
c13841e30a | ||
|
|
9ae1ff22c7 | ||
|
|
8db5a45dcd | ||
|
|
b3e2485cd0 | ||
|
|
6c135be248 | ||
|
|
b5a4af9656 | ||
|
|
b23f1d777b | ||
|
|
2f49adf605 | ||
|
|
76f9eb7945 | ||
|
|
0c2718ca8c | ||
|
|
7109c5be9c | ||
|
|
e9fad88a10 | ||
|
|
d94d571881 | ||
|
|
d663c2b61d | ||
|
|
a3cbd8db8b | ||
|
|
90e92c27b8 | ||
|
|
76b433c1da | ||
|
|
b116a0103e | ||
|
|
6a7a0dd24d | ||
|
|
c2366aa36f | ||
|
|
4da50ef125 | ||
|
|
2e0f293dcd | ||
|
|
d0095a36b5 | ||
|
|
1eae7852c4 | ||
|
|
da06278df8 | ||
|
|
bd8f914804 | ||
|
|
51b24309a7 | ||
|
|
60a4572087 | ||
|
|
248af821a7 | ||
|
|
c85e8b84b9 | ||
|
|
e4d159307b | ||
|
|
80a30a9102 | ||
|
|
299b94243d | ||
|
|
b7ab45a3a7 | ||
|
|
9d3deaff0f | ||
|
|
42a1e389a5 | ||
|
|
9883a064f3 | ||
|
|
52617b472d | ||
|
|
764c15e6c0 | ||
|
|
88b384c2b4 | ||
|
|
92e231b10c | ||
|
|
e9ce006444 | ||
|
|
bc5ee74ffd | ||
|
|
688cf9eea5 | ||
|
|
ad9a19d551 | ||
|
|
7595e6db36 | ||
|
|
74fd5c569c | ||
|
|
e4376c178b | ||
|
|
9e46438534 | ||
|
|
4dd29bd4a7 | ||
|
|
90af54b7ba | ||
|
|
cadcdde5f8 | ||
|
|
4c77bc11de | ||
|
|
05988eb899 | ||
|
|
040bd05333 | ||
|
|
5f03238f60 | ||
|
|
4c6d91a101 | ||
|
|
71b93887dc | ||
|
|
391049ef77 | ||
|
|
3d5aec5651 | ||
|
|
d976184e24 | ||
|
|
5a45c1191a | ||
|
|
07f315ca12 | ||
|
|
be1cf0e876 | ||
|
|
d4d0ed728f | ||
|
|
0f0f20b21c | ||
|
|
abdb9c973b | ||
|
|
4e0b287890 | ||
|
|
00308f9ed6 | ||
|
|
2488ccdb8c | ||
|
|
cec2f3cc1b | ||
|
|
5a19773dfa | ||
|
|
7c3bb0a0af | ||
|
|
90d44bf863 | ||
|
|
9d0ff86a44 | ||
|
|
d03bc9f40b | ||
|
|
863bda76dc | ||
|
|
fcbe01bbfd | ||
|
|
6178c46aec | ||
|
|
87110eef08 | ||
|
|
1bfeac5035 | ||
|
|
ef257b566f | ||
|
|
0fce2edcf8 | ||
|
|
152188503e | ||
|
|
d804c16a1c | ||
|
|
cb7f2e4634 | ||
|
|
b90695c7c8 | ||
|
|
e67c8bfda6 | ||
|
|
90eb428787 | ||
|
|
e3cacaa89f | ||
|
|
6167428ecf | ||
|
|
367f76b6f4 | ||
|
|
733b6dabb1 | ||
|
|
72cd669bf0 | ||
|
|
84f630af4a | ||
|
|
05df700140 | ||
|
|
f230a64e7d | ||
|
|
1855c84cec | ||
|
|
3c982a6cd4 | ||
|
|
7053561f89 | ||
|
|
02fcabfdbc | ||
|
|
0c0efdd2c8 | ||
|
|
9a93601a03 | ||
|
|
b68f2b6cd6 | ||
|
|
80d95e9225 | ||
|
|
04288eda8c | ||
|
|
3a7f75cf30 | ||
|
|
0ca64b2db0 | ||
|
|
81aaf49463 | ||
|
|
5c93616690 | ||
|
|
c1823bc59c | ||
|
|
1634859659 | ||
|
|
684781423d | ||
|
|
1f2507fc00 | ||
|
|
0644b63b67 | ||
|
|
64f6b267d9 | ||
|
|
528e9d8868 | ||
|
|
f618822f34 | ||
|
|
e9a5fcdc7c | ||
|
|
2a33e91167 | ||
|
|
77327ec06f | ||
|
|
f530b25d74 | ||
|
|
8db81914b1 | ||
|
|
5fce7f4b63 | ||
|
|
1ee235c949 | ||
|
|
be7d8d4460 | ||
|
|
f134283bae | ||
|
|
38d5d01ea1 | ||
|
|
8e3e186fab | ||
|
|
4b33b3afeb | ||
|
|
9beca5895a | ||
|
|
1afc03eee1 | ||
|
|
331b03f894 | ||
|
|
1c9b180b3a | ||
|
|
57a16e85f8 | ||
|
|
c7cd5bcc36 | ||
|
|
f571007516 | ||
|
|
fac3f03f7b | ||
|
|
7d85dd6570 | ||
|
|
a91ef8602f | ||
|
|
1bc670617e | ||
|
|
74288ba3f3 | ||
|
|
bf2856011d | ||
|
|
ca974a902d | ||
|
|
f992897e7a | ||
|
|
c121607f61 | ||
|
|
032c7aea73 | ||
|
|
f6c419746c | ||
|
|
83f13a9a1a | ||
|
|
2111af2ec8 | ||
|
|
648e6eb9bc | ||
|
|
994b4e8051 | ||
|
|
f2f464b1ca | ||
|
|
119d11b405 | ||
|
|
d7031198cd | ||
|
|
187d4020f5 | ||
|
|
0a77bd0b47 | ||
|
|
cb00e7e969 | ||
|
|
1b2fe0d713 | ||
|
|
8e73f6f0dd | ||
|
|
d3c7b45ad9 | ||
|
|
fee15fd880 | ||
|
|
196b960b47 | ||
|
|
241a88ef48 | ||
|
|
fdf0c2711b | ||
|
|
239a95e683 | ||
|
|
d3205d2425 | ||
|
|
681ba8068c | ||
|
|
d5429d276f | ||
|
|
746b10be81 | ||
|
|
b9aa27e406 | ||
|
|
00cf277156 | ||
|
|
75ce7d745e | ||
|
|
ee1bbca5c9 | ||
|
|
0effc86620 | ||
|
|
8a36970b24 | ||
|
|
8be87ede99 | ||
|
|
d61dd71627 | ||
|
|
755f742088 | ||
|
|
0107e41123 | ||
|
|
e58c8c2192 | ||
|
|
ee4518da9e | ||
|
|
64e7183896 | ||
|
|
bd2715a35e | ||
|
|
986e4fc65f | ||
|
|
908cecffb9 | ||
|
|
07226ae7a1 | ||
|
|
c90258ef4b | ||
|
|
f500092a6a | ||
|
|
d1f1f65c9b | ||
|
|
aae0cb6379 | ||
|
|
2b0a0d9a14 | ||
|
|
69fcb9646b | ||
|
|
a0bf615960 | ||
|
|
c024f553fd | ||
|
|
c97d6a576f |
1
.gitattributes
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.pl linguist-language=Perl
|
||||
1
.gitignore
vendored
@@ -8,3 +8,4 @@
|
||||
.DS_Store
|
||||
wiki.log
|
||||
.prove
|
||||
TAGS
|
||||
|
||||
32
Makefile
@@ -3,8 +3,8 @@
|
||||
# subdirectory.
|
||||
|
||||
VERSION_NO=$(shell git describe --tags)
|
||||
TRANSLATIONS=$(wildcard modules/translations/[a-z]*-utf8.pl$)
|
||||
MODULES=$(wildcard modules/*.pl)
|
||||
TRANSLATIONS=$(wildcard modules/translations/*-utf8.pl)
|
||||
MODULES=$(sort $(wildcard modules/*.pl))
|
||||
BUILD=build/wiki.pl $(foreach file, $(notdir $(MODULES)) $(notdir $(TRANSLATIONS)), build/$(file))
|
||||
|
||||
# PREPARE/BUILD: this creates copies of wiki.pl and all the modules
|
||||
@@ -19,9 +19,13 @@ build:
|
||||
|
||||
clean:
|
||||
rm -rf build
|
||||
prove t/setup.pl
|
||||
|
||||
release:
|
||||
perl stuff/release ~/oddmuse.org/releases 2.3.3
|
||||
|
||||
build/wiki.pl: wiki.pl
|
||||
perl -lne "s/(\\\$$q->a\({-href=>'http:\/\/www.oddmuse.org\/'}, 'Oddmuse'\))/\\\$$q->a({-href=>'http:\/\/git.savannah.gnu.org\/cgit\/oddmuse.git\/tag\/?id=$(VERSION_NO)'}, 'wiki.pl') . ' ($(VERSION_NO)), see ' . \$$1/; print" < $< > $@
|
||||
perl -lne "s/(\\\$$q->a\(\{-href=>'https:\/\/www.oddmuse.org\/'\}, 'Oddmuse'\))/\\\$$q->a({-href=>'https:\/\/alexschroeder.ch\/cgit\/oddmuse\/tag\/?id=$(VERSION_NO)'}, 'wiki.pl') . ' ($(VERSION_NO)), see ' . \$$1/; print" < $< > $@
|
||||
|
||||
build/%-utf8.pl: modules/translations/%-utf8.pl
|
||||
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
|
||||
@@ -32,8 +36,8 @@ build/national-%.pl: modules/translations/national-%.pl
|
||||
build/month-names-%.pl: modules/translations/month-names-%.pl
|
||||
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, 'translations\/', '$(VERSION_NO)')/; print" < $< > $@
|
||||
|
||||
# from: http://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl
|
||||
# to: http://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl?id=2.1-11-gd4f1e27
|
||||
# from: https://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl
|
||||
# to: https://git.savannah.gnu.org/cgit/oddmuse.git/tree/modules/namespaces.pl?id=2.1-11-gd4f1e27
|
||||
|
||||
build/%.pl: modules/%.pl
|
||||
perl -lne "s/(AddModuleDescription\('[^']+', '[^']+')\)/\$$1, undef, '$(VERSION_NO)')/; print" < $< > $@
|
||||
@@ -56,3 +60,21 @@ jobs ?= 4
|
||||
test:
|
||||
prove t/setup.pl
|
||||
prove --jobs=$(jobs) --state=slow,save t
|
||||
|
||||
# Spin up a quick test
|
||||
|
||||
development:
|
||||
@if grep --quiet 'ScriptName = "http://127.0.0.1:8080";' test-data/config; then \
|
||||
echo Not overwriting \$$ScriptName in test-data/config; \
|
||||
else \
|
||||
echo '$ScriptName = "http://127.0.0.1:8080";' >> test-data/config; \
|
||||
fi
|
||||
morbo --listen http://*:8080 \
|
||||
--watch wiki.pl --watch test-data/config --watch test-data/modules/ \
|
||||
stuff/mojolicious-app.pl
|
||||
|
||||
%.pem:
|
||||
openssl req -new -x509 -days 365 -nodes -out cert.pem -keyout key.pem
|
||||
|
||||
gemini: cert.pem key.pem
|
||||
perl stuff/gemini-server.pl --wiki_cert_file=cert.pem --wiki_key_file=key.pem
|
||||
|
||||
@@ -23,12 +23,21 @@ usermod -a -G sudo alex
|
||||
Now you can login as {{{alex}}} and do everything else using {{{sudo}}}.
|
||||
|
||||
You need to copy wiki.pl into your cgi-bin directory, and you need to
|
||||
make the script executable.
|
||||
make the script executable. You might also have to change its owner to
|
||||
an appropriate user on your system.
|
||||
|
||||
{{{
|
||||
sudo wget -O /usr/lib/cgi-bin/wiki.pl \
|
||||
http://git.savannah.gnu.org/cgit/oddmuse.git/plain/wiki.pl
|
||||
sudo chmod +x /usr/lib/cgi-bin/wiki.pl
|
||||
sudo chown www-data.www-data /usr/lib/cgi-bin/wiki.pl
|
||||
}}}
|
||||
|
||||
If you're on SUSE, the user might not be {{{www-data}}} but
|
||||
{{{wwwrun}}} without appropriate group:
|
||||
|
||||
{{{
|
||||
sudo chown wwwrun.root /usr/lib/cgi-bin/wiki.pl
|
||||
}}}
|
||||
|
||||
You should be able to test it right now! Visit
|
||||
@@ -85,7 +94,7 @@ Enjoy your wiki experience.
|
||||
Visit https://www.oddmuse.org/ to learn more about the translation
|
||||
files and modules that are part of this package.
|
||||
|
||||
== Apache
|
||||
== Checking the Apache Setup
|
||||
|
||||
If you think this information doesn't work for you, here are some things
|
||||
to check.
|
||||
@@ -119,7 +128,7 @@ The default site is configured in
|
||||
sudo a2ensite default
|
||||
}}}
|
||||
|
||||
This file also lists the directories we've used in out instructions
|
||||
This file also lists the directories we've used in our instructions
|
||||
above.
|
||||
|
||||
{{{
|
||||
@@ -136,6 +145,35 @@ simply restart it all:
|
||||
sudo service apache2 graceful
|
||||
}}}
|
||||
|
||||
== Using just Perl
|
||||
|
||||
You can use Mojolicious as your web server. There is a simple
|
||||
##server.pl## which you can use. Here's how you might start it:
|
||||
|
||||
{{{
|
||||
mkdir ~/oddmuse
|
||||
WikiDataDir=$HOME/oddmuse perl server.pl daemon
|
||||
}}}
|
||||
|
||||
This makes the server available on {{{http://localhost:3000/wiki}}}.
|
||||
Make sure you create the directory before starting the server!
|
||||
If you don't, you'll get a strange error:
|
||||
`STDERR: : No such file or directory at ... perl5/Mojolicious/Plugin/CGI.pm`.
|
||||
|
||||
If it works, feel free to upgrade to Hypnotoad.
|
||||
|
||||
{{{
|
||||
WikiDataDir=$HOME/oddmuse hypnotoad server.pl
|
||||
}}}
|
||||
|
||||
Note: Hypnotoad uses a different default port. The above makes the
|
||||
server available on {{{http://localhost:8080/wiki}}}. Hypnotoad will
|
||||
keep forking new processes. To stop it, use the {{{-s}}} flag.
|
||||
|
||||
{{{
|
||||
hypnotoad -s server.pl
|
||||
}}}
|
||||
|
||||
== License
|
||||
|
||||
Permission is granted to copy, distribute and/or modify this document
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /usr/bin/perl
|
||||
|
||||
# Copyright (C) 2011–2015 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2011–2018 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -23,7 +23,8 @@ use utf8;
|
||||
|
||||
# load Oddmuse core
|
||||
$RunCGI = 0;
|
||||
do "wiki.pl";
|
||||
$DataDir = '/home/alex/campaignwiki';
|
||||
do "/home/alex/farm/wiki.pl";
|
||||
|
||||
# globals depending on the name of the script
|
||||
my ($self, $name, $wiki);
|
||||
@@ -35,6 +36,9 @@ if ($0 eq '/home/alex/campaignwiki.org/add-link.pl') {
|
||||
$self = "https://campaignwiki.org/add-adventure";
|
||||
$name = "OSR Links to Adventures";
|
||||
$wiki = 'Adventures';
|
||||
} elsif ($0 eq '/home/alex/campaignwiki.org/add-sf-link.pl') {
|
||||
$name = "OSRSF House Rules Wiki: Uplinked Intelligence";
|
||||
$wiki = 'UplinkedIntelligence';
|
||||
} else {
|
||||
ReportError('Cannot determine wiki!', '500 INTERNAL SERVER ERROR');
|
||||
}
|
||||
@@ -164,7 +168,7 @@ sub is_duplicate {
|
||||
" already links to the URL you submitted:",
|
||||
GetUrl($link->[0], $link->[1]));
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -288,11 +292,13 @@ sub print_end_of_page {
|
||||
|
||||
sub main {
|
||||
$ConfigFile = "$DataDir/config"; # read the global config file
|
||||
$ModuleDir = "$DataDir/modules"; # global modules
|
||||
$DataDir = "$DataDir/$wiki"; # but link to the local pages
|
||||
Init(); # read config file (no modules!)
|
||||
Init(); # read config file
|
||||
$ScriptName = $site; # undo setting in the config file
|
||||
$FullUrl = $site; #
|
||||
InitPageVariables(); # call again: $ScriptName was wrong
|
||||
$HomePage = 'HomePage'; # $HomePage must not be translated
|
||||
binmode(STDOUT,':utf8');
|
||||
$q->charset('utf8');
|
||||
if ($q->path_info eq '/source') {
|
||||
|
||||
14
contrib/campaignwiki/delete.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
if test -z "$2" -o ! -z "$3"; then
|
||||
echo "Usage: delete.sh USERNAME WIKI"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
username=$1
|
||||
wiki=$2
|
||||
|
||||
for p in $(curl --silent "https://campaignwiki.org/wiki/$wiki?action=index;raw=1"); do
|
||||
echo "Deleting: $p"
|
||||
curl -F frodo=1 -F "title=$p" -F text=DeletedPage -F summary=Deleted -F username="$username" "https://campaignwiki.org/wiki/$wiki"
|
||||
sleep 5
|
||||
done
|
||||
93
contrib/emacswiki/bootstrap.js
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
// Public Domain
|
||||
// initial version by Alex Schroeder <alex@gnu.org>
|
||||
// with many improvements by Evgkeni Sampelnikof
|
||||
|
||||
$(function(){
|
||||
|
||||
// add fancy classes
|
||||
$('div.header' ).addClass('container');
|
||||
$('div.wrapper').addClass('container');
|
||||
$('div.footer' ).addClass('container');
|
||||
$('div.footer > .navbar' ).remove();
|
||||
$('.message > p' ).addClass('alert');
|
||||
$('img.portrait').addClass('img-polaroid');
|
||||
|
||||
$('input:text').addClass('input-medium search-query');
|
||||
$('textarea').addClass('span12');
|
||||
$('input:submit').addClass('btn');
|
||||
$('.download a').addClass('btn btn-success');
|
||||
|
||||
$('.footer .gotobar').remove();
|
||||
$('.footer br').first().remove();
|
||||
var $gotobar = $('.gotobar')
|
||||
.after($('<div>').attr('class','navbar')
|
||||
.append($('<div>').attr('class','navbar-inner')
|
||||
.append($('<ul>').attr('class', 'nav'))));
|
||||
var $id = $('h1 a').first().text();
|
||||
var $list = $('.nav')
|
||||
.append($('<li>')
|
||||
.append($('<a>').attr('class', 'brand').attr('href', 'http://www.emacswiki.org/')
|
||||
.append('Emacs Wiki')));
|
||||
$('.gotobar a').each(function() {
|
||||
var $item = $('<li>');
|
||||
$(this).appendTo($item);
|
||||
$item.appendTo($list);
|
||||
if ($(this).text() == $id) {
|
||||
$item.addClass('active');
|
||||
}
|
||||
});
|
||||
$gotobar.remove();
|
||||
|
||||
// search without labels, without button, without language field
|
||||
$('form.search input[type=submit]').remove();
|
||||
$('form.search label').remove();
|
||||
$('form.search input#searchlang').remove();
|
||||
$('form.search')
|
||||
.css({'float': 'right',
|
||||
'margin-top': '10px'});
|
||||
$('.navbar').append($('form.search'));
|
||||
|
||||
// add button style to some links
|
||||
$('.edit.bar a').addClass('btn');
|
||||
|
||||
// add color to Talk button for a non-existing page
|
||||
$('a.btn.comment.edit').addClass('btn-warning');
|
||||
|
||||
// move article link and talk link below title
|
||||
var $link = $('a.original').add('a.comment');
|
||||
if ($link) {
|
||||
$('.header h1').after($('<p>').append($link));
|
||||
}
|
||||
|
||||
// toc
|
||||
if ($('title').text() == "EmacsWiki: Wikified Emacs Lisp List") {
|
||||
$('.content').addClass('ell');
|
||||
}
|
||||
|
||||
// tables
|
||||
$('table').addClass('table');
|
||||
|
||||
// minor edit checkbox
|
||||
$('input[type=checkbox]').addClass('checkbox');
|
||||
$('input[type=checkbox]').parent().addClass('checkbox');
|
||||
|
||||
// clean up admin page
|
||||
$('li a.clear').parent().remove();
|
||||
$('li a.index').parent().remove();
|
||||
|
||||
$('a[href="http://creativecommons.org/licenses/GPL/2.0/"]')
|
||||
.parent()
|
||||
.css({'margin-right': '120px',
|
||||
'opacity': 0.3,
|
||||
'padding-top': '1em'});
|
||||
$('.footer .bar')
|
||||
.after('<hr />');
|
||||
var footer_wrapper = $('<div/>')
|
||||
.addClass('footer_wrapper');
|
||||
var footer = $('.footer.container');
|
||||
footer.after(footer_wrapper);
|
||||
footer_wrapper.append(footer);
|
||||
var logo_image = $('<img />')
|
||||
.attr('src', 'http://emacswiki.org/ew_logo.png');
|
||||
$('.header .navbar .brand').html(logo_image);
|
||||
});
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use CGI;
|
||||
use CGI::Carp qw(fatalsToBrowser);
|
||||
|
||||
131
contrib/no-flickr.pl
Normal file
@@ -0,0 +1,131 @@
|
||||
#! /usr/bin/perl -w
|
||||
|
||||
# Copyright (C) 2005-2016 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use Modern::Perl;
|
||||
use LWP::UserAgent;
|
||||
use utf8;
|
||||
binmode(STDOUT, ":utf8");
|
||||
|
||||
my $ua = LWP::UserAgent->new;
|
||||
|
||||
sub url_encode {
|
||||
my $str = shift;
|
||||
return '' unless $str;
|
||||
utf8::encode($str); # turn to byte string
|
||||
my @letters = split(//, $str);
|
||||
my %safe = map {$_ => 1} ('a' .. 'z', 'A' .. 'Z', '0' .. '9', '-', '_', '.', '!', '~', '*', "'", '(', ')', '#');
|
||||
foreach my $letter (@letters) {
|
||||
$letter = sprintf("%%%02x", ord($letter)) unless $safe{$letter};
|
||||
}
|
||||
return join('', @letters);
|
||||
}
|
||||
|
||||
sub get_raw {
|
||||
my $uri = shift;
|
||||
my $response = $ua->get($uri);
|
||||
return $response->content if $response->is_success;
|
||||
}
|
||||
|
||||
sub get_wiki_page {
|
||||
my ($wiki, $id, $password) = @_;
|
||||
my $parameters = [
|
||||
pwd => $password,
|
||||
action => 'browse',
|
||||
id => $id,
|
||||
raw => 1,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
return $response->decoded_content if $response->is_success;
|
||||
die "Getting $id returned " . $response->status_line;
|
||||
}
|
||||
|
||||
sub get_wiki_index {
|
||||
my $wiki = shift;
|
||||
my $parameters = [
|
||||
search => "flickr.com",
|
||||
context => 0,
|
||||
raw => 1,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
return $response->decoded_content if $response->is_success;
|
||||
die "Getting the index returned " . $response->status_line;
|
||||
}
|
||||
|
||||
sub post_wiki_page {
|
||||
my ($wiki, $id, $username, $password, $text) = @_;
|
||||
my $parameters = [
|
||||
username => $username,
|
||||
pwd => $password,
|
||||
recent_edit => 'on',
|
||||
text => $text,
|
||||
title => $id,
|
||||
];
|
||||
my $response = $ua->post($wiki, $parameters);
|
||||
die "Posting to $id returned " . $response->status_line unless $response->code == 302;
|
||||
}
|
||||
|
||||
my %seen = ();
|
||||
|
||||
sub write_flickr {
|
||||
my ($id, $flickr, $dir, $file) = @_;
|
||||
say "Found $flickr";
|
||||
warn "$file was seen before: " . $seen{$file} if $seen{$file};
|
||||
die "$file contains unknown characters" if $file =~ /[^a-z0-9_.]/;
|
||||
$seen{$file} = "$id used $flickr";
|
||||
my $bytes = get_raw($flickr) or die("No data for $id");
|
||||
open(my $fh, '>', "$dir/$file") or die "Cannot write $dir/$file";
|
||||
binmode($fh);
|
||||
print $fh $bytes;
|
||||
close($fh);
|
||||
}
|
||||
|
||||
sub convert_page {
|
||||
my ($wiki, $pics, $dir, $username, $password, $id) = @_;
|
||||
say $id;
|
||||
my $text = get_wiki_page($wiki, $id, $password);
|
||||
my $is_changed = 0;
|
||||
while ($text =~ m!(https://[a-z0-9.]+.flickr.com/(?:[a-z0-9.]+/)?([a-z0-9_]+\.(?:jpg|png)))!) {
|
||||
my $flickr = $1;
|
||||
my $file = $2;
|
||||
write_flickr($id, $flickr, $dir, $file);
|
||||
$is_changed = 1;
|
||||
my $re = quotemeta($flickr);
|
||||
$text =~ s!$flickr!$pics/$file!g;
|
||||
}
|
||||
if ($is_changed) {
|
||||
post_wiki_page($wiki, $id, $username, $password, $text);
|
||||
} else {
|
||||
# die "$id has no flickr matches?\n$text";
|
||||
}
|
||||
sleep(5);
|
||||
}
|
||||
|
||||
sub convert_site {
|
||||
my ($wiki, $pics, $dir, $username, $password) = @_;
|
||||
my @ids = split(/\n/, get_wiki_index($wiki));
|
||||
for my $id (@ids) {
|
||||
convert_page($wiki, $pics, $dir, $username, $password, $id);
|
||||
}
|
||||
}
|
||||
|
||||
our $AdminPass;
|
||||
do "/home/alex/password.pl";
|
||||
convert_site('https://alexschroeder.ch/wiki',
|
||||
'https://alexschroeder.ch/pics',
|
||||
'/home/alex/alexschroeder.ch/pics',
|
||||
'Alex Schroeder',
|
||||
$AdminPass);
|
||||
@@ -1,168 +0,0 @@
|
||||
;;; vc-oddmuse.el -- add VC support to oddmuse-curl
|
||||
;;
|
||||
;; Copyright (C) 2014 Alex Schroeder <alex@gnu.org>
|
||||
;;
|
||||
;; Latest version:
|
||||
;; http://git.savannah.gnu.org/cgit/oddmuse.git/plain/contrib/vc-oddmuse.el
|
||||
;; Discussion, feedback:
|
||||
;; http://www.emacswiki.org/cgi-bin/wiki/OddmuseCurl
|
||||
;;
|
||||
;; This program is free software: you can redistribute it and/or modify it
|
||||
;; under the terms of the GNU General Public License as published by the Free
|
||||
;; Software Foundation, either version 3 of the License, or (at your option)
|
||||
;; any later version.
|
||||
;;
|
||||
;; This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
;; FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
;; more details.
|
||||
;;
|
||||
;; You should have received a copy of the GNU General Public License along
|
||||
;; with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Add the following to your init file:
|
||||
;;
|
||||
;; (add-to-list 'vc-handled-backends 'oddmuse)
|
||||
|
||||
(add-to-list 'vc-handled-backends 'oddmuse)
|
||||
|
||||
(require 'oddmuse-curl)
|
||||
(require 'diff)
|
||||
|
||||
(defun vc-oddmuse-revision-granularity () 'file)
|
||||
|
||||
(defun vc-oddmuse-registered (file)
|
||||
"Handle files in `oddmuse-directory'."
|
||||
(string-match (concat "^" (expand-file-name oddmuse-directory))
|
||||
(file-name-directory file)))
|
||||
|
||||
(defun vc-oddmuse-state (file)
|
||||
"Return the current version control state of FILE.
|
||||
For a list of possible values, see `vc-state'."
|
||||
;; Avoid downloading the current version from the wiki and comparing
|
||||
;; the text: Too much traffic!
|
||||
'edited)
|
||||
|
||||
(defun vc-oddmuse-working-revision (file)
|
||||
"The current revision based on `oddmuse-revisions'."
|
||||
(oddmuse-revision-get oddmuse-wiki oddmuse-page-name))
|
||||
|
||||
(defun vc-oddmuse-checkout-model (files)
|
||||
"No locking."
|
||||
'implicit)
|
||||
|
||||
(defun vc-oddmuse-create-repo (file)
|
||||
(error "You cannot create Oddmuse wikis using Emacs."))
|
||||
|
||||
(defun vc-oddmuse-register (files &optional rev comment)
|
||||
"This always works.")
|
||||
|
||||
(defun vc-oddmuse-revert (file &optional contents-done)
|
||||
"No idea"
|
||||
nil)
|
||||
|
||||
(defvar vc-oddmuse-log-command
|
||||
(concat "curl --silent %w"
|
||||
" --form action=rc"
|
||||
" --form showedit=1"
|
||||
" --form all=1"
|
||||
" --form from=1"
|
||||
" --form raw=1"
|
||||
" --form match='%r'")
|
||||
"Command to use for publishing index pages.
|
||||
It must print the page to stdout.
|
||||
|
||||
See `oddmuse-format-command' for the formatting options.")
|
||||
|
||||
(defun vc-oddmuse-print-log (files buffer &optional shortlog start-revision limit)
|
||||
"Load complete recent changes for the files."
|
||||
;; Derive `oddmuse-wiki' from the first file
|
||||
(with-oddmuse-file (car files)
|
||||
;; The wiki expects a Perl regular expression!
|
||||
(let ((regexp (concat "^(" (mapconcat 'file-name-nondirectory files "|") ")$")))
|
||||
(oddmuse-run "Getting recent changes" vc-oddmuse-log-command nil nil buffer)))
|
||||
(with-current-buffer buffer
|
||||
(oddmuse-render-rss3))
|
||||
'limit-unsupported)
|
||||
|
||||
(defun vc-oddmuse-log-outgoing ()
|
||||
(error "This is not supported."))
|
||||
|
||||
(defun vc-oddmuse-log-incoming ()
|
||||
(error "This is not supported."))
|
||||
|
||||
(defvar vc-oddmuse-get-revision-command
|
||||
(concat "curl --silent"
|
||||
" --form action=browse"
|
||||
" --form id=%t"
|
||||
" --form revision=%v"
|
||||
" --form raw=1"
|
||||
" '%w'")
|
||||
"Command to use to get older revisions of a page.
|
||||
It must print the page to stdout.
|
||||
|
||||
%? '?' character
|
||||
%w URL of the wiki as provided by `oddmuse-wikis'
|
||||
%t Page title as provided by `oddmuse-page-name'
|
||||
%v Revision to retrieve as provided by `oddmuse-revision'")
|
||||
|
||||
(defun oddmuse-revision-filename (rev)
|
||||
"Return filename for revision REV.
|
||||
This uses `oddmuse-directory', `wiki' and `pagename' as bound by
|
||||
`with-oddmuse-file'."
|
||||
(concat oddmuse-directory
|
||||
"/" wiki
|
||||
"/" pagename
|
||||
".~" rev "~"))
|
||||
|
||||
(defun vc-oddmuse-diff (files &optional rev1 rev2 buffer)
|
||||
"Report the differences for FILES."
|
||||
(setq buffer (or buffer (get-buffer-create "*vc-diff*")))
|
||||
(dolist (file files)
|
||||
(with-oddmuse-file file
|
||||
(setq rev1 (or rev1 (oddmuse-get-latest-revision wiki pagename)))
|
||||
(dolist (rev (list rev1 rev2))
|
||||
(when (and rev (not (file-readable-p (oddmuse-revision-filename rev))))
|
||||
(let* ((oddmuse-revision rev)
|
||||
(command vc-oddmuse-get-revision-command)
|
||||
(filename (oddmuse-revision-filename rev)))
|
||||
(with-temp-buffer
|
||||
(oddmuse-run
|
||||
(concat "Downloading revision " rev)
|
||||
command wiki pagename)
|
||||
(write-file filename)))))
|
||||
(diff-no-select
|
||||
(if rev1 (oddmuse-revision-filename rev1) file)
|
||||
(if rev2 (oddmuse-revision-filename rev2) file)
|
||||
nil
|
||||
(vc-switches 'oddmuse 'diff)
|
||||
buffer))))
|
||||
|
||||
(defun vc-oddmuse-revert (file &optional contents-done)
|
||||
"Revert FILE back to the wiki revision.
|
||||
If optional arg CONTENTS-DONE is non-nil, then nothing needs to
|
||||
be done, as the contents of FILE have already been reverted from
|
||||
a version backup."
|
||||
(unless contents-done
|
||||
(with-oddmuse-file file
|
||||
(let ((command (oddmuse-format-command vc-oddmuse-get-revision-command)))
|
||||
(with-temp-buffer
|
||||
(oddmuse-run "Loading" command)
|
||||
(write-file file))))))
|
||||
|
||||
(defun vc-oddmuse-checkin (files rev comment)
|
||||
"Commit changes in FILES to this backend.
|
||||
REV is a historical artifact and should be ignored. COMMENT is
|
||||
used as a check-in comment."
|
||||
(dolist (file files)
|
||||
(with-oddmuse-file file
|
||||
(let* ((summary comment)
|
||||
(command (oddmuse-format-command oddmuse-post-command))
|
||||
(buf (get-buffer-create " *oddmuse-response*")))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents file)
|
||||
(oddmuse-run "Posting" command wiki pagename buf t 302))))))
|
||||
|
||||
(provide 'vc-oddmuse)
|
||||
536
css/alex-2016.css
Normal file
@@ -0,0 +1,536 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* hide all the crap */
|
||||
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
|
||||
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
|
||||
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
|
||||
display:none;
|
||||
}
|
||||
div.content a.book,
|
||||
div.content a.movie {
|
||||
text-decoration: none;
|
||||
}
|
||||
a cite {
|
||||
font-style: italic;
|
||||
}
|
||||
img[alt="RSS"] { display: none }
|
||||
a.rss { font-size: 8pt }
|
||||
}
|
||||
|
||||
/* headings: we can use larger sizes if we use a lighter color.
|
||||
we cannot inherit the font-family because header and footer use a narrow font. */
|
||||
|
||||
h1, h2, h3, title {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1, channel title {
|
||||
font-size: 32pt;
|
||||
margin: 1em 0 0.5em 0;
|
||||
padding: 0.4em 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 1em 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* headers in the journal are smaller */
|
||||
|
||||
div.journal h1, item title {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
div.journal h2 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.journal h3 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: italic;
|
||||
}
|
||||
div.journal hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
p.more {
|
||||
margin-top: 3em;
|
||||
}
|
||||
/* Links in headings appear on journal pages. */
|
||||
|
||||
h1 a, h2 a, h3 a {
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1 a:visited, h2 a:visited, h3 a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* for download buttons and the like */
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-size: 120%;
|
||||
cursor: pointer;
|
||||
padding: 0.4em 0.6em;
|
||||
text-shadow: 0px -1px 0px #ccc;
|
||||
background-color: #cfa;
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
|
||||
}
|
||||
|
||||
.button .icon {
|
||||
color: #363;
|
||||
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
|
||||
}
|
||||
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
a.pencil {
|
||||
padding-left: 1ex;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
visibility: hidden;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
*:hover > a.pencil {
|
||||
visibility: visible;
|
||||
transition: opacity .5s linear;
|
||||
opacity: 1;
|
||||
}
|
||||
@media print {
|
||||
a.pencil {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.number {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* stop floating content from flowing over the footer */
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* the distance between links in the navigation bars */
|
||||
|
||||
span.bar a {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* search box in the top bar */
|
||||
|
||||
.header form, .header p {
|
||||
display: inline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
label[for="searchlang"], #searchlang, .header input[type="submit"] {
|
||||
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
visibility: hidden; position: absolute;
|
||||
}
|
||||
/* wrap on the iphone */
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow:hidden;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
/* styling for divs that will be invisible when printing
|
||||
when printing. */
|
||||
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
@media print {
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
font-size: 8pt;
|
||||
}
|
||||
}
|
||||
|
||||
div.footer form.search {
|
||||
display: none;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
div.diff {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
div.old {
|
||||
background-color: #ffffaf;
|
||||
}
|
||||
div.new {
|
||||
background-color: #cfffcf;
|
||||
}
|
||||
|
||||
div.refer {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
div.message {
|
||||
background-color:#fee;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
img.xml {
|
||||
border:none;
|
||||
padding:1px;
|
||||
}
|
||||
a.small img {
|
||||
max-width:300px;
|
||||
}
|
||||
a.large img {
|
||||
max-width:600px;
|
||||
}
|
||||
div.sister {
|
||||
margin-right:1ex;
|
||||
background-color:inherit;
|
||||
}
|
||||
div.sister p {
|
||||
margin-top:0;
|
||||
}
|
||||
div.sister hr {
|
||||
display:none;
|
||||
}
|
||||
div.sister img {
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.near, div.definition {
|
||||
background-color:#efe;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
float:right;
|
||||
border:1px dotted #000;
|
||||
padding:0 1em;
|
||||
}
|
||||
div.sidebar ul {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
/* replacements, features */
|
||||
|
||||
ins {
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
acronym, abbr {
|
||||
letter-spacing:0.1em;
|
||||
font-variant:small-caps;
|
||||
}
|
||||
|
||||
/* Interlink prefix not shown */
|
||||
a .site, a .separator {
|
||||
display: none;
|
||||
}
|
||||
a cite { font:inherit; }
|
||||
/* browser borkage */
|
||||
textarea[name="text"] { width:97%; height:80%; }
|
||||
textarea[name="summary"] { width:97%; height:3em; }
|
||||
/* comments */
|
||||
textarea[name="aftertext"] { width:97%; height:10em; }
|
||||
div.commentshown {
|
||||
font-size: 12pt;
|
||||
padding: 2em 0;
|
||||
}
|
||||
div.commenthidden {
|
||||
display:none;
|
||||
}
|
||||
div.commentshown {
|
||||
display:block;
|
||||
}
|
||||
p.comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.comment {
|
||||
font-size: 14pt;
|
||||
}
|
||||
div.comment h2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
/* comment pages with username, homepage, and email subscription */
|
||||
.comment form span { display: block; }
|
||||
.comment form span label { display: inline-block; width: 10em; }
|
||||
/* IE sucks */
|
||||
.comment input#username,
|
||||
.comment input#homepage,
|
||||
.comment input#mail { width: 20em; }
|
||||
|
||||
/* cal */
|
||||
div.month { padding:0; margin:0 2ex; }
|
||||
body > div.month {
|
||||
float:right;
|
||||
background-color: inherit;
|
||||
border:solid thin;
|
||||
padding:0 1ex;
|
||||
}
|
||||
.year > .month {
|
||||
float:left;
|
||||
}
|
||||
.footer {
|
||||
clear:both;
|
||||
}
|
||||
.month .title a.local {
|
||||
background-color: inherit;
|
||||
}
|
||||
.month a.local {
|
||||
background-color: #ddf;
|
||||
}
|
||||
.month a.today {
|
||||
background-color: #fdd;
|
||||
}
|
||||
.month a {
|
||||
color:inherit;
|
||||
font-weight:inherit;
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* history tables and other tables */
|
||||
table.history {
|
||||
border: none;
|
||||
}
|
||||
td.history {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table.user {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table.user tr td, table.user tr th {
|
||||
border: none;
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.arab tr th {
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
table.arab, table.arab tr th, table.arab tr td {
|
||||
border:none;
|
||||
}
|
||||
th.nobreak {
|
||||
white-space:nowrap;
|
||||
}
|
||||
table.full { width:99%; margin-left:1px; }
|
||||
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
|
||||
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
|
||||
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
|
||||
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
|
||||
table.t td { vertical-align: top; }
|
||||
td.half { width:50%; }
|
||||
td.third { width:33%; }
|
||||
|
||||
form table td { padding:5px; }
|
||||
|
||||
/* lists */
|
||||
dd { padding-bottom:0.5ex; }
|
||||
dl.inside dt { float:left; }
|
||||
/* search */
|
||||
div.search span.result { font-size:larger; }
|
||||
div.search span.info { font-size:smaller; font-style:italic; }
|
||||
div.search p.result { display:none; }
|
||||
|
||||
img.logo {
|
||||
float: right;
|
||||
margin: 0 0 0 1ex;
|
||||
padding: 0;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.3;
|
||||
background-color:#ffe;
|
||||
}
|
||||
|
||||
/* images */
|
||||
|
||||
div.content a.feed img, div.journal a.feed img,
|
||||
div.content a img.smiley, div.journal a img.smiley, img.smiley,
|
||||
div.content a.inline img, div.journal a.inline img,
|
||||
div.content li a.image img, div.journal li a.image img {
|
||||
margin: 0; padding: 0; border: none;
|
||||
}
|
||||
div.image a img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.image span.caption {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.left { float:left; margin-right: 1em; }
|
||||
.right { float:right; margin-left: 1em; }
|
||||
.half img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
div.left .left, div.right .right {
|
||||
float:none;
|
||||
}
|
||||
.center { text-align:center; }
|
||||
table.aside {
|
||||
float:right;
|
||||
width:40%;
|
||||
margin-left: 1em;
|
||||
padding: 1ex;
|
||||
border: 1px dotted #666;
|
||||
}
|
||||
table.aside td {
|
||||
text-align:left;
|
||||
}
|
||||
div.sidebar {
|
||||
float:right; width: 250px;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin: 1ex;
|
||||
}
|
||||
|
||||
.bigsidebar {
|
||||
float:right;
|
||||
width: 500px;
|
||||
border: none;
|
||||
margin-left: 1ex;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
|
||||
dl.irc dt span.time { float:left; }
|
||||
dl.irc dd { margin-left:22ex; }
|
||||
|
||||
/* portrait */
|
||||
|
||||
div.footer, div.comment, hr { clear: both; }
|
||||
.portrait { float: left; font-size: small; margin-right: 1em; }
|
||||
.portrait a { color: #999; }
|
||||
|
||||
div.left { float:left; margin:1em; padding: 0.5em; }
|
||||
div.left p { display:table-cell; }
|
||||
div.left p + p { display:table-caption; caption-side:bottom; }
|
||||
|
||||
p.table a { float:left; width:20ex; }
|
||||
p.table + p { clear:both; }
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel > link:before {
|
||||
font-size: 18pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This is an RSS feed, designed to be read in a feed reader.";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
link, license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
username:before { content: "Last edited by "; }
|
||||
username:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
544
css/alex-2017.css
Normal file
@@ -0,0 +1,544 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "Palatino Linotype", "Book Antiqua", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 14pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* hide all the crap */
|
||||
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
|
||||
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
|
||||
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
|
||||
display:none;
|
||||
}
|
||||
div.content a.book,
|
||||
div.content a.movie {
|
||||
text-decoration: none;
|
||||
}
|
||||
a cite {
|
||||
font-style: italic;
|
||||
}
|
||||
img[alt="RSS"] { display: none }
|
||||
a.rss { font-size: 8pt }
|
||||
}
|
||||
|
||||
/* headings: we can use larger sizes if we use a lighter color.
|
||||
we cannot inherit the font-family because header and footer use a narrow font. */
|
||||
|
||||
h1, h2, h3, title {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1, channel title {
|
||||
font-size: 32pt;
|
||||
margin: 1em 0 0.5em 0;
|
||||
padding: 0.4em 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 1em 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* headers in the journal are smaller */
|
||||
|
||||
div.journal h1, item title {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
div.journal h2 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.journal h3 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: italic;
|
||||
}
|
||||
div.journal hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
p.more {
|
||||
margin-top: 3em;
|
||||
}
|
||||
/* Links in headings appear on journal pages. */
|
||||
|
||||
h1 a, h2 a, h3 a {
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1 a:visited, h2 a:visited, h3 a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* for download buttons and the like */
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-size: 120%;
|
||||
cursor: pointer;
|
||||
padding: 0.4em 0.6em;
|
||||
text-shadow: 0px -1px 0px #ccc;
|
||||
background-color: #cfa;
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
|
||||
}
|
||||
|
||||
.button .icon {
|
||||
color: #363;
|
||||
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
|
||||
}
|
||||
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
a.pencil {
|
||||
padding-left: 1ex;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
visibility: hidden;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
*:hover > a.pencil {
|
||||
visibility: visible;
|
||||
transition: opacity .5s linear;
|
||||
opacity: 1;
|
||||
}
|
||||
@media print {
|
||||
a.pencil {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.number {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* stop floating content from flowing over the footer */
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* the distance between links in the navigation bars */
|
||||
|
||||
span.bar a {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* search box in the top bar */
|
||||
|
||||
.header form, .header p {
|
||||
display: inline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
label[for="searchlang"], #searchlang, .header input[type="submit"] {
|
||||
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
visibility: hidden; position: absolute;
|
||||
}
|
||||
/* wrap on the iphone */
|
||||
@media only screen and (max-device-width: 480px) {
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "Andale Mono", Monaco, "Courier New", Courier, monospace, "Symbola";
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
pre {
|
||||
overflow:hidden;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
/* styling for divs that will be invisible when printing
|
||||
when printing. */
|
||||
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
@media print {
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
font-size: 8pt;
|
||||
}
|
||||
}
|
||||
|
||||
div.footer form.search {
|
||||
display: none;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
div.diff {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
color: #000;
|
||||
|
||||
}
|
||||
div.old {
|
||||
background-color: #ffffaf;
|
||||
}
|
||||
div.new {
|
||||
background-color: #cfffcf;
|
||||
}
|
||||
|
||||
div.refer {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
div.message {
|
||||
background-color:#fee;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
img.xml {
|
||||
border:none;
|
||||
padding:1px;
|
||||
}
|
||||
a.small img {
|
||||
max-width:300px;
|
||||
}
|
||||
a.large img {
|
||||
max-width:600px;
|
||||
}
|
||||
div.sister {
|
||||
margin-right:1ex;
|
||||
background-color:inherit;
|
||||
}
|
||||
div.sister p {
|
||||
margin-top:0;
|
||||
}
|
||||
div.sister hr {
|
||||
display:none;
|
||||
}
|
||||
div.sister img {
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.near, div.definition {
|
||||
background-color:#efe;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
float:right;
|
||||
border:1px dotted #000;
|
||||
padding:0 1em;
|
||||
}
|
||||
div.sidebar ul {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
/* replacements, features */
|
||||
|
||||
ins {
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
acronym, abbr {
|
||||
letter-spacing:0.1em;
|
||||
font-variant:small-caps;
|
||||
}
|
||||
|
||||
/* Interlink prefix not shown */
|
||||
a .site, a .separator {
|
||||
display: none;
|
||||
}
|
||||
a cite { font:inherit; }
|
||||
/* browser borkage */
|
||||
textarea[name="text"] { width:97%; height:80%; }
|
||||
textarea[name="summary"] { width:97%; height:3em; }
|
||||
/* comments */
|
||||
textarea[name="aftertext"] { width:97%; height:10em; }
|
||||
div.commentshown {
|
||||
font-size: 12pt;
|
||||
padding: 2em 0;
|
||||
}
|
||||
div.commenthidden {
|
||||
display:none;
|
||||
}
|
||||
div.commentshown {
|
||||
display:block;
|
||||
}
|
||||
p.comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.comment {
|
||||
font-size: 14pt;
|
||||
}
|
||||
div.comment h2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
/* comment pages with username, homepage, and email subscription */
|
||||
.comment form span { display: block; }
|
||||
.comment form span label { display: inline-block; width: 10em; }
|
||||
/* IE sucks */
|
||||
.comment input#username,
|
||||
.comment input#homepage,
|
||||
.comment input#mail { width: 20em; }
|
||||
|
||||
/* cal */
|
||||
div.month { padding:0; margin:0 2ex; }
|
||||
body > div.month {
|
||||
float:right;
|
||||
background-color: inherit;
|
||||
border:solid thin;
|
||||
padding:0 1ex;
|
||||
}
|
||||
.year > .month {
|
||||
float:left;
|
||||
}
|
||||
.footer {
|
||||
clear:both;
|
||||
}
|
||||
.month .title a.local {
|
||||
background-color: inherit;
|
||||
}
|
||||
.month a.local {
|
||||
background-color: #ddf;
|
||||
}
|
||||
.month a.today {
|
||||
background-color: #fdd;
|
||||
}
|
||||
.month a {
|
||||
color:inherit;
|
||||
font-weight:inherit;
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* history tables and other tables */
|
||||
table.history {
|
||||
border: none;
|
||||
}
|
||||
td.history {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table tr th {
|
||||
border: none;
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.arab tr th {
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
table.arab, table.arab tr th, table.arab tr td {
|
||||
border:none;
|
||||
}
|
||||
th.nobreak {
|
||||
white-space:nowrap;
|
||||
}
|
||||
table.full { width:99%; margin-left:1px; }
|
||||
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
|
||||
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
|
||||
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
|
||||
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
|
||||
table.t td { vertical-align: top; }
|
||||
td.half { width:50%; }
|
||||
td.third { width:33%; }
|
||||
|
||||
form table td { padding:5px; }
|
||||
|
||||
/* lists */
|
||||
dd { padding-bottom:0.5ex; }
|
||||
dl.inside dt { float:left; }
|
||||
/* search */
|
||||
div.search span.result { font-size:larger; }
|
||||
div.search span.info { font-size:smaller; font-style:italic; }
|
||||
div.search p.result { display:none; }
|
||||
|
||||
img.logo {
|
||||
float: right;
|
||||
margin: 0 0 0 1ex;
|
||||
padding: 0;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.3;
|
||||
background-color:#ffe;
|
||||
}
|
||||
|
||||
/* images */
|
||||
|
||||
div.content a.feed img, div.journal a.feed img,
|
||||
div.content a img.smiley, div.journal a img.smiley, img.smiley,
|
||||
div.content a.inline img, div.journal a.inline img,
|
||||
div.content li a.image img, div.journal li a.image img {
|
||||
margin: 0; padding: 0; border: none;
|
||||
}
|
||||
div.image a img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.image span.caption {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.left { float:left; margin-right: 1em; }
|
||||
.right { float:right; margin-left: 1em; }
|
||||
.half img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
div.left .left, div.right .right {
|
||||
float:none;
|
||||
}
|
||||
.center { text-align:center; }
|
||||
table.aside {
|
||||
float:right;
|
||||
width:40%;
|
||||
margin-left: 1em;
|
||||
padding: 1ex;
|
||||
border: 1px dotted #666;
|
||||
}
|
||||
table.aside td {
|
||||
text-align:left;
|
||||
}
|
||||
div.sidebar {
|
||||
float:right; width: 250px;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin: 1ex;
|
||||
}
|
||||
|
||||
.bigsidebar {
|
||||
float:right;
|
||||
width: 500px;
|
||||
border: none;
|
||||
margin-left: 1ex;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
|
||||
dl.irc dt span.time { float:left; }
|
||||
dl.irc dd { margin-left:22ex; }
|
||||
|
||||
/* portrait */
|
||||
|
||||
div.footer, div.comment, hr { clear: both; }
|
||||
.portrait { float: left; font-size: small; margin-right: 1em; }
|
||||
.portrait a { color: #999; }
|
||||
|
||||
div.left { float:left; margin:1em; padding: 0.5em; }
|
||||
div.left p { display:table-cell; }
|
||||
div.left p + p { display:table-caption; caption-side:bottom; }
|
||||
|
||||
p.table a { float:left; width:20ex; }
|
||||
p.table + p { clear:both; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
615
css/alex-2018.css
Normal file
@@ -0,0 +1,615 @@
|
||||
/* This file is in the public domain. */
|
||||
html{ text-align: center; }
|
||||
|
||||
body, rss {
|
||||
font-family: "DejaVu Serif", Palatino, serif;
|
||||
font-style: normal;
|
||||
font-size: 16pt;
|
||||
padding: 1em 3em;
|
||||
max-width: 72ex;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
color: #000;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
@media only screen and (max-device-width: 600px) {
|
||||
body {
|
||||
padding: 1ex;
|
||||
}
|
||||
textarea {
|
||||
font-size: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
/* code */
|
||||
|
||||
textarea, pre, code, tt {
|
||||
font-family: "DejaVu Mono", "Andale Mono", Monaco, "Courier New", Courier, monospace;
|
||||
}
|
||||
|
||||
pre, code, tt {
|
||||
font-size: 12pt; /* fits 80ex */
|
||||
}
|
||||
pre {
|
||||
overflow:hidden;
|
||||
white-space: pre-wrap; /* CSS 3 */
|
||||
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */
|
||||
white-space: -pre-wrap; /* Opera 4-6 */
|
||||
white-space: -o-pre-wrap; /* Opera 7 */
|
||||
word-wrap: break-word; /* Internet Explorer 5.5+ */
|
||||
}
|
||||
|
||||
@import url(file:///home/alex/alexschroeder.ch/css/alex-2017.css) print;
|
||||
|
||||
@media print {
|
||||
body {
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
/* hide all the crap */
|
||||
div.diff, div.diff+hr, div.refer, div.near, div.definition, div.sister,
|
||||
div.cal, div.footer, span.specialdays, span.gotobar, a.edit, a.number span,
|
||||
div.rc form, form.tiny, p.comment, p#plus1, div.g-plusone, div.content a.feed {
|
||||
display:none;
|
||||
}
|
||||
div.content a.book,
|
||||
div.content a.movie {
|
||||
text-decoration: none;
|
||||
}
|
||||
a cite {
|
||||
font-style: italic;
|
||||
}
|
||||
img[alt="RSS"] { display: none }
|
||||
a.rss { font-size: 8pt }
|
||||
}
|
||||
|
||||
/* headings: we can use larger sizes if we use a lighter color.
|
||||
we cannot inherit the font-family because header and footer use a narrow font. */
|
||||
|
||||
h1, h2, h3, title {
|
||||
font-family: inherit;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1, channel title {
|
||||
font-size: 32pt;
|
||||
margin: 1em 0 0.5em 0;
|
||||
padding: 0.4em 0;
|
||||
}
|
||||
h2 {
|
||||
font-size: 18pt;
|
||||
margin: 2em 0 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
h3 {
|
||||
font-size: inherit;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
margin: 1em 0 0 0;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* headers in the journal are smaller */
|
||||
|
||||
div.journal h1, item title {
|
||||
font-size: inherit;
|
||||
padding: 0;
|
||||
clear: both;
|
||||
border-bottom: 1px solid #000;
|
||||
}
|
||||
div.journal h2 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
}
|
||||
div.journal h3 {
|
||||
font-family: inherit;
|
||||
font-size: inherit;
|
||||
font-weight: inherit;
|
||||
font-style: italic;
|
||||
}
|
||||
div.journal hr {
|
||||
visibility: hidden;
|
||||
}
|
||||
p.more {
|
||||
margin-top: 3em;
|
||||
}
|
||||
/* Links in headings appear on journal pages. */
|
||||
|
||||
h1 a, h2 a, h3 a {
|
||||
color:inherit;
|
||||
text-decoration:none;
|
||||
font-weight: normal;
|
||||
}
|
||||
h1 a:visited, h2 a:visited, h3 a:visited {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* for download buttons and the like */
|
||||
|
||||
.button {
|
||||
display: inline-block;
|
||||
font-size: 120%;
|
||||
cursor: pointer;
|
||||
padding: 0.4em 0.6em;
|
||||
text-shadow: 0px -1px 0px #ccc;
|
||||
background-color: #cfa;
|
||||
border: 1px solid #9d8;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 1px 3px white inset, 0px 1px 3px black;
|
||||
}
|
||||
|
||||
.button .icon {
|
||||
color: #363;
|
||||
text-shadow: 0px -1px 1px white, 0px 1px 3px #666;
|
||||
}
|
||||
|
||||
.button a {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* links */
|
||||
|
||||
a.pencil {
|
||||
padding-left: 1ex;
|
||||
text-decoration: none;
|
||||
color: inherit;
|
||||
visibility: hidden;
|
||||
transition: visibility 0s 1s, opacity 1s linear;
|
||||
opacity: 0;
|
||||
}
|
||||
*:hover > a.pencil {
|
||||
visibility: visible;
|
||||
transition: opacity .5s linear;
|
||||
opacity: 1;
|
||||
}
|
||||
@media print {
|
||||
a.pencil {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
a.number {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* stop floating content from flowing over the footer */
|
||||
|
||||
hr {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* the distance between links in the navigation bars */
|
||||
|
||||
span.bar a {
|
||||
margin-right: 1ex;
|
||||
}
|
||||
|
||||
a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* search box in the top bar */
|
||||
|
||||
.header form, .header p {
|
||||
display: inline;
|
||||
white-space: nowrap;
|
||||
}
|
||||
label[for="searchlang"], #searchlang, .header input[type="submit"] {
|
||||
/* don't use display: none! http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
visibility: hidden; position: absolute;
|
||||
}
|
||||
|
||||
.header input {
|
||||
width: 10ex;
|
||||
}
|
||||
|
||||
/* other form fields */
|
||||
|
||||
input[type="text"] {
|
||||
padding: 0;
|
||||
font-size: 80%;
|
||||
line-height: 125%;
|
||||
}
|
||||
|
||||
/* styling for divs that will be invisible when printing
|
||||
when printing. */
|
||||
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
|
||||
font-size: 14pt;
|
||||
}
|
||||
@media print {
|
||||
div.header, div.footer, div.near, div.definition, p.comment, a.tag {
|
||||
font-size: 8pt;
|
||||
}
|
||||
}
|
||||
|
||||
div.footer form.search {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Recent Changes */
|
||||
|
||||
div.rc {
|
||||
overflow: hidden;
|
||||
}
|
||||
div.rc li + li {
|
||||
margin-top: 1em;
|
||||
}
|
||||
div.rc li strong, table.history strong, strong.description {
|
||||
font-family: inherit;
|
||||
font-weight: inherit;
|
||||
}
|
||||
.red {
|
||||
background: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background: orange;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.indigo {
|
||||
background: indigo;
|
||||
color: indigo;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: violet;
|
||||
color: violet;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ip-code {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
/* Diff */
|
||||
|
||||
div.diff {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
color: #000;
|
||||
}
|
||||
div.old {
|
||||
background-color: #ffffaf;
|
||||
}
|
||||
div.new {
|
||||
background-color: #cfffcf;
|
||||
}
|
||||
|
||||
div.refer {
|
||||
padding-left: 5%;
|
||||
padding-right: 5%;
|
||||
font-size: 12pt;
|
||||
}
|
||||
|
||||
div.message {
|
||||
background-color:#fee;
|
||||
color:#000;
|
||||
}
|
||||
|
||||
img.xml {
|
||||
border:none;
|
||||
padding:1px;
|
||||
}
|
||||
a.small img {
|
||||
max-width:300px;
|
||||
}
|
||||
a.large img {
|
||||
max-width:600px;
|
||||
}
|
||||
div.sister {
|
||||
margin-right:1ex;
|
||||
background-color:inherit;
|
||||
}
|
||||
div.sister p {
|
||||
margin-top:0;
|
||||
}
|
||||
div.sister hr {
|
||||
display:none;
|
||||
}
|
||||
div.sister img {
|
||||
border:none;
|
||||
}
|
||||
|
||||
div.near, div.definition {
|
||||
background-color:#efe;
|
||||
}
|
||||
|
||||
div.sidebar {
|
||||
float:right;
|
||||
border:1px dotted #000;
|
||||
padding:0 1em;
|
||||
}
|
||||
div.sidebar ul {
|
||||
padding-left:1em;
|
||||
}
|
||||
|
||||
/* replacements, features */
|
||||
|
||||
ins {
|
||||
font-style: italic;
|
||||
text-decoration: none;
|
||||
}
|
||||
acronym, abbr {
|
||||
letter-spacing:0.1em;
|
||||
font-variant:small-caps;
|
||||
}
|
||||
|
||||
/* Interlink prefix not shown */
|
||||
a .site, a .separator {
|
||||
display: none;
|
||||
}
|
||||
a cite { font:inherit; }
|
||||
/* browser borkage */
|
||||
textarea[name="text"] { width:97%; height:80%; }
|
||||
textarea[name="summary"] { width:97%; height:3em; }
|
||||
/* comments */
|
||||
textarea[name="aftertext"] { width:97%; height:10em; }
|
||||
div.commentshown {
|
||||
font-size: 12pt;
|
||||
padding: 2em 0;
|
||||
}
|
||||
div.commenthidden {
|
||||
display:none;
|
||||
}
|
||||
div.commentshown {
|
||||
display:block;
|
||||
}
|
||||
p.comment {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.comment {
|
||||
font-size: 14pt;
|
||||
}
|
||||
div.comment h2 {
|
||||
margin-top: 5em;
|
||||
}
|
||||
/* comment pages with username, homepage, and email subscription */
|
||||
.comment form span { display: block; }
|
||||
.comment form span label { display: inline-block; width: 10em; }
|
||||
/* IE sucks */
|
||||
.comment input#username,
|
||||
.comment input#homepage,
|
||||
.comment input#mail { width: 20em; }
|
||||
|
||||
/* cal */
|
||||
div.month { padding:0; margin:0 2ex; }
|
||||
body > div.month {
|
||||
float:right;
|
||||
background-color: inherit;
|
||||
border:solid thin;
|
||||
padding:0 1ex;
|
||||
}
|
||||
.year > .month {
|
||||
float:left;
|
||||
}
|
||||
.footer {
|
||||
clear:both;
|
||||
}
|
||||
.month .title a.local {
|
||||
background-color: inherit;
|
||||
}
|
||||
.month a.local {
|
||||
background-color: #ddf;
|
||||
}
|
||||
.month a.today {
|
||||
background-color: #fdd;
|
||||
}
|
||||
.month a {
|
||||
color:inherit;
|
||||
font-weight:inherit;
|
||||
text-decoration: none;
|
||||
background-color: #eee;
|
||||
}
|
||||
/* history tables and other tables */
|
||||
table.history {
|
||||
border: none;
|
||||
}
|
||||
td.history {
|
||||
border: none;
|
||||
}
|
||||
|
||||
table {
|
||||
border: none;
|
||||
border-top: 1px solid #ccc;
|
||||
border-bottom: 1px solid #ccc;
|
||||
padding: 1em;
|
||||
margin: 1em 2em;
|
||||
}
|
||||
table tr td, table tr th {
|
||||
border: none;
|
||||
padding: 0.2em 0.5em;
|
||||
vertical-align: top;
|
||||
}
|
||||
table.arab tr th {
|
||||
font-weight:normal;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
}
|
||||
table.arab, table.arab tr th, table.arab tr td {
|
||||
border:none;
|
||||
}
|
||||
th.nobreak {
|
||||
white-space:nowrap;
|
||||
}
|
||||
table.full { width:99%; margin-left:1px; }
|
||||
table.j td, table.j th, table tr td.j, table tr th.j, .j { text-align:justify; }
|
||||
table.l td, table.l th, table tr td.l, table tr th.l, .l { text-align:left; }
|
||||
table.r td, table.r th, table tr td.r, table tr th.r, .r { text-align:right; }
|
||||
table.c td, table.c th, table tr td.c, table tr th.c, .c { text-align:center; }
|
||||
table.t td { vertical-align: top; }
|
||||
td.half { width:50%; }
|
||||
td.third { width:33%; }
|
||||
|
||||
form table td { padding:5px; }
|
||||
|
||||
/* lists */
|
||||
dd { padding-bottom:0.5ex; }
|
||||
dl.inside dt { float:left; }
|
||||
/* search */
|
||||
div.search span.result { font-size:larger; }
|
||||
div.search span.info { font-size:smaller; font-style:italic; }
|
||||
div.search p.result { display:none; }
|
||||
|
||||
img.logo {
|
||||
float: right;
|
||||
margin: 0 0 0 1ex;
|
||||
padding: 0;
|
||||
border: 1px solid #000;
|
||||
opacity: 0.3;
|
||||
background-color:#ffe;
|
||||
}
|
||||
|
||||
/* images */
|
||||
|
||||
div.content a.feed img, div.journal a.feed img,
|
||||
div.content a img.smiley, div.journal a img.smiley, img.smiley,
|
||||
div.content a.inline img, div.journal a.inline img,
|
||||
div.content li a.image img, div.journal li a.image img {
|
||||
margin: 0; padding: 0; border: none;
|
||||
}
|
||||
div.image a img {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
div.image span.caption {
|
||||
margin: 0 1em;
|
||||
}
|
||||
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.left { float:left; margin-right: 1em; }
|
||||
.right { float:right; margin-left: 1em; }
|
||||
.half img { height: 50%; width: 50%; }
|
||||
.face img { width: 200px; }
|
||||
div.left .left, div.right .right {
|
||||
float:none;
|
||||
}
|
||||
.center { text-align:center; }
|
||||
table.aside {
|
||||
float:right;
|
||||
width:40%;
|
||||
margin-left: 1em;
|
||||
padding: 1ex;
|
||||
border: 1px dotted #666;
|
||||
}
|
||||
table.aside td {
|
||||
text-align:left;
|
||||
}
|
||||
div.sidebar {
|
||||
float:right; width: 250px;
|
||||
text-align: right;
|
||||
border: none;
|
||||
margin: 1ex;
|
||||
}
|
||||
|
||||
.bigsidebar {
|
||||
float:right;
|
||||
width: 500px;
|
||||
border: none;
|
||||
margin-left: 1ex;
|
||||
font-size: 80%;
|
||||
}
|
||||
|
||||
dl.irc dt { width:20ex; float:left; text-align:right; clear:left; }
|
||||
dl.irc dt span.time { float:left; }
|
||||
dl.irc dd { margin-left:22ex; }
|
||||
|
||||
/* portrait */
|
||||
|
||||
div.footer, div.comment, hr { clear: both; }
|
||||
.portrait { float: left; font-size: small; margin-right: 1em; }
|
||||
.portrait a { color: #999; }
|
||||
|
||||
div.left { float:left; margin:1em; padding: 0.5em; }
|
||||
div.left p { display:table-cell; }
|
||||
div.left p + p { display:table-caption; caption-side:bottom; }
|
||||
|
||||
p.table a { float:left; width:20ex; }
|
||||
p.table + p { clear:both; }
|
||||
|
||||
/* mastodon */
|
||||
|
||||
div.mastodon { padding: 0 2em }
|
||||
div.mastodon .status {padding-top: 1ex; border-bottom: 1px solid grey;}
|
||||
div.mastodon .status:first-child {border-top: 1px solid grey;}
|
||||
|
||||
/* terminal "screenshots" */
|
||||
|
||||
.terminal {
|
||||
width: 80%;
|
||||
margin: 50px auto 100px auto;
|
||||
padding: 5px;
|
||||
font-size: 62%; /* fits 80ex */
|
||||
border: 1px solid #999;
|
||||
border-radius: 5px;
|
||||
box-shadow: 0px 25px 50px #999;
|
||||
}
|
||||
|
||||
/* rss */
|
||||
|
||||
channel * { display: block; }
|
||||
|
||||
channel title {
|
||||
margin-top: 30pt;
|
||||
}
|
||||
copyright {
|
||||
font-size: 14pt;
|
||||
margin-top: 1em;
|
||||
}
|
||||
channel:before {
|
||||
font-size: 14pt;
|
||||
display: block;
|
||||
margin: 1em;
|
||||
padding: 0.5em;
|
||||
content: "This document is to be read in a feed reader. The item content is escaped HTML, which makes it hard to read for humans. Sorry!";
|
||||
color: red;
|
||||
border: 1px solid red;
|
||||
}
|
||||
license {
|
||||
font-size: 11pt;
|
||||
margin-bottom: 9pt;
|
||||
}
|
||||
contributor:before { content: "Last edited by "; }
|
||||
contributor:after { content: "."; }
|
||||
generator:before { content: "Feed generated by "; }
|
||||
generator:after { content: "."; }
|
||||
channel description {
|
||||
font-weight: bold;
|
||||
}
|
||||
item description {
|
||||
font-weight: normal;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
link, managingEditor, webMaster, license, url,
|
||||
docs, language,
|
||||
pubDate, lastBuildDate, ttl, guid, category, comments,
|
||||
docs, image title, image link,
|
||||
status, version, diff, history, importance {
|
||||
display: none;
|
||||
}
|
||||
@@ -321,7 +321,6 @@ div.sister {
|
||||
float:left;
|
||||
margin-right:1ex;
|
||||
padding-right:1ex;
|
||||
border-right:1px dashed;
|
||||
}
|
||||
div.sister p { padding:1ex; margin:0; }
|
||||
div.sister hr { display:none; }
|
||||
|
||||
425
css/latex.css
Normal file
@@ -0,0 +1,425 @@
|
||||
/*!
|
||||
* LaTeX.css (https://latex.now.sh/)
|
||||
*
|
||||
* Source: https://github.com/vincentdoerig/latex-css
|
||||
* Licensed under MIT (https://github.com/vincentdoerig/latex-css/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-regular.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-regular.woff') format('woff'),
|
||||
url('/style/fonts/LM-regular.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-italic.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-italic.woff') format('woff'),
|
||||
url('/style/fonts/LM-italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: normal;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-bold.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-bold.woff') format('woff'),
|
||||
url('/style/fonts/LM-bold.ttf') format('truetype');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Latin Modern';
|
||||
font-style: italic;
|
||||
font-weight: bold;
|
||||
font-display: swap;
|
||||
src: url('/style/fonts/LM-bold-italic.woff2') format('woff2'),
|
||||
url('/style/fonts/LM-bold-italic.woff') format('woff'),
|
||||
url('/style/fonts/LM-bold-italic.ttf') format('truetype');
|
||||
}
|
||||
|
||||
/* Box sizing rules */
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* Remove default margin */
|
||||
body,
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
p,
|
||||
ul[class],
|
||||
ol[class],
|
||||
li,
|
||||
figure,
|
||||
figcaption,
|
||||
dl,
|
||||
dd {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Make default font-size 1rem and add smooth scrolling to anchors */
|
||||
html {
|
||||
font-size: 1.4rem;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'Latin Modern', Georgia, Cambria, 'DejaVu Serif', 'Times New Roman', Times, serif;
|
||||
line-height: 1.4;
|
||||
max-width: 80ch;
|
||||
min-height: 100vh;
|
||||
overflow-x: hidden;
|
||||
margin: 0 auto;
|
||||
padding: 2rem 1.25rem;
|
||||
|
||||
counter-reset: theorem;
|
||||
counter-reset: definition;
|
||||
|
||||
color: hsl(0, 5%, 10%);
|
||||
background-color: hsl(210, 20%, 98%);
|
||||
|
||||
text-rendering: optimizeLegibility;
|
||||
}
|
||||
|
||||
/* Justify and hyphenate all paragraphs */
|
||||
p {
|
||||
text-align: justify;
|
||||
hyphens: auto;
|
||||
-webkit-hyphens: auto;
|
||||
-moz-hyphens: auto;
|
||||
margin-top: 1rem;
|
||||
}
|
||||
|
||||
/* A elements that don't have a class get default styles */
|
||||
a:not([class]) {
|
||||
text-decoration-skip-ink: auto;
|
||||
}
|
||||
|
||||
/* Make links red */
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #a00;
|
||||
}
|
||||
a:visited {
|
||||
text-decoration: none;
|
||||
color: #800;
|
||||
}
|
||||
|
||||
a:focus {
|
||||
outline-offset: 2px;
|
||||
outline: 2px solid hsl(220, 90%, 52%);
|
||||
}
|
||||
|
||||
|
||||
/* Ueberschriften mit Links nur dezent einfärben */
|
||||
h1 a, h1 a:visited,
|
||||
h2 a, h2 a:visited,
|
||||
h3 a, h3 a:visited,
|
||||
h4 a, h4 a:visited,
|
||||
h5 a, h5 a:visited,
|
||||
h6 a, h6 a:visited {
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* goto bar */
|
||||
div.menu form.search {
|
||||
font-size:75%;
|
||||
margin-top:2em;
|
||||
margin-bottom:3em;
|
||||
}
|
||||
|
||||
div.menu span.gotobar a.local,
|
||||
div.menu span.gotobar a.local:visited {
|
||||
text-decoration: none;
|
||||
color: #1e133c87;
|
||||
margin-right:1.1em;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
/* Make images easier to work with */
|
||||
img {
|
||||
max-width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Inherit fonts for inputs and buttons */
|
||||
input,
|
||||
button,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* Prevent textarea from overflowing */
|
||||
textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* Natural flow and rhythm in articles by default */
|
||||
article > * + * {
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
/* Styles for inline code or code snippets */
|
||||
code,
|
||||
pre,
|
||||
kbd {
|
||||
font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New',
|
||||
monospace;
|
||||
font-size: 85%;
|
||||
}
|
||||
pre {
|
||||
padding: 1rem 1.4rem;
|
||||
max-width: 100%;
|
||||
overflow: auto;
|
||||
border-radius: 4px;
|
||||
background: hsl(210, 28%, 93%);
|
||||
}
|
||||
pre code {
|
||||
font-size: 95%;
|
||||
position: relative;
|
||||
}
|
||||
kbd {
|
||||
background: hsl(210, 5%, 100%);
|
||||
border: 1px solid hsl(210, 5%, 70%);
|
||||
border-radius: 2px;
|
||||
padding: 2px 4px;
|
||||
font-size: 75%;
|
||||
}
|
||||
|
||||
/* Make table 100% width, add borders between rows */
|
||||
table {
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0;
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
}
|
||||
th,
|
||||
td {
|
||||
text-align: left;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
td {
|
||||
border-bottom: 1px solid hsl(0, 0%, 85%);
|
||||
}
|
||||
thead th {
|
||||
border-bottom: 2px solid hsl(0, 0%, 70%);
|
||||
}
|
||||
tfoot th {
|
||||
border-top: 2px solid hsl(0, 0%, 70%);
|
||||
}
|
||||
|
||||
/* Center align the title */
|
||||
h1:first-child {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Nested ordered list for ToC */
|
||||
nav ol {
|
||||
counter-reset: item;
|
||||
padding-left: 2rem;
|
||||
}
|
||||
nav li {
|
||||
display: block;
|
||||
}
|
||||
nav li:before {
|
||||
content: counters(item, '.') ' ';
|
||||
counter-increment: item;
|
||||
padding-right: 0.85rem;
|
||||
}
|
||||
|
||||
/* Center definitions (most useful for display equations) */
|
||||
dl dd {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Theorem */
|
||||
.theorem {
|
||||
counter-increment: theorem;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
.theorem::before {
|
||||
content: 'Satz ' counter(theorem) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Lemma */
|
||||
.lemma {
|
||||
counter-increment: theorem;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: italic;
|
||||
}
|
||||
.lemma::before {
|
||||
content: 'Lemma ' counter(theorem) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Proof */
|
||||
.proof {
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: normal;
|
||||
position: relative;
|
||||
}
|
||||
.proof::before {
|
||||
content: 'Beweis. ' attr(title);
|
||||
font-style: italic;
|
||||
}
|
||||
.proof:after {
|
||||
content: '◾️';
|
||||
position: absolute;
|
||||
right: -12px;
|
||||
bottom: -2px;
|
||||
}
|
||||
|
||||
/* Definition */
|
||||
.definition {
|
||||
counter-increment: definition;
|
||||
display: block;
|
||||
margin: 12px 0;
|
||||
font-style: normal;
|
||||
}
|
||||
.definition::before {
|
||||
content: 'Definition ' counter(definition) '. ';
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Center align author name, use small caps and add vertical spacing */
|
||||
.author {
|
||||
margin: 0.85rem 0;
|
||||
font-variant-caps: small-caps;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* Make footnote text smaller and left align it (looks bad with long URLs) */
|
||||
.footnotes p {
|
||||
text-align: left;
|
||||
line-height: 1.5;
|
||||
font-size: 85%;
|
||||
margin-bottom: 0.4rem;
|
||||
}
|
||||
.footnotes {
|
||||
border-top: 1px solid hsl(0, 0%, 39%);
|
||||
}
|
||||
|
||||
/* Center title and paragraph */
|
||||
.abstract,
|
||||
.abstract p {
|
||||
text-align: center;
|
||||
}
|
||||
.abstract {
|
||||
margin: 2.25rem 0;
|
||||
}
|
||||
|
||||
/* Format the LaTeX symbol correctly (a higher up, e lower) */
|
||||
.latex span:nth-child(1) {
|
||||
text-transform: uppercase;
|
||||
font-size: 0.75em;
|
||||
vertical-align: 0.28em;
|
||||
margin-left: -0.48em;
|
||||
margin-right: -0.15em;
|
||||
line-height: 1ex;
|
||||
}
|
||||
|
||||
.latex span:nth-child(2) {
|
||||
text-transform: uppercase;
|
||||
vertical-align: -0.5ex;
|
||||
margin-left: -0.1667em;
|
||||
margin-right: -0.125em;
|
||||
line-height: 1ex;
|
||||
}
|
||||
|
||||
/* Heading typography */
|
||||
h1 {
|
||||
font-size: 2.5rem;
|
||||
line-height: 3.25rem;
|
||||
margin-bottom: 1.625rem;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.7rem;
|
||||
line-height: 2rem;
|
||||
margin-top: 3rem;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.4rem;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.2rem;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1rem;
|
||||
margin-top: 1.8rem;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1rem;
|
||||
font-style: italic;
|
||||
font-weight: normal;
|
||||
margin-top: 2.5rem;
|
||||
}
|
||||
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
line-height: 1.625rem;
|
||||
}
|
||||
|
||||
h1 + h2 {
|
||||
margin-top: 1.625rem;
|
||||
}
|
||||
|
||||
h2 + h3,
|
||||
h3 + h4,
|
||||
h4 + h5 {
|
||||
margin-top: 0.8rem;
|
||||
}
|
||||
|
||||
h5 + h6 {
|
||||
margin-top: -0.8rem;
|
||||
}
|
||||
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin-bottom: 0.8rem;
|
||||
}
|
||||
|
||||
div.diff div.old {
|
||||
background-color: #FFFFAF;
|
||||
}
|
||||
|
||||
div.diff div.new {
|
||||
background-color: #CFFFCF;
|
||||
}
|
||||
|
||||
div.content blockquote {
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
@@ -27,6 +27,10 @@ textarea, pre, code, tt {
|
||||
font-family: Times, serif;
|
||||
font-size:10pt;
|
||||
}
|
||||
/* Printing from Firefox */
|
||||
svg {
|
||||
transform: translate(-1.5cm, -1cm);
|
||||
}
|
||||
}
|
||||
|
||||
/* iPhone */
|
||||
@@ -47,9 +51,10 @@ textarea, pre, code, tt {
|
||||
.browse { min-height: 3em; }
|
||||
.header form, .header p { margin: 0; }
|
||||
/* hide the buttons but don't use display:none because of
|
||||
http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form */
|
||||
.header input[type="submit"] { position: absolute; visibility: hidden; }
|
||||
.header input { width: 5em; font-size: 80%; }
|
||||
http://stackoverflow.com/questions/5665203/getting-iphone-go-button-to-submit-form
|
||||
.header input[type="submit"] { position: absolute; visibility: hidden; } */
|
||||
.header input { width: 6em; font-size: 80%; }
|
||||
.header input[type="checkbox"] { width: 1em; }
|
||||
.footer { clear:both; font-size: 90%; }
|
||||
.content input { font-size: 80%; line-height: 125%; }
|
||||
|
||||
@@ -201,10 +206,12 @@ div.message {
|
||||
}
|
||||
table.history { border-style:none; }
|
||||
td.history { border-style:none; }
|
||||
div.history span.dash + strong { font-weight: normal; }
|
||||
span.result { font-size:larger; }
|
||||
span.info { font-size:smaller; font-style:italic; }
|
||||
div.rc hr { display: none; }
|
||||
div.rc li { padding-bottom: 0.5em; }
|
||||
div.rc li strong { font-weight: normal; }
|
||||
|
||||
/* Tables */
|
||||
table.user {
|
||||
|
||||
103
css/wiki.css
@@ -51,13 +51,13 @@ a.image:hover img {
|
||||
}
|
||||
|
||||
/* a.definition soll aussehen wie h2 */
|
||||
h2, p a.definition {
|
||||
h2, p > a.definition {
|
||||
display: block;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
/* Such Link im h1 soll nicht auffallen. */
|
||||
h1, h2, h3, h4, h1 a, h1 a:visited, p a.definition {
|
||||
h1, h2, h3, h4, h1 a, h1 a:visited, p > a.definition {
|
||||
color: #666;
|
||||
font-size: 30pt;
|
||||
font-weight: normal;
|
||||
@@ -172,6 +172,50 @@ span.bar a {
|
||||
padding: 1ex 0;
|
||||
}
|
||||
|
||||
.red {
|
||||
background: red;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.orange {
|
||||
background: orange;
|
||||
color: orange;
|
||||
}
|
||||
|
||||
.yellow {
|
||||
background: yellow;
|
||||
color: yellow;
|
||||
}
|
||||
|
||||
.green {
|
||||
background: green;
|
||||
color: green;
|
||||
}
|
||||
|
||||
.blue {
|
||||
background: blue;
|
||||
color: blue;
|
||||
}
|
||||
|
||||
.indigo {
|
||||
background: indigo;
|
||||
color: indigo;
|
||||
}
|
||||
|
||||
.violet {
|
||||
background: violet;
|
||||
color: violet;
|
||||
}
|
||||
|
||||
.white {
|
||||
background: white;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.ip-code {
|
||||
border: 1px solid #666;
|
||||
}
|
||||
|
||||
hr {
|
||||
border: none;
|
||||
color: black;
|
||||
@@ -220,49 +264,18 @@ code {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Basic';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
src: local('Gentium Basic Bold'), local('GentiumBasic-Bold'), url(/fonts/GenBasB.woff) format('woff');
|
||||
/* for https://oddmuse.org/wiki/All_Modules */
|
||||
.foo_list + .journal h1 {
|
||||
font: inherit;
|
||||
border: none;
|
||||
display: list-item;
|
||||
margin-top: 0;
|
||||
margin-left: 1em;
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Basic';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: local('Gentium Basic Italic'), local('GentiumBasic-Italic'), url(/fonts/GenBasI.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Basic';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
src: local('Gentium Basic Bold Italic'), local('GentiumBasic-BoldItalic'), url(/fonts/GenBasBI.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Basic';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Gentium Basic'), local('GentiumBasic'), url(/fonts/GenBasR.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Plus';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
src: local('Gentium Plus'), local('GentiumPlus'), url(/fonts/GentiumPlus-R.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Gentium Plus';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
src: local('Gentium Plus Italic'), local('GentiumPlus-Italic'), url(/fonts/GentiumPlus-I.woff) format('woff');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'Symbola';
|
||||
src: local('Symbola'), url('/fonts/Symbola.woff') format('woff') url('/fonts/Symbola.ttf') format('truetype');
|
||||
.foo_list + .journal a {
|
||||
font: inherit;
|
||||
border: none;
|
||||
text-decoration: none;
|
||||
color: #a00;
|
||||
}
|
||||
|
||||
BIN
logo/falky/Neris/Neris-Black.otf
Normal file
BIN
logo/falky/Neris/Neris-BlackItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-Light.otf
Normal file
BIN
logo/falky/Neris/Neris-LightItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-SemiBold.otf
Normal file
BIN
logo/falky/Neris/Neris-SemiBoldItalic.otf
Normal file
BIN
logo/falky/Neris/Neris-Thin.otf
Normal file
BIN
logo/falky/Neris/Neris-ThinItalic.otf
Normal file
15
logo/falky/README.md
Normal file
@@ -0,0 +1,15 @@
|
||||
Falky schreibt:
|
||||
|
||||
Zum Thema Rechte am Logo möchte ich erstmal sagen, dass es mir primär
|
||||
darum ging den Auftritt von oddmuse.org aufzuhübschen. Also du/ihr
|
||||
sollt durch das Logo unterstützt werden, nicht eingeschränkt.
|
||||
|
||||
Welche Lizenz das ab besten leisten, da hab ich keinen Schimmer.
|
||||
|
||||
Schön wäre, wenn irgendwo ein verweis auf "Falky [falky.de]"
|
||||
auftaucht, der soll aber nicht bei jeder Verwendung auftauchen,
|
||||
sondern irgendwo 'auffindbar' an 'zentraler' Stelle - halt irgendwo
|
||||
auf der Homepage, dass ich darauf verweisen kann und dass niemand was
|
||||
anderes behaupten kann. Das wäre es schon. Und ja, falls jemand das
|
||||
logo für ein anderes Projekt verwenden möchte, kann man ja höflich
|
||||
nochmal fragen oder so.
|
||||
BIN
logo/falky/oddmuse.banner.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
25
logo/falky/oddmuse.banner.svg
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-61 -1 177 62">
|
||||
|
||||
<rect fill="#FFF" x="-60" y="0" width="175" height="60"/>
|
||||
|
||||
<text style="font:400 6px Neris Black" fill="#000" x="2" y="18">powered by</text>
|
||||
<text style="font:400 16px Neris Thin" fill="#000" x="2" y="34">Oddmuse<tspan style="font-family:Neris Black">.org</tspan></text>
|
||||
|
||||
<g id="new" transform="translate(-30,30) scale(.18,.18)" >
|
||||
<circle fill="#FFF" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
<g id="new" transform="rotate(207.2)" >
|
||||
|
||||
<path fill="#000" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#000" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#000" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#000" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g></g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
BIN
logo/falky/oddmuse.icon.png
Normal file
|
After Width: | Height: | Size: 4.1 KiB |
19
logo/falky/oddmuse.icon.svg
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-100 -100 200 200" >
|
||||
|
||||
<rect fill="#D88" x="-100" y="-100" width="200" height="200"/>
|
||||
|
||||
<g id="new" transform="rotate(180) translate(0,-19)" >
|
||||
|
||||
<path fill="#A00" d="m42 -77 q18 0 33 14 q 12 -6 23 -16 q-2 25 -10 43 c0 110 -44 155 -88 155 c-44 0 -88 -44 -88 -155 q-8 -18 -10 -43 q11 10 23 16 q15 -14 33 -14z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="6" fill="#A00" d="m0 16 c30 0 38 -2 48 -2 c17 0 33 16 33 52 c0 34 -12 52 -31 52 c-15 0 -30 -7 -50 -7 c-20 0 -35 7 -50 7 c-19 0 -31 -18 -31 -52 c0 -36 16 -52 33 -52 c10 0 18 2 48 2z"/>
|
||||
<circle fill="#FFF" cx="45" cy="49" r="12"/> <circle fill="#FFF" cx="-45" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#666" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.1 KiB |
BIN
logo/falky/oddmuse.logo.png
Normal file
|
After Width: | Height: | Size: 8.3 KiB |
22
logo/falky/oddmuse.logo.svg
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-162 -162 324 324">
|
||||
|
||||
<circle fill="#FEE" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
|
||||
<g id="new" transform="rotate(210)" >
|
||||
|
||||
<path fill="#A00" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#A00" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#D88" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#666" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.3 KiB |
24
logo/falky/oddmuse.siegel.svg
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-162 -162 324 324">
|
||||
|
||||
<circle fill="#FFF" stroke="#000" stroke-width="3" cx="0" cy="0" r="160.5"/>
|
||||
|
||||
<text style="font:400 27px Neris Black" fill="#000" text-anchor="middle" x="-5" y="137">Oddmuse</text>
|
||||
|
||||
<g id="new" transform="rotate(210)" >
|
||||
|
||||
<path fill="#000" d="m42 -77 q24 0 38 20 c14 -1 42 -18 52 -29 c-1 50 -26 68 -44 70 c0 90 -44 141 -88 141 c-44 0 -88 -51 -88 -141 c-18 -2 -43 -20 -44 -70 c10 11 38 28 52 29 q14 -20 38 -20z"/>
|
||||
<path fill="#000" transform="translate(0,60) rotate(-14)" d="m -22 46q1 50 22 50q21 0 22 -50z"/>
|
||||
|
||||
<path stroke="#FFF" stroke-width="4" fill="#000" d="m0 17 c 30 0 36 -2 46 -2 c 18 0 32 16 32 51 c 0 34 -12 50 -32 50 c-16 0 -26 -5 -46 -5 c-20 0 -30 5 -46 5 c-20 0 -33 -18 -32 -50 c0 -36 16 -52 32 -51 c10 0 16 2 46 2z"/>
|
||||
<circle fill="#FFF" cx="44" cy="49" r="12"/> <circle fill="#FFF" cx="-44" cy="49" r="12"/>
|
||||
|
||||
<circle fill="#FFF" cx="42" cy="-31" r="40"/> <circle fill="#000" cx="42" cy="-31" r="20.5"/>
|
||||
<circle fill="#FFF" cx="-42" cy="-31" r="40"/> <path fill="#000" transform="translate(-42,-31) rotate(55)" d="m-7 7 v20 q7 2 14 0 v-20 h20 q2 -7 0 -14 h-20 v-20 q -7 -2 -14 0 v20 h-20 q-2 7 0 14z"/>
|
||||
|
||||
</g>
|
||||
|
||||
|
||||
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.4 KiB |
BIN
logo/falky/preview/oddmuse-preview.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
logo/falky/preview/oddmuse.icon-preview.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
logo/falky/preview/oddmuse.org-preview.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
logo/falky/testmonial.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
4
logo/murray/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
The logo is licensed under the [GNU Free Documentation
|
||||
License](http://www.emacswiki.org/FDL) as well as the [CC BY
|
||||
2.0](http://creativecommons.org/licenses/by/2.0/) license. The author
|
||||
is [Murray Altheim](http://www.altheim.com/murray/).
|
||||
BIN
logo/murray/oddmuse-logo.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
100
logo/murray/oddmuse-logo.svg
Normal file
@@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Sodipodi ("http://www.sodipodi.com/") -->
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
inkscape:version="0.41"
|
||||
sodipodi:docname="oddmuse-logo.svg"
|
||||
sodipodi:docbase="/Users/alex/Pictures/Oddmuse"
|
||||
height="1000pt"
|
||||
width="1000pt"
|
||||
sodipodi:version="0.32"
|
||||
id="svg1">
|
||||
<metadata
|
||||
id="metadata32">
|
||||
<rdf:RDF
|
||||
id="RDF34">
|
||||
<cc:Work
|
||||
id="Work36"
|
||||
rdf:about="">
|
||||
<dc:format
|
||||
id="format38">image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage"
|
||||
id="type40" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3" />
|
||||
<sodipodi:namedview
|
||||
inkscape:current-layer="svg1"
|
||||
inkscape:window-y="22"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-height="535"
|
||||
inkscape:window-width="640"
|
||||
inkscape:cy="625.00000"
|
||||
inkscape:cx="625.00000"
|
||||
inkscape:zoom="0.28960000"
|
||||
id="base" />
|
||||
<g
|
||||
transform="translate(-155.7935,22.13440)"
|
||||
id="g176">
|
||||
<path
|
||||
transform="matrix(1.021740,0.000000,0.000000,1.021740,-299.4160,85.75640)"
|
||||
sodipodi:ry="148.93437"
|
||||
sodipodi:rx="142.30524"
|
||||
sodipodi:cy="475.27606"
|
||||
sodipodi:cx="1066.8474"
|
||||
d="M 1209.1526 475.27606 A 142.30524 148.93437 0 1 1 924.54218,475.27606 A 142.30524 148.93437 0 1 1 1209.1526 475.27606 z"
|
||||
id="path166"
|
||||
style="fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:22.021299;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="matrix(0.591973,0.000000,0.000000,0.523224,159.0800,309.0390)"
|
||||
sodipodi:ry="148.93437"
|
||||
sodipodi:rx="142.30524"
|
||||
sodipodi:cy="475.27606"
|
||||
sodipodi:cx="1066.8474"
|
||||
d="M 1209.1526 475.27606 A 142.30524 148.93437 0 1 1 924.54218,475.27606 A 142.30524 148.93437 0 1 1 1209.1526 475.27606 z"
|
||||
id="path168"
|
||||
style="fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke:#000000;stroke-width:38.609402;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<rect
|
||||
transform="translate(-1.416020,0.000000)"
|
||||
y="561.16870"
|
||||
x="694.39026"
|
||||
height="88.691116"
|
||||
width="195.30150"
|
||||
id="rect170"
|
||||
style="font-size:12.000000;fill:#ffde00;fill-opacity:1.0000000;fill-rule:evenodd;stroke-width:1.0000000pt" />
|
||||
<g
|
||||
id="g173">
|
||||
<path
|
||||
transform="translate(185.0000,-158.7500)"
|
||||
sodipodi:ry="31.250000"
|
||||
sodipodi:rx="25.000000"
|
||||
sodipodi:cy="783.75000"
|
||||
sodipodi:cx="565.00000"
|
||||
d="M 590.00000 783.75000 A 25.000000 31.250000 0 1 1 540.00000,783.75000 A 25.000000 31.250000 0 1 1 590.00000 783.75000 z"
|
||||
id="path171"
|
||||
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
<path
|
||||
transform="translate(266.2500,-158.7500)"
|
||||
sodipodi:ry="31.250000"
|
||||
sodipodi:rx="25.000000"
|
||||
sodipodi:cy="783.75000"
|
||||
sodipodi:cx="565.00000"
|
||||
d="M 590.00000 783.75000 A 25.000000 31.250000 0 1 1 540.00000,783.75000 A 25.000000 31.250000 0 1 1 590.00000 783.75000 z"
|
||||
id="path172"
|
||||
style="fill:#000000;fill-opacity:1.0000000;fill-rule:evenodd;stroke:none;stroke-width:1.0000000pt;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1.0000000"
|
||||
sodipodi:type="arc" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
package OddMuse;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
@@ -44,7 +41,7 @@ sub AdminPowerDelete {
|
||||
GetCluster($Page{text}));
|
||||
}
|
||||
# Regenerate index on next request
|
||||
unlink($IndexFile);
|
||||
Unlink($IndexFile);
|
||||
ReleaseLock();
|
||||
print $q->p(T('Main lock released.'));
|
||||
PrintFooter();
|
||||
@@ -61,30 +58,30 @@ sub AdminPowerRename {
|
||||
print $q->p(T('Main lock obtained.'));
|
||||
# page file -- only check for existing or missing pages here
|
||||
my $fname = GetPageFile($id);
|
||||
ReportError(Ts('The page %s does not exist', $id), '400 BAD REQUEST') unless -f $fname;
|
||||
ReportError(Ts('The page %s does not exist', $id), '400 BAD REQUEST') unless IsFile($fname);
|
||||
my $newfname = GetPageFile($new);
|
||||
ReportError(Ts('The page %s already exists', $new), '400 BAD REQUEST') if -f $newfname;
|
||||
ReportError(Ts('The page %s already exists', $new), '400 BAD REQUEST') if IsFile($newfname);
|
||||
# Regenerate index on next request -- remove this before errors can occur!
|
||||
unlink($IndexFile);
|
||||
Unlink($IndexFile);
|
||||
# page file
|
||||
CreateDir($PageDir); # It might not exist yet
|
||||
rename($fname, $newfname)
|
||||
Rename($fname, $newfname)
|
||||
or ReportError(Tss('Cannot rename %1 to %2', $fname, $newfname) . ": $!", '500 INTERNAL SERVER ERROR');
|
||||
# keep directory
|
||||
my $kdir = GetKeepDir($id);
|
||||
my $newkdir = GetKeepDir($new);
|
||||
CreateDir($KeepDir); # It might not exist yet (only the parent directory!)
|
||||
rename($kdir, $newkdir)
|
||||
Rename($kdir, $newkdir)
|
||||
or ReportError(Tss('Cannot rename %1 to %2', $kdir, $newkdir) . ": $!", '500 INTERNAL SERVER ERROR')
|
||||
if -d $kdir;
|
||||
if IsDir($kdir);
|
||||
# refer file
|
||||
if (defined(&GetRefererFile)) {
|
||||
my $rdir = GetRefererFile($id);
|
||||
my $newrdir = GetRefererFile($new);
|
||||
CreateDir($RefererDir); # It might not exist yet
|
||||
rename($rdir, $newrdir)
|
||||
Rename($rdir, $newrdir)
|
||||
or ReportError(Tss('Cannot rename %1 to %2', $rdir, $newrdir) . ": $!", '500 INTERNAL SERVER ERROR')
|
||||
if -d $rdir;
|
||||
if IsDir($rdir);
|
||||
}
|
||||
# RecentChanges
|
||||
OpenPage($new);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -29,7 +29,7 @@ $NewQuestion = 'Write your question here:';
|
||||
|
||||
sub IncrementInFile {
|
||||
my $filename = shift;
|
||||
sysopen my $fh, $filename, O_RDWR|O_CREAT or die "can't open $filename: $!";
|
||||
sysopen my $fh, encode_utf8($filename), O_RDWR|O_CREAT or die "can't open $filename: $!";
|
||||
flock $fh, LOCK_EX or die "can't flock $filename: $!";
|
||||
my $num = <$fh> || 1;
|
||||
seek $fh, 0, 0 or die "can't rewind $filename: $!";
|
||||
|
||||
@@ -171,9 +171,9 @@ sub UserCanEditAutoLockFix {
|
||||
return 0 if $id eq 'SampleUndefinedPage' or $id eq T('SampleUndefinedPage')
|
||||
or $id eq 'Sample_Undefined_Page' or $id eq T('Sample_Undefined_Page');
|
||||
return 1 if UserIsAdmin() || UserIsEditor();
|
||||
return 0 if $id ne '' and -f GetLockedPageFile($id);
|
||||
return 0 if $LockOnCreation{$id} and not -f GetPageFile($id); # new page
|
||||
return 0 if !$EditAllowed or -f $NoEditFile;
|
||||
return 0 if $id ne '' and IsFile(GetLockedPageFile($id));
|
||||
return 0 if $LockOnCreation{$id} and not IsFile(GetPageFile($id)); # new page
|
||||
return 0 if !$EditAllowed or IsFile($NoEditFile);
|
||||
return 0 if $editing and UserIsBanned(); # this call is more expensive
|
||||
return 0 if $EditAllowed >= 2 and (not $CommentsPrefix or $id !~ /^$CommentsPrefix/);
|
||||
return 1 if $EditAllowed >= 3 and ($comment or (GetParam('aftertext', '') and not GetParam('text', '')));
|
||||
@@ -206,18 +206,17 @@ except where noted.
|
||||
|
||||
Copyleft 2008 by B.w.Curry <http://www.raiazome.com>.
|
||||
|
||||
This file is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This file is distributed in the hope that it will be useful,
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this file; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
=cut
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Grab MLDBM at http://search.cpan.org/dist/MLDBM/lib/MLDBM.pm
|
||||
# ie: http://search.cpan.org/CPAN/authors/id/C/CH/CHAMAS/MLDBM-2.01.tar.gz
|
||||
@@ -44,8 +41,8 @@ sub BacklinksMenu {
|
||||
$Action{buildback} = \&BuildBacklinkDatabase;
|
||||
sub BuildBacklinkDatabase {
|
||||
print GetHttpHeader('text/plain');
|
||||
unlink $backfile; # Remove old database
|
||||
tie my %backhash, 'MLDBM', $backfile or die "Cannot open file $backfile $!\n";
|
||||
Unlink($backfile); # Remove old database
|
||||
tie my %backhash, 'MLDBM', encode_utf8($backfile) or die "Cannot open file $backfile $!\n";
|
||||
log1("Starting Database Store Process ... please wait\n\n");
|
||||
|
||||
foreach my $name (AllPagesList()) {
|
||||
@@ -101,7 +98,7 @@ sub GetBackLink {
|
||||
|
||||
our ($BacklinkBanned);
|
||||
$BacklinkBanned = "HomePage|ScratchPad" if !$BacklinkBanned;
|
||||
tie my %backhash, 'MLDBM', $backfile, O_CREAT|O_RDWR, oct(644) or die "Cannot open file $backfile $!\n";
|
||||
tie my %backhash, 'MLDBM', encode_utf8($backfile), O_CREAT|O_RDWR, oct(644) or die "Cannot open file $backfile $!\n";
|
||||
|
||||
# Search database for matches
|
||||
while ( my ($source, $hashes) = each %backhash ) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2013 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2013-2021 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -21,11 +21,12 @@ compared to the list of regular expressions on the C<BannedHosts> page
|
||||
(see C<$BannedHosts>). If the contributor is already banned, this is
|
||||
mentioned. If the contributor is not banned, you'll see a button
|
||||
allowing you to ban him or her immediately. If you click the button,
|
||||
the IP or hostname will be added to the C<BannedHosts> page for you.
|
||||
the IP will be added to the C<BannedHosts> page for you.
|
||||
|
||||
=cut
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
our ($q, $Now, %Page, $OpenPageName, %Action, $UrlPattern, $BannedContent, $BannedHosts, @MyAdminCode);
|
||||
|
||||
AddModuleDescription('ban-contributors.pl', 'Ban Contributors Extension');
|
||||
@@ -56,17 +57,18 @@ sub IsItBanned {
|
||||
sub DoBanHosts {
|
||||
my $id = shift;
|
||||
my $content = GetParam('content', '');
|
||||
my $host = GetParam('host', '');
|
||||
my $range = GetParam('range', '');
|
||||
my $regexp = GetParam('regexp', '');
|
||||
if ($content) {
|
||||
SetParam('text', GetPageContent($BannedContent)
|
||||
. $content . " # " . CalcDay($Now) . " "
|
||||
. NormalToFree($id) . "\n");
|
||||
SetParam('summary', NormalToFree($id));
|
||||
DoPost($BannedContent);
|
||||
} elsif ($host) {
|
||||
$host =~ s/\./\\./g;
|
||||
} elsif ($regexp) {
|
||||
SetParam('text', GetPageContent($BannedHosts)
|
||||
. "^" . $host . " # " . CalcDay($Now) . " "
|
||||
. $regexp . " # " . CalcDay($Now)
|
||||
. " $range "
|
||||
. NormalToFree($id) . "\n");
|
||||
SetParam('summary', NormalToFree($id));
|
||||
DoPost($BannedHosts);
|
||||
@@ -94,12 +96,20 @@ sub DoBanHosts {
|
||||
if (IsItBanned($_, \@regexps)) {
|
||||
print $q->p(Ts("%s is banned", $name));
|
||||
} else {
|
||||
print GetFormStart(undef, 'get', 'ban'),
|
||||
GetHiddenValue('action', 'ban'),
|
||||
GetHiddenValue('id', $id),
|
||||
GetHiddenValue('host', $_),
|
||||
GetHiddenValue('recent_edit', 'on'),
|
||||
$q->p($name, $q->submit(T('Ban!'))), $q->end_form();
|
||||
my @pairs = BanContributors::get_range($_);
|
||||
while (@pairs) {
|
||||
my $start = shift(@pairs);
|
||||
my $end = shift(@pairs);
|
||||
$range = "[$start - $end]";
|
||||
$name .= " " . $range;
|
||||
print GetFormStart(undef, 'get', 'ban'),
|
||||
GetHiddenValue('action', 'ban'),
|
||||
GetHiddenValue('id', $id),
|
||||
GetHiddenValue('range', $range),
|
||||
GetHiddenValue('regexp', BanContributors::get_regexp_ip($start, $end)),
|
||||
GetHiddenValue('recent_edit', 'on'),
|
||||
$q->p($name, $q->submit(T('Ban!'))), $q->end_form();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -158,3 +168,139 @@ sub NewBanContributorsWriteRcLog {
|
||||
};
|
||||
return OldBanContributorsWriteRcLog(@_);
|
||||
}
|
||||
|
||||
package BanContributors;
|
||||
use Net::Whois::Parser qw/parse_whois/;
|
||||
use Net::IP;
|
||||
|
||||
sub get_range {
|
||||
my $ip = shift;
|
||||
my $response = parse_whois(domain => $ip);
|
||||
my $re = '(?:[0-9]{1,3}\.){3}[0-9]{1,3}';
|
||||
# Just try all the keys and see whether there is a range match.
|
||||
for (keys %$response) {
|
||||
my @result;
|
||||
$_ = $response->{$_};
|
||||
for (ref eq 'ARRAY' ? @$_ : $_) {
|
||||
$ip = Net::IP->new($_);
|
||||
push(@result, $ip->ip, $ip->last_ip) if $ip;
|
||||
}
|
||||
return @result if @result;
|
||||
}
|
||||
# Fallback
|
||||
return $ip, $ip;
|
||||
}
|
||||
|
||||
sub get_groups {
|
||||
my ($from, $to) = @_;
|
||||
my @groups;
|
||||
if ($from == $to) {
|
||||
return [$from, $to];
|
||||
}
|
||||
# ones up to the nearest ten
|
||||
if ($from < $to and ($from % 10 or $from < 10)) {
|
||||
# from 5-7: as is
|
||||
# from 5-17: 5 + 9 - 5 = 9 thus 5-9, set $from to 10
|
||||
my $to2 = int($to/10) > int($from/10) ? $from + 9 - $from % 10 : $to;
|
||||
push(@groups, [$from, $to2]);
|
||||
$from = $to2 + 1;
|
||||
}
|
||||
# tens up to the nearest hundred
|
||||
if ($from < $to and $from % 100) {
|
||||
# 10-17: as is
|
||||
# 10-82: 10 to 79, set $from to 80 (8*10-1)
|
||||
# 10-182: 10 to 99, set $from to 100 (10+99=10=99)
|
||||
# 110-182: 110 to 179, set $from to 180 (170)
|
||||
# 110-222: 110 to 199, set $from to 200 (110+99-10 = 199)
|
||||
my $to2 = int($to/100) > int($from/100) ? $from + 99 - $from % 100
|
||||
: int($to/10) > int($from/10) ? int($to / 10) * 10 - 1
|
||||
: $to;
|
||||
push(@groups, [$from, $to2]);
|
||||
$from = $to2 + 1;
|
||||
}
|
||||
# up to the next hundred
|
||||
if (int($to/100) > int($from/100)) {
|
||||
# from 100 to 223: set $from to 200 (2*100-1)
|
||||
my $to2 = int($to/100) * 100 - 1;
|
||||
push(@groups, [$from, $to2]);
|
||||
$from = $to2 + 1;
|
||||
}
|
||||
# up to the next ten
|
||||
if (int($to/10) > int($from/10)) {
|
||||
# 10 to 17: skip
|
||||
# 100 to 143: set $from to 140 (14*10-1)
|
||||
my $to2 = int($to / 10) * 10 - 1;
|
||||
push(@groups, [$from, $to2]);
|
||||
$from = $to2 + 1;
|
||||
}
|
||||
# up to the next one
|
||||
if ($from <= $to) {
|
||||
push(@groups, [$from, $to]);
|
||||
}
|
||||
# warn join("; ", map { "@$_" } @groups);
|
||||
return \@groups;
|
||||
}
|
||||
|
||||
sub get_regexp_range {
|
||||
my @chars;
|
||||
for my $group (@{get_groups(@_)}) {
|
||||
my ($from, $to) = @$group;
|
||||
my $char;
|
||||
for (my $i = length($from); $i >= 1; $i--) {
|
||||
if (substr($from, - $i, 1) eq substr($to, - $i, 1)) {
|
||||
$char .= substr($from, - $i, 1);
|
||||
} else {
|
||||
$char .= '[' . substr($from, - $i, 1) . '-' . substr($to, - $i, 1). ']';
|
||||
}
|
||||
}
|
||||
push(@chars, $char);
|
||||
}
|
||||
return join('|', @chars);
|
||||
}
|
||||
|
||||
sub get_regexp_ip {
|
||||
my ($from, $to) = @_;
|
||||
my @start = split(/\./, $from);
|
||||
my @end = split(/\./, $to);
|
||||
my $regexp = "^";
|
||||
for my $i (0 .. 3) {
|
||||
if ($start[$i] eq $end[$i]) {
|
||||
# if the byte is the same, use it as is
|
||||
$regexp .= $start[$i];
|
||||
$regexp .= '\.' if $i < 3;
|
||||
} elsif ($start[$i] == 0 and $end[$i] == 255) {
|
||||
# the starting byte is 0 and the end byte is 255, then anything goes:
|
||||
# we're done, e.g. 185.244.214.0 - 185.244.214.255 results in 185\.244\.214\.
|
||||
last;
|
||||
} elsif ($i == 3 and $start[$i] != $end[$i]) {
|
||||
# example 45.87.2.128 - 45.87.2.255: the last bytes differ
|
||||
$regexp .= '(' . get_regexp_range($start[$i], $end[$i]) . ')';
|
||||
last;
|
||||
} elsif ($start[$i + 1] == 0 and $end[$i + 1] == 255) {
|
||||
# if we're here, we already know that the start byte and the end byte are
|
||||
# not the same; if the next bytes are from 0 to 255, we know that
|
||||
# everything else doesn't matter, e.g. 42.118.48.0 - 42.118.63.255
|
||||
$regexp .= '(' . get_regexp_range($start[$i], $end[$i]) . ')';
|
||||
$regexp .= '\.' if $i < 3;
|
||||
last;
|
||||
} elsif ($end[$i] - $start[$i] == 1 and $start[$i + 1] > 0 and $end[$i + 1] < 255) {
|
||||
# if we're here, we already know that the start byte and the end byte are
|
||||
# not the same; if the starting byte of the next (!) byte is bigger than
|
||||
# zero, then we need groups: in the case 77.56.180.0 - 77.57.70.255 for
|
||||
# example,
|
||||
$regexp .= '(' . $start[$i] . '\.(' . get_regexp_range($start[$i + 1], 255) . ')|'
|
||||
. $end[$i] . '\.(' . get_regexp_range(0, $end[$i + 1]) . ')';
|
||||
$regexp .= '\.' if $i < 3;
|
||||
last;
|
||||
} else {
|
||||
warn "Unhandled regexp: $from - $to ($i)";
|
||||
$regexp .= 'XXX';
|
||||
$regexp .= '\.' if $i < 3;
|
||||
last;
|
||||
}
|
||||
}
|
||||
return $regexp;
|
||||
}
|
||||
|
||||
# this is required in case we concatenate other modules to this one
|
||||
package OddMuse;
|
||||
|
||||
72
modules/ban-mixed-scripts.pl
Normal file
@@ -0,0 +1,72 @@
|
||||
# Copyright (C) 2018 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
=encoding utf8
|
||||
|
||||
=head1 Mixed Scripts
|
||||
|
||||
This module disallows ordinary users from posting words that consist of multiple
|
||||
scripts. Stuff like this: "It's diffіcult to find knowledgeable people on this
|
||||
topic, but youu sound like you know wgat you're taⅼkіng аboսt!" Did you notice
|
||||
the confusable characters? The sentence contains the following:
|
||||
ARMENIAN SMALL LETTER SEH
|
||||
CYRILLIC SMALL LETTER A
|
||||
CYRILLIC SMALL LETTER BYELORUSSIAN-UKRAINIAN I
|
||||
SMALL ROMAN NUMERAL FIFTY
|
||||
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
use Unicode::UCD qw(charprop);
|
||||
|
||||
AddModuleDescription('ban-mixed-scripts.pl', 'Ban Mixed Scripts Extension');
|
||||
|
||||
*OldBanMixedScriptsBannedContent = \&BannedContent;
|
||||
*BannedContent = \&NewBanMixedScriptsBannedContent;
|
||||
|
||||
sub NewBanMixedScriptsBannedContent {
|
||||
my $rule = OldBanMixedScriptsBannedContent(@_);
|
||||
$rule ||= BanMixedScript(@_);
|
||||
return $rule;
|
||||
}
|
||||
|
||||
sub BanMixedScript {
|
||||
my $str = shift;
|
||||
my @words = $str =~ m/\w+/g;
|
||||
my %seen;
|
||||
my %prop;
|
||||
for my $word (@words) {
|
||||
next if $seen{$word};
|
||||
$seen{$word} = 1;
|
||||
my $script;
|
||||
for my $char (split(//, $word)) {
|
||||
my $s = $prop{$char};
|
||||
if (not $s) {
|
||||
$s = charprop(ord($char), "Script_Extensions");
|
||||
if ($s eq 'Hiragana') {
|
||||
$s = 'Han'; # this mixing is ok
|
||||
}
|
||||
$prop{$char} = $s;
|
||||
}
|
||||
next if $s eq "Common";
|
||||
if (not $script) {
|
||||
$script = $s;
|
||||
} elsif ($script ne $s) {
|
||||
return "Mixed scripts in $word ($script and $s, if not more)";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright (C) 2012 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2012-2018 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -45,7 +45,8 @@ This extension works with logbannedcontent.pl.
|
||||
|
||||
=cut
|
||||
|
||||
our (%AdminPages, %LockOnCreation, @MyInitVariables, %PlainTextPages, $BannedContent, $BannedFile);
|
||||
our (%AdminPages, %LockOnCreation, @MyInitVariables, %PlainTextPages, $BannedContent, $BannedFile,
|
||||
$FullUrlPattern);
|
||||
our ($BannedRegexps);
|
||||
|
||||
$BannedRegexps = 'BannedRegexps';
|
||||
@@ -61,12 +62,13 @@ push(@MyInitVariables, sub {
|
||||
|
||||
sub RegexpNewBannedContent {
|
||||
my $str = shift;
|
||||
# check whether Banned Content complains
|
||||
my $rule = RegexpOldBannedContent($str, @_);
|
||||
if (not $rule) {
|
||||
foreach (split(/\n/, GetPageContent($BannedRegexps))) {
|
||||
next unless m/^\s*([^#]+?)\s*(#\s*(\d\d\d\d-\d\d-\d\d\s*)?(.*))?$/;
|
||||
my ($regexp, $comment, $re) = ($1, $4, undef);
|
||||
eval { $re = qr/$regexp/i; };
|
||||
eval { $re = qr/($regexp)/i; };
|
||||
if (defined($re) && $str =~ $re) {
|
||||
my $group1 = $1;
|
||||
my $explanation = ($group1
|
||||
|
||||
@@ -19,7 +19,7 @@ AddModuleDescription('bbcode.pl', 'bbCode Extension');
|
||||
|
||||
our ($q, @HtmlStack, @MyRules, %RuleOrder, $UrlProtocols, $FullUrlPattern);
|
||||
push(@MyRules, \&bbCodeRule);
|
||||
$RuleOrder{\&bbCodeRule} = 100; # must come after PortraitSupportRule
|
||||
$RuleOrder{\&bbCodeRule} = 300; # must come after PortraitSupportRule, MarkdownRule
|
||||
|
||||
our ($bbBlock);
|
||||
my %bbTitle = qw(h1 1 h2 1 h3 1 h4 1 h5 1 h6 1);
|
||||
@@ -32,7 +32,9 @@ sub bbCodeRule {
|
||||
my $bbcode = $1;
|
||||
my $tag = lc($2);
|
||||
my $option = $3; # sanitize?
|
||||
if ($tag eq 'b') {
|
||||
if ($tag eq 'br') {
|
||||
return $q->br(); }
|
||||
elsif ($tag eq 'b') {
|
||||
return AddHtmlEnvironment('b'); }
|
||||
elsif ($tag eq 'i') {
|
||||
return AddHtmlEnvironment('i'); }
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
# Copyright (C) 2004, 2005, 2006 Alex Schroeder <alex@emacswiki.org>
|
||||
# Copyright (C) 2004–2023 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2006 Ingo Belka
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
@@ -26,6 +23,7 @@ our ($q, %Page, %Action, $Now, $OpenPageName, $CollectingJournal, $FreeLinkPatte
|
||||
our ($CalendarOnEveryPage, $CalAsTable, $CalStartMonday);
|
||||
|
||||
$CalendarOnEveryPage = 0; # 1=on every page is a month-div situated in the header, use css to control
|
||||
# 2=this month and the previous month; 3=this, previous and next month
|
||||
$CalAsTable = 0; # 0=every month-div is "free", 1=every month-div is caught in a table, use css to control
|
||||
$CalStartMonday = 0; # 0=week starts with Su, 1=week starts with Mo
|
||||
|
||||
@@ -37,8 +35,22 @@ sub NewCalendarGetHeader {
|
||||
return $header unless $CalendarOnEveryPage;
|
||||
my $action = GetParam('action', 'browse');
|
||||
return $header if grep(/^$action$/, ('calendar', 'edit'));
|
||||
my $cal = Cal();
|
||||
$header =~ s/<div class="header">/$cal<div class="header">/;
|
||||
my $cal;
|
||||
my ($sec, $min, $hour, $mday, $mon, $year) = localtime($Now);
|
||||
$year += 1900;
|
||||
# $mon is 0 based and thus good for previous month
|
||||
if ($mon < 1) { $year -= 1; $mon += 12; };
|
||||
$cal .= Cal($year, $mon) if $CalendarOnEveryPage > 1;
|
||||
# the current month
|
||||
$mon += 1;
|
||||
if ($mon > 12) { $year += 1; $mon -= 12; };
|
||||
$cal .= Cal($year, $mon) if $CalendarOnEveryPage;
|
||||
# the next month
|
||||
$mon += 1;
|
||||
if ($mon > 12) { $year += 1; $mon -= 12; };
|
||||
$cal .= Cal($year, $mon) if $CalendarOnEveryPage > 2;
|
||||
# insert calendars before header div
|
||||
$header =~ s!<div class="header">!<div class="cal">$cal</div><div class="header">!;
|
||||
return $header;
|
||||
}
|
||||
|
||||
@@ -88,7 +100,7 @@ sub Cal {
|
||||
$year_text, 'local collection year'));
|
||||
}
|
||||
}}e;
|
||||
return "<div class=\"cal month\"><pre>$cal</pre></div>";
|
||||
return "<div class=\"month\"><pre>$cal</pre></div>";
|
||||
}
|
||||
|
||||
$Action{collect} = \&DoCollect;
|
||||
@@ -100,9 +112,7 @@ sub DoCollect {
|
||||
my $search = GetParam('search', '');
|
||||
ReportError(T('The match parameter is missing.')) unless $match or $search;
|
||||
print GetHeader('', Ts('Page Collection for %s', $match||$search), '');
|
||||
my @pages = (grep(/$match/, $search
|
||||
? SearchTitleAndBody($search)
|
||||
: AllPagesList()));
|
||||
my @pages = Matched($match, $search ? SearchTitleAndBody($search) : AllPagesList());
|
||||
if (!$CollectingJournal) {
|
||||
$CollectingJournal = 1;
|
||||
# Now save information required for saving the cache of the current page.
|
||||
@@ -129,7 +139,7 @@ sub CalendarRule {
|
||||
my $oldpos = pos;
|
||||
Clean(CloseHtmlEnvironments());
|
||||
Dirty($1);
|
||||
print Cal($2, $3);
|
||||
print $q->div({-class => 'cal'}, Cal($2, $3));
|
||||
pos = $oldpos;
|
||||
return AddHtmlEnvironment('p');
|
||||
} elsif (/\G(month:([+-]\d\d?))/cg
|
||||
@@ -144,7 +154,7 @@ sub CalendarRule {
|
||||
$mon += 1 + $delta;
|
||||
while ($mon < 1) { $year -= 1; $mon += 12; };
|
||||
while ($mon > 12) { $year += 1; $mon -= 12; };
|
||||
print Cal($year, $mon, undef, $id);
|
||||
print $q->div({-class => 'cal'}, Cal($year, $mon, undef, $id));
|
||||
pos = $oldpos;
|
||||
return AddHtmlEnvironment('p');
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,8 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
use utf8;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
|
||||
66
modules/cook-lang.pl
Normal file
@@ -0,0 +1,66 @@
|
||||
# Copyright (C) 2021 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('cook-lang.pl', 'Cooklang Extension');
|
||||
|
||||
our ($q, $bol, @MyRules);
|
||||
|
||||
push(@MyRules, \&CookLangRule);
|
||||
|
||||
sub CookLangRule {
|
||||
if (/\G#([^\n#\@\{\}]+)\{(?:([^\n%\}]+)(?:%([^\n\}]+))?)?\}/cg) {
|
||||
# #canning funnel{}
|
||||
my $html = "";
|
||||
$html .= $q->strong({-title=>"number"}, $2) if $2;
|
||||
$html .= " " if $2 and $3;
|
||||
$html .= $q->strong({-title=>"unit"}, $3) if $3;
|
||||
$html .= " " if $1 and ($2 or $3);
|
||||
$html .= $q->strong({-title=>"cookware"}, $1);
|
||||
return $html;
|
||||
} elsif (/\G#(\w+)/cg) {
|
||||
# #pot
|
||||
return $q->strong({-title=>"cookware"}, $1);
|
||||
} elsif (/\G\@([^\n#\@\{\}]+)\{(?:([^\n%\}]+)(?:%([^\n\}]+))?)?\}/cg) {
|
||||
# @ground black pepper{}
|
||||
my $html = "";
|
||||
$html .= $q->strong({-title=>"number"}, $2) if $2;
|
||||
$html .= " " if $2 and $3;
|
||||
$html .= $q->strong({-title=>"unit"}, $3) if $3;
|
||||
$html .= " " if $1 and ($2 or $3);
|
||||
$html .= $q->strong({-title=>"ingredient"}, $1);
|
||||
return $html;
|
||||
} elsif (/\G\@(\w+)/cg) {
|
||||
# @salt
|
||||
return $q->strong({-title=>"ingredient"}, $1);
|
||||
} elsif (/\G\~\{([^\n%\}]+)(?:%([^\n\}]+))?\}/cg) {
|
||||
# ~{25%minutes}
|
||||
my $html = $q->strong({-title=>"number"}, $1);
|
||||
$html .= " " if $1 and $2;
|
||||
$html .= $q->strong({-title=>"unit"}, $2) if $2;
|
||||
return $html;
|
||||
} elsif (/\G\/\/\s*(.*)/cg) {
|
||||
# // Don't burn the roux!
|
||||
return $q->em({-title=>"comment"}, $1);
|
||||
} elsif ($bol and /\G>>\s*(.*)/cg) {
|
||||
# // Don't burn the roux!
|
||||
return CloseHtmlEnvironments()
|
||||
. $q->blockquote({-title=>"meta"}, $1)
|
||||
. AddHtmlEnvironment('p');
|
||||
}
|
||||
# no match
|
||||
return;
|
||||
}
|
||||
@@ -1,34 +1,35 @@
|
||||
# Copyright (C) 2005 Fletcher T. Penney <fletcher@freeshell.org>
|
||||
# Copyright (C) 2016 Alex Schroeder <alex@gnu.org>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
# This program is free software; you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation; either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
#
|
||||
# This module stores additional information about a page when it is
|
||||
# first created:
|
||||
# created = the date the page is FIRST saved
|
||||
# originalAuthor = the username that first created a page
|
||||
#
|
||||
# Of course, you can customize this to store more information
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
=head1 Creation Date Extension
|
||||
|
||||
This module stores additional information about a page when it is first created:
|
||||
|
||||
=over
|
||||
=item C<created> is the date the page is first saved
|
||||
=item C<originalAuthor> is the username that first created a page
|
||||
=back
|
||||
=cut
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('creationdate.pl', 'CreationDate Module');
|
||||
|
||||
our (%Page, $Now);
|
||||
our (%Page, $Now, @MyAdminCode, %Action, $q, $FS, $RcOldFile, $RcFile);
|
||||
|
||||
*CreationDateOldOpenPage = \&OpenPage;
|
||||
*OpenPage = \&CreationDateOpenPage;
|
||||
@@ -39,3 +40,45 @@ sub CreationDateOpenPage{
|
||||
$Page{originalAuthor} = GetParam('username','') unless $Page{originalAuthor}
|
||||
or $Page{revision};
|
||||
}
|
||||
|
||||
# Allow administrators to add the 'created' item to page files, based on rc log
|
||||
# files.
|
||||
|
||||
push(@MyAdminCode, \&CreationDateMenu);
|
||||
|
||||
sub CreationDateMenu {
|
||||
my ($id, $menuref, $restref) = @_;
|
||||
push(@$menuref,
|
||||
ScriptLink('action=add-creation-date',
|
||||
T('Add creation date to page files'),
|
||||
'creationdate')) if UserIsAdmin();
|
||||
}
|
||||
|
||||
$Action{'add-creation-date'} = \&AddCreationDate;
|
||||
|
||||
sub AddCreationDate {
|
||||
print GetHeader('', T('Add creation date to page files'));
|
||||
print $q->start_div({-class=>'creationdate'});
|
||||
print '<ul>';
|
||||
RequestLockOrError();
|
||||
for my $file ($RcOldFile, $RcFile) {
|
||||
open(my $F, '<:encoding(UTF-8)', encode_utf8($file)) or next;
|
||||
while (my $line = <$F>) {
|
||||
chomp($line);
|
||||
my ($ts, $id, $minor, $summary, $host, $username, $revision)
|
||||
= split(/$FS/, $line);
|
||||
next unless $revision == 1;
|
||||
print $q->li(NormalToFree($id));
|
||||
OpenPage($id);
|
||||
next unless $Page{revision}; # skip if page no longer exists
|
||||
next if $Page{created} and $Page{originalAuthor};
|
||||
$Page{created} = $ts unless $Page{created};
|
||||
$Page{originalAuthor} = $username unless $Page{originalAuthor};
|
||||
SavePage();
|
||||
}
|
||||
}
|
||||
ReleaseLock();
|
||||
print '</ul>';
|
||||
print $q->end_div();
|
||||
PrintFooter();
|
||||
}
|
||||
|
||||
@@ -246,7 +246,8 @@ sub CreoleRule {
|
||||
$q->img({-src=> UnquoteHtml($1),
|
||||
-alt=> UnquoteHtml($3),
|
||||
-title=> UnquoteHtml($3),
|
||||
-class=> 'url outside'})));
|
||||
-class=> 'url outside',
|
||||
-loading=>'lazy'})));
|
||||
}
|
||||
# image link: [[link|{{pic}}]] and [[link|{{pic|text}}]]
|
||||
elsif (m/\G(\[\[$FreeLinkPattern$CreoleLinkPipePattern
|
||||
@@ -257,7 +258,8 @@ sub CreoleRule {
|
||||
$q->img({-src=> GetDownloadLink(FreeToNormal($3), 2),
|
||||
-alt=> UnquoteHtml($text),
|
||||
-title=> UnquoteHtml($text),
|
||||
-class=> 'upload'}), 'image')), $text);
|
||||
-class=> 'upload',
|
||||
-loading=>'lazy'}), 'image')), $text);
|
||||
}
|
||||
# image link: [[link|{{url}}]] and [[link|{{url|text}}]]
|
||||
elsif (m/\G(\[\[$FreeLinkPattern$CreoleLinkPipePattern
|
||||
@@ -268,7 +270,8 @@ sub CreoleRule {
|
||||
$q->img({-src=> UnquoteHtml($3),
|
||||
-alt=> UnquoteHtml($text),
|
||||
-title=> UnquoteHtml($text),
|
||||
-class=> 'url outside'}), 'image')), $text);
|
||||
-class=> 'url outside',
|
||||
-loading=>'lazy'}), 'image')), $text);
|
||||
}
|
||||
# image link: [[url|{{pic}}]] and [[url|{{pic|text}}]]
|
||||
elsif (m/\G(\[\[$FullUrlPattern$CreoleLinkPipePattern
|
||||
@@ -279,7 +282,8 @@ sub CreoleRule {
|
||||
$q->img({-src=> GetDownloadLink(FreeToNormal($3), 2),
|
||||
-alt=> UnquoteHtml($text),
|
||||
-title=> UnquoteHtml($text),
|
||||
-class=> 'upload'}))), $text);
|
||||
-class=> 'upload',
|
||||
-loading=>'lazy'}))), $text);
|
||||
}
|
||||
# image link: [[url|{{url}}]] and [[url|{{url|text}}]]
|
||||
elsif (m/\G\[\[$FullUrlPattern$CreoleLinkPipePattern
|
||||
@@ -289,7 +293,8 @@ sub CreoleRule {
|
||||
$q->img({-src=> UnquoteHtml($2),
|
||||
-alt=> UnquoteHtml($4),
|
||||
-title=> UnquoteHtml($4),
|
||||
-class=> 'url outside'})));
|
||||
-class=> 'url outside',
|
||||
-loading=>'lazy'})));
|
||||
}
|
||||
# link: [[url]] and [[url|text]]
|
||||
elsif (m/\G\[\[$FullUrlPattern$CreoleLinkTextPattern\]\]/cgs) {
|
||||
@@ -405,8 +410,7 @@ sub CreoleRule {
|
||||
if ($is_left_justified and
|
||||
$is_right_justified) { $attributes .= 'align="center"' }
|
||||
elsif ($is_right_justified) { $attributes .= 'align="right"' }
|
||||
# this is the default:
|
||||
# elsif ($is_left_justified) { $attributes .= 'align="left"' }
|
||||
elsif ($is_left_justified) { $attributes .= 'align="left"' }
|
||||
|
||||
return
|
||||
(InElement('td') || InElement('th') ? CloseHtmlEnvironmentUntil('tr') : '')
|
||||
|
||||
@@ -217,7 +217,7 @@ sub PrintPageContentCrossbar {
|
||||
|
||||
# If the crossbar div is placed immediately after the content div, place it
|
||||
# immediately before the content div.
|
||||
if (not ($html =~ s~(<div class="content browse">)$crossbar_pattern~$2$1~)) {
|
||||
if (not ($html =~ s~(<div class="content browse" lang="[a-z]*">)$crossbar_pattern~$2$1~)) {
|
||||
# Otherwise, if the crossbar div is placed immediately before the end of the
|
||||
# content div, place it immediately after the end of the content div.
|
||||
$html =~
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
37
modules/definition-lists.pl
Normal file
@@ -0,0 +1,37 @@
|
||||
#! /usr/bin/perl
|
||||
# Copyright (C) 2019 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('definition-lists.pl', 'Definition Lists Extension');
|
||||
|
||||
our ($q, $bol, @MyRules, @HtmlStack, $Fragment);
|
||||
|
||||
push(@MyRules, \&DefinitionListsRule);
|
||||
|
||||
# term
|
||||
# : definition
|
||||
|
||||
sub DefinitionListsRule {
|
||||
if ($bol and /\G(?:\s*\n)*(\S.*)\n[ \t]*:[ \t]*/cg) {
|
||||
return OpenHtmlEnvironment('dl', 1) . "<dt>$1</dt>" . AddHtmlEnvironment('dd');
|
||||
} elsif (InElement('dd') and /\G(?:\s*\n)+(\S.*)\n[ \t]*:[ \t]*/cg) {
|
||||
return OpenHtmlEnvironment('dl', 1) . "<dt>$1</dt>" . AddHtmlEnvironment('dd');
|
||||
} elsif (InElement('dd') and /\G(\s*\n)+[ \t]*:[ \t]*/cg) {
|
||||
return OpenHtmlEnvironment('dl', 1) . AddHtmlEnvironment('dd');
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -77,8 +77,7 @@ sub DoUnifiedDiff { # copied from DoDiff
|
||||
RequestLockDir('diff') or return '';
|
||||
WriteStringToFile($oldName, $_[0]);
|
||||
WriteStringToFile($newName, $_[1]);
|
||||
my $diff_out = `diff -U 99999 -- \Q$oldName\E \Q$newName\E | tail -n +7`; # should be +4, but we always add extra line # TODO that workaround is ugly, fix it!
|
||||
utf8::decode($diff_out); # needs decoding
|
||||
my $diff_out = decode_utf8(`diff -U 99999 -- \Q$oldName\E \Q$newName\E | tail -n +7`); # should be +4, but we always add extra line # TODO that workaround is ugly, fix it!
|
||||
$diff_out =~ s/\n\K\\ No newline.*\n//g; # Get rid of common complaint.
|
||||
ReleaseLockDir('diff');
|
||||
# No need to unlink temp files--next diff will just overwrite.
|
||||
|
||||
49
modules/ditaa.pl
Normal file
@@ -0,0 +1,49 @@
|
||||
#! /usr/bin/perl
|
||||
# Copyright (C) 2015–2017 Alex Schroeder <alex@gnu.org>
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
# Foundation, either version 3 of the License, or (at your option) any later
|
||||
# version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License along with
|
||||
# this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('ditaa.pl', 'Ditaa for Diagrams');
|
||||
|
||||
our ($q, $bol, @MyRules, @KnownLocks, $TempDir);
|
||||
|
||||
push (@MyRules, \&DitaaRule);
|
||||
push(@KnownLocks, 'diagram');
|
||||
|
||||
sub DitaaRule {
|
||||
if ($bol && m/\G<diagram(\s+style=".*")?>\n((.*\n)+)<\/diagram>/cg) {
|
||||
return "MIME::Base64 not installed" unless eval { require MIME::Base64; };
|
||||
my $style = $1;
|
||||
my $map = UnquoteHtml($2);
|
||||
RequestLockDir('diagram', undef, undef, 1);
|
||||
WriteStringToFile("$TempDir/diagram.txt", $map);
|
||||
$ENV{LANG}='en_US.UTF-8'; # Java needs Locale to match as well!
|
||||
my $output = `ditaa "$TempDir/diagram.txt" "$TempDir/diagram.png"`;
|
||||
my $image = '';
|
||||
# not UTF-8 layer!
|
||||
if (open(IN, '<', "$TempDir/diagram.png")) {
|
||||
local $/ = undef; # Read complete files
|
||||
$image = <IN>;
|
||||
close IN;
|
||||
}
|
||||
ReleaseLockDir('diagram');
|
||||
my $data = MIME::Base64::encode_base64($image);
|
||||
my $url = "data:image/png;base64,$data";
|
||||
return CloseHtmlEnvironments()
|
||||
. "<div$style>" . $q->img({-src=>$url, -alt=>$map, -loading=>'lazy'}) . "</div>";
|
||||
}
|
||||
return undef;
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This module offers the user the additional possibility to
|
||||
# edit a page by double-clicking on it. The user must have
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -29,7 +29,7 @@ push(@MyInitVariables, \&DraftInit);
|
||||
sub DraftInit {
|
||||
if (GetParam('Draft', '')) {
|
||||
SetParam('action', 'draft') ; # Draft button used
|
||||
} elsif (-f "$DraftDir/" . GetParam('username', $q->remote_addr()) # draft exists
|
||||
} elsif (IsFile("$DraftDir/" . GetParam('username', $q->remote_addr())) # draft exists
|
||||
and $FooterNote !~ /action=draft/) { # take care of mod_perl persistence
|
||||
$FooterNote = $q->p(ScriptLink('action=draft', T('Recover Draft'))) . $FooterNote;
|
||||
}
|
||||
@@ -47,9 +47,9 @@ sub DoDraft {
|
||||
WriteStringToFile($draft, EncodePage(text=>$text, id=>$id));
|
||||
SetParam('msg', T('Draft saved')); # invalidate cache
|
||||
print GetHttpHeader('', T('Draft saved'), '204 NO CONTENT');
|
||||
} elsif (-f $draft) {
|
||||
} elsif (IsFile($draft)) {
|
||||
my $data = ParseData(ReadFileOrDie($draft));
|
||||
unlink ($draft);
|
||||
Unlink($draft);
|
||||
$Message .= $q->p(T('Draft recovered'));
|
||||
DoEdit($data->{id}, $data->{text}, 1);
|
||||
} else {
|
||||
@@ -76,22 +76,19 @@ push(@MyMaintenance, \&DraftCleanup);
|
||||
|
||||
sub DraftFiles {
|
||||
return map {
|
||||
my $x = $_;
|
||||
$x = substr($x, length($DraftDir) + 1);
|
||||
utf8::decode($x);
|
||||
$x;
|
||||
} bsd_glob("$DraftDir/*"), bsd_glob("$DraftDir/.*");
|
||||
substr($_, length($DraftDir) + 1);
|
||||
} Glob("$DraftDir/*"), Glob("$DraftDir/.*");
|
||||
}
|
||||
|
||||
sub DraftCleanup {
|
||||
print '<p>' . T('Draft Cleanup');
|
||||
foreach my $draft (DraftFiles()) {
|
||||
next if $draft eq '.' or $draft eq '..';
|
||||
my $ts = (stat("$DraftDir/$draft"))[9];
|
||||
my $ts = Modified("$DraftDir/$draft");
|
||||
if ($Now - $ts < 1209600) { # 14*24*60*60
|
||||
print $q->br(), Tss("%1 was last modified %2 and was kept",
|
||||
$draft, CalcTimeSince($Now - $ts));
|
||||
} elsif (unlink("$DraftDir/$draft")) {
|
||||
} elsif (Unlink("$DraftDir/$draft")) {
|
||||
print $q->br(), Tss("%1 was last modified %2 and was deleted",
|
||||
$draft, CalcTimeSince($Now - $ts));
|
||||
} else {
|
||||
|
||||
@@ -49,5 +49,5 @@ sub DuckDuckGoSearchInit {
|
||||
|
||||
sub DoDuckDuckGoSearch {
|
||||
my $search = UrlEncode(GetParam('search', undef));
|
||||
print $q->redirect({-uri=>"https://www.duckduckgo.com/?q=$search+site%3A$DuckDuckGoSearchDomain"});
|
||||
print $q->redirect({-uri=>"https://duckduckgo.com/?q=$search+site%3A$DuckDuckGoSearchDomain"});
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Makes the wiki logo depend on the current date.
|
||||
#
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -9,10 +9,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -48,7 +48,7 @@ sub EmojiRule {
|
||||
} elsif (/\G>:-?\(/cg) {
|
||||
# 😠 1F620 ANGRY FACE
|
||||
return '😠';
|
||||
} elsif (/\G:-?[Ppb]/cg) {
|
||||
} elsif (/\G:-?[Ppb]\b/cg) {
|
||||
# 😝 1F61D FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES
|
||||
return '😝';
|
||||
} elsif (/\G<3/cg) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This module creates a list of all questions on the page, e.g.
|
||||
# for a faq. It does so by recognizing all lines that begin with
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA,
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -27,8 +27,7 @@ sub FixEncoding {
|
||||
ValidIdOrDie($id);
|
||||
RequestLockOrError();
|
||||
OpenPage($id);
|
||||
my $text = $Page{text};
|
||||
utf8::decode($text);
|
||||
my $text = decode_utf8($Page{text});
|
||||
Save($id, $text, T('Fix character encoding'), 1) if $text ne $Page{text};
|
||||
ReleaseLock();
|
||||
ReBrowsePage($id);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -12,8 +12,8 @@ our ($q, $OpenPageName, @MyRules, $CrossbarPageName);
|
||||
push(@MyRules, \&FormsRule);
|
||||
|
||||
sub FormsRule {
|
||||
if (-f GetLockedPageFile($OpenPageName) or (InElement('div', '^class="crossbar"$') and
|
||||
-f GetLockedPageFile($CrossbarPageName))) {
|
||||
if (IsFile(GetLockedPageFile($OpenPageName)) or (InElement('div', '^class="crossbar"$') and
|
||||
IsFile(GetLockedPageFile($CrossbarPageName)))) {
|
||||
if (/\G(\<form.*?\<\/form\>)/cgs) {
|
||||
my $form = $1;
|
||||
my $oldpos = pos;
|
||||
|
||||
@@ -163,8 +163,7 @@ sub GdSecurityImageGenerate {
|
||||
my ($imgData) = $img->out(force => 'png');
|
||||
my $ticketId = Digest::MD5::md5_hex(rand());
|
||||
CreateDir($GdSecurityImageDir);
|
||||
my $file = GdSecurityImageGetImageFile($ticketId);
|
||||
open my $fh, ">:raw", $file
|
||||
open my $fh, ">:raw", encode_utf8(GdSecurityImageGetImageFile($ticketId))
|
||||
or ReportError(Ts('Image storing failed. (%s)', $!), '500 INTERNAL SERVER ERROR');
|
||||
print $fh $imgData;
|
||||
#print $fh $png; ### experimental ###
|
||||
@@ -187,9 +186,7 @@ sub GdSecurityImageIsValidId {
|
||||
}
|
||||
|
||||
sub GdSecurityImageReadImageFile {
|
||||
my $file = shift;
|
||||
utf8::encode($file); # filenames are bytes!
|
||||
if (open(my $IN, '<:raw', $file)) {
|
||||
if (open(my $IN, '<:raw', encode_utf8(shift))) {
|
||||
local $/ = undef; # Read complete files
|
||||
my $data=<$IN>;
|
||||
close $IN;
|
||||
@@ -211,7 +208,7 @@ sub GdSecurityImageDoImage {
|
||||
print $q->header(-type=>'image/png');
|
||||
print $data;
|
||||
|
||||
unlink(GdSecurityImageGetImageFile($id));
|
||||
Unlink(GdSecurityImageGetImageFile($id));
|
||||
}
|
||||
|
||||
sub GdSecurityImageCleanup {
|
||||
@@ -219,10 +216,10 @@ sub GdSecurityImageCleanup {
|
||||
if (!GdSecurityImageIsValidId($id)) {
|
||||
return;
|
||||
}
|
||||
my @files = (bsd_glob("$GdSecurityImageDir/*.png"), bsd_glob("$GdSecurityImageDir/*.ticket"));
|
||||
my @files = (Glob("$GdSecurityImageDir/*.png"), Glob("$GdSecurityImageDir/*.ticket"));
|
||||
foreach my $file (@files) {
|
||||
if ($Now - (stat $file)[9] > $GdSecurityImageDuration) {
|
||||
unlink($file);
|
||||
if ($Now - Modified($file) > $GdSecurityImageDuration) {
|
||||
Unlink($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -255,7 +252,7 @@ sub GdSecurityImageCheck {
|
||||
}
|
||||
|
||||
if (GdSecurityImageIsValidId($id)) {
|
||||
unlink(GdSecurityImageGetTicketFile($id));
|
||||
Unlink(GdSecurityImageGetTicketFile($id));
|
||||
}
|
||||
|
||||
$GdSecurityImageId = GdSecurityImageGenerate();
|
||||
|
||||
@@ -30,18 +30,18 @@ $GitMail = 'unknown@oddmuse.org';
|
||||
sub GitCommit {
|
||||
my ($message, $author) = @_;
|
||||
my $oldDir = cwd;
|
||||
chdir("$DataDir/page");
|
||||
ChangeDir("$DataDir/page");
|
||||
capture {
|
||||
system($GitBinary, qw(add -A));
|
||||
system($GitBinary, qw(commit -q -m), $message, "--author=$author <$GitMail>");
|
||||
};
|
||||
chdir($oldDir);
|
||||
ChangeDir($oldDir);
|
||||
}
|
||||
|
||||
sub GitInitRepository {
|
||||
return if -d "$DataDir/page/.git";
|
||||
return if IsDir("$DataDir/page/.git");
|
||||
capture {
|
||||
system($GitBinary, qw(init -q --), "$DataDir/page");
|
||||
system($GitBinary, qw(init -q --), encode_utf8("$DataDir/page"));
|
||||
};
|
||||
GitCommit('Initial import', 'Oddmuse');
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ sub GitRun {
|
||||
my $exitStatus;
|
||||
# warn join(' ', $GitBinary, @_) . "\n";
|
||||
|
||||
chdir($GitRepo);
|
||||
ChangeDir($GitRepo);
|
||||
if ($GitDebug) {
|
||||
# TODO use ToString here
|
||||
# capture the output of the git comand in a temporary file
|
||||
@@ -99,7 +99,7 @@ sub GitRun {
|
||||
} else {
|
||||
$exitStatus = system($GitBinary, @_);
|
||||
}
|
||||
chdir($oldDir);
|
||||
ChangeDir($oldDir);
|
||||
return $exitStatus;
|
||||
}
|
||||
|
||||
@@ -108,7 +108,7 @@ sub GitInitVariables {
|
||||
}
|
||||
|
||||
sub GitInitRepository {
|
||||
return if -d "$GitRepo/.git";
|
||||
return if IsDir("$GitRepo/.git");
|
||||
my $exception = shift;
|
||||
CreateDir($GitRepo);
|
||||
GitRun(qw(init --quiet));
|
||||
@@ -187,17 +187,16 @@ sub DoGitCleanup {
|
||||
}
|
||||
|
||||
sub GitCleanup {
|
||||
if (-d $GitRepo) {
|
||||
if (IsDir($GitRepo)) {
|
||||
print $q->p('Git cleanup starting');
|
||||
AllPagesList();
|
||||
# delete all the files including all the files starting with a dot
|
||||
opendir(DIR, $GitRepo) or ReportError("cannot open directory $GitRepo: $!");
|
||||
opendir(DIR, encode_utf8($GitRepo)) or ReportError("cannot open directory $GitRepo: $!");
|
||||
foreach my $file (readdir(DIR)) {
|
||||
my $name = $file;
|
||||
utf8::decode($name); # filenames are bytes
|
||||
my $name = decode_utf8($file);
|
||||
next if $file eq '.git' or $file eq '.' or $file eq '..' or $IndexHash{$name};
|
||||
print $q->p("Deleting left over file $name");
|
||||
unlink "$GitRepo/$file" or ReportError("cannot delete $GitRepo/$name: $!");
|
||||
Unlink("$GitRepo/$file") or print $q->p("Cannot delete $GitRepo/$name: $!");
|
||||
}
|
||||
closedir DIR;
|
||||
# write all the files again, just to be sure
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
# Copyright (C) 2006-2014 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2016 Ingo Belka
|
||||
#
|
||||
# This program is free software: you can redistribute it and/or modify it under
|
||||
# the terms of the GNU General Public License as published by the Free Software
|
||||
@@ -25,12 +26,17 @@ our ($GotobarName);
|
||||
|
||||
$GotobarName = 'GotoBar';
|
||||
|
||||
our ($GotobarSetHome, $GotobarSetRC);
|
||||
# 0 does set home-link and/or rc-link automatically, 1 doesn't
|
||||
|
||||
# do this later so that the user can customize $GotobarName
|
||||
push(@MyInitVariables, \&GotobarInit);
|
||||
|
||||
sub GotobarInit {
|
||||
$GotobarName = FreeToNormal($GotobarName); # spaces to underscores
|
||||
$AdminPages{$GotobarName} = 1;
|
||||
my $id = GetId();
|
||||
my $encoded = UrlEncode($id);
|
||||
if ($IndexHash{$GotobarName}) {
|
||||
OpenPage($GotobarName);
|
||||
return if PageMarkedForDeletion();
|
||||
@@ -38,8 +44,11 @@ sub GotobarInit {
|
||||
# links for unsuspecting users.
|
||||
@UserGotoBarPages = ();
|
||||
$UserGotoBar = '';
|
||||
my $text = $Page{text};
|
||||
$text =~ s/\$\$id\b/$encoded/g;
|
||||
$text =~ s/\$id\b/$id/g;
|
||||
my $count = 0;
|
||||
while ($Page{text} =~ m/($LinkPattern|\[\[$FreeLinkPattern\]\]|\[\[$FreeLinkPattern\|([^\]]+)\]\]|\[$InterLinkPattern\s+([^\]]+?)\]|\[$FullUrlPattern[|[:space:]]([^\]]+?)\])/g) {
|
||||
while ($text =~ m/($LinkPattern|\[\[$FreeLinkPattern\]\]|\[\[$FreeLinkPattern\|([^\]]+)\]\]|\[$InterLinkPattern\s+([^\]]+?)\]|\[$FullUrlPattern[|[:space:]]([^\]]+?)\])/g) {
|
||||
my $page = $2||$3||$4||$6||$8;
|
||||
my $text = $5||$7||$9;
|
||||
$UserGotoBar .= ' ' if $UserGotoBar;
|
||||
@@ -53,9 +62,9 @@ sub GotobarInit {
|
||||
# is the list of recent changes.
|
||||
$count++;
|
||||
if ($count == 1) {
|
||||
$HomePage = FreeToNormal($page);
|
||||
unless ($GotobarSetHome) {$HomePage = FreeToNormal($page)};
|
||||
} elsif ($count == 2) {
|
||||
$RCName = FreeToNormal($page);
|
||||
unless ($GotobarSetRC) {$RCName = FreeToNormal($page);}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
48
modules/grep-filtered.pl
Normal file
@@ -0,0 +1,48 @@
|
||||
# Copyright (C) 2020 Alex Schroeder <alex@gnu.org>
|
||||
# Copyright (C) 2020 Daniel MacKay <daniel@bonmot.ca>
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
AddModuleDescription('grep-filtered.pl', 'Grep Filtered');
|
||||
|
||||
our ($PageDir);
|
||||
our ($UseGrep);
|
||||
|
||||
$UseGrep = 1;
|
||||
|
||||
*OldGrepFiltered = \&Filtered;
|
||||
*Filtered = \&NewGrepFiltered;
|
||||
|
||||
sub NewGrepFiltered {
|
||||
my ($string, @pages) = @_;
|
||||
my @pages = OldGrepFiltered(@_);
|
||||
my $regexp = SearchRegexp($string);
|
||||
return @pages unless GetParam('grep', $UseGrep) and $regexp;
|
||||
my @result = grep(/$regexp/i, @pages); # search parameter for page titles
|
||||
my %found = map {$_ => 1} @result;
|
||||
$regexp =~ s/\\n(\)*)$/\$$1/g; # sometimes \n can be replaced with $
|
||||
$regexp =~ s/([?+{|()])/\\$1/g; # basic regular expressions from man grep
|
||||
# if we know of any remaining grep incompatibilities we should
|
||||
# return @pages here!
|
||||
$regexp = quotemeta($regexp);
|
||||
open(F, '-|:encoding(UTF-8)', "find $PageDir -type f -print0 | xargs -0 -n10 -P4 grep --ignore-case -l '$regexp'") ;
|
||||
while (<F>) {
|
||||
my ($pageName) = m/.*\/(.*)\.pg$/ ;
|
||||
push(@result, $pageName) if not $found{$pageName};
|
||||
} close(F);
|
||||
return sort @result;
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
@@ -43,7 +40,7 @@ sub HtmlTemplate {
|
||||
my $type = shift;
|
||||
# return header.de.html, or header.html, or error.html, or report an error...
|
||||
foreach my $f ((map { "$type.$_" } HtmlTemplateLanguage()), $type, "error") {
|
||||
return "$HtmlTemplateDir/$f.html" if -r "$HtmlTemplateDir/$f.html";
|
||||
return "$HtmlTemplateDir/$f.html" if IsFile("$HtmlTemplateDir/$f.html");
|
||||
}
|
||||
ReportError(Tss('Could not find %1.html template in %2', $type, $HtmlTemplateDir),
|
||||
'500 INTERNAL SERVER ERROR');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -12,10 +12,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -14,10 +14,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This module offers the possibility to restrict viewing of "hidden"
|
||||
# pages to only editors or admins. The restriction may be based
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
@@ -87,7 +84,7 @@ sub GetActionHtmlTemplate {
|
||||
my $action = GetParam('action', 'browse');
|
||||
# return browse.de.html, or browse.html, or error.html, or report an error...
|
||||
foreach my $f ((map { "$action.$_" } HtmlTemplateLanguage()), $action, "error") {
|
||||
return "$HtmlTemplateDir/$f.html" if -r "$HtmlTemplateDir/$f.html";
|
||||
return "$HtmlTemplateDir/$f.html" if IsFile("$HtmlTemplateDir/$f.html");
|
||||
}
|
||||
ReportError(Tss('Could not find %1.html template in %2', $action, $HtmlTemplateDir),
|
||||
'500 INTERNAL SERVER ERROR');
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# the Free Software Foundation; either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
@@ -11,10 +11,7 @@
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the
|
||||
# Free Software Foundation, Inc.
|
||||
# 59 Temple Place, Suite 330
|
||||
# Boston, MA 02111-1307 USA
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
use strict;
|
||||
use v5.10;
|
||||
|
||||