335 Commits
master ... main

Author SHA1 Message Date
5a51420d5e fix mathjax config 2026-06-05 16:22:37 -07:00
f092e99c6b keep mysql password inside container to avoid host process table exposure 2026-05-08 18:23:46 -07:00
d79b9a9a1d replace subprocess shell calls with pathlib in backup canary to prevent shell injection 2026-05-08 18:23:43 -07:00
942d75dd86 disable raw HTML in mediawiki to prevent stored XSS 2026-05-08 18:23:39 -07:00
1e8af71026 add docker socket proxy to protect against unrestricted host access from gitea runner 2026-05-08 18:23:36 -07:00
e8235f246f update .gitignore 2026-05-08 18:23:31 -07:00
4ea40c091e Merge branch 'stupid-goddamn-mysql'
* stupid-goddamn-mysql:
  fix stupid goddamn mysql secret volume
2026-04-21 11:33:36 -07:00
7f61795ad9 fix stupid goddamn mysql secret volume 2026-04-21 11:33:24 -07:00
6e52b56302 Merge branch 'optimize-mw-dockerfile'
* optimize-mw-dockerfile:
  fix d-mediawiki dockerfile
2026-04-21 11:01:03 -07:00
8926e6c33b Merge branch 'gitea-actions'
* gitea-actions:
  remove unused data vol
  fix networking issues in gitea action runner
  fix stupid volume issue
  upgrade mediawiki (AGAIN)
  pod-charlesreid1 service: stdout journal
  remove endless tex packages from mw Dockerfile
  fix edit box style
  add runner config dir
  add gitea runner config
  get gitea container set up for gitea actions
2026-04-21 11:00:54 -07:00
e5b56493e8 fix d-mediawiki dockerfile 2026-04-21 10:58:46 -07:00
3ec56cb967 remove unused data vol 2026-04-19 23:04:02 -07:00
f134f3cfbe fix networking issues in gitea action runner 2026-04-19 16:27:52 -07:00
021673c5aa fix stupid volume issue 2026-04-19 16:18:17 -07:00
f0e7740409 upgrade mediawiki (AGAIN) 2026-04-19 16:18:02 -07:00
45b60b42b4 pod-charlesreid1 service: stdout journal 2026-04-19 16:17:46 -07:00
f58fa07a9d remove endless tex packages from mw Dockerfile 2026-04-19 12:07:40 -07:00
c67149837a fix edit box style 2026-04-19 12:07:14 -07:00
6fcc762836 add runner config dir 2026-04-19 11:38:55 -07:00
90a98652be add gitea runner config 2026-04-19 11:36:10 -07:00
3cc52ddb6f get gitea container set up for gitea actions 2026-04-19 11:00:45 -07:00
714d939a0f fix [edit] style 2026-04-15 23:33:59 -07:00
e007447c99 use -i not -it 2026-04-15 23:33:45 -07:00
8b0645d700 fix [edit] style 2026-04-15 23:11:13 -07:00
e4eeab201f remove plan files 2026-04-15 23:10:59 -07:00
5470e90660 Merge branch 'claude-plans-execute-upgrade'
* claude-plans-execute-upgrade:
  add build extensions dir script
  update gitignore
  add php error logging
  fix bootstrap2 skin for 1.39
  update LocalSettings.php
  upgrade to mediawiki 1.39 in mw dockerfile
  bump mysql dockerfile version from 5.7 to 8.0
  add mysql no root password plan
  add execution notes
  update plan
  remove plan
  add fixes for getting non-root mysql user
  fix wiki backups and canary script to check for missing trailer, not just nonzero files
  remove stupid dead file
  add plan to fix sql backups, plus implemented fixes for sql backups
  add mysql no root pw transition plan
  add mediawiki upgrade plan
2026-04-15 22:58:04 -07:00
49d5f64c98 add build extensions dir script 2026-04-15 22:56:36 -07:00
2cba400f81 update gitignore 2026-04-15 22:55:08 -07:00
ef59df6890 add php error logging 2026-04-15 22:55:02 -07:00
047288fe7b fix bootstrap2 skin for 1.39 2026-04-15 22:54:08 -07:00
fc0abbad25 update LocalSettings.php 2026-04-15 22:53:51 -07:00
e51d8b19f2 upgrade to mediawiki 1.39 in mw dockerfile 2026-04-15 22:53:13 -07:00
fe1a35d06e bump mysql dockerfile version from 5.7 to 8.0 2026-04-15 22:52:48 -07:00
a7b4a4c9ff add mysql no root password plan 2026-04-15 22:51:27 -07:00
47fd49cecb add execution notes 2026-04-15 22:29:05 -07:00
564dfba199 update plan 2026-04-15 22:28:48 -07:00
a907947e78 remove plan 2026-04-13 18:52:21 -07:00
b44d535a93 Merge branch 'claude-plans-mysql-no-root' into claude-plans
* claude-plans-mysql-no-root:
  add fixes for getting non-root mysql user
2026-04-13 18:50:33 -07:00
98d9368d65 add fixes for getting non-root mysql user 2026-04-13 18:50:02 -07:00
b475f2142e Merge branch 'claude-plans-first-fix-sql-backups' into claude-plans
* claude-plans-first-fix-sql-backups:
  fix wiki backups and canary script to check for missing trailer, not just nonzero files
  remove stupid dead file
  add plan to fix sql backups, plus implemented fixes for sql backups
2026-04-13 18:38:30 -07:00
647e24013e fix wiki backups and canary script to check for missing trailer, not just nonzero files 2026-04-13 18:38:02 -07:00
dba56b4d43 remove stupid dead file 2026-04-13 18:37:40 -07:00
134450d922 add plan to fix sql backups, plus implemented fixes for sql backups 2026-04-13 18:30:32 -07:00
91120fa093 fix stupid environment.example problems 2026-04-13 17:20:13 -07:00
227b8c058e fix math rendering to be cheap ass <code> 2026-04-13 17:19:05 -07:00
2772e3447c add mysql no root pw transition plan 2026-04-02 21:38:49 -07:00
c6f0183d4b add mediawiki upgrade plan 2026-04-02 21:38:39 -07:00
1b3d1776b4 overwrite existing rendered templates by default 2026-03-25 20:58:10 -07:00
1f47029098 Merge pull request #2 from charlesreid1-docker/claude-audit
Implement changes recommended from Claude audit
2026-03-25 20:25:07 -07:00
0a89fe68c8 use docker volume for nginx log storage 2026-03-25 19:53:29 -07:00
d0b8e83ffc convert _.conf to _.conf.j2 2026-03-25 19:53:12 -07:00
89d5849708 apply rate-limiting to wiki urls consistently 2026-03-25 19:47:31 -07:00
13a3a1cb5e add X-Forwarded-Proto header to let mw/gitea know requests came in over https 2026-03-25 19:46:53 -07:00
892eddcbbb fix imagemagick thumbnail size limit 2026-03-25 19:43:57 -07:00
c95fcfaaf2 implement frontend/backend network segmentation 2026-03-25 19:43:19 -07:00
0e09187b3e Merge branch 'claude-fix-backup-scripts' into claude-audit
* claude-fix-backup-scripts:
  fix var handling (more defensive)
2026-03-25 19:41:52 -07:00
8afcd3073b fix var handling (more defensive) 2026-03-25 19:41:39 -07:00
efb3fa0140 fix variable name error 2026-03-25 19:39:32 -07:00
3048c35647 actually print error message in backups canary 2026-03-25 19:38:29 -07:00
86997b5a55 add restart policy for mysql and mw 2026-03-25 19:37:13 -07:00
fadee2ea91 fix min password length to 10 2026-03-25 19:35:06 -07:00
87582b77b2 Merge branch 'claude-pin-versions' into claude-audit
* claude-pin-versions:
  pin gitea and nginx versions
2026-03-25 19:34:26 -07:00
aaa226d82a pin gitea and nginx versions 2026-03-25 19:33:08 -07:00
5f26ebac25 Merge branch 'claude-mw-upgrade-key' into claude-audit
* claude-mw-upgrade-key:
  no .mysql.rootpw.cnf file (empty)
  get MW upgrade key from env var
2026-03-25 10:36:56 -07:00
940e21f507 no .mysql.rootpw.cnf file (empty) 2026-03-25 10:35:38 -07:00
99ab12a2ba get MW upgrade key from env var 2026-03-25 10:35:38 -07:00
6c49dd3171 fix stupid timer issue 2025-12-06 19:04:03 -08:00
99616d5de5 5 per second 2025-10-16 02:43:30 -07:00
83f898192a bump rate limit to 6 requests per second 2025-10-16 02:42:59 -07:00
5eb9ee5c3c add rate limits to /wiki, /w, and gitea endpoints 2025-10-16 02:42:44 -07:00
df23627e9a add a mediawiki cache directory to mw conf 2025-10-16 02:42:25 -07:00
76dc820b2d bind-mount /var/log/nginx between container and host 2025-10-16 02:42:09 -07:00
6b2b21b668 add base nginx.conf with rate limiting 2025-09-24 12:26:20 -07:00
bcb04257fa add slow query log config for mysql 2025-09-24 12:26:08 -07:00
0cad1e0398 add nginx and mysql config files 2025-09-24 12:25:50 -07:00
14d70a919d add rate-limiting to https config 2025-09-24 12:25:13 -07:00
3aba9729e6 add Troubleshooting.md 2025-06-14 03:48:49 -07:00
eb840384d1 update gitea theme name in app.ini.j2 2025-06-14 03:47:59 -07:00
5bf613cd56 ban more jerks 2025-05-24 19:36:17 -07:00
ccfed3f3fc update mw skin 2025-05-24 19:36:17 -07:00
194e619537 3 weeks for backups 2025-03-09 10:39:23 -07:00
a0f9548fcf ban more jerks 2025-03-07 16:13:15 -08:00
418315150a ban more jerks 2025-03-07 15:55:14 -08:00
ebb304d374 ban more jerks 2025-03-07 15:43:51 -08:00
8580c2c1f0 ban jerks 2025-03-06 12:24:43 -08:00
a3f460113a add instructions for blocking IP addresses 2024-11-16 19:17:46 -08:00
e94f911d99 add "ban jerks" section to nginx config 2024-11-16 19:17:31 -08:00
f7446c5a2d chmod the logs 2023-10-22 08:27:17 -07:00
6d1fa940a7 add wikifiles restore script 2023-10-15 13:06:49 -07:00
cfac7c69dc fix env var problem 2023-10-15 13:06:48 -07:00
3287d57554 fix script comment 2023-10-15 13:06:48 -07:00
d347024939 update gitea app.ini jinja template 2023-10-02 07:34:19 -07:00
8e4f86c8c6 smol makefile fix 2023-08-22 04:33:15 -07:00
5b855a575a make adjustments to bring all pod backup scripts in sync 2022-07-16 13:19:39 -07:00
4248f86c64 fixup restore db script 2022-07-15 17:52:58 -07:00
f36011d4cc fixup restore wikifiles 2022-07-15 17:49:59 -07:00
4953dfb8f3 remove tree subdomain 2022-06-05 21:05:20 -07:00
d003935769 update php.ini upload size to match localsettings.php 2022-03-23 20:05:47 -07:00
58e795bd98 fix backup canary script 2022-03-17 15:20:02 -07:00
0709e883ea 8am 2022-03-17 14:37:04 -07:00
8965515215 run backups canary every day 2022-03-17 14:36:00 -07:00
69523ba027 remove tree 2022-03-17 14:18:04 -07:00
2a4ed33024 add tree htpasswd to docker-compose 2022-03-09 20:32:57 -08:00
f880c44b79 add .tree.htpasswd to tree subdomain for auth protection 2022-03-09 20:18:26 -08:00
5cac0fa869 fix cert for tree subdomain 2022-03-09 09:01:14 -08:00
303ebf8ea3 add tree subdomain to renew cert script 2022-03-09 08:36:49 -08:00
4d638c456e bind-mount /www tree subdomain htdocs 2022-03-08 09:09:11 -08:00
72fc465d1d add tree subdomain to nginx config 2022-03-08 09:08:52 -08:00
2f579f4cfa restore 2022-03-08 09:02:06 -08:00
1bc4bb4902 add mw to skin footer 2022-03-06 18:49:12 -08:00
d91b7dc735 flush wikifiles and wikidb 2022-02-20 19:13:45 -08:00
acb2f57176 jerks 2022-02-20 19:13:45 -08:00
3482004df0 add php.ini 2022-02-07 18:18:54 -08:00
4ed1b479ef JERKS 2022-02-07 16:08:44 -08:00
5a931c2e38 another jerk 2022-02-07 15:49:43 -08:00
17da345041 more jerks 2022-02-07 15:47:19 -08:00
5e9be9e6c8 fix one more robots.txt 2022-02-07 15:20:27 -08:00
0148fe3e55 fix bind-mounting robots.txt 2022-02-07 15:07:46 -08:00
a144d6070b fix parsing of du command 2022-02-06 17:36:38 -08:00
989036ac21 add certbot to rsyslog filters 2022-02-06 17:36:38 -08:00
523ed50647 tell tar to stop crying about the log file and just skip it 2022-01-23 12:12:48 -08:00
03f81f4a25 more horrible hard-coded python binary 2022-01-18 22:02:34 -08:00
002ad20d7d stupid stupid stupid hard-coded shim path 2022-01-18 21:57:14 -08:00
2cb6a39990 restore weekly schedule 2022-01-18 21:48:58 -08:00
920ff3839e update gitea robots 2022-01-16 13:37:47 -08:00
d3dae75d38 add robots.txt to charlesreid1.com and git.charlesreid1.com 2022-01-16 13:27:27 -08:00
4004ba6ccb add robots dir 2022-01-16 13:27:15 -08:00
cf982ee2c6 add robots.txt to docker-compose template 2022-01-16 13:26:52 -08:00
efd9487953 add cut cmd to du cmd in aws backup script 2022-01-16 13:26:37 -08:00
b2552b6345 fix gitea backup script 2022-01-16 12:28:06 -08:00
1a8f699ab4 UGH more endless fixes 2022-01-16 12:07:09 -08:00
5e3ab1768c add boto/botocore checks, rearrange service installation steps 2022-01-16 11:53:43 -08:00
291ff2d28a restore daily runs 2022-01-16 11:53:11 -08:00
229975883c restore once a week schedule 2022-01-15 09:20:26 -08:00
af7ef822f0 remove commented lines 2022-01-15 09:18:28 -08:00
cc3688a982 add botocore/boto3 check for canary 2022-01-15 08:51:16 -08:00
e080cda745 add missing directive to rsyslog conf file 2022-01-15 08:05:34 -08:00
45c0f1390f update certbot renewal service 2022-01-14 13:24:51 -08:00
dacef1ac09 fix rsyslog config file 2022-01-14 13:22:52 -08:00
03a8456a2a fix execstartpre for canary service 2022-01-12 14:19:14 -08:00
d1d749d8e4 update makefile and add rsyslog config file 2022-01-12 14:06:56 -08:00
74adabc43a update log strategy - all services log to syslog, rely on user to filter system log 2022-01-12 13:55:37 -08:00
3566305577 add rsyslog filtering option 2022-01-12 13:53:36 -08:00
7442b2ee87 completely remove StandardOutput: from all serivces 2022-01-10 11:17:07 -08:00
9aa49166a6 remove StandardOutput from service files https://github.com/systemd/systemd/pull/10944 2022-01-10 10:38:02 -08:00
f06ac24ecb fix file: to append: 2022-01-10 01:36:18 -08:00
b796cc9756 bump backup services schedule to daily 2022-01-09 11:52:24 -08:00
25063ed251 pin mediawiki version to 1.34 in mw Dockerfile 2021-12-30 16:40:02 -08:00
72a47d71f2 more fail2ban cleanup 2021-12-30 16:31:31 -08:00
dba09976fb remove non-functional fail2banlog ext 2021-12-30 16:30:03 -08:00
7a3c76b9f9 remove unused script (use one in scripts/ instead) 2021-12-30 15:56:30 -08:00
18fd6038df fix clean-templates file 2021-12-30 15:56:30 -08:00
18814b6a1d fix pod install dir variable name 2021-12-30 15:43:08 -08:00
fc35d94b3c fix typos in apply templates script 2021-12-30 14:46:39 -08:00
3604bc1378 ignore environment when cleaning rendered templates 2021-12-30 14:44:14 -08:00
f0f65db9e3 make mkdocs-material submodule url https instad of git so it works without ssh key preconfigured 2021-12-30 14:37:15 -08:00
e5686d4d9a Merge branch 'feature/environment-template'
* feature/environment-template:
  massive rename of all ansible variables
  prep apply templates script for ansible variable rename
  fix missing var name in environment.j2
2021-12-30 12:00:06 -08:00
30c4a24b8d massive rename of all ansible variables 2021-12-30 11:59:45 -08:00
904122db17 prep apply templates script for ansible variable rename 2021-12-30 11:59:43 -08:00
8760edf0c3 fix missing var name in environment.j2 2021-12-30 11:56:53 -08:00
b4650771bc add environment template 2021-12-30 11:41:26 -08:00
b8182774a4 add --ignore-failed-read flag to gitea tar command 2021-12-26 19:26:48 -08:00
bb3b6c027a update certbot service to send logs to /var/log 2021-12-24 15:41:49 -08:00
1d18b5e71c send backup canary logs to /var/log 2021-12-24 15:41:22 -08:00
858cb6c3c8 send backup service logs to /var/log 2021-12-24 15:41:04 -08:00
0a5f9f99ac fix service description 2021-12-24 15:39:32 -08:00
2ac521e1c9 fix env var name in clean olderthan script 2021-12-19 10:48:58 -08:00
ffc4f1d0c0 add --no-progress flag to aws bacup script 2021-12-19 10:48:40 -08:00
7246b0845c cover cleanolderthan service with makefile install/uninstall rules 2021-12-12 11:29:02 -08:00
67acb4a32b Merge branch 'clean-backups'
* clean-backups:
  add systemd timer for clean backups service
2021-12-12 11:25:10 -08:00
15d4bcecc7 add systemd timer for clean backups service 2021-12-12 11:24:56 -08:00
9c92f3fd75 Merge branch 'service-updates'
* service-updates:
  add service to clean files older than N days
  add ExecStartPre to existing backup services
  clean older than 45 days
2021-12-12 11:16:38 -08:00
b838446576 add service to clean files older than N days 2021-12-12 10:50:44 -08:00
25b0f900a7 add ExecStartPre to existing backup services 2021-12-12 10:50:30 -08:00
0b2943fc3a clean older than 45 days 2021-12-12 10:50:07 -08:00
6fb8e7fdaa update apply templates script to include ignore list 2021-12-10 18:14:42 -08:00
573c0a3723 filter warning about password during mysqldump 2021-12-05 12:38:05 -08:00
6f5ee63c34 fix var problems with build extensions script and fix_* mw scripts 2021-12-04 17:53:36 -08:00
1e2e7a577f fix hard-coded vars 2021-12-04 17:17:12 -08:00
79d644e5bf typo fixes 2021-11-27 10:35:35 -08:00
f67faa651b fix var mapping 2021-11-27 09:55:09 -08:00
d5c441f9bf add chmod +x for shell scripts 2021-11-21 09:44:39 -08:00
c20a32b616 run certbot service as root 2021-11-20 11:45:58 -08:00
18d5d46406 create boto3 s3 resource in backups canary script 2021-11-20 10:39:01 -08:00
b8650cea95 update clean olderthan script 2021-11-17 15:06:23 -08:00
7caae4c5d6 less verbose aws commands 2021-11-17 15:00:45 -08:00
9e7f971a33 fix backups canary script 2021-10-17 14:29:38 -07:00
bf78d136c7 add canary to install process in makefile 2021-10-09 16:16:49 -07:00
dbd2effd68 update backups canary to use the right python 2021-10-09 16:16:03 -07:00
2c6a231983 fix canary service file 2021-10-02 13:34:25 -07:00
9f894f8780 fix canary timer syntax 2021-10-02 13:27:16 -07:00
07fd8e8a09 fix env var checks in apply templates script 2021-10-02 13:27:02 -07:00
31357bf16b restore backup timers to their final time 2021-10-02 13:17:28 -07:00
1a456a72b4 fix up aws backup script to use native aws cli env vars 2021-10-02 12:13:59 -07:00
2fe66094a6 fix chmod commands for installed template files 2021-10-02 12:07:17 -07:00
ca88f9ff5c fix permissions in makefile when installing service/timer files 2021-10-02 08:26:59 -07:00
5dc5ad5fb2 update timer syntax 2021-10-02 08:14:58 -07:00
455e3aa6e8 correctly specify aws credentials before using aws cli 2021-10-02 08:14:50 -07:00
fda32ac686 minor makefile improvements 2021-09-29 08:54:49 -07:00
3add031dd5 add aws backups to makefile 2021-09-29 08:34:33 -07:00
0f93a15f20 fix problem with aws backup script 2021-09-29 08:34:14 -07:00
20a569277b ignore log files 2021-09-27 22:00:30 -07:00
c6f7e290f4 fix wikifiles dump script 2021-09-27 21:59:45 -07:00
2a3c0b56c8 update timer description 2021-09-27 21:59:32 -07:00
2e6a339fbb fix service output/error syntax 2021-09-11 17:29:25 -07:00
619b09cc2c use abs path to bash 2021-09-11 17:25:40 -07:00
e7859eb4c5 more certbot updates 2021-09-11 17:22:40 -07:00
92a7189dbe update descriptions of service/timer for certbot 2021-09-11 17:19:48 -07:00
0401c08a56 install certbot with make install command 2021-09-11 17:18:16 -07:00
83e22c1cd2 update gitignore 2021-09-11 17:16:22 -07:00
e0ae04dee4 fix typos 2021-09-11 17:15:34 -07:00
61cd05b01a Merge branch 'cert-renewal'
* cert-renewal:
  add certbot renewal script, plus service, plus timer
2021-09-11 17:13:46 -07:00
1bd7893507 add certbot renewal script, plus service, plus timer 2021-09-11 17:13:30 -07:00
1d7e3b4c55 run backups canary on sunday at 9 am 2021-09-11 13:32:05 -07:00
ffe898d656 add gitea backups to makefile 2021-09-11 12:49:15 -07:00
d1895de16f update gitignore 2021-09-11 12:35:04 -07:00
40e9ef3880 Merge branch 'main' of https://github.com/charlesreid1-docker/pod-charlesreid1
* 'main' of https://github.com/charlesreid1-docker/pod-charlesreid1:
  reschedule aws backups for an hour after other backups
  add gitea timer/service
  add gitea backup script
2021-09-11 12:33:58 -07:00
89f8e4dd15 Merge branch 'add-gitea-backups'
* add-gitea-backups:
  reschedule aws backups for an hour after other backups
  add gitea timer/service
  add gitea backup script
2021-09-11 12:28:41 -07:00
30ad04448c reschedule aws backups for an hour after other backups 2021-09-11 12:23:51 -07:00
47c60ef5f9 add gitea timer/service 2021-09-11 12:23:29 -07:00
83b4a08fbd add gitea backup script 2021-09-11 12:23:20 -07:00
753df5176a update d-gitea readme a bit 2021-09-11 12:06:05 -07:00
941923c5da fix mediawiki build extensions script 2021-09-11 12:05:49 -07:00
9103e60eec prefix install/uninstall commands with sudo 2021-09-11 12:05:37 -07:00
ac8c6e7c7c remove unused file 2021-09-11 12:03:50 -07:00
39eb2f8b00 update gitignore for d-gitea 2021-09-11 12:02:20 -07:00
9e3db8ea2e update service to specify full path to test 2021-09-11 11:39:11 -07:00
ea814e572f add more rendered templates to gitignore 2021-09-11 11:30:09 -07:00
8181e334eb update apply templates script 2021-09-11 11:29:26 -07:00
b6209c2bfa revamp jinja-to-env var map 2021-09-11 11:28:38 -07:00
895605e340 fix apply templates 2021-09-11 11:13:32 -07:00
dd119618e9 ignore gitea data dir 2021-09-11 11:09:48 -07:00
46aeb84217 Merge branch 'make-stuff'
* make-stuff: (57 commits)
  backup canary -> backups canary
  add backup canary
  update env example
  remove gitea from makefile
  update scripts readme
  add readme for backup scripts
  update timers to run on sunday
  more scripts cleanup
  clean up existing scripts, remove gitea dump scripts
  add aws backup scripts (first draft)
  disable gitea backups
  remove gitea, mediawiki, mysql, nginx submodules
  add nginx dir
  add d-mysql directory contents
  adding charlesreid1.com wiki config dir - includes MW skin
  update gitignore
  fix clean templates script
  add d-mediawiki files
  revamp makefile, add mw make commands
  remove unused image
  ...
2021-09-11 10:26:57 -07:00
857f5eaad8 Merge branch 'backup-stuff' into make-stuff
* backup-stuff:
  backup canary -> backups canary
  add backup canary
  update env example
  remove gitea from makefile
  update scripts readme
  add readme for backup scripts
  update timers to run on sunday
  more scripts cleanup
  clean up existing scripts, remove gitea dump scripts
  add aws backup scripts (first draft)
2021-09-11 10:25:27 -07:00
a4e157223a backup canary -> backups canary 2021-09-10 16:32:16 -07:00
1cd2100c03 add backup canary 2021-09-10 16:30:12 -07:00
cfb48578da update env example 2021-09-10 16:29:53 -07:00
8f049c05d3 remove gitea from makefile 2021-09-10 14:22:04 -07:00
2db3cf5001 update scripts readme 2021-09-10 14:21:39 -07:00
48d8184022 add readme for backup scripts 2021-09-10 14:20:14 -07:00
ad7cad9521 update timers to run on sunday 2021-09-10 14:10:03 -07:00
cef2e260b0 more scripts cleanup 2021-09-10 14:02:34 -07:00
ae4abd454b clean up existing scripts, remove gitea dump scripts 2021-09-10 13:52:33 -07:00
ab245284d7 add aws backup scripts (first draft) 2021-09-10 13:52:09 -07:00
9c8317c2bc disable gitea backups 2021-09-09 16:09:32 -07:00
cf6a3a89ba Merge branch 'break-submodules' into make-stuff
* break-submodules:
  remove gitea, mediawiki, mysql, nginx submodules
  add nginx dir
  add d-mysql directory contents
  adding charlesreid1.com wiki config dir - includes MW skin
  update gitignore
  fix clean templates script
  add d-mediawiki files
  revamp makefile, add mw make commands
  remove unused image
  more gitea files
  add gitea custom dir
  add data dir with dummy placeholder
  rename submodules
2021-09-09 06:30:26 -07:00
7eb3284405 Merge branch 'break-submodules-rm-submodules' into break-submodules
* break-submodules-rm-submodules:
  remove gitea, mediawiki, mysql, nginx submodules
2021-09-09 06:25:54 -07:00
bff7152d35 remove gitea, mediawiki, mysql, nginx submodules 2021-09-09 06:25:28 -07:00
a2d32411bc Merge branch 'break-submodules-nginx' into break-submodules
* break-submodules-nginx:
  add nginx dir
2021-09-09 06:24:58 -07:00
115dd87f32 add nginx dir 2021-09-09 06:22:37 -07:00
1177dfbece Merge branch 'break-submodules-mysql' into break-submodules
* break-submodules-mysql:
  add d-mysql directory contents
2021-09-09 06:22:13 -07:00
d292db8b44 add d-mysql directory contents 2021-09-09 05:59:00 -07:00
eb5d688a7a Merge branch 'break-submodules-mediawiki' into break-submodules
* break-submodules-mediawiki:
  adding charlesreid1.com wiki config dir - includes MW skin
  update gitignore
  fix clean templates script
  add d-mediawiki files
  revamp makefile, add mw make commands
2021-09-09 05:54:17 -07:00
d91e00a2e1 adding charlesreid1.com wiki config dir - includes MW skin 2021-09-09 05:51:11 -07:00
51dafe3768 update gitignore 2021-09-09 05:49:57 -07:00
a667966fcf fix clean templates script 2021-09-09 05:49:34 -07:00
dee3b0036b add d-mediawiki files 2021-09-09 05:45:28 -07:00
c70568b6ac revamp makefile, add mw make commands 2021-09-09 05:42:59 -07:00
b60599a701 Merge branch 'break-submodules-gitea' into break-submodules
* break-submodules-gitea:
  remove unused image
  more gitea files
  add gitea custom dir
  add data dir with dummy placeholder
2021-09-09 04:00:24 -07:00
8721a6d903 remove unused image 2021-09-09 03:58:40 -07:00
a6434fbf75 more gitea files 2021-09-09 03:57:27 -07:00
2ddbdd8dca add gitea custom dir 2021-09-09 03:55:57 -07:00
b569412538 add data dir with dummy placeholder 2021-09-09 03:55:44 -07:00
6bbce6600d rename submodules 2021-09-09 03:42:45 -07:00
cc1595586c update mysql scripts 2021-09-09 03:37:51 -07:00
f2760bf516 update mediawiki scripts 2021-09-09 03:35:51 -07:00
a2df381af3 add make help rule 2021-09-08 16:37:10 -07:00
256515107b add install/uninstall plus a bunch of other make commands 2021-09-08 16:11:24 -07:00
ee9d9aa66e add makefile 2021-09-08 16:03:06 -07:00
158daa4dff update gitignore 2021-09-08 16:02:58 -07:00
3a0102658a update gitignore 2021-09-08 16:02:03 -07:00
1822e01459 bump d-mediawiki submodule 2021-09-08 16:00:48 -07:00
a931d03ce2 update d-nginx-charlesreid1 template layout 2021-09-08 15:44:59 -07:00
ad033375d2 look for templates recursively 2021-09-08 15:39:23 -07:00
bd140b49cc update d-mw submodule pointer 2021-09-08 15:39:09 -07:00
d72b1f90ca check if pod_charlesreid1_dir env var exists 2021-09-08 15:38:47 -07:00
c1f589fe6c update gitea container pointer 2021-09-08 15:38:17 -07:00
98a693a005 update gitea container pointer 2021-09-08 15:37:18 -07:00
aa1e373548 update log locations 2021-09-07 19:46:04 -07:00
ae503b2a14 remote todo 2021-09-07 19:28:40 -07:00
6c123a2ffe remove update submodules script 2021-09-07 19:27:19 -07:00
1e1611806a remove unused yaml file 2021-09-07 19:26:03 -07:00
0e674cca36 moving utils-X to scripts/X 2021-09-07 17:26:37 -07:00
deb1db71fa remove attic 2021-09-07 17:22:51 -07:00
bf089eff76 add pod-charlesreid1 startup service script 2021-09-07 17:22:15 -07:00
49e22483a3 add script to clean old files out 2021-09-07 17:21:20 -07:00
1428af3b07 add scripts to create backups for gitea/wikidb/wikifiles 2021-09-07 17:18:33 -07:00
aefcfde465 add service and timer scripts for backup utilities 2021-09-07 17:17:38 -07:00
7cd43c68d0 revamp the scripts dir 2021-09-07 13:42:51 -07:00
a881c044a8 move apply templates script to scripts/ 2021-09-07 12:00:21 -07:00
95bcc2cd76 remove unused scripts 2021-09-07 12:00:05 -07:00
160bb1e599 update apply_templates to map all jinja vars to env vars 2021-09-07 11:47:58 -07:00
6f314e2b86 add example environment file 2021-09-06 20:03:18 -07:00
5ef08622c4 check for python3 and aws 2021-09-06 16:11:50 -07:00
fa29404ced bump d-nginx-charelsreid1 submodule pointer 2021-09-06 16:11:27 -07:00
2a1b8ab374 add example environment file environment.example 2021-09-06 13:52:55 -07:00
24e594bb00 add environment file to .gitignore 2021-09-06 13:52:09 -07:00
efb5485217 update license 2021-09-06 13:22:01 -07:00
2f7576a44c remove phpmyadmin and python-files submodules 2021-09-06 13:04:00 -07:00
df982538b3 fix docker binary and backup dir structure 2021-09-06 13:03:14 -07:00
5bb44f76f0 update d-mediawiki submodule 2021-09-05 16:58:16 -07:00
e1560017e7 update d-mediawiki submodule 2021-09-05 16:28:40 -07:00
3d6e20263a fix wikidb dump script to match private-wiki wikidb dump script 2021-09-05 16:27:37 -07:00
2977203b52 fix wikifiles backup script docker bin path and container name 2021-09-05 16:10:17 -07:00
0d6f92e3e1 fix wikidb backup script path to docker and container name 2021-09-05 16:09:55 -07:00
107e885c83 bind gitea to port 22 2021-08-20 14:00:00 -07:00
71c91121c5 bump 2021-08-20 13:57:10 -07:00
8ec2a7db2a fix container names 2021-01-20 18:26:28 -08:00
543980373a update d-mediawiki submodule 2020-08-18 23:22:58 -07:00
f9fb9e34b4 make nginx dependent on mysql 2020-08-05 10:07:13 -07:00
1c5512a350 update mw submodule 2020-07-26 15:41:56 -07:00
d2e57efe4b bump d-mysql version 2020-07-26 10:56:22 -07:00
3453240935 fix math problems with mediawiki extensions upgrade 2020-07-22 23:25:25 -07:00
31703eb2ed fixups for extensions/LocalSettings in d-mediawiki submodule 2020-07-09 10:23:55 -07:00
c1523bdad6 bump d-mediawiki submodule 2020-07-09 10:13:34 -07:00
3c2a8f8e7d Merge branch 'master' of github.com:charlesreid1-docker/pod-charlesreid1
* 'master' of github.com:charlesreid1-docker/pod-charlesreid1:
  bump commit pointer for d-nginx-charlesreid1
2020-06-25 19:10:58 -07:00
1faf699866 bump commit pointer for d-nginx-charlesreid1 2020-06-25 19:10:25 -07:00
b9f6309e35 fix gitea repo location and mwf2b log location 2020-06-25 01:32:55 -07:00
0c26201a75 update mw to include a mwf2b log 2020-06-25 01:20:21 -07:00
24a795aec6 updating d-mediawiki submodules and mw-fail2ban log file 2020-06-25 00:56:14 -07:00
513cdf6d82 add mwf2b log to mw bind-mounting in docker-compose file 2020-06-25 00:54:48 -07:00
67ca856233 more new commits for fail2banlog config changes 2020-06-21 13:37:24 -07:00
f7bf5147b4 update charlesreid1-config in d-mediawiki submodule, fail2banlog 2020-06-21 13:27:07 -07:00
7a938cdd0e update d-mediawiki submodule to latest 2020-05-21 18:12:37 -07:00
633c83973c chmod +x clean.sh 2020-05-02 17:53:03 -07:00
957a2d8f94 add script to clean out the backups directory 2020-05-02 17:52:28 -07:00
2a9a94698d use absolute paths (fixup) 2020-05-02 17:52:17 -07:00
21c8f89509 use absolute paths 2020-05-02 17:51:41 -07:00
cae87263de fix typos in docs links 2020-05-02 15:44:52 -07:00
c5a8431ba9 fix link 2020-05-02 11:59:18 -07:00
ee4bf4d7c5 update mkdocs-material submodule 2020-05-02 10:05:49 -07:00
2aba479724 update mkdocs-material submodule (leave me alone, stop bothering me) 2020-05-01 23:38:13 -07:00
947f844cfb update d-gitea submodule 2020-05-01 23:38:13 -07:00
05f8b63af0 mount /gitea_repositories into d-gitea container at /data/gitea/repositories 2020-05-01 23:38:13 -07:00
69f3e0da3a remove unused databot and service scripts 2020-04-28 18:38:56 -07:00
190 changed files with 33475 additions and 2663 deletions

40
.gitignore vendored
View File

@@ -1,16 +1,32 @@
*.log
*.pyc
environment
attic
# gitea
d-gitea/data/
d-gitea/custom/
# mediawiki
charlesreid1.wiki.conf
d-mediawiki/mediawiki/
d-mediawiki/charlesreid1-config/mediawiki/skins/Bootstrap2/Bootstrap2.php
d-mediawiki/charlesreid1-config/mediawiki/skins/Bootstrap2/navbar.php
d-mediawiki/charlesreid1-config/mediawiki/mathjax
# nginx
d-nginx-charlesreid1/conf.d/http.DOMAIN.conf
d-nginx-charlesreid1/conf.d/https.DOMAIN.conf
# scripts dir
scripts/git_*_www.py
scripts/certbot/renew_charlesreid1_certs.sh
*.timer
*.service
# misc
site
root.password
docker-compose.yml
*.zip
scripts/output
scripts/forever_loop.py.j2
scripts/forever_loop.service.j2
scripts/executioner.pyc
scripts/git_clone_www.py
scripts/git_pull_www.py
scripts/git_clone_data.py
scripts/git_pull_data.py
.claude

20
.gitmodules vendored
View File

@@ -1,21 +1,3 @@
[submodule "d-mysql"]
path = d-mysql
url = git@github.com:charlesreid1-docker/d-mysql.git
[submodule "d-mediawiki"]
path = d-mediawiki
url = git@github.com:charlesreid1-docker/d-mediawiki.git
[submodule "d-phpmyadmin"]
path = d-phpmyadmin
url = git@github.com:charlesreid1-docker/d-phpmyadmin.git
[submodule "d-nginx-charlesreid1"]
path = d-nginx-charlesreid1
url = git@github.com:charlesreid1-docker/d-nginx-charlesreid1.git
[submodule "d-python-files"]
path = d-python-files
url = git@github.com:charlesreid1-docker/d-python-files.git
[submodule "mkdocs-material"]
path = mkdocs-material
url = git@github.com:charlesreid1-docker/mkdocs-material.git
[submodule "d-gitea"]
path = d-gitea
url = git@github.com:charlesreid1-docker/d-gitea.git
url = https://github.com/charlesreid1/mkdocs-material

View File

@@ -1,4 +1,4 @@
Copyright (c) 2018 Charles Reid
Copyright (c) 2018-2021 Charles Reid
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

194
Makefile Normal file
View File

@@ -0,0 +1,194 @@
include common.mk
all:
@echo "no default make rule defined"
help:
@echo ""
@echo ""
@echo "pod-charlesreid Makefile:"
@echo ""
@echo ""
@echo "This Makefile contains rules for setting up pod-charlesreid1"
@echo ""
@echo "make help: Get help"
@echo ""
@echo "--------------------------------------------------"
@echo " Templates:"
@echo ""
@echo "make templates: Render each .j2 template file in this and all subdirectories"
@echo " (uses environment variables to populate Jinja variables)"
@echo ""
@echo "make list-templates: List each .j2 template file that will be rendered by a 'make template' command"
@echo ""
@echo "make clean-templates: Remove each rendered .j2 template"
@echo ""
@echo "--------------------------------------------------"
@echo " Backups:"
@echo ""
@echo "make backups: Create backups of every service (wiki database, wiki files) in ~/backups"
@echo ""
@echo "make clean-backups: Remove files from ~/backups directory older than 30 days"
@echo ""
@echo "--------------------------------------------------"
@echo " MediaWiki:"
@echo ""
@echo "make mw-build-extensions Build the MediaWiki extensions directory"
@echo ""
@echo "make mw-fix-extensions Copy the built extensions directory into the MW container"
@echo ""
@echo "make mw-fix-localsettings Copy the LocalSettings.php file into the MW container"
@echo ""
@echo "make mw-fix-skins Copy the skins directory into the MW container"
@echo ""
@echo "--------------------------------------------------"
@echo " /www Directory:"
@echo ""
@echo "make clone-www: Create the /www directory structure for charlesreid1.com"
@echo ""
@echo "make pull-www: Update the contents of the /www directory structure for charlesreid1.com"
@echo ""
@echo "--------------------------------------------------"
@echo " Startup Services:"
@echo ""
@echo "make install: Install and start systemd service to run pod-charlesreid1."
@echo " Also install and start systemd service for pod-charlesreid1 backup services"
@echo " for each service (mediawiki/mysql) part of pod-charlesreid1."
@echo ""
@echo "make uninstall: Remove all systemd startup services and timers part of pod-charlesreid1"
@echo ""
# Templates
templates:
@find * -name "*.service.j2" | xargs -I '{}' chmod 644 {}
@find * -name "*.timer.j2" | xargs -I '{}' chmod 644 {}
/home/charles/.pyenv/shims/python3 $(POD_CHARLESREID1_DIR)/scripts/apply_templates.py
list-templates:
@find * -name "*.j2"
clean-templates:
# sudo is required because bind-mounted gitea files end up owned by root. stupid docker.
sudo -E /home/charles/.pyenv/shims/python3 $(POD_CHARLESREID1_DIR)/scripts/clean_templates.py
# Backups
backups:
$(POD_CHARLESREID1_DIR)/scripts/backups/wikidb_dump.sh
$(POD_CHARLESREID1_DIR)/scripts/backups/wikifiles_dump.sh
clean-backups:
$(POD_CHARLESREID1_DIR)/scripts/clean_templates.sh
# MediaWiki
mw-build-extensions:
$(POD_CHARLESREID1_DIR)/scripts/mw/build_extensions_dir.sh
mw-fix-extensions: mw-build-extensions
$(POD_CHARLESREID1_DIR)/scripts/mw/build_extensions_dir.sh
mw-fix-localsettings:
$(POD_CHARLESREID1_DIR)/scripts/mw/fix_LocalSettings.sh
mw-fix-skins:
$(POD_CHARLESREID1_DIR)/scripts/mw/fix_skins.sh
# /www Dir
clone-www:
/home/charles/.pyenv/shims/python3 $(POD_CHARLESREID1_DIR)/scripts/git_clone_www.py
pull-www:
/home/charles/.pyenv/shims/python3 $(POD_CHARLESREID1_DIR)/scripts/git_pull_www.py
install:
ifeq ($(shell which systemctl),)
$(error Please run this make command on a system with systemctl installed)
endif
@/home/charles/.pyenv/shims/python3 -c 'import botocore' || (echo "Please install the botocore library using python3 or pip3 binary"; exit 1)
@/home/charles/.pyenv/shims/python3 -c 'import boto3' || (echo "Please install the boto3 library using python3 or pip3 binary"; exit 1)
sudo cp $(POD_CHARLESREID1_DIR)/scripts/pod-charlesreid1.service /etc/systemd/system/pod-charlesreid1.service
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/pod-charlesreid1-backups-aws.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/pod-charlesreid1-backups-cleanolderthan.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/pod-charlesreid1-backups-gitea.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/pod-charlesreid1-backups-wikidb.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/pod-charlesreid1-backups-wikifiles.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/canary/pod-charlesreid1-canary.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/certbot/pod-charlesreid1-certbot.{service,timer} /etc/systemd/system/.
sudo cp $(POD_CHARLESREID1_DIR)/scripts/backups/10-pod-charlesreid1-rsyslog.conf /etc/rsyslog.d/.
sudo chmod 664 /etc/systemd/system/pod-charlesreid1*
sudo systemctl daemon-reload
sudo systemctl restart rsyslog
sudo systemctl enable pod-charlesreid1
sudo systemctl enable pod-charlesreid1-backups-wikidb.timer
sudo systemctl enable pod-charlesreid1-backups-wikifiles.timer
sudo systemctl enable pod-charlesreid1-backups-gitea.timer
sudo systemctl enable pod-charlesreid1-backups-aws.timer
sudo systemctl enable pod-charlesreid1-backups-cleanolderthan.timer
sudo systemctl enable pod-charlesreid1-canary.timer
sudo systemctl enable pod-charlesreid1-certbot.timer
sudo systemctl start pod-charlesreid1-backups-wikidb.timer
sudo systemctl start pod-charlesreid1-backups-wikifiles.timer
sudo systemctl start pod-charlesreid1-backups-gitea.timer
sudo systemctl start pod-charlesreid1-backups-aws.timer
sudo systemctl start pod-charlesreid1-backups-cleanolderthan.timer
sudo systemctl start pod-charlesreid1-canary.timer
sudo systemctl start pod-charlesreid1-certbot.timer
sudo chown syslog:syslog /var/log/pod-charlesreid1-backups-aws.service.log
sudo chown syslog:syslog /var/log/pod-charlesreid1-backups-cleanolderthan.service.log
sudo chown syslog:syslog /var/log/pod-charlesreid1-backups-gitea.service.log
sudo chown syslog:syslog /var/log/pod-charlesreid1-backups-wikidb.service.log
sudo chown syslog:syslog /var/log/pod-charlesreid1-backups-wikifiles.service.log
sudo chown syslog:syslog /var/log/pod-charlesreid1-canary.service.log
uninstall:
ifeq ($(shell which systemctl),)
$(error Please run this make command on a system with systemctl installed)
endif
-sudo systemctl disable pod-charlesreid1
-sudo systemctl disable pod-charlesreid1-backups-aws.timer
-sudo systemctl disable pod-charlesreid1-backups-cleanolderthan.timer
-sudo systemctl disable pod-charlesreid1-backups-gitea.timer
-sudo systemctl disable pod-charlesreid1-backups-wikidb.timer
-sudo systemctl disable pod-charlesreid1-backups-wikifiles.timer
-sudo systemctl disable pod-charlesreid1-canary.timer
-sudo systemctl disable pod-charlesreid1-certbot.timer
# Leave the pod running!
# -sudo systemctl stop pod-charlesreid1
-sudo systemctl stop pod-charlesreid1-backups-aws.timer
-sudo systemctl stop pod-charlesreid1-backups-cleanolderthan.timer
-sudo systemctl stop pod-charlesreid1-backups-gitea.timer
-sudo systemctl stop pod-charlesreid1-backups-wikidb.timer
-sudo systemctl stop pod-charlesreid1-backups-wikifiles.timer
-sudo systemctl stop pod-charlesreid1-canary.timer
-sudo systemctl stop pod-charlesreid1-certbot.timer
-sudo rm -f /etc/systemd/system/pod-charlesreid1.service
-sudo rm -f /etc/systemd/system/pod-charlesreid1-backups-aws.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-backups-cleanolderthan.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-backups-gitea.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-backups-wikidb.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-backups-wikifiles.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-canary.{service,timer}
-sudo rm -f /etc/systemd/system/pod-charlesreid1-certbot.{service,timer}
sudo systemctl daemon-reload
-sudo rm -f /etc/rsyslog.d/10-pod-charlesreid1-rsyslog.conf
-sudo systemctl restart rsyslog
.PHONY: help

34
TODO.md
View File

@@ -1,34 +0,0 @@
# TODO
`underscores_in_headers on;`
[link](https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/)
- nginx configurations in separate files
- group all subdomain variations in one file
- one place to go
- one file = one domain, subdomain, port, etc. but group stuff easier to change
- network overlay
- nginx can't reverse proxy to 10.5.0.2 b/c doesn't see it
- need to have two networks:
- one virtual private network set up by docker (default)
- one host network only connected to nginx container
- extras in containers:
- fail2ban
- log rotation
- log backups
- netdata on krash?
- plugging docker-compose into netdata?
- disk space
- canary script
- finer grained control and understanding of fs usage
- <s>rebuild and restart for slimmer python files container</s>
- <s>logging? messages? status?
- want to avoid a few things:
- giant pileup of gigabytes of logs, getting bit in the ass
- giant pileup of container stuff, completely running out of space
- second almost happened, at 97% or so</s>

19
Troubleshooting.md Normal file
View File

@@ -0,0 +1,19 @@
To get a shell in a container that has been created, before it is runnning in a pod, use `docker run`:
```
docker run --rm -it --entrypoint bash <image-name-or-id>
docker run --rm -it --entrypoint bash pod-charlesreid1_stormy_mediawiki
```
To get a shell in a container that is running in a pod, use `docker exec`:
```
docker exec -it <image-name> /bin/bash
docker exec -it stormy_mw /bin/bash
```
Also, if no changes are picking up, and you've already tried rebuilding the container image, try editing the Dockerfile.

17
common.mk Normal file
View File

@@ -0,0 +1,17 @@
SHELL=/bin/bash
ifeq ($(shell echo ${POD_CHARLESREID1_DIR}),)
$(error Environment variable POD_CHARLESREID1_DIR not defined. Please run "source environment" in the repo root directory before running make commands)
endif
ifeq ($(shell test -d ${POD_CHARLESREID1_DIR} || echo "nope"), nope)
$(error Environment variable POD_CHARLESREID1_DIR points to a non-existent directory)
endif
ifeq ($(shell which python3),)
$(error Please install python3)
endif
ifeq ($(shell which aws),)
$(error Please install aws-cli)
endif

Submodule d-gitea deleted from 983cd1bf18

34
d-gitea/README.md Normal file
View File

@@ -0,0 +1,34 @@
# d-gitea
This directory contains files for the gitea docker container
in the charlesreid1 docker pod.
See [pod-charlesreid1](https://git.charlesreid1.com/docker/pod-charlesreid1).
## Custom Directory
The custom directory contains the gitea configuration file, plus any other
custom files Gitea might need.
The `custom` directory is bind mounted to `/data/gitea` inside the container.
## Data Directory
The data directory contains any instance-specific gitea data.
The data directory is bind-mounted to `/app/gitea/data` in the container.
## Repository Drive
Gitea stores all of its repositories in a separate drive that is at
`/gitea_repositories` on the host machine.
The gitea repositories drive is bind-mounted to `/data/git/repositories` in the container.
### Rendering app.ini Template
The gitea configuration file is located at `custom/conf/app.ini`.
The app.ini configuration file is not provided, only a template is provided.
Use the top-level pod-charlesreid1 Makefile and scripts to render templates.
Use the top-level environment file to set variable values.

View File

@@ -0,0 +1,111 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; My Amazing Gitea Config File
;;
;; charles reid
;; march 2017
;; https://github.com/go-gitea/gitea/blob/master/conf/app.ini
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
APP_NAME = {{ pod_charlesreid1_gitea_app_name }}
RUN_USER = git
RUN_MODE = prod
WORK_PATH = /data/gitea
[ui]
DEFAULT_THEME = gitea-dark
THEMES = gitea-dark
[database]
DB_TYPE = sqlite3
HOST =
NAME =
USER =
PASSWD =
SSL_MODE = disable
PATH = /data/gitea/gitea.db
[repository]
ROOT = /data/git/repositories
PREFERRED_LICENSES = MIT License
; This gets rid of the HTTP option to check out repos...
DISABLE_HTTP_GIT = false
[server]
PROTOCOL = http
DOMAIN = git.{{ pod_charlesreid1_server_name }}
#CERT_FILE = /www/gitea/certs/cert.pem
#KEY_FILE = /www/gitea/certs/key.pem
SSH_DOMAIN = git.{{ pod_charlesreid1_server_name }}
HTTP_PORT = 3000
HTTP_ADDR = 0.0.0.0
ROOT_URL = https://git.{{ pod_charlesreid1_server_name }}
;ROOT_URL = %(PROTOCOL)s://%(DOMAIN)s:%(HTTP_PORT)s/
DISABLE_SSH = false
; port to display in clone url:
;SSH_PORT = 222
; port for built-in ssh server to listen on:
SSH_LISTEN_PORT = 22
OFFLINE_MODE = false
; Upper level of template and static file path
; default is the path where Gitea is executed
;;;;STATIC_ROOT_PATH = /www/gitea/static
[mailer]
ENABLED = false
[service]
REGISTER_EMAIL_CONFIRM = false
ENABLE_NOTIFY_MAIL = false
DISABLE_REGISTRATION = true
ENABLE_CAPTCHA = false
REQUIRE_SIGNIN_VIEW = false
[picture]
DISABLE_GRAVATAR = true
ENABLE_FEDERATED_AVATAR = false
AVATAR_UPLOAD_PATH = /data/gitea/avatars
[session]
PROVIDER = file
[log]
MODE = file
; Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace"
LEVEL = Info
ROOT_PATH = /data/gitea/log
; For "file" mode only
[log.file]
LEVEL =
; This enables automated log rotate(switch of following options), default is true
LOG_ROTATE = true
; Max line number of single file, default is 1000000
MAX_LINES = 1000000
; Max size shift of single file, default is 28 means 1 << 28, 256MB
MAX_SIZE_SHIFT = 28
; Segment log daily, default is true
DAILY_ROTATE = true
; Expired days of log file(delete after max days), default is 7
MAX_DAYS = 7
[cron.archive_cleanup]
ENABLED = false
[security]
INSTALL_LOCK = true
SECRET_KEY = {{ pod_charlesreid1_gitea_secretkey }}
MIN_PASSWORD_LENGTH = 10
INTERNAL_TOKEN = {{ pod_charlesreid1_gitea_internaltoken }}
[actions]
ENABLED = true
[other]
SHOW_FOOTER_BRANDING = false
; Show version information about Gitea and Go in the footer
SHOW_FOOTER_VERSION = false
; Show time of template execution in the footer
SHOW_FOOTER_TEMPLATE_LOAD_TIME = false

View File

@@ -0,0 +1 @@
<h2>hallo werld dis is de geeeeeet tea</h2>

View File

@@ -0,0 +1,3 @@
<!--
<a class="item" href="{{AppSubUrl}}/hello.html">Hello World</a>
-->

View File

@@ -0,0 +1,3 @@
{{template "base/head" .}}
<meta http-equiv="Refresh" content="0; url=/explore/repos" />
{{template "base/footer" .}}

View File

@@ -0,0 +1,20 @@
log:
level: info
runner:
# Label format: <label>:<runner-type>:<image>
# "ubuntu-latest" is the standard GitHub Actions label.
# Map it (and common aliases) to a Docker image so jobs don't sit waiting.
labels:
# alpine: ~50MB, has python3+pip; install extras with: apk add --no-cache git curl
- "alpine:docker://python:3.12-alpine"
- "ubuntu-latest:docker://catthehacker/ubuntu:act-22.04"
- "ubuntu-22.04:docker://catthehacker/ubuntu:act-22.04"
- "ubuntu-20.04:docker://catthehacker/ubuntu:act-20.04"
- "ubuntu-24.04:docker://catthehacker/ubuntu:act-22.04"
container:
network: "pod-charlesreid1_frontend"
cache:
enabled: true

Submodule d-mediawiki deleted from 00a480f381

52
d-mediawiki/Dockerfile Normal file
View File

@@ -0,0 +1,52 @@
FROM mediawiki:1.39.12
EXPOSE 8989
# Install ImageMagick (used for image thumbnailing)
RUN apt-get update && \
apt-get install -y --no-install-recommends imagemagick && \
rm -rf /var/lib/apt/lists/*
# Copy skins, config files, and other particulars into container
# WARNING: DOCKER STUPIDITY AHEAD
# MediaWiki needs everything, everything, to be in one folder.
# Docker is totally incapable of mounting a file in a volume.
# I cannot update LocalSettings.php without clearing the cache.
# I can't bind-mount the skins dir, because then it's owned by root.
# I can't fix the fact that all bind-mounted dirs are owned by root,
# because I can only add commands in THIS DOCKERFILE.
# and when you run the commands in this dockerfile,
# YOU CANNOT SEE THE BIND-MOUNTED STUFF.
# Extensions (REL1_39 branches; EmbedVideo skipped for the 1.34 -> 1.39 upgrade)
COPY charlesreid1-config/mediawiki/extensions/Math /var/www/html/extensions/Math
COPY charlesreid1-config/mediawiki/extensions/ParserFunctions /var/www/html/extensions/ParserFunctions
COPY charlesreid1-config/mediawiki/extensions/SyntaxHighlight_GeSHi /var/www/html/extensions/SyntaxHighlight_GeSHi
# Skins
COPY charlesreid1-config/mediawiki/skins /var/www/html/skins
# MathJax 3.2.2 (self-hosted, served via Apache alias at /w/mathjax/*).
# Math extension runs in 'source' mode; MathJax renders client-side, so we
# never call out to restbase/mathoid. See LocalSettings.php.j2.
COPY charlesreid1-config/mediawiki/mathjax /var/www/html/mathjax
# Settings
COPY charlesreid1-config/mediawiki/LocalSettings.php /var/www/html/LocalSettings.php
# Apache conf file
COPY charlesreid1-config/apache/*.conf /etc/apache2/sites-enabled/
RUN chown -R www-data:www-data /var/www/html/* /var/www/html/skins /var/www/html/mathjax /var/www/html/LocalSettings* && \
touch /var/www/html/skins && \
chmod 600 /var/www/html/LocalSettings.php && \
a2enmod rewrite
# PHP conf file
# https://hub.docker.com/_/php/
COPY php/php.ini /usr/local/etc/php/
# Start
CMD apache2-foreground

97
d-mediawiki/README.md Normal file
View File

@@ -0,0 +1,97 @@
# d-mediawiki
This directory contains files used to run the MediaWiki container
for the charlesreid1.com wiki. The MediaWiki container consists of
a PHP-enabled Apache web server serving the MediaWiki application,
and storing data in a MySQL database (different container).
See [pod-charlesreid1](https://git.charelsreid1.com/docker/pod-charlesreid1).
## Directory Layout
This directory contains `charlesreid1-config`, which has both
MediaWiki and Apache configuration files.
## Creating Extensions Directory
## Summary
This directory contains a Dockerfile that modifies the
official MediaWiki docker container. Before launching
the container, it specifies `/var/www/html` as a mounted volume,
and it copies `LocalSettings.php`, the MediaWiki config file,
from this repo into the container.
See [d-mysql repo](https://charlesreid1.com:3000/docker/d-mysql).
Also see [pod-charlesreid1](https://git.charlesreid1.com/docker/pod-charlesreid1.git)
for a working pod using this container.
## Docker Compose
To use this container as part of a pod, as with the charlesreid1.com wiki,
see [pod-charlesreid1-wiki](https://charlesreid1.com:3000/docker/pod-charlesreid1-wiki).
## Troubleshooting
If you are seeing 404s on every page you try, it may be because
your MediaWiki config file is set to redirect you to `/wiki/Main_Page`
but your web server is not set up to handle it.
See [this lin](https://www.mediawiki.org/wiki/Manual:Short_URL)
and the guide for [apache](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Short_URL/Apache)
and [nginx](https://www.mediawiki.org/wiki/Special:MyLanguage/Manual:Short_URL/Nginx).
## Updating Settings
The LocalSettings.php file must be copied into the
container, because we will end up bind-mounting the
entire MediaWiki directory when the container is run
and we can't bind-mount a file inside a bind-mounted
directory.
Thus, to update LocalSettings.php, skins, or extensions,
you will need to re-make the Docker container.
Use the make rules to remake the Docker container:
```
make clean
make build
make run
```
## Submodule
The submodule `charlesreid1-config/`
contains configuration files for both
MediaWiki and Apache.
See the [wiki/charlesreid1-config](https://git.charlesreid1.com/wiki/charlesreid1-config)
repo for details.
To clone the submodule when you clone the repo,
include the `--recursive` flag:
```
git clone --recursive https://git.charlesreid1.com/docker/d-mediawiki.git
```
To check out the submodule after a shallow clone:
```
git submodule init
# or
git submodule update --init
```
To fetch changes to the submodule from the submodule's remote:
```
git submodule update --remote
```

34
d-mediawiki/Skins.md Normal file
View File

@@ -0,0 +1,34 @@
To update the MediaWiki skin:
- See the long angry rant in the Dockerfile
- You have to rebuild the whole container. Yup, stupid.
- Rebuild the MW container while the docker pod is still running (won't effect the docker pod)
- When finished rebuilding the MW container, restart the docker pod.
The skin currently in use is in `charlesreid1-config/mediawiki/skins/Bootstrap2`
To rebuild and then restart the pod:
```
# switch to main pod directory
cd ../
# rebuild all containers
docker-compose build
# stop and start the pod
sudo service pod-charlesreid1 stop
sudo service pod-charlesreid1 start
```
To verify that the skin has correcty been installed, you can check
the skin file inside the container. First, get a shell in the container:
```
docker exec -it stormy_mw /bin/bash
```
Once inside the container, the main web directory is `/var/www/html/`,
so the skins should be in `/var/www/html/skins/`. You can use `cat` to
print the file to the screen and verify it is correct.

View File

@@ -0,0 +1,11 @@
# charlesreid1-config
Config and other site-specific files
for the charlesreid1.com wiki.
The apache directory contains apache config files
for the apache server runing mediawiki.
The mediawiki directory contains mediawiki
configuration files.

View File

@@ -0,0 +1 @@
charlesreid1.wiki.conf

View File

@@ -0,0 +1,65 @@
ServerName {{ pod_charlesreid1_server_name }}
Listen 8989
<VirtualHost *:8989>
# nginx reverse proxy
# talks to apache via 127.0.0.1
# on port 8989
ServerAlias www.{{ pod_charlesreid1_server_name }}
LogLevel warn
ServerAdmin {{ pod_charlesreid1_mediawiki_admin_email }}
DirectoryIndex index.html index.cgi index.php
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
AddHandler php5-script php
# PHP module settings:
<IfModule php5_module>
# Add php type handler
AddType text/html php
# Make index.php a default file
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
# =================
# wiki
Alias /wiki /var/www/html/index.php
Alias /w /var/www/html
<Directory /var/www/html>
#
# http://www.mediawiki.org/wiki/Manual:Short_URL/Apache
#
# Enable the rewrite engine
RewriteEngine On
# Short url for wiki pages
RewriteRule ^/?wiki(/.*)?$ %{DOCUMENT_ROOT}/w/index.php [L]
Options FollowSymLinks
AllowOverride None
Require all granted
### # Rewrite / to main page
### RewriteRule ^/*$ %{DOCUMENT_ROOT}/w/index.php [L]
</Directory>
</VirtualHost>

View File

@@ -0,0 +1,2 @@
LocalSettings.php
extensions

View File

@@ -0,0 +1,268 @@
<?php
$wgSitename = "charlesreid1";
$wgMetaNamespace = "Charlesreid1";
# from http://www.mediawiki.org/wiki/Manual:Short_URL#Recommended_how-to_guide_.28setup_used_on_Wikipedia.29
$wgScriptPath = "/w"; # Path to the actual files. This should already be there
$wgArticlePath = "/wiki/$1"; # Virtual path. This directory MUST be different from the one used in $wgScriptPath
$wgUsePathInfo = true; # Enable use of pretty URLs
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## The protocol and server name to use in fully-qualified URLs
$wgServer = 'https://{{ pod_charlesreid1_server_name }}';
$wgCanonicalServer = 'https://{{ pod_charlesreid1_server_name }}';
## The URL path to static resources (images, scripts, etc.)
$wgStylePath = "$wgScriptPath/skins";
$wgResourceBasePath = $wgScriptPath;
# The URL path to the logo. Make sure you change this from the default,
# or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
# UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEmergencyContact = "charles@charlesreid1.com";
$wgPasswordSender = "charles@charlesreid1.com";
$wgEnableUserEmail = true; # UPO
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
# Database settings
$wgDBtype = "mysql";
$wgDBserver = getenv('MYSQL_HOST');
$wgDBname = getenv('MYSQL_DATABASE');
$wgDBuser = getenv('MYSQL_USER');
$wgDBpassword = getenv('MYSQL_PASSWORD');
# MySQL specific settings
$wgDBprefix = "";
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# $wgDBmysql5 removed — deprecated in MW 1.39
# Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgCacheDirectory = "$IP/cache";
$wgMemCachedServers = [];
# To enable image uploads, make sure the 'images' directory
# is writable, then set this to true:
$wgEnableUploads = true;
$wgMaxUploadSize = 1024*1024*100; # 100 MB
# also set in php.ini
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Allow specific file extensions
$wgStrictFileExtensions = false;
$wgFileExtensions[] = 'pdf';
$wgFileExtensions[] = 'svg';
$wgFileExtensions[] = 'mm';
$wgFileExtensions[] = 'png';
$wgFileExtensions[] = 'jpg';
$wgFileExtensions[] = 'JPG';
$wgFileExtensions[] = 'jpeg';
$wgFileExtensions[] = 'py';
# Allow any file extensions, but print a warning if not in $wgFileExtensions[]
$wgCheckFileExtensions = false;
# do not send pingback to https://www.mediawiki.org
$wgPingback = false;
# If you use ImageMagick (or any other shell command) on a
# Linux server, this will need to be set to the name of an
# available UTF-8 locale
$wgShellLocale = "en_US.utf8";
# Math rendering: Math extension emits raw LaTeX ('source' mode), then
# a self-hosted MathJax 3 build at /w/mathjax/ renders it client-side.
# No mathoid, no restbase, no external CDN.
$wgDefaultUserOptions['math'] = 'source';
$wgMathValidModes = [ 'source' ];
# Skip TeX validation entirely — default validator calls out to restbase,
# which breaks air-gapped installs even when we only emit source HTML.
$wgMathDisableTexFilter = 'always';
$wgHooks['BeforePageDisplay'][] = function ( $out, $skin ) {
$out->addHeadItem( 'mathjax-config',
'<script>'
. 'window.MathJax = {'
. ' tex: {'
. ' inlineMath: [["$","$"],["\\\\(","\\\\)"]],'
. ' displayMath: [["$$","$$"],["\\\\[","\\\\]"]],'
. ' processEscapes: true'
. ' },'
. ' options: {'
. ' enableMenu: false,'
. ' renderActions: { addMenu: [] }'
. ' },'
. ' startup: { typeset: true }'
. '};'
. '</script>'
);
$out->addHeadItem( 'mathjax-script',
'<script defer src="/w/mathjax/tex-chtml.js"></script>'
);
};
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = getenv('MEDIAWIKI_SECRETKEY');
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = getenv('MEDIAWIKI_UPGRADEKEY');
# No license info
$wgRightsPage = "";
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Alternative:
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = "";
$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-nd/3.0/us/";
$wgRightsText = "Attribution-NonCommercial-NoDerivs 3.0 United States";
$wgRightsIcon = "/w/skins/charlesmartinreid/cc.png";
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
# Boostrap2 skin:
wfLoadSkin( 'Bootstrap2' );
require_once "$IP/skins/Bootstrap2/Bootstrap2.php";
$wgDefaultSkin = 'Bootstrap2';
$wgValidSkinNames['bootstrap2'] = 'Bootstrap2';
# Change to true for debugging
$wgShowExceptionDetails=false;
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
session_save_path("tmp");
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
############################################################
############# Charles-Modified Settings ####################
# Allow external images (to do this, simply insert the image's URL)
# http://url.for/some/image.png
# But these cannot be resized.
$wgAllowExternalImages = true;
# Use ImageMagick
$wgUseImageMagic=true;
# $wgAllowDisplayTitle - Allow the magic word { { DISPLAYTITLE: } } to override the title of a page.
$wgAllowdisplayTitle=true;
# Log IP addresses in the recentchanges table.
$wgPutIPinRC=true;
# Getting some weird "Error creating thumbnail: Invalid thumbnail parameters" messages w/ thumbnail
# http://www.gossamer-threads.com/lists/wiki/mediawiki/169439
$wgMaxImageArea=64000000;
$wgMaxShellMemory=512000;
$wgFavicon="$wgScriptPath/favicon.ico";
######################
# Edit permissions
# only admin can edit
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = true;
# only admin can register new accounts
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['user']['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount'] = true;
# only admin can upload
$wgGroupPermissions['*']['upload'] = false;
$wgGroupPermissions['user']['upload'] = false;
$wgGroupPermissions['sysop']['upload'] = true;
$wgGroupPermissions['*']['reupload'] = false;
$wgGroupPermissions['user']['reupload'] = false;
$wgGroupPermissions['sysop']['reupload'] = true;
###############################
## GeSHi syntax highlighting/code extension
# https://github.com/wikimedia/mediawiki-extensions-SyntaxHighlight_GeSHi.git
wfLoadExtension( 'SyntaxHighlight_GeSHi' );
$wgSyntaxHighlightDefaultLang = "text";
##############################
# Parser functions
# http://www.mediawiki.org/wiki/Extension:ParserFunctions
# http://en.wikipedia.org/wiki/Template_talk:Navbox
wfLoadExtension( 'ParserFunctions' );
##############################################
# Embed videos extension — SKIPPED for MW 1.39 upgrade (add back later)
###########################################
# Math extension
# https://github.com/wikimedia/mediawiki-extensions-Math.git
wfLoadExtension( 'Math' );
###########################################
# Parsoid (bundled in MW 1.39, runs in-process)
# Required for REST API /v1/page/{title}/with_html endpoint
wfLoadExtension( 'Parsoid', "$IP/vendor/wikimedia/parsoid/extension.json" );
$wgParsoidSettings = [
'useSelser' => true,
];
#############################################
# Fix cookies crap
session_save_path("/tmp");
##############################################
# Secure login
$wgServer = "https://{{ pod_charlesreid1_server_name }}";
$wgSecureLogin = true;
###################################
# Raw html
$wgRawHtml = false;
# but also keep things locked down
$wgUseRCPatrol=true;
$wgNewUserLog=true;
##################################
# Paths
$wgUploadPath = "$wgScriptPath/images";
$wgUploadDirectory = "$IP/images";
$wgMathPath = "$wgUploadPath/math";
$wgMathDirectory = "$wgUploadDirectory/math";
$wgTmpDirectory = "$wgUploadDirectory/tmp";
$wgLatexCommand = "/usr/bin/latex";
#$wgUploadBaseUrl = false; # not sure about why this one too...
$wgVerifyMimeType = false;
#$wgDebugLogFile = "/var/log/apache2/wiki.log";

View File

@@ -0,0 +1,18 @@
# mediawiki config files
In the `LocalSettings.php` file, which needs to have the MySQL
account credentials, we have the following:
```
## Database settings
$wgDBtype = "mysql";
$wgDBserver = getenv('MYSQL_HOST');
$wgDBname = getenv('MYSQL_DATABASE');
$wgDBuser = getenv('MYSQL_USER');
$wgDBpassword = getenv('MYSQL_PASSWORD');
```
This information comes from the environment. In our case,
this comes from a MediaWiki docker container (see the
[d-mediawiki](https://git.charlesreid1.com/docker/d-mediawiki)
repo.)

View File

@@ -6,10 +6,13 @@ Apply Default Values to Jinja Templates
This script applies default values to
docker-compose.yml file.
mediawiki LocalSettings.php file.
The template is useful for Ansible,
The configuration templates are useful for Ansible,
but this is useful for experiments/one-offs.
All configuration files are for charlesreid1.com
docker pod, nginx, and realted infrastructure.
"""
@@ -20,17 +23,15 @@ TEMPLATEDIR = '.'
OUTDIR = '.'
# Should existing files be overwritten
OVERWRITE = False
OVERWRITE = True
env = Environment(loader=FileSystemLoader('.'))
tfile = 'docker-compose.yml.j2'
rfile = 'docker-compose.yml'
tfile = 'LocalSettings.php.j2'
rfile = 'LocalSettings.php'
content = env.get_template(tfile).render({
"server_name_default" : "charlesreid1.com",
"mediawiki_secretkey" : "asdfqwerty_oiuqoweiruoasdfi",
"mysql_password" : "MySuperSecretPassword"
"server_name_default" : "charlesreid1.com"
})
# Write to file

View File

@@ -0,0 +1,329 @@
<?php
# This file was automatically generated by the MediaWiki 1.30.0
# installer. If you make manual changes, please keep track in case you
# need to recreate them later.
#
# See includes/DefaultSettings.php for all configurable settings
# and their default values, but don't forget to make changes in _this_
# file, not there.
#
# Further documentation for configuration settings may be found at:
# https://www.mediawiki.org/wiki/Manual:Configuration_settings
# Protect against web entry
if ( !defined( 'MEDIAWIKI' ) ) {
exit;
}
## Uncomment this to disable output compression
# $wgDisableOutputCompression = true;
$wgSitename = "charlesreid1";
$wgMetaNamespace = "Charlesreid1";
# from http://www.mediawiki.org/wiki/Manual:Short_URL#Recommended_how-to_guide_.28setup_used_on_Wikipedia.29
$wgScriptPath = "/w"; # Path to the actual files. This should already be there
$wgArticlePath = "/wiki/$1"; # Virtual path. This directory MUST be different from the one used in $wgScriptPath
$wgUsePathInfo = true; # Enable use of pretty URLs
## The protocol and server name to use in fully-qualified URLs
$wgServer = 'https://';
$wgCanonicalServer = 'https://';
## The URL path to static resources (images, scripts, etc.)
$wgStylePath = "$wgScriptPath/skins";
$wgResourceBasePath = $wgScriptPath;
## The URL path to the logo. Make sure you change this from the default,
## or else you'll overwrite your logo when you upgrade!
$wgLogo = "$wgResourceBasePath/resources/assets/wiki.png";
## UPO means: this is also a user preference option
$wgEnableEmail = true;
$wgEnableUserEmail = true; # UPO
$wgEmergencyContact = "charles@charlesreid1.com";
$wgPasswordSender = "charles@charlesreid1.com";
$wgEnotifUserTalk = false; # UPO
$wgEnotifWatchlist = false; # UPO
$wgEmailAuthentication = true;
## Database settings
$wgDBtype = "mysql";
$wgDBserver = getenv('MYSQL_HOST');
$wgDBname = getenv('MYSQL_DATABASE');
$wgDBuser = getenv('MYSQL_USER');
$wgDBpassword = getenv('MYSQL_PASSWORD');
# MySQL specific settings
$wgDBprefix = "";
# MySQL table options to use during installation or update
$wgDBTableOptions = "ENGINE=InnoDB, DEFAULT CHARSET=binary";
# Experimental charset support for MySQL 5.0.
//$wgDBmysql5 = false; // new version
$wgDBmysql5 = true; // true on charlesreid1.com
## Shared memory settings
$wgMainCacheType = CACHE_ACCEL;
$wgMemCachedServers = [];
## To enable image uploads, make sure the 'images' directory
## is writable, then set this to true:
$wgEnableUploads = true;
$wgMaxUploadSize = 1024*1024*100; # 100 MB
# also set in php.ini
$wgUseImageMagick = true;
$wgImageMagickConvertCommand = "/usr/bin/convert";
# InstantCommons allows wiki to use images from https://commons.wikimedia.org
$wgUseInstantCommons = false;
# Allow specific file extensions
$wgStrictFileExtensions = false;
$wgFileExtensions[] = 'pdf';
$wgFileExtensions[] = 'svg';
$wgFileExtensions[] = 'mm';
$wgFileExtensions[] = 'png';
$wgFileExtensions[] = 'jpg';
$wgFileExtensions[] = 'JPG';
$wgFileExtensions[] = 'jpeg';
$wgFileExtensions[] = 'py';
# Allow any file extensions,
# but print a warning if its not
# in $wgFileExtensions[]
$wgCheckFileExtensions = false;
# do not send pingback to https://www.mediawiki.org
$wgPingback = false;
# If you use ImageMagick (or any other shell command) on a
# Linux server, this will need to be set to the name of an
# available UTF-8 locale
//$wgShellLocale = "C.UTF-8"; // modern
$wgShellLocale = "en_US.utf8"; // charlesreid1.com version
## Set $wgCacheDirectory to a writable directory on the web server
## to make your wiki go slightly faster. The directory should not
## be publically accessible from the web.
#$wgCacheDirectory = "$IP/cache";
## If you have the appropriate support software installed
## you can enable inline LaTeX equations:
$wgUseTeX = true;
$wgTexvc = "$IP/extensions/Math/math/texvc";
//$wgTexvc = '/usr/bin/texvc';
$wgDefaultUserOptions['math'] = 0; //Always render eqns as .pngs
# Site language code, should be one of the list in ./languages/data/Names.php
$wgLanguageCode = "en";
$wgSecretKey = getenv('MEDIAWIKI_SECRETKEY');
# Changing this will log out all existing sessions.
$wgAuthenticationTokenVersion = "1";
# Site upgrade key. Must be set to a string (default provided) to turn on the
# web installer while LocalSettings.php is in place
$wgUpgradeKey = "984c1d9858dabc27";
## no license info
$wgRightsPage = "";
$wgRightsUrl = "";
$wgRightsText = "";
$wgRightsIcon = "";
# Alternative:
$wgEnableCreativeCommonsRdf = true;
$wgRightsPage = ""; # Set to the title of a wiki page that describes your license/copyright
$wgRightsUrl = "http://creativecommons.org/licenses/by-nc-nd/3.0/us/";
$wgRightsText = "Attribution-NonCommercial-NoDerivs 3.0 United States";
$wgRightsIcon = "/w/skins/charlesmartinreid/cc.png";
# $wgRightsCode = "[license_code]"; # Not yet used
#
# Path to the GNU diff3 utility. Used for conflict resolution.
$wgDiff3 = "/usr/bin/diff3";
## Default skin: you can change the default skin. Use the internal symbolic
## names, ie 'vector', 'monobook':
# Boostrap2 skin:
wfLoadSkin( 'Bootstrap2' );
require_once "$IP/skins/Bootstrap2/Bootstrap2.php";
$wgDefaultSkin = 'Bootstrap2';
$wgValidSkinNames['bootstrap2'] = 'Bootstrap2';
$wgShowExceptionDetails=false;
//$wgShowExceptionDetails = true;
//$wgShowDBErrorBacktrace = true;
//$wgShowSQLErrors = true;
$wgDiff3 = "/usr/bin/diff3";
# When you make changes to this configuration file, this will make
# sure that cached pages are cleared.
session_save_path("tmp");
$wgCacheEpoch = max( $wgCacheEpoch, gmdate( 'YmdHis', @filemtime( __FILE__ ) ) );
############################################################
############# Charles-Modified Settings ####################
# Allow external images:
$wgAllowExternalImages = true;
# to do this, simply insert the image's URL:
#http://url.for/some/image.png
# But these cannot be resized. It's better to just put your own version into the wiki
# Use ImageMagick
$wgUseImageMagic=true;
# $wgAllowDisplayTitle - Allow the magic word { { DISPLAYTITLE: } } to override the title of a page.
$wgAllowdisplayTitle=true;
# $wgPutIPinRC - Log IP addresses in the recentchanges table.
$wgPutIPinRC=true;
# Getting some weird "Error creating thumbnail: Invalid thumbnail parameters" messages w/ thumbnail
# http://www.gossamer-threads.com/lists/wiki/mediawiki/169439
$wgMaxImageArea=64000000;
$wgMaxShellMemory=0;
# Also:
# http://www.ipbwiki.com/forums/index.php?showtopic=812
$wgFavicon="$wgScriptPath/favicon.ico";
######################
# Edit permissions
# only admin can edit
$wgGroupPermissions['*']['edit'] = false;
$wgGroupPermissions['user']['edit'] = false;
$wgGroupPermissions['sysop']['edit'] = true;
# only admin can register new accounts
$wgGroupPermissions['*']['createaccount'] = false;
$wgGroupPermissions['user']['createaccount'] = false;
$wgGroupPermissions['sysop']['createaccount'] = true;
# only admin can upload
$wgGroupPermissions['*']['upload'] = false;
$wgGroupPermissions['user']['upload'] = false;
$wgGroupPermissions['sysop']['upload'] = true;
$wgGroupPermissions['*']['reupload'] = false;
$wgGroupPermissions['user']['reupload'] = false;
$wgGroupPermissions['sysop']['reupload'] = true;
###############################
## GeSHi syntax highlighting/code extension
#
# https://github.com/wikimedia/mediawiki-extensions-SyntaxHighlight_GeSHi.git
#
require_once("$IP/extensions/SyntaxHighlight_GeSHi/SyntaxHighlight_GeSHi.php");
$wgSyntaxHighlightDefaultLang = "text";
##############################
# Parser functions
#
# http://www.mediawiki.org/wiki/Extension:ParserFunctions
# http://en.wikipedia.org/wiki/Template_talk:Navbox
require_once( "$IP/extensions/ParserFunctions/ParserFunctions.php" );
##############################################
# Embed videos extension
# https://github.com/HydraWiki/mediawiki-embedvideo/
#require_once("$IP/extensions/EmbedVideo/EmbedVideo.php");
wfLoadExtension( 'EmbedVideo' );
###########################################
## Math extension
#
# https://github.com/wikimedia/mediawiki-extensions-Math.git
#
require_once "$IP/extensions/Math/Math.php";
#############################################
## Fix cookies crap
session_save_path("/tmp");
##############################################
#### secure login
$wgServer = "https://";
$wgSecureLogin = true;
###################################
##### raw html
$wgRawHtml = true;
# but also keep things locked down
$wgUseRCPatrol=true;
$wgNewUserLog=true;
##############################################
## Because adding a new extension for every dumb little thing you want to do is dumb
$wgRawHtml = true;
$wgUploadPath = "$wgScriptPath/images";
$wgUploadDirectory = "$IP/images";
$wgMathPath = "$wgUploadPath/math";
$wgMathDirectory = "$wgUploadDirectory/math";
$wgTmpDirectory = "$wgUploadDirectory/tmp";
$wgLatexCommand = "/usr/bin/latex";
#$wgUploadBaseUrl = false; #not sure about why this one too...
$wgVerifyMimeType = false;
# log
$wgDebugLogFile = "/var/log/apache2/wiki.log";

View File

@@ -0,0 +1,452 @@
<?php
/**
* Bootstrap2 MediaWiki skin
*
* @file Bootstrap2.php
*/
if( !defined( 'MEDIAWIKI' ) )
die( -1 );
/**
* Inherit main code from SkinTemplate, set the CSS and template filter.
*/
class SkinBootstrap2 extends SkinTemplate {
/** Using Bootstrap2 */
var $skinname = 'Bootstrap2',
$stylename = 'Bootstrap2',
// -------- Start ---------
// making this true, to match the Dash style
$useHeadElement = true,
//$useHeadElement = false,
// -------- End ---------
// cmr 05/08/2014
$template = 'Bootstrap2Template';
// MW 1.39: Skin::setupSkinUserCss() was removed. initPage() is the
// per-request hook that still receives OutputPage and runs before
// headElement is generated, so addStyle() calls land in the <head>.
public function initPage( OutputPage $out ) {
parent::initPage( $out );
$out->addStyle( 'Bootstrap2/IE50Fixes.css', 'screen', 'lt IE 5.5000' );
$out->addStyle( 'Bootstrap2/IE55Fixes.css', 'screen', 'IE 5.5000' );
$out->addStyle( 'Bootstrap2/IE60Fixes.css', 'screen', 'IE 6' );
$out->addStyle( 'Bootstrap2/IE70Fixes.css', 'screen', 'IE 7' );
$out->addStyle( 'Bootstrap2/rtl.css', 'screen', '', 'rtl' );
$out->addStyle( 'Bootstrap2/bootstrap.css' );
$out->addStyle( 'Bootstrap2/slate.css' );
$out->addStyle( 'Bootstrap2/main.css' );
$out->addStyle( 'Bootstrap2/dox.css' );
$out->addStyle( 'Bootstrap2/css/font-awesome.css' );
//$out->addStyle('Bootstrap2/cmr-bootstrap-cyborg.css');
//$out->addStyle('Bootstrap2/cmr-bootstrap-cyborg-wiki.css');
//
//$out->addStyle('Bootstrap2/bootstrap-cyborg.css' );
//$out->addStyle('Bootstrap2/bootstrap-responsive-cyborg.css');
//$out->addStyle( 'Bootstrap2/main.css', 'screen' );
}
}
class Bootstrap2Template extends QuickTemplate {
var $skin;
/**
* Template filter callback for Bootstrap2 skin.
* Takes an associative array of data set from a SkinTemplate-based
* class, and a wrapper for MediaWiki's localization database, and
* outputs a formatted page.
*
* @access private
*/
function execute() {
global $wgRequest;
$this->skin = $skin = $this->data['skin'];
$action = $wgRequest->getText( 'action' );
// -------- Start ------------
// Adding the following line makes Geshi work
// (MW 1.39: read $this->data directly to avoid QuickTemplate::html('headelement') deprecation)
echo $this->data['headelement'];
// Left this out because the [edit] buttons were becoming right-aligned
// Got around that behavior by changing shared.css
// -------- End ------------
// cmr 01-10-2014
/////////////////////////////
// begin custom
// bootstrap content
$get_override = 'True';
$url_array = explode('/',$_SERVER['REQUEST_URI']);
array_shift($url_array); // remove first value as it's empty
$p = "wiki";
// path, inside container
include('/var/www/html/skins/Bootstrap2/navbar.php');
?>
<!-- favicon -->
<link rel="shortcut icon" href="/favicon.ico">
<div class="container">
<!-- Row: Navigation bar for wiki -->
<div class="row">
<nav class="wiki navbar navbar-default">
<div class="container-fixed">
<div class="navbar-header">
<a href="/wiki/" class="navbar-brand">
{{ pod_charlesreid1_server_name }} wiki
</a>
</div>
<div>
<ul class="wiki nav navbar-nav">
<?php
/*
// Print debug information
echo "\n";
echo "<!--";
echo "\n";
echo print_r($this->data['content_actions']);
echo "\n";
echo "~~~~~~~~~";
echo "\n";
foreach($this->data['content_actions'] as $key => $tab) {
echo $key;
echo "\n";
//echo print_r($tab);
echo $tab['href'];
echo "\n";
echo "\n";
echo "\n";
}
echo "\n";
echo "-->";
echo "\n";
*/
echo "\n";
foreach($this->data['content_actions'] as $key => $tab) {
if( in_array($key, array('nstab-main','edit','history','viewsource','delete','move'))) {
echo '<li class="wiki';
if( $tab['class'] ) {
echo ' ';
echo $tab['class'];
}
echo '" id="' . Sanitizer::escapeIdForAttribute( "ca-$key" ) . '">';
echo '<a href="';
echo htmlspecialchars($tab['href']);
echo '">';
echo $tab['text'];
echo "</a>";
echo "</li>";
//echo '>'.htmlspecialchars($tab['text']).'</a></li>';
echo "\n";
}
} ?>
</ul>
</div>
</div>
</nav>
</div>
<!-- Row: Page content for wiki -->
<div class="row">
<div class="span10 offset1">
<!--
=========================
Begin MediaWiki content
=========================
-->
<div class="mw_content">
<div id="content" <?php $this->html("specialpageattributes") ?>>
<!-- page title -->
<div class="page-header">
<h1 id="firstHeading" class="firstHeading">
<?php $this->html('title') ?>
</h1>
</div><!--div page-header-->
<!-- pre-article stuff -->
<div id="bodyContent">
<h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
<div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?>
</div>
<?php
if($this->data['undelete']) { ?>
<div id="contentSub2"><?php $this->html('undelete') ?></div>
<?php
}
if($this->data['newtalk'] ) { ?>
<div class="usermessage"><?php $this->html('newtalk') ?></div>
<?php
}
?>
<!-- article -->
<!-- begin mediawiki content -->
<?php $this->html('bodytext') ?>
<?php
if($this->data['catlinks']) {
$this->html('catlinks');
} ?>
</div><!-- end bodyContent -->
</div><!--div special page attributes-->
</div><!--div mw content-->
<!--
=========================
End MediaWiki content
=========================
-->
</div><!--div span10 -->
</div><!--row-->
<!--
==========================================================
====================== Begin Wiki Footer =================
==========================================================
-->
</div>
<?php
include('/var/www/html/skins/Bootstrap2/footer.php');
?>
<?php
} // end of execute() method
/*************************************************************************************************/
function searchBox() {
global $wgUseTwoButtonsSearchForm;
?>
<div id="p-search" class="portlet">
<div id="searchBody" class="pBody">
<form class="navbar-search pull-left" action="<?php $this->text('wgScript') ?>" id="searchform">
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
<?php
echo Html::input( 'search',
isset( $this->data['search'] ) ? $this->data['search'] : '', 'search',
array(
'id' => 'searchInput',
'class' => 'search-query',
'title' => $this->skin->titleAttrib( 'search' ),
'accesskey' => $this->skin->accesskey( 'search' )
) ); ?>
<!--
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="<?php $this->msg('searcharticle') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-go' ); ?> /><?php if ($wgUseTwoButtonsSearchForm) { ?>&nbsp;
-->
<input type='submit' name="fulltext" class="btn btn-large" id="mw-searchButton" value="<?php $this->msg('searchbutton') ?>"<?php echo $this->skin->tooltipAndAccesskey( 'search-fulltext' ); ?> /><?php } else { ?>
<div><a href="<?php $this->text('searchaction') ?>" rel="search"><?php $this->msg('powersearch-legend') ?></a></div><?php } ?>
</form>
</div>
</div>
<?php
}
/*************************************************************************************************/
function personalTools() {
?>
<ul class="nav nav-list">
<li class="nav-header"><?php $this->msg('personaltools') ?></li>
<?php
foreach($this->data['personal_urls'] as $key => $item) {
if( strcmp($key,"userpage") == 0
|| strcmp($key,"preferences") == 0
|| strcmp($key,"logout") == 0 ) { ?>
<li> <a href="<?php
echo htmlspecialchars($item['href']) ?>"<?php echo $skin->tooltipAndAccesskey('pt-'.$key) ?><?php
if(!empty($item['class'])) { ?> class="<?php
echo htmlspecialchars($item['class']) ?>"<?php } ?>><?php
echo htmlspecialchars($item['text']) ?></a></li>
<?php
} else {
}
}
// put a log in button
?>
<li><a href="/wiki/Special:UserLogin">Log in</a></li>
<?php
}
/*************************************************************************************************/
function toolbox() {
?>
<!--
<div class="portlet" id="p-tb">
<div class="pBody">
-->
<ul class="nav nav-list">
<li class="nav-header"><?php $this->msg('toolbox') ?></li>
<?php
/*
if($this->data['notspecialpage']) { ?>
<li id="t-whatlinkshere"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['whatlinkshere']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-whatlinkshere') ?>><?php $this->msg('whatlinkshere') ?></a></li>
<?php
if( $this->data['nav_urls']['recentchangeslinked'] ) { ?>
<li id="t-recentchangeslinked"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['recentchangeslinked']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-recentchangeslinked') ?>><?php $this->msg('recentchangeslinked-toolbox') ?></a></li>
<?php }
}
if( isset( $this->data['nav_urls']['trackbacklink'] ) && $this->data['nav_urls']['trackbacklink'] ) { ?>
<li id="t-trackbacklink"><a href="<?php
echo htmlspecialchars($this->data['nav_urls']['trackbacklink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-trackbacklink') ?>><?php $this->msg('trackbacklink') ?></a></li>
<?php }
if($this->data['feeds']) { ?>
<li id="feedlinks"><?php foreach($this->data['feeds'] as $key => $feed) {
?><a id="<?php echo Sanitizer::escapeIdForAttribute( "feed-$key" ) ?>" href="<?php
echo htmlspecialchars($feed['href']) ?>" rel="alternate" type="application/<?php echo $key ?>+xml" class="feedlink"<?php echo $this->skin->tooltipAndAccesskey('feed-'.$key) ?>><?php echo htmlspecialchars($feed['text'])?></a>&nbsp;
<?php } ?></li><?php
}
*/
// Upload files, and list all files
if($this->data['nav_urls']['upload']) {
?><li id="t-<?php echo 'upload'; ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['upload']['href'])
?>" <?php echo $this->skin->tooltipAndAccesskey('t-upload') ?>><?php $this->msg('upload') ?></a></li>
<?php
}
// Special pages, and list all pages
if( $this->data['nav_urls']['specialpages'] ) {
?><li id="t-<?php echo 'specialpages'; ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['specialpages']['href'])
?>" <?php echo $this->skin->tooltipAndAccesskey('t-specialpages') ?>><?php $this->msg('specialpages') ?></a></li>
<?php
$element_name = 'all_pages';
$element_title = 'List All Pages';
$element_href = "/wiki/Special:AllPages";
$this->data['nav_urls'][$element_name]['href'] = $element_href;
?>
<li id="t-<?php echo $element_name; ?>"><a href="<?php echo htmlspecialchars( $this->data['nav_urls'][$element_name]['href'] )
?>" title="<?php echo $element_title ?>"><?php echo $element_title; ?></a></li>
<?php
}
/*
foreach( array('contributions', 'log', 'blockip', 'emailuser') as $special ) {
if($this->data['nav_urls'][$special]) {
?><li id="t-<?php echo $special ?>"><a href="<?php echo htmlspecialchars($this->data['nav_urls'][$special]['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-'.$special) ?>><?php $this->msg($special) ?></a></li>
<?php }
}
*/
/*
if(!empty($this->data['nav_urls']['print']['href'])) { ?>
<li id="t-print"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['print']['href'])
?>" rel="alternate"<?php echo $this->skin->tooltipAndAccesskey('t-print') ?>><?php $this->msg('printableversion') ?></a></li><?php
}
*/
if(!empty($this->data['nav_urls']['permalink']['href'])) { ?>
<li id="t-permalink"><a href="<?php echo htmlspecialchars($this->data['nav_urls']['permalink']['href'])
?>"<?php echo $this->skin->tooltipAndAccesskey('t-permalink') ?>><?php $this->msg('permalink') ?></a></li><?php
} elseif ($this->data['nav_urls']['permalink']['href'] === '') { ?>
<li id="t-ispermalink"<?php echo $this->skin->tooltip('t-ispermalink') ?>><?php $this->msg('permalink') ?></li><?php
}
//wfRunHooks( 'BootstrapTemplateToolboxEnd', array( &$this ) );
Hooks::run( 'BootstrapTemplateToolboxEnd', array( &$this ) );
?>
</ul>
<!--
</div>
</div>
-->
<?php
}
/*************************************************************************************************/
function languageBox() {
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
<h5<?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
<li class="<?php echo htmlspecialchars($langlink['class'])?>"><?php
?><a href="<?php echo htmlspecialchars($langlink['href']) ?>"><?php echo $langlink['text'] ?></a></li>
<?php } ?>
</ul>
</div>
</div>
<?php
}
}
/*************************************************************************************************/
function customBox( $bar, $cont ) {
?>
<!--
<div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
<div class='pBody'>
-->
<?php if ( is_array( $cont ) ) { ?>
<ul class="nav nav-list">
<li class="nav-header"><?php $msg = wfMessage( $bar ); if ($msg->isDisabled()) echo htmlspecialchars($bar); else echo htmlspecialchars($msg->text()); ?></li>
<?php foreach($cont as $key => $val) { ?>
<li id="<?php echo Sanitizer::escapeId($val['id']) ?>"<?php
if ( $val['active'] ) { ?> class="active" <?php }
?>><a href="<?php echo htmlspecialchars($val['href']) ?>"<?php echo $this->skin->tooltipAndAccesskey($val['id']) ?>><?php echo htmlspecialchars($val['text']) ?></a></li>
<?php } ?>
</ul>
<?php } else {
# allow raw HTML block to be defined by extensions
print $cont;
}
?>
<!--
</div>
</div>
-->
<?php
}
} // end of class

View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
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 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.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -0,0 +1,67 @@
/*
** IE5.0 Fix Stylesheet
*/
#column-content {
margin: 0 !important;
float: none;
}
#column-content #content {
margin-top: 3em;
height: 1%;
}
#column-one {
position: absolute;
overflow: visible;
top: 0;
left: 0;
z-index: 3;
}
#footer {
margin: 0 0 0 13.6em;
}
/* IE 5 & 5.5 interpret keyword sizes one off */
body { font-size: xx-small; }
/*
** the edit tabs
*/
#p-cactions li {
float: left;
padding-top: 0;
padding-bottom: 0 !important;
height: 0.9em;
}
#p-cactions li a {
display: block;
padding-bottom: 0.045em;
}
#p-cactions li.selected a {
padding-bottom: 0.17em;
}
#p-cactions li a:hover {
padding-bottom: 0.17em;
}
/* 5.0 doesn't like the background icon for external links and user */
.link-external,
.external {
background: none;
padding: 0;
}
#p-personal ul { float: right }
#p-personal li { float: left }
li#pt-userpage,
li#pt-anonuserpage,
li#pt-login,
li#pt-logout {
background: none;
padding-left: none;
}
.visualClear {
width: 100%;
height: 0px;
padding:0;
margin: 0;
}
.firstHeading { margin-bottom: .3em; }
/*div{ border:1px solid Red !important;}*/

View File

@@ -0,0 +1,88 @@
/* IE5.5/win- only fixes */
#column-content {
float: none;
margin-left: 0;
height: 1%;
}
#column-content #content {
position: relative;
z-index: 5;
margin-left: 12.2em;
margin-top: 3em;
height: 1%;
}
#column-one {
position: absolute;
top: 0;
left: 0;
z-index: 4;
width: 100%;
}
#footer {
margin-left: 13.6em;
border-left: 1px solid #fabd23;
}
/*#bodyContent div,
#bodyContent pre { overflow: auto; }*/
#p-personal { padding-bottom: .1em; }
body { font-size: xx-small; }
/* WERELATE
#p-cactions {
width: 76% !important;
z-index: 3 !important;
float: none;
}
#p-cactions li {
padding-bottom: 0 !important;
border: none;
background-color: transparent;
cursor: default;
float: none !important;
}
#p-cactions li a {
display: inline-block !important;
vertical-align: top;
padding-bottom: 0;
border: solid #aaa;
border-width: 1px 1px 0;
}
#p-cactions li.selected a {
border-color: #fabd23;
padding-bottom: 0.17em;
}
#p-cactions li a:hover {
padding-bottom: 0.17em;
}
*/
#p-navigation a {
display: inline-block;
width: 100%;
}
.portlet {
overflow: hidden;
}
#bodyContent a.external {
background: url(external.png) center right no-repeat;
padding-right: 13px;
}
/* show the hand */
#p-logo a,
#p-logo a:hover {
cursor: pointer;
}
.visualClear {
width: 90%;
height: 1px;
padding: 0;
margin: 0;
}
#editform {
width: 100%;
}

View File

@@ -0,0 +1,125 @@
/* 6.0 - only fixes */
/* content area */
/* workaround for various ie float bugs */
div#column-content {
float: none;
margin-left: 0;
height: 1%;
}
div#column-content .mw-body {
margin-left: 12.2em;
margin-top: 3em;
height: 1%;
}
.rtl div#column-content .mw-body {
margin-right: 12.2em;
margin-left: 0;
}
div#column-one {
position: absolute;
top: 0;
left: 0;
z-index: 4;
}
.rtl div#column-one {
left: auto;
right: 0;
}
div#footer {
margin-left: 13.6em;
border-left: 1px solid #fabd23;
}
.rtl div#footer {
margin-left: 0;
margin-right: 13.6em;
border-left: none;
border-right: 1px solid #fabd23;
}
/* float/negative margin brokenness */
* html div#footer {
margin-top: 0;
}
* html div#column-content {
display: inline;
margin-bottom: 0;
}
/* the tabs */
#p-cactions {
z-index: 3;
}
#p-cactions li {
padding-bottom: 0 !important;
border: none;
background-color: transparent;
cursor: default;
float: none !important;
}
#p-cactions li a {
display: inline-block !important;
vertical-align: top;
padding-bottom: 0;
border: solid #aaa;
border-width: 1px 1px 0;
}
#p-cactions li.selected a {
border-color: #fabd23;
padding-bottom: 0.17em;
}
#p-cactions li a:hover {
padding-bottom: 0.17em;
}
#p-navigation a {
display: inline-block;
width: 100%;
}
#portal-personaltools {
padding-bottom: 0.1em;
}
.rtl a.feedlink {
background-position: right;
padding-right: 0;
padding-left: 16px;
}
/* show the hand */
#p-logo a,
#p-logo a:hover {
cursor: pointer;
}
div.visualClear {
width: 100%;
line-height: 0;
}
textarea {
width: 96%;
}
#catlinks,
div.tright,
div.tleft {
position: relative;
}
/* bug 12846 */
body.rtl #preftoc a, body.rtl #preftoc a:active {
float: left;
}

View File

@@ -0,0 +1,96 @@
/* 7.0 - only fixes */
/* content area */
/* workaround for various ie float bugs */
/* This bit is needed to make links clickable... WTF */
div#column-content .mw-body {
margin-left: 12.2em;
margin-top: 3em;
height: 1%;
}
.rtl div#column-content .mw-body {
margin-right: 12.2em;
margin-left: 0;
}
.rtl div#column-one {
/* For some reason it tries to inherit the padding-top into every div,
* and I can't figure out how to get it back off.
* Margin works correctly for this use, though.
*/
padding-top: 0;
margin-top: 160px;
}
/* These elements also have padding-left: 20px; in main.css, but in RTL mode this is flipped.
* That's good in normal browsers, but in IE7 it needs to not be flipped for some daft reason.
* Also clear the right margin (originally margin-left: 1em)
*/
li#pt-userpage, li#pt-anonuserpage, li#pt-login {
padding-left: 20px;
margin-right: 0;
}
.rtl a.feedlink {
background-position: right;
padding-right: 0;
padding-left: 16px;
}
/* the tabs */
#p-cactions {
z-index: 3;
}
#p-cactions li {
padding-bottom: 0 !important;
border: none;
background-color: transparent;
cursor: default;
float: none !important;
}
#p-cactions li a {
display: inline-block !important;
vertical-align: top;
padding-bottom: 0;
border: solid #aaa;
border-width: 1px 1px 0;
}
#p-cactions li.selected a {
border-color: #fabd23;
padding-bottom: 0.17em;
}
#p-cactions li a:hover {
padding-bottom: 0.17em;
}
#p-navigation a {
display: inline-block;
width: 100%;
}
#portal-personaltools {
padding-bottom: 0.1em;
}
textarea {
width: 96%;
}
/*
#catlinks,
div.tright,
div.tleft {
position: relative;
}
*/
div#footer li {
/* Work around bug with inline <li> tags with right margins and nowrap */
margin-right: 0;
}

View File

@@ -0,0 +1,18 @@
<footer id="contentinfo" class="body">
<hr />
<p style="text-align: center">
<span class="fa-stack fa-lg">
<i class="fa fa-square fa-stack-2x"></i>
<i class="fa fa-terminal fa-stack-1x fa-inverse"></i>
</span>
Made from the command line with vim by
<a href="http://charlesreid1.com">charlesreid1</a><br />
with help from <a href="http://d3js.org">D3.js</a>, <a href="http://angularjs.org">Angular.js</a>, and <a href="http://getpelican.com">Pelican</a>.
</p>
<script type="text/javascript" src="{{ SITEURL }}/theme/js/jquery-1.11.2.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/js/jquery_load_template-1.4.5.min.js"></script>
<script type="text/javascript" src="{{ SITEURL }}/theme/js/bootstrap-3.3.4.js"></script>
</footer><!-- /#contentinfo -->

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,90 @@
/* ==========================================================
* bootstrap-alert.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* ALERT CLASS DEFINITION
* ====================== */
var dismiss = '[data-dismiss="alert"]'
, Alert = function (el) {
$(el).on('click', dismiss, this.close)
}
Alert.prototype.close = function (e) {
var $this = $(this)
, selector = $this.attr('data-target')
, $parent
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
e && e.preventDefault()
$parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent())
$parent.trigger(e = $.Event('close'))
if (e.isDefaultPrevented()) return
$parent.removeClass('in')
function removeElement() {
$parent
.trigger('closed')
.remove()
}
$.support.transition && $parent.hasClass('fade') ?
$parent.on($.support.transition.end, removeElement) :
removeElement()
}
/* ALERT PLUGIN DEFINITION
* ======================= */
$.fn.alert = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('alert')
if (!data) $this.data('alert', (data = new Alert(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.alert.Constructor = Alert
/* ALERT DATA-API
* ============== */
$(function () {
$('body').on('click.alert.data-api', dismiss, Alert.prototype.close)
})
}(window.jQuery);

View File

@@ -0,0 +1,96 @@
/* ============================================================
* bootstrap-button.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* BUTTON PUBLIC CLASS DEFINITION
* ============================== */
var Button = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.button.defaults, options)
}
Button.prototype.setState = function (state) {
var d = 'disabled'
, $el = this.$element
, data = $el.data()
, val = $el.is('input') ? 'val' : 'html'
state = state + 'Text'
data.resetText || $el.data('resetText', $el[val]())
$el[val](data[state] || this.options[state])
// push to event loop to allow forms to submit
setTimeout(function () {
state == 'loadingText' ?
$el.addClass(d).attr(d, d) :
$el.removeClass(d).removeAttr(d)
}, 0)
}
Button.prototype.toggle = function () {
var $parent = this.$element.parent('[data-toggle="buttons-radio"]')
$parent && $parent
.find('.active')
.removeClass('active')
this.$element.toggleClass('active')
}
/* BUTTON PLUGIN DEFINITION
* ======================== */
$.fn.button = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('button')
, options = typeof option == 'object' && option
if (!data) $this.data('button', (data = new Button(this, options)))
if (option == 'toggle') data.toggle()
else if (option) data.setState(option)
})
}
$.fn.button.defaults = {
loadingText: 'loading...'
}
$.fn.button.Constructor = Button
/* BUTTON DATA-API
* =============== */
$(function () {
$('body').on('click.button.data-api', '[data-toggle^=button]', function ( e ) {
var $btn = $(e.target)
if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn')
$btn.button('toggle')
})
})
}(window.jQuery);

View File

@@ -0,0 +1,169 @@
/* ==========================================================
* bootstrap-carousel.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#carousel
* ==========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* CAROUSEL CLASS DEFINITION
* ========================= */
var Carousel = function (element, options) {
this.$element = $(element)
this.options = options
this.options.slide && this.slide(this.options.slide)
this.options.pause == 'hover' && this.$element
.on('mouseenter', $.proxy(this.pause, this))
.on('mouseleave', $.proxy(this.cycle, this))
}
Carousel.prototype = {
cycle: function (e) {
if (!e) this.paused = false
this.options.interval
&& !this.paused
&& (this.interval = setInterval($.proxy(this.next, this), this.options.interval))
return this
}
, to: function (pos) {
var $active = this.$element.find('.active')
, children = $active.parent().children()
, activePos = children.index($active)
, that = this
if (pos > (children.length - 1) || pos < 0) return
if (this.sliding) {
return this.$element.one('slid', function () {
that.to(pos)
})
}
if (activePos == pos) {
return this.pause().cycle()
}
return this.slide(pos > activePos ? 'next' : 'prev', $(children[pos]))
}
, pause: function (e) {
if (!e) this.paused = true
clearInterval(this.interval)
this.interval = null
return this
}
, next: function () {
if (this.sliding) return
return this.slide('next')
}
, prev: function () {
if (this.sliding) return
return this.slide('prev')
}
, slide: function (type, next) {
var $active = this.$element.find('.active')
, $next = next || $active[type]()
, isCycling = this.interval
, direction = type == 'next' ? 'left' : 'right'
, fallback = type == 'next' ? 'first' : 'last'
, that = this
, e = $.Event('slide')
this.sliding = true
isCycling && this.pause()
$next = $next.length ? $next : this.$element.find('.item')[fallback]()
if ($next.hasClass('active')) return
if ($.support.transition && this.$element.hasClass('slide')) {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$next.addClass(type)
$next[0].offsetWidth // force reflow
$active.addClass(direction)
$next.addClass(direction)
this.$element.one($.support.transition.end, function () {
$next.removeClass([type, direction].join(' ')).addClass('active')
$active.removeClass(['active', direction].join(' '))
that.sliding = false
setTimeout(function () { that.$element.trigger('slid') }, 0)
})
} else {
this.$element.trigger(e)
if (e.isDefaultPrevented()) return
$active.removeClass('active')
$next.addClass('active')
this.sliding = false
this.$element.trigger('slid')
}
isCycling && this.cycle()
return this
}
}
/* CAROUSEL PLUGIN DEFINITION
* ========================== */
$.fn.carousel = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('carousel')
, options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option)
if (!data) $this.data('carousel', (data = new Carousel(this, options)))
if (typeof option == 'number') data.to(option)
else if (typeof option == 'string' || (option = options.slide)) data[option]()
else if (options.interval) data.cycle()
})
}
$.fn.carousel.defaults = {
interval: 5000
, pause: 'hover'
}
$.fn.carousel.Constructor = Carousel
/* CAROUSEL DATA-API
* ================= */
$(function () {
$('body').on('click.carousel.data-api', '[data-slide]', function ( e ) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, options = !$target.data('modal') && $.extend({}, $target.data(), $this.data())
$target.carousel(options)
e.preventDefault()
})
})
}(window.jQuery);

View File

@@ -0,0 +1,157 @@
/* =============================================================
* bootstrap-collapse.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#collapse
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* COLLAPSE PUBLIC CLASS DEFINITION
* ================================ */
var Collapse = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.collapse.defaults, options)
if (this.options.parent) {
this.$parent = $(this.options.parent)
}
this.options.toggle && this.toggle()
}
Collapse.prototype = {
constructor: Collapse
, dimension: function () {
var hasWidth = this.$element.hasClass('width')
return hasWidth ? 'width' : 'height'
}
, show: function () {
var dimension
, scroll
, actives
, hasData
if (this.transitioning) return
dimension = this.dimension()
scroll = $.camelCase(['scroll', dimension].join('-'))
actives = this.$parent && this.$parent.find('> .accordion-group > .in')
if (actives && actives.length) {
hasData = actives.data('collapse')
if (hasData && hasData.transitioning) return
actives.collapse('hide')
hasData || actives.data('collapse', null)
}
this.$element[dimension](0)
this.transition('addClass', $.Event('show'), 'shown')
this.$element[dimension](this.$element[0][scroll])
}
, hide: function () {
var dimension
if (this.transitioning) return
dimension = this.dimension()
this.reset(this.$element[dimension]())
this.transition('removeClass', $.Event('hide'), 'hidden')
this.$element[dimension](0)
}
, reset: function (size) {
var dimension = this.dimension()
this.$element
.removeClass('collapse')
[dimension](size || 'auto')
[0].offsetWidth
this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
return this
}
, transition: function (method, startEvent, completeEvent) {
var that = this
, complete = function () {
if (startEvent.type == 'show') that.reset()
that.transitioning = 0
that.$element.trigger(completeEvent)
}
this.$element.trigger(startEvent)
if (startEvent.isDefaultPrevented()) return
this.transitioning = 1
this.$element[method]('in')
$.support.transition && this.$element.hasClass('collapse') ?
this.$element.one($.support.transition.end, complete) :
complete()
}
, toggle: function () {
this[this.$element.hasClass('in') ? 'hide' : 'show']()
}
}
/* COLLAPSIBLE PLUGIN DEFINITION
* ============================== */
$.fn.collapse = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('collapse')
, options = typeof option == 'object' && option
if (!data) $this.data('collapse', (data = new Collapse(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.collapse.defaults = {
toggle: true
}
$.fn.collapse.Constructor = Collapse
/* COLLAPSIBLE DATA-API
* ==================== */
$(function () {
$('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
var $this = $(this), href
, target = $this.attr('data-target')
|| e.preventDefault()
|| (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
, option = $(target).data('collapse') ? 'toggle' : $this.data()
$(target).collapse(option)
})
})
}(window.jQuery);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,100 @@
/* ============================================================
* bootstrap-dropdown.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
* ============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function ($) {
"use strict"; // jshint ;_;
/* DROPDOWN CLASS DEFINITION
* ========================= */
var toggle = '[data-toggle="dropdown"]'
, Dropdown = function (element) {
var $el = $(element).on('click.dropdown.data-api', this.toggle)
$('html').on('click.dropdown.data-api', function () {
$el.parent().removeClass('open')
})
}
Dropdown.prototype = {
constructor: Dropdown
, toggle: function (e) {
var $this = $(this)
, $parent
, selector
, isActive
if ($this.is('.disabled, :disabled')) return
selector = $this.attr('data-target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
$parent = $(selector)
$parent.length || ($parent = $this.parent())
isActive = $parent.hasClass('open')
clearMenus()
if (!isActive) $parent.toggleClass('open')
return false
}
}
function clearMenus() {
$(toggle).parent().removeClass('open')
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
$.fn.dropdown = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('dropdown')
if (!data) $this.data('dropdown', (data = new Dropdown(this)))
if (typeof option == 'string') data[option].call($this)
})
}
$.fn.dropdown.Constructor = Dropdown
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$(function () {
$('html').on('click.dropdown.data-api', clearMenus)
$('body')
.on('click.dropdown', '.dropdown form', function (e) { e.stopPropagation() })
.on('click.dropdown.data-api', toggle, Dropdown.prototype.toggle)
})
}(window.jQuery);

View File

@@ -0,0 +1,399 @@
/*
* Bootstrap Image Gallery 2.10
* https://github.com/blueimp/Bootstrap-Image-Gallery
*
* Copyright 2011, Sebastian Tschan
* https://blueimp.net
*
* Licensed under the MIT license:
* http://www.opensource.org/licenses/MIT
*/
/*jslint nomen: true, regexp: true */
/*global define, window, document, jQuery */
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
// Register as an anonymous AMD module:
define([
'jquery',
'load-image',
'bootstrap'
], factory);
} else {
// Browser globals:
factory(
window.jQuery,
window.loadImage
);
}
}(function ($, loadImage) {
'use strict';
// Bootstrap Image Gallery is an extension to the Modal dialog of Twitter's
// Bootstrap toolkit, to ease navigation between a set of gallery images.
// It features transition effects, fullscreen mode and slideshow functionality.
$.extend($.fn.modal.defaults, {
// Delegate to search gallery links from, can be anything that
// is accepted as parameter for $():
delegate: document,
// Selector for gallery links:
selector: null,
// The filter for the selected gallery links (e.g. set to ":odd" to
// filter out label and thumbnail linking twice to the same image):
filter: '*',
// The index of the first gallery image to show:
index: 0,
// The href of the first gallery image to show (overrides index):
href: null,
// The range of images around the current one to preload:
preloadRange: 2,
// Offset of image width to viewport width:
offsetWidth: 100,
// Offset of image height to viewport height:
offsetHeight: 200,
// Set to true to display images as canvas elements:
canvas: false,
// Shows the next image after the given time in ms (0 = disabled):
slideshow: 0,
// Defines the image division for previous/next clicks:
imageClickDivision: 0.5
});
var originalShow = $.fn.modal.Constructor.prototype.show,
originalHide = $.fn.modal.Constructor.prototype.hide;
$.extend($.fn.modal.Constructor.prototype, {
initLinks: function () {
var $this = this,
options = this.options,
selector = options.selector ||
'a[data-target=' + options.target + ']';
this.$links = $(options.delegate).find(selector)
.filter(options.filter).each(function (index) {
if ($this.getUrl(this) === options.href) {
options.index = index;
}
});
if (!this.$links[options.index]) {
options.index = 0;
}
},
getUrl: function (element) {
return element.href || $(element).data('href');
},
getDownloadUrl: function (element) {
return $(element).data('download');
},
startSlideShow: function () {
var $this = this;
if (this.options.slideshow) {
this._slideShow = window.setTimeout(
function () {
$this.next();
},
this.options.slideshow
);
}
},
stopSlideShow: function () {
window.clearTimeout(this._slideShow);
},
toggleSlideShow: function () {
var node = this.$element.find('.modal-slideshow');
if (this.options.slideshow) {
this.options.slideshow = 0;
this.stopSlideShow();
} else {
this.options.slideshow = node.data('slideshow') || 5000;
this.startSlideShow();
}
node.find('i').toggleClass('icon-play icon-pause');
},
preloadImages: function () {
var options = this.options,
range = options.index + options.preloadRange + 1,
link,
i;
for (i = options.index - options.preloadRange; i < range; i += 1) {
link = this.$links[i];
if (link && i !== options.index) {
$('<img>').prop('src', this.getUrl(link));
}
}
},
loadImage: function () {
var $this = this,
modal = this.$element,
index = this.options.index,
url = this.getUrl(this.$links[index]),
download = this.getDownloadUrl(this.$links[index]),
oldImg;
this.abortLoad();
this.stopSlideShow();
modal.trigger('beforeLoad');
// The timeout prevents displaying a loading status,
// if the image has already been loaded:
this._loadingTimeout = window.setTimeout(function () {
modal.addClass('modal-loading');
}, 100);
oldImg = modal.find('.modal-image').children().removeClass('in');
// The timeout allows transition effects to finish:
window.setTimeout(function () {
oldImg.remove();
}, 3000);
modal.find('.modal-title').text(this.$links[index].title);
modal.find('.modal-download').prop(
'href',
download || url
);
this._loadingImage = loadImage(
url,
function (img) {
$this.img = img;
window.clearTimeout($this._loadingTimeout);
modal.removeClass('modal-loading');
modal.trigger('load');
$this.showImage(img);
$this.startSlideShow();
},
this._loadImageOptions
);
this.preloadImages();
},
showImage: function (img) {
var modal = this.$element,
transition = $.support.transition && modal.hasClass('fade'),
method = transition ? modal.animate : modal.css,
modalImage = modal.find('.modal-image'),
clone,
forceReflow;
modalImage.css({
width: img.width,
height: img.height
});
modal.find('.modal-title').css({ width: Math.max(img.width, 380) });
if (transition) {
clone = modal.clone().hide().appendTo(document.body);
}
if ($(window).width() > 767) {
method.call(modal.stop(), {
'margin-top': -((clone || modal).outerHeight() / 2),
'margin-left': -((clone || modal).outerWidth() / 2)
});
} else {
modal.css({
top: ($(window).height() - (clone || modal).outerHeight()) / 2
});
}
if (clone) {
clone.remove();
}
modalImage.append(img);
forceReflow = img.offsetWidth;
modal.trigger('display');
if (transition) {
if (modal.is(':visible')) {
$(img).on(
$.support.transition.end,
function (e) {
// Make sure we don't respond to other transitions events
// in the container element, e.g. from button elements:
if (e.target === img) {
$(img).off($.support.transition.end);
modal.trigger('displayed');
}
}
).addClass('in');
} else {
$(img).addClass('in');
modal.one('shown', function () {
modal.trigger('displayed');
});
}
} else {
$(img).addClass('in');
modal.trigger('displayed');
}
},
abortLoad: function () {
if (this._loadingImage) {
this._loadingImage.onload = this._loadingImage.onerror = null;
}
window.clearTimeout(this._loadingTimeout);
},
prev: function () {
var options = this.options;
options.index -= 1;
if (options.index < 0) {
options.index = this.$links.length - 1;
}
this.loadImage();
},
next: function () {
var options = this.options;
options.index += 1;
if (options.index > this.$links.length - 1) {
options.index = 0;
}
this.loadImage();
},
keyHandler: function (e) {
switch (e.which) {
case 37: // left
case 38: // up
e.preventDefault();
this.prev();
break;
case 39: // right
case 40: // down
e.preventDefault();
this.next();
break;
}
},
wheelHandler: function (e) {
e.preventDefault();
e = e.originalEvent;
this._wheelCounter = this._wheelCounter || 0;
this._wheelCounter += (e.wheelDelta || e.detail || 0);
if ((e.wheelDelta && this._wheelCounter >= 120) ||
(!e.wheelDelta && this._wheelCounter < 0)) {
this.prev();
this._wheelCounter = 0;
} else if ((e.wheelDelta && this._wheelCounter <= -120) ||
(!e.wheelDelta && this._wheelCounter > 0)) {
this.next();
this._wheelCounter = 0;
}
},
initGalleryEvents: function () {
var $this = this,
modal = this.$element;
modal.find('.modal-image').on('click.modal-gallery', function (e) {
var modalImage = $(this);
if ($this.$links.length === 1) {
$this.hide();
} else {
if ((e.pageX - modalImage.offset().left) / modalImage.width() <
$this.options.imageClickDivision) {
$this.prev(e);
} else {
$this.next(e);
}
}
});
modal.find('.modal-prev').on('click.modal-gallery', function (e) {
$this.prev(e);
});
modal.find('.modal-next').on('click.modal-gallery', function (e) {
$this.next(e);
});
modal.find('.modal-slideshow').on('click.modal-gallery', function (e) {
$this.toggleSlideShow(e);
});
$(document)
.on('keydown.modal-gallery', function (e) {
$this.keyHandler(e);
})
.on(
'mousewheel.modal-gallery, DOMMouseScroll.modal-gallery',
function (e) {
$this.wheelHandler(e);
}
);
},
destroyGalleryEvents: function () {
var modal = this.$element;
this.abortLoad();
this.stopSlideShow();
modal.find('.modal-image, .modal-prev, .modal-next, .modal-slideshow')
.off('click.modal-gallery');
$(document)
.off('keydown.modal-gallery')
.off('mousewheel.modal-gallery, DOMMouseScroll.modal-gallery');
},
show: function () {
if (!this.isShown && this.$element.hasClass('modal-gallery')) {
var modal = this.$element,
options = this.options,
windowWidth = $(window).width(),
windowHeight = $(window).height();
if (modal.hasClass('modal-fullscreen')) {
this._loadImageOptions = {
maxWidth: windowWidth,
maxHeight: windowHeight,
canvas: options.canvas
};
if (modal.hasClass('modal-fullscreen-stretch')) {
this._loadImageOptions.minWidth = windowWidth;
this._loadImageOptions.minHeight = windowHeight;
}
} else {
this._loadImageOptions = {
maxWidth: windowWidth - options.offsetWidth,
maxHeight: windowHeight - options.offsetHeight,
canvas: options.canvas
};
}
if (windowWidth > 767) {
modal.css({
'margin-top': -(modal.outerHeight() / 2),
'margin-left': -(modal.outerWidth() / 2)
});
} else {
modal.css({
top: ($(window).height() - modal.outerHeight()) / 2
});
}
this.initGalleryEvents();
this.initLinks();
if (this.$links.length) {
modal.find('.modal-slideshow, .modal-prev, .modal-next')
.toggle(this.$links.length !== 1);
modal.toggleClass(
'modal-single',
this.$links.length === 1
);
this.loadImage();
}
}
originalShow.apply(this, arguments);
},
hide: function () {
if (this.isShown && this.$element.hasClass('modal-gallery')) {
this.options.delegate = document;
this.options.href = null;
this.destroyGalleryEvents();
}
originalHide.apply(this, arguments);
}
});
$(function () {
$(document.body).on(
'click.modal-gallery.data-api',
'[data-toggle="modal-gallery"]',
function (e) {
var $this = $(this),
options = $this.data(),
modal = $(options.target),
data = modal.data('modal'),
link;
if (!data) {
options = $.extend(modal.data(), options);
}
if (!options.selector) {
options.selector = 'a[data-gallery=gallery]';
}
link = $(e.target).closest(options.selector);
if (link.length && modal.length) {
e.preventDefault();
options.href = link.prop('href') || link.data('href');
options.delegate = link[0] !== this ? this : document;
if (data) {
$.extend(data.options, options);
}
modal.modal(options);
}
}
);
});
}));

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,218 @@
/* =========================================================
* bootstrap-modal.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#modals
* =========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================= */
!function ($) {
"use strict"; // jshint ;_;
/* MODAL CLASS DEFINITION
* ====================== */
var Modal = function (content, options) {
this.options = options
this.$element = $(content)
.delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this))
}
Modal.prototype = {
constructor: Modal
, toggle: function () {
return this[!this.isShown ? 'show' : 'hide']()
}
, show: function () {
var that = this
, e = $.Event('show')
this.$element.trigger(e)
if (this.isShown || e.isDefaultPrevented()) return
$('body').addClass('modal-open')
this.isShown = true
escape.call(this)
backdrop.call(this, function () {
var transition = $.support.transition && that.$element.hasClass('fade')
if (!that.$element.parent().length) {
that.$element.appendTo(document.body) //don't move modals dom position
}
that.$element
.show()
if (transition) {
that.$element[0].offsetWidth // force reflow
}
that.$element.addClass('in')
transition ?
that.$element.one($.support.transition.end, function () { that.$element.trigger('shown') }) :
that.$element.trigger('shown')
})
}
, hide: function (e) {
e && e.preventDefault()
var that = this
e = $.Event('hide')
this.$element.trigger(e)
if (!this.isShown || e.isDefaultPrevented()) return
this.isShown = false
$('body').removeClass('modal-open')
escape.call(this)
this.$element.removeClass('in')
$.support.transition && this.$element.hasClass('fade') ?
hideWithTransition.call(this) :
hideModal.call(this)
}
}
/* MODAL PRIVATE METHODS
* ===================== */
function hideWithTransition() {
var that = this
, timeout = setTimeout(function () {
that.$element.off($.support.transition.end)
hideModal.call(that)
}, 500)
this.$element.one($.support.transition.end, function () {
clearTimeout(timeout)
hideModal.call(that)
})
}
function hideModal(that) {
this.$element
.hide()
.trigger('hidden')
backdrop.call(this)
}
function backdrop(callback) {
var that = this
, animate = this.$element.hasClass('fade') ? 'fade' : ''
if (this.isShown && this.options.backdrop) {
var doAnimate = $.support.transition && animate
this.$backdrop = $('<div class="modal-backdrop ' + animate + '" />')
.appendTo(document.body)
if (this.options.backdrop != 'static') {
this.$backdrop.click($.proxy(this.hide, this))
}
if (doAnimate) this.$backdrop[0].offsetWidth // force reflow
this.$backdrop.addClass('in')
doAnimate ?
this.$backdrop.one($.support.transition.end, callback) :
callback()
} else if (!this.isShown && this.$backdrop) {
this.$backdrop.removeClass('in')
$.support.transition && this.$element.hasClass('fade')?
this.$backdrop.one($.support.transition.end, $.proxy(removeBackdrop, this)) :
removeBackdrop.call(this)
} else if (callback) {
callback()
}
}
function removeBackdrop() {
this.$backdrop.remove()
this.$backdrop = null
}
function escape() {
var that = this
if (this.isShown && this.options.keyboard) {
$(document).on('keyup.dismiss.modal', function ( e ) {
e.which == 27 && that.hide()
})
} else if (!this.isShown) {
$(document).off('keyup.dismiss.modal')
}
}
/* MODAL PLUGIN DEFINITION
* ======================= */
$.fn.modal = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('modal')
, options = $.extend({}, $.fn.modal.defaults, $this.data(), typeof option == 'object' && option)
if (!data) $this.data('modal', (data = new Modal(this, options)))
if (typeof option == 'string') data[option]()
else if (options.show) data.show()
})
}
$.fn.modal.defaults = {
backdrop: true
, keyboard: true
, show: true
}
$.fn.modal.Constructor = Modal
/* MODAL DATA-API
* ============== */
$(function () {
$('body').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
var $this = $(this), href
, $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
, option = $target.data('modal') ? 'toggle' : $.extend({}, $target.data(), $this.data())
e.preventDefault()
$target.modal(option)
})
})
}(window.jQuery);

View File

@@ -0,0 +1,98 @@
/* ===========================================================
* bootstrap-popover.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#popovers
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* =========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
var Popover = function ( element, options ) {
this.init('popover', element, options)
}
/* NOTE: POPOVER EXTENDS BOOTSTRAP-TOOLTIP.js
========================================== */
Popover.prototype = $.extend({}, $.fn.tooltip.Constructor.prototype, {
constructor: Popover
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
, content = this.getContent()
$tip.find('.popover-title')[this.isHTML(title) ? 'html' : 'text'](title)
$tip.find('.popover-content > *')[this.isHTML(content) ? 'html' : 'text'](content)
$tip.removeClass('fade top bottom left right in')
}
, hasContent: function () {
return this.getTitle() || this.getContent()
}
, getContent: function () {
var content
, $e = this.$element
, o = this.options
content = $e.attr('data-content')
|| (typeof o.content == 'function' ? o.content.call($e[0]) : o.content)
return content
}
, tip: function () {
if (!this.$tip) {
this.$tip = $(this.options.template)
}
return this.$tip
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
$.fn.popover = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('popover')
, options = typeof option == 'object' && option
if (!data) $this.data('popover', (data = new Popover(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.popover.Constructor = Popover
$.fn.popover.defaults = $.extend({} , $.fn.tooltip.defaults, {
placement: 'right'
, content: ''
, template: '<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'
})
}(window.jQuery);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,151 @@
/* =============================================================
* bootstrap-scrollspy.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
function ScrollSpy( element, options) {
var process = $.proxy(this.process, this)
, $element = $(element).is('body') ? $(window) : $(element)
, href
this.options = $.extend({}, $.fn.scrollspy.defaults, options)
this.$scrollElement = $element.on('scroll.scroll.data-api', process)
this.selector = (this.options.target
|| ((href = $(element).attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7
|| '') + ' .nav li > a'
this.$body = $('body')
this.refresh()
this.process()
}
ScrollSpy.prototype = {
constructor: ScrollSpy
, refresh: function () {
var self = this
, $targets
this.offsets = $([])
this.targets = $([])
$targets = this.$body
.find(this.selector)
.map(function () {
var $el = $(this)
, href = $el.data('target') || $el.attr('href')
, $href = /^#\w/.test(href) && $(href)
return ( $href
&& href.length
&& [[ $href.position().top, href ]] ) || null
})
.sort(function (a, b) { return a[0] - b[0] })
.each(function () {
self.offsets.push(this[0])
self.targets.push(this[1])
})
}
, process: function () {
var scrollTop = this.$scrollElement.scrollTop() + this.options.offset
, scrollHeight = this.$scrollElement[0].scrollHeight || this.$body[0].scrollHeight
, maxScroll = scrollHeight - this.$scrollElement.height()
, offsets = this.offsets
, targets = this.targets
, activeTarget = this.activeTarget
, i
if (scrollTop >= maxScroll) {
return activeTarget != (i = targets.last()[0])
&& this.activate ( i )
}
for (i = offsets.length; i--;) {
activeTarget != targets[i]
&& scrollTop >= offsets[i]
&& (!offsets[i + 1] || scrollTop <= offsets[i + 1])
&& this.activate( targets[i] )
}
}
, activate: function (target) {
var active
, selector
this.activeTarget = target
$(this.selector)
.parent('.active')
.removeClass('active')
selector = this.selector
+ '[data-target="' + target + '"],'
+ this.selector + '[href="' + target + '"]'
active = $(selector)
.parent('li')
.addClass('active')
if (active.parent('.dropdown-menu')) {
active = active.closest('li.dropdown').addClass('active')
}
active.trigger('activate')
}
}
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
$.fn.scrollspy = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('scrollspy')
, options = typeof option == 'object' && option
if (!data) $this.data('scrollspy', (data = new ScrollSpy(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.scrollspy.Constructor = ScrollSpy
$.fn.scrollspy.defaults = {
offset: 10
}
/* SCROLLSPY DATA-API
* ================== */
$(function () {
$('[data-spy="scroll"]').each(function () {
var $spy = $(this)
$spy.scrollspy($spy.data())
})
})
}(window.jQuery);

View File

@@ -0,0 +1,135 @@
/* ========================================================
* bootstrap-tab.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ======================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
var Tab = function ( element ) {
this.element = $(element)
}
Tab.prototype = {
constructor: Tab
, show: function () {
var $this = this.element
, $ul = $this.closest('ul:not(.dropdown-menu)')
, selector = $this.attr('data-target')
, previous
, $target
, e
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}
if ( $this.parent('li').hasClass('active') ) return
previous = $ul.find('.active a').last()[0]
e = $.Event('show', {
relatedTarget: previous
})
$this.trigger(e)
if (e.isDefaultPrevented()) return
$target = $(selector)
this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
type: 'shown'
, relatedTarget: previous
})
})
}
, activate: function ( element, container, callback) {
var $active = container.find('> .active')
, transition = callback
&& $.support.transition
&& $active.hasClass('fade')
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
element.addClass('active')
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if ( element.parent('.dropdown-menu') ) {
element.closest('li.dropdown').addClass('active')
}
callback && callback()
}
transition ?
$active.one($.support.transition.end, next) :
next()
$active.removeClass('in')
}
}
/* TAB PLUGIN DEFINITION
* ===================== */
$.fn.tab = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tab')
if (!data) $this.data('tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tab.Constructor = Tab
/* TAB DATA-API
* ============ */
$(function () {
$('body').on('click.tab.data-api', '[data-toggle="tab"], [data-toggle="pill"]', function (e) {
e.preventDefault()
$(this).tab('show')
})
})
}(window.jQuery);

View File

@@ -0,0 +1,275 @@
/* ===========================================================
* bootstrap-tooltip.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame
* ===========================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
"use strict"; // jshint ;_;
/* TOOLTIP PUBLIC CLASS DEFINITION
* =============================== */
var Tooltip = function (element, options) {
this.init('tooltip', element, options)
}
Tooltip.prototype = {
constructor: Tooltip
, init: function (type, element, options) {
var eventIn
, eventOut
this.type = type
this.$element = $(element)
this.options = this.getOptions(options)
this.enabled = true
if (this.options.trigger != 'manual') {
eventIn = this.options.trigger == 'hover' ? 'mouseenter' : 'focus'
eventOut = this.options.trigger == 'hover' ? 'mouseleave' : 'blur'
this.$element.on(eventIn, this.options.selector, $.proxy(this.enter, this))
this.$element.on(eventOut, this.options.selector, $.proxy(this.leave, this))
}
this.options.selector ?
(this._options = $.extend({}, this.options, { trigger: 'manual', selector: '' })) :
this.fixTitle()
}
, getOptions: function (options) {
options = $.extend({}, $.fn[this.type].defaults, options, this.$element.data())
if (options.delay && typeof options.delay == 'number') {
options.delay = {
show: options.delay
, hide: options.delay
}
}
return options
}
, enter: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (!self.options.delay || !self.options.delay.show) return self.show()
clearTimeout(this.timeout)
self.hoverState = 'in'
this.timeout = setTimeout(function() {
if (self.hoverState == 'in') self.show()
}, self.options.delay.show)
}
, leave: function (e) {
var self = $(e.currentTarget)[this.type](this._options).data(this.type)
if (this.timeout) clearTimeout(this.timeout)
if (!self.options.delay || !self.options.delay.hide) return self.hide()
self.hoverState = 'out'
this.timeout = setTimeout(function() {
if (self.hoverState == 'out') self.hide()
}, self.options.delay.hide)
}
, show: function () {
var $tip
, inside
, pos
, actualWidth
, actualHeight
, placement
, tp
if (this.hasContent() && this.enabled) {
$tip = this.tip()
this.setContent()
if (this.options.animation) {
$tip.addClass('fade')
}
placement = typeof this.options.placement == 'function' ?
this.options.placement.call(this, $tip[0], this.$element[0]) :
this.options.placement
inside = /in/.test(placement)
$tip
.remove()
.css({ top: 0, left: 0, display: 'block' })
.appendTo(inside ? this.$element : document.body)
pos = this.getPosition(inside)
actualWidth = $tip[0].offsetWidth
actualHeight = $tip[0].offsetHeight
switch (inside ? placement.split(' ')[1] : placement) {
case 'bottom':
tp = {top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'top':
tp = {top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}
break
case 'left':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}
break
case 'right':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}
break
}
$tip
.css(tp)
.addClass(placement)
.addClass('in')
}
}
, isHTML: function(text) {
// html string detection logic adapted from jQuery
return typeof text != 'string'
|| ( text.charAt(0) === "<"
&& text.charAt( text.length - 1 ) === ">"
&& text.length >= 3
) || /^(?:[^<]*<[\w\W]+>[^>]*$)/.exec(text)
}
, setContent: function () {
var $tip = this.tip()
, title = this.getTitle()
$tip.find('.tooltip-inner')[this.isHTML(title) ? 'html' : 'text'](title)
$tip.removeClass('fade in top bottom left right')
}
, hide: function () {
var that = this
, $tip = this.tip()
$tip.removeClass('in')
function removeWithAnimation() {
var timeout = setTimeout(function () {
$tip.off($.support.transition.end).remove()
}, 500)
$tip.one($.support.transition.end, function () {
clearTimeout(timeout)
$tip.remove()
})
}
$.support.transition && this.$tip.hasClass('fade') ?
removeWithAnimation() :
$tip.remove()
}
, fixTitle: function () {
var $e = this.$element
if ($e.attr('title') || typeof($e.attr('data-original-title')) != 'string') {
$e.attr('data-original-title', $e.attr('title') || '').removeAttr('title')
}
}
, hasContent: function () {
return this.getTitle()
}
, getPosition: function (inside) {
return $.extend({}, (inside ? {top: 0, left: 0} : this.$element.offset()), {
width: this.$element[0].offsetWidth
, height: this.$element[0].offsetHeight
})
}
, getTitle: function () {
var title
, $e = this.$element
, o = this.options
title = $e.attr('data-original-title')
|| (typeof o.title == 'function' ? o.title.call($e[0]) : o.title)
return title
}
, tip: function () {
return this.$tip = this.$tip || $(this.options.template)
}
, validate: function () {
if (!this.$element[0].parentNode) {
this.hide()
this.$element = null
this.options = null
}
}
, enable: function () {
this.enabled = true
}
, disable: function () {
this.enabled = false
}
, toggleEnabled: function () {
this.enabled = !this.enabled
}
, toggle: function () {
this[this.tip().hasClass('in') ? 'hide' : 'show']()
}
}
/* TOOLTIP PLUGIN DEFINITION
* ========================= */
$.fn.tooltip = function ( option ) {
return this.each(function () {
var $this = $(this)
, data = $this.data('tooltip')
, options = typeof option == 'object' && option
if (!data) $this.data('tooltip', (data = new Tooltip(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.tooltip.Constructor = Tooltip
$.fn.tooltip.defaults = {
animation: true
, placement: 'top'
, selector: false
, template: '<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'
, trigger: 'hover'
, title: ''
, delay: 0
}
}(window.jQuery);

View File

@@ -0,0 +1,61 @@
/* ===================================================
* bootstrap-transition.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#transitions
* ===================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ========================================================== */
!function ($) {
$(function () {
"use strict"; // jshint ;_;
/* CSS TRANSITION SUPPORT (http://www.modernizr.com/)
* ======================================================= */
$.support.transition = (function () {
var transitionEnd = (function () {
var el = document.createElement('bootstrap')
, transEndEventNames = {
'WebkitTransition' : 'webkitTransitionEnd'
, 'MozTransition' : 'transitionend'
, 'OTransition' : 'oTransitionEnd'
, 'msTransition' : 'MSTransitionEnd'
, 'transition' : 'transitionend'
}
, name
for (name in transEndEventNames){
if (el.style[name] !== undefined) {
return transEndEventNames[name]
}
}
}())
return transitionEnd && {
end: transitionEnd
}
})()
})
}(window.jQuery);

View File

@@ -0,0 +1,285 @@
/* =============================================================
* bootstrap-typeahead.js v2.0.4
* http://twitter.github.com/bootstrap/javascript.html#typeahead
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!function($){
"use strict"; // jshint ;_;
/* TYPEAHEAD PUBLIC CLASS DEFINITION
* ================================= */
var Typeahead = function (element, options) {
this.$element = $(element)
this.options = $.extend({}, $.fn.typeahead.defaults, options)
this.matcher = this.options.matcher || this.matcher
this.sorter = this.options.sorter || this.sorter
this.highlighter = this.options.highlighter || this.highlighter
this.updater = this.options.updater || this.updater
this.$menu = $(this.options.menu).appendTo('body')
this.source = this.options.source
this.shown = false
this.listen()
}
Typeahead.prototype = {
constructor: Typeahead
, select: function () {
var val = this.$menu.find('.active').attr('data-value')
this.$element
.val(this.updater(val))
.change()
return this.hide()
}
, updater: function (item) {
return item
}
, show: function () {
var pos = $.extend({}, this.$element.offset(), {
height: this.$element[0].offsetHeight
})
this.$menu.css({
top: pos.top + pos.height
, left: pos.left
})
this.$menu.show()
this.shown = true
return this
}
, hide: function () {
this.$menu.hide()
this.shown = false
return this
}
, lookup: function (event) {
var that = this
, items
, q
this.query = this.$element.val()
if (!this.query) {
return this.shown ? this.hide() : this
}
items = $.grep(this.source, function (item) {
return that.matcher(item)
})
items = this.sorter(items)
if (!items.length) {
return this.shown ? this.hide() : this
}
return this.render(items.slice(0, this.options.items)).show()
}
, matcher: function (item) {
return ~item.toLowerCase().indexOf(this.query.toLowerCase())
}
, sorter: function (items) {
var beginswith = []
, caseSensitive = []
, caseInsensitive = []
, item
while (item = items.shift()) {
if (!item.toLowerCase().indexOf(this.query.toLowerCase())) beginswith.push(item)
else if (~item.indexOf(this.query)) caseSensitive.push(item)
else caseInsensitive.push(item)
}
return beginswith.concat(caseSensitive, caseInsensitive)
}
, highlighter: function (item) {
var query = this.query.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, '\\$&')
return item.replace(new RegExp('(' + query + ')', 'ig'), function ($1, match) {
return '<strong>' + match + '</strong>'
})
}
, render: function (items) {
var that = this
items = $(items).map(function (i, item) {
i = $(that.options.item).attr('data-value', item)
i.find('a').html(that.highlighter(item))
return i[0]
})
items.first().addClass('active')
this.$menu.html(items)
return this
}
, next: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, next = active.next()
if (!next.length) {
next = $(this.$menu.find('li')[0])
}
next.addClass('active')
}
, prev: function (event) {
var active = this.$menu.find('.active').removeClass('active')
, prev = active.prev()
if (!prev.length) {
prev = this.$menu.find('li').last()
}
prev.addClass('active')
}
, listen: function () {
this.$element
.on('blur', $.proxy(this.blur, this))
.on('keypress', $.proxy(this.keypress, this))
.on('keyup', $.proxy(this.keyup, this))
if ($.browser.webkit || $.browser.msie) {
this.$element.on('keydown', $.proxy(this.keypress, this))
}
this.$menu
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
}
, keyup: function (e) {
switch(e.keyCode) {
case 40: // down arrow
case 38: // up arrow
break
case 9: // tab
case 13: // enter
if (!this.shown) return
this.select()
break
case 27: // escape
if (!this.shown) return
this.hide()
break
default:
this.lookup()
}
e.stopPropagation()
e.preventDefault()
}
, keypress: function (e) {
if (!this.shown) return
switch(e.keyCode) {
case 9: // tab
case 13: // enter
case 27: // escape
e.preventDefault()
break
case 38: // up arrow
if (e.type != 'keydown') break
e.preventDefault()
this.prev()
break
case 40: // down arrow
if (e.type != 'keydown') break
e.preventDefault()
this.next()
break
}
e.stopPropagation()
}
, blur: function (e) {
var that = this
setTimeout(function () { that.hide() }, 150)
}
, click: function (e) {
e.stopPropagation()
e.preventDefault()
this.select()
}
, mouseenter: function (e) {
this.$menu.find('.active').removeClass('active')
$(e.currentTarget).addClass('active')
}
}
/* TYPEAHEAD PLUGIN DEFINITION
* =========================== */
$.fn.typeahead = function (option) {
return this.each(function () {
var $this = $(this)
, data = $this.data('typeahead')
, options = typeof option == 'object' && option
if (!data) $this.data('typeahead', (data = new Typeahead(this, options)))
if (typeof option == 'string') data[option]()
})
}
$.fn.typeahead.defaults = {
source: []
, items: 8
, menu: '<ul class="typeahead dropdown-menu"></ul>'
, item: '<li><a href="#"></a></li>'
}
$.fn.typeahead.Constructor = Typeahead
/* TYPEAHEAD DATA-API
* ================== */
$(function () {
$('body').on('focus.typeahead.data-api', '[data-provide="typeahead"]', function (e) {
var $this = $(this)
if ($this.data('typeahead')) return
e.preventDefault()
$this.typeahead($this.data())
})
})
}(window.jQuery);

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 B

View File

@@ -0,0 +1,490 @@
/* BonBon Buttons 1.1 by simurai.com
1.1 Added unprefixed attributes, :focus style, <button> support
1.0 Released
Usage:
Default button: <a href="" class="button">Label</a>
More fancy with icon: <a href="" class="button orange glossy" data-icon="★">Label</a>
Following additional class names are supported:
Color: orange, pink, blue, green, transparent
Font: serif
Material: glossy, glass
Size: xs, xl
Shape: round, oval, brackets, skew, back, knife, shield, drop, morph
Icon only: icon
Disabled: disabled
*/
@import url(http://fonts.googleapis.com/css?family=Droid+Sans:bold+Lobster);
@import url(http://fonts.googleapis.com/css?family=Lobster);
/* -------------- THE button -------------- */
.button {
/* text */
text-decoration: none;
font: 24px/1em 'Droid Sans', sans-serif;
font-weight: bold;
text-shadow: rgba(255,255,255,.5) 0 1px 0;
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
/* layout */
/*
padding: .5em .6em .4em .6em;
margin: .5em;
*/
padding: .4em .4em .4em .4em;
margin: .3em;
display: inline-block;
position: relative;
-webkit-border-radius: 8px;
-moz-border-radius: 8px;
border-radius: 8px;
/* effects */
border-top: 1px solid rgba(255,255,255,0.8);
border-bottom: 1px solid rgba(0,0,0,0.1);
background-image: -webkit-gradient(radial, 50% 0, 100, 50% 0, 0, from( rgba(255,255,255,0) ), to( rgba(255,255,255,0.7) )), url(noise.png);
background-image: -moz-radial-gradient(top, ellipse cover, rgba(255,255,255,0.7) 0%, rgba(255,255,255,0) 100%), url(noise.png);
background-image: gradient(radial, 50% 0, 100, 50% 0, 0, from( rgba(255,255,255,0) ), to( rgba(255,255,255,0.7) )), url(noise.png);
-webkit-transition: background .4s ease-in-out;
-moz-transition: background .4s ease-in-out;
transition: background .4s ease-in-out;
/* color */
color: hsl(0, 0%, 40%) !important;
background-color: hsl(0, 0%, 75%);
-webkit-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(0, 0%, 60%) 0 .1em 3px, hsl(0, 0%, 45%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(0, 0%, 60%) 0 .1em 3px, hsl(0, 0%, 45%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(0, 0%, 60%) 0 .1em 3px, hsl(0, 0%, 45%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
}
/* -------------- button (tag) -------------- */
button.button {
border-left: none;
border-right: none;
}
button.button:hover {
cursor: pointer;
}
/* -------------- icon -------------- */
.button:before {
font: 1.2em/0 sans-serif;
content: attr(data-icon); /* gets the icon value from the custom data attribute and puts it infront of the button label */
margin-right: 0.4em;
}
/* icon only */
.icon {
font-weight: normal;
font-style: normal;
text-indent: -999em;
}
.icon:before {
margin-right: 0;
display: block;
height: 0;
text-indent: 0px;
line-height: .75em;
}
/* -------------- colours -------------- */
.button.orange {
color: hsl(39, 100%, 30%) !important;
background-color: hsl(39, 100%, 50%);
-webkit-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(39, 100%, 40%) 0 .1em 3px, hsl(39, 100%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(39, 100%, 40%) 0 .1em 3px, hsl(39, 100%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(39, 100%, 40%) 0 .1em 3px, hsl(39, 100%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
}
.button.orange:hover { background-color: hsl(39, 100%, 65%); }
.button.blue {
color: hsl(208, 50%, 40%) !important;
background-color: hsl(208, 100%, 75%);
-webkit-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(208, 50%, 55%) 0 .1em 3px, hsl(208, 50%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(208, 50%, 55%) 0 .1em 3px, hsl(208, 50%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(208, 50%, 55%) 0 .1em 3px, hsl(208, 50%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
}
.button.blue:hover { background-color: hsl(208, 100%, 83%); }
.button.green {
color: hsl(88, 70%, 30%) !important;
background-color: hsl(88, 70%, 60%);
-webkit-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(88, 70%, 40%) 0 .1em 3px, hsl(88, 70%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(88, 70%, 40%) 0 .1em 3px, hsl(88, 70%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(88, 70%, 40%) 0 .1em 3px, hsl(88, 70%, 30%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
}
.button.green:hover { background-color: hsl(88, 70%, 75%); }
.button.pink {
color: hsl(340, 100%, 30%) !important;
background-color: hsl(340, 100%, 75%);
-webkit-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(340, 70%, 50%) 0 .1em 3px, hsl(340, 80%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(340, 70%, 50%) 0 .1em 3px, hsl(340, 80%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.15) 0 -0.1em .3em, /* inner shadow */
hsl(340, 70%, 50%) 0 .1em 3px, hsl(340, 80%, 40%) 0 .3em 1px, /* color border */
rgba(0,0,0,0.2) 0 .5em 5px; /* drop shadow */
}
.button.pink:hover { background-color: hsl(340, 100%, 83%); }
.button.transparent {
color: rgba(0,0,0,0.5) !important;
}
.button.transparent, .button.transparent:hover, .button.transparent:active {
background-color: transparent;
background-image: none;
}
.button.transparent:hover {
opacity: .9;
}
/* -------------- States -------------- */
.button:hover {
background-color: hsl(0, 0%, 83%);
}
.button:active {
background-image: -webkit-gradient(radial, 50% 0, 100, 50% 0, 0, from( rgba(255,255,255,0) ), to( rgba(255,255,255,0) )), url(noise.png);
background-image: -moz-gradient(radial, 50% 0, 100, 50% 0, 0, from( rgba(255,255,255,0) ), to( rgba(255,255,255,0) )), url(noise.png);
background-image: gradient(radial, 50% 0, 100, 50% 0, 0, from( rgba(255,255,255,0) ), to( rgba(255,255,255,0) )), url(noise.png);
-webkit-box-shadow: inset rgba(255,255,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.2) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.4) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
-moz-box-shadow: inset rgba(255,255,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.2) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.4) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
box-shadow: inset rgba(255,255,255,0.6) 0 0.3em .3em, inset rgba(0,0,0,0.2) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.4) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
-webkit-transform: translateY(.2em);
-moz-transform: translateY(.2em);
transform: translateY(.2em);
}
.button:focus {
outline: none;
color: rgba(254,255,255,0.9) !important;
text-shadow: rgba(0,0,0,0.2) 0 1px 2px;
}
.button[disabled], .button[disabled]:hover, .button.disabled, .button.disabled:hover {
opacity: .5;
cursor: default;
color: rgba(0,0,0,0.2) !important;
text-shadow: none !important;
background-color: rgba(0,0,0,0.05);
background-image: none;
border-top: none;
-webkit-box-shadow: inset rgba(255,254,255,0.4) 0 0.3em .3em, inset rgba(0,0,0,0.1) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.3) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
-moz-box-shadow: inset rgba(255,254,255,0.4) 0 0.3em .3em, inset rgba(0,0,0,0.1) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.3) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
box-shadow: inset rgba(255,254,255,0.4) 0 0.3em .3em, inset rgba(0,0,0,0.1) 0 -0.1em .3em, /* inner shadow */
rgba(0,0,0,0.3) 0 .1em 1px, /* border */
rgba(0,0,0,0.2) 0 .2em 6px; /* drop shadow */
-webkit-transform: translateY(5px);
-moz-transform: translateY(5px);
transform: translateY(5px);
}
/* -------------- Fonts -------------- */
.serif {
font-family: 'Lobster', serif;
font-weight: normal;
}
/* -------------- Sizes -------------- */
.xs { font-size: 16px; }
.xl { font-size: 32px; }
/* -------------- Materials -------------- */
.button.glossy:after, .button.glass:after {
content: "";
position: absolute;
width: 90%;
height: 60%;
top: 0;
left: 5%;
-webkit-border-radius: .5em .5em 1em 1em / .5em .5em 2em 2em;
-moz-border-radius: .5em .5em 1em 1em / .5em .5em 2em 2em;
border-radius: .5em .5em 1em 1em / .5em .5em 2em 2em;
background-image: -webkit-gradient(linear, 0% 0, 100% 0, from( rgba(255,255,255,.55) ), to( rgba(255,255,255,.5) ),
color-stop(.5, rgba(255,255,255,0)), color-stop(.8, rgba(255,255,255,0)) );
background-image: -moz-linear-gradient(left, rgba(255,255,255,.55), rgba(255,255,255,0) 50%, rgba(255,255,255,0) 80%, rgba(255,255,255,.5) );
background-image: gradient(linear, 0% 0, 100% 0, from( rgba(255,255,255,.55) ), to( rgba(255,255,255,.5) ),
color-stop(.5, rgba(255,255,255,0)), color-stop(.8, rgba(255,255,255,0)) );
}
.button.glossy:active:after,
.button.glass:active:after,
.button.disabled:after,
.button[disabled]:after
{ opacity: .6; }
.button.icon.glossy:after,
.button.icon.glass:after { height: 75% ; }
/* -------------- Glass + Transparent -------------- */
.button.glass {
text-shadow: rgba(255,255,255,.5) 0 -1px 0, rgba(0,0,0,0.18) 0 .18em .15em;
}
.button.glass:active {
text-shadow: rgba(255,255,255,.3) 0 1px 0, rgba(0,0,0,0.15) 0 .18em .15em;
}
/* -------------- Shapes -------------- */
/* round */
.round, .round.glossy:after, .round.glass:after {
border-top: none;
-webkit-border-radius: 1em;
-moz-border-radius: 1em;
border-radius: 1em;
}
/* oval */
.oval {
border-top: none;
padding-left: .8em;
padding-right: .8em;
-webkit-border-radius: 5em / 2em;
-moz-border-radius: 5em / 2em;
border-radius: 5em / 2em;
}
.oval.glossy:after, .oval.glass:after {
top: 5%;
-webkit-border-radius: 5em / 2em 2em 1em 1em;
-moz-border-radius: 5em / 2em 2em 1em 1em;
border-radius: 5em / 2em 2em 1em 1em;
}
.oval.icon {
padding-left: .8em;
padding-right: .8em;
-webkit-border-radius: 1.5em / 1em;
-moz-border-radius: 1.5em / 1em;
border-radius: 1.5em / 1em;
}
.oval.icon.glossy:after, .oval.icon.glass:after {
-webkit-border-radius: 1.5em / 1em;
-moz-border-radius: 1.5em / 1em;
border-radius: 1.5em / 1em;
}
/* brackets */
.brackets, .brackets.glossy:after, .brackets.glass:after {
border-top: none;
-webkit-border-radius: .5em / 1em;
-moz-border-radius: .5em / 1em;
border-radius: .5em / 1em;
}
/* skew */
.skew {
border-top: none;
padding-right: 1.2em;
padding-left: 0.8em;
-webkit-border-radius: 5em 1em / 5em 1em;
-moz-border-radius: 5em 1em / 5em 1em;
border-radius: 5em 1em / 5em 1em;
}
.skew.glossy:after, .skew.glass:after {
left: 10%;
-webkit-border-radius: 7em 1em / 5em 1em;
-moz-border-radius: 7em 1em / 5em 1em;
border-radius: 7em 1em / 5em 1em;
}
.skew.icon {
padding-right: .9em;
padding-left: .8em;
}
/* back */
.back, .back.glossy:after, .back.glass:after {
border-top-color: rgba(255,255,255,0.5);
-webkit-border-radius: 1.6em 1.6em 1em 1em / 4em 4em 1em 1em;
-moz-border-radius: 1.6em 1.6em 1em 1em / 4em 4em 1em 1em;
border-radius: 1.6em 1.6em 1em 1em / 4em 4em 1em 1em;
}
.back.glossy:after, .back.glass:after {
left: 6%;
width: 88%;
}
/* knife */
.knife {
padding-left: 1.5em;
-webkit-border-radius: .2em .5em .5em 8em / .2em .5em .5em 5em;
-moz-border-radius: .2em .5em .5em 8em / .2em .5em .5em 5em;
border-radius: .2em .5em .5em 8em / .2em .5em .5em 5em;
}
.knife.glossy:after, .knife.glass:after {
left: 3%;
width: 97%;
-webkit-border-radius: .1em .5em .5em 8em / .1em .5em .5em 2em;
-moz-border-radius: .1em .5em .5em 8em / .1em .5em .5em 2em;
border-radius: .1em .5em .5em 8em / .1em .5em .5em 2em;
}
.knife.glossy.icon:after, .knife.glass.icon:after {
left: 5%;
width: 95%;
-webkit-border-radius: .5em .5em 1em 6em / .5em .5em 1em 4em;
-moz-border-radius: .5em .5em 1em 6em / .5em .5em 1em 4em;
border-radius: .5em .5em 1em 6em / .5em .5em 1em 4em;
}
/* shield */
.shield, .shield.glossy:after, .shield.glass:after {
-webkit-border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
-moz-border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
}
.shield {
padding-left: .8em;
padding-right: .8em;
}
.shield.icon {
padding-left: .6em;
padding-right: .6em;
}
/* drop */
.drop {
border-top: none;
-webkit-border-radius: 2em 5em 2em .6em / 2em 4em 2em .6em;
-moz-border-radius: 2em 5em 2em .6em / 2em 4em 2em .6em;
border-radius: 2em 5em 2em .6em / 2em 4em 2em .6em;
}
.drop.glossy:after, .drop.glass:after {
left: 4%;
-webkit-border-radius: 2em 6em 2em 1em / 2em 4em 2em 2em;
-moz-border-radius: 2em 6em 2em 1em / 2em 4em 2em 2em;
border-radius: 2em 6em 2em 1em / 2em 4em 2em 2em;
}
.drop.icon {
padding-right: .6em;
}
/* morph */
.morph {
border-top: none;
-webkit-border-radius: 5em / 2em;
-moz-border-radius: 5em / 2em;
border-radius: 5em / 2em;
-webkit-transition: -webkit-border-radius .3s ease-in-out;
-moz-transition: -moz-border-radius .3s ease-in-out;
transition: -moz-border-radius .3s ease-in-out;
}
.morph:hover {
-webkit-border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
-moz-border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
border-radius: .4em .4em 2em 2em / .4em .4em 3em 3em;
}
.morph:active {
-webkit-border-radius: .3em;
-moz-border-radius: .3em;
border-radius: .3em;
}
.morph:after {
display: none;
}
/* Some ugly hacks for FF.
Thanks to David Hund for some help - http://valuedstandards.com/static/test/buttons/ */
@-moz-document url-prefix() {
.button { text-align: center; }
.icon { padding: .5em 1em; }
.icon:before { margin-left: -.42em; float: left; }
.social.icon:before { margin-left: -.22em; }
.drop.icon { padding-right: 1.1em; }
.shield.icon { padding-left: 1.1em; padding-right: 1.1em; }
.skew.icon { padding-right: 1.4em; padding-left: 1.3em; }
.oval.icon { padding-left: 1.3em; padding-right: 1.3em; }
.knife { padding-left: 2em; }
}
/* Damn, this became a fat baby.. */

View File

@@ -0,0 +1,24 @@
<div class="navbar-wrapper">
<div class="container">
<div class="navbar navbar-default navbar-static-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./index.html">ossoc</a>
</div>
<div class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<button id="loginbutton" type="button" class="btn btn-primary narbar-btn"><i class="glyphicon glyphicon-log-in"></i>Login</button>
<button type="button" class="btn btn-success navbar-btn"><i class="glyphicon glyphicon-link"></i><a href="./register.jsp">Create account</a></button>
</ul>
</div>
</div>
</div>
</div>
</div>

View File

@@ -0,0 +1,124 @@
blockquote#quote {
margin-top: 30px;
margin-bottom: 30px;
}
@font-face
{
font-family: 'GenBasI';
src: url('/css/font/GenBasI.ttf');
}
blockquote#quote p {
/*
font-family: "HelveticaNeue Light","Helvetica Neue Light","Helvetica Neue","Helvetica";
*/
font-family: 'GenBasI';
font-weight: 100;
font-size: 20px;
line-height: 150%;
}
img {
/*background-color: #fff;*/
padding: 5px;
}
img.tex {
background-color: #ddd;
}
body.mediawiki {
padding-top: 0px;
}
@media (min-width: 981px) {
/*
body.mediawiki {
padding-top: 100px;
}
*/
}
div.wikilink_btn a {
color: #fff;
font-weight: bold;
font-size: 20px;
}
.wikitable th,.wikitable td {
border-top:1px solid #222; background: transparent;
}
.wikitable th,.wikitable td{border-top:1px solid #222;}
.wikitable tbody tr:hover th,.wikitable tbody tr:hover td{background-color:#444;}
.wikitable tbody tr:hover td,.table tbody tr:hover th{background-color:#444;}
.wikitable,.well,.prettyprint,input,textarea,select{-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;}
.wikitable{width:100%;margin-bottom:18px;}.wikitable th,.wikitable td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
.wikitable th{font-weight:bold;}
.wikitable thead th{vertical-align:bottom;}
.wikitable caption+thead tr:first-child th,.wikitable caption+thead tr:first-child td,.wikitable colgroup+thead tr:first-child th,.wikitable colgroup+thead tr:first-child td,.wikitable thead:first-child tr:first-child th,.wikitable thead:first-child tr:first-child td{border-top:0;}
.wikitable tbody+tbody{border-top:2px solid #dddddd;}
.wikitable tbody tr:hover th,.wikitable tbody tr:hover td{background-color:#333;}
.wikitable{width:100%;margin-bottom:18px;}.wikitable th,.wikitable td{padding:8px;line-height:18px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
.wikitable th{font-weight:bold;}
.wikitable thead th{vertical-align:bottom;}
.wikitable caption+thead tr:first-child th,.wikitable caption+thead tr:first-child td,.wikitable colgroup+thead tr:first-child th,.wikitable colgroup+thead tr:first-child td,.wikitable thead:first-child tr:first-child th,.wikitable thead:first-child tr:first-child td{border-top:0;}
.wikitable tbody+tbody{border-top:2px solid #dddddd;}
table.wikitable, table.wikitable th {
background: none repeat scroll 0 0 #222;
}
/*
ul, div {
font-size: 18px;
}
*/
div#mw-normal-catlinks {
font-size: 14px;
margin-top: 20px;
margin-bottom: 20px;
}
table, table.navbox,
table ul li, table.navbox ul li,
table ul, table.navbox ul,
table p, table.navbox p,
table a, table.navbox a {
font-size: 14px;
}
h1, h2, h3, h4, h5 {
padding-top: 20px;
}
div.mw-geshi {
font-size: 14px;
}
pre {
font-size: 14px;
}
div.mainarticle {
font-size: 18px;
}
a:visited {
/*
unvisited link color:
color: #33b5e5;
*/
/*
visited link color:
http://www.w3schools.com/tags/ref_colorpicker.asp
*/
color: #2E8AE6;
}
#toc, .toc,
#catlinks, .catlinks {
background-color: #333;
}

View File

@@ -0,0 +1,81 @@
h1.hero {
padding: 0px 45px;
color: white;
font: bold 24px/45pxHelvetica,Sans-Serif;
letter-spacing:-1px;
/*
background: rgb(0,0,0);
background: rgba(0,0,0,0.7);
*/
padding:10px;
}
a.nav_well_title {
font-variant: small-caps;
}
.label-big{
font-size:14px;
line-height: 18px;
}
h4.widgettitle {
font-size: 18px;
padding-top: 25px;
}
/*
//////////////////////////////////
make a hero unit that actually looks good with cyborg skin
*/
h1.superhero {
margin: 10px 0;
font-family: inherit;
font-weight: bold;
color: #000;
text-rendering: optimizelegibility;
font-size: 60px;
margin-bottom: 0;
line-height: 1;
letter-spacing: -1px;
}
p.hero-unit {
font-size: 18px;
font-weight: 200;
line-height: 30px;
color: #333;
}
.superhero td {
padding: 30px;
}
.hero-unit-no-padding {
padding-top: 0px;
padding-bottom: 0px;
}
/*
* use the nicest helvetica you can
*/
body, p {
/*
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, "Lucida Grande", sans-serif;
*/
font-weight: 300;
line-height: 150%;
}
/* give the navbar on the right more padding */
#sidebar1{
margin-left:20px;
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,85 @@
/******** line-dot subway **********************/
div#subway {
text-align: center;
}
html, body {
/*height: 100%;*/
}
path {
stroke: #2780e3;
stroke-width: 8px;
}
svg .data-point {
stroke: black;
stroke-width: 4px;
fill: white;
}
/******************************/
.vcenter {
}
.col-centered{
float: none;
margin: 0 auto;
}
.splash-img {
width: 300px;
height: 300px;
}
h1.jumbo {
font-size: 64px;
}
h1.jumbojumbo {
font-size: 78px;
}
a.index-btn {
width: 300px;
margin-top: 10px;
margin-bottom: 10px;
margin-left: 15px;
margin-right: 15px;
}
.navbar-default {
background-color: #000;
border-color: #000;
}
div.v300 {
height: 300px;
}
div.v200 {
height: 200px;
}
div.v150 {
height: 150px;
}
div.v50 {
height: 50px;
}
hr {
text-align: center;
width: 100px;
}

File diff suppressed because it is too large Load Diff

After

Width:  |  Height:  |  Size: 434 KiB

View File

@@ -0,0 +1,53 @@
<br />
<br />
<center>
<hr />
</center>
<footer id="contentinfo" class="body">
<p style="text-align: center">
<span class="fa-stack fa-lg">
<i class="fa fa-square fa-stack-2x" style="color:#000;"></i>
<i class="fa fa-terminal fa-stack-1x fa-inverse"></i>
</span>
Made from the command line with vim by
<a href="http://charlesreid1.com">charlesreid1</a><br />
with help from <a href="https://getbootstrap.com/">Bootstrap</a> and <a href="http://mediawiki.org">MediaWiki</a>.
</p>
<p style="text-align: center">
<a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">
<span class="fa-stack fa-lg">
<i class="fa fa-square fa-stack-2x" style="color:#000;"></i>
<i class="fa fa-creative-commons fa-stack-1x fa-inverse"></i>
</span>
</a>
<br />
Licensed under the <a rel="license" href="http://creativecommons.org/licenses/by-nc/4.0/">Creative Commons Attribution-NonCommercial 4.0 License</a>.
</p>
<script type="text/javascript">
var sc_project=11477000;
var sc_invisible=1;
var sc_security="d49adba3";
var scJsHost = (("https:" == document.location.protocol) ?
"https://secure." : "http://www.");
document.write("<sc"+"ript type='text/javascript' src='" +
scJsHost+
"statcounter.com/counter/counter.js'></"+"script>");
</script>
<noscript><div class="statcounter"><a title="Web Analytics"
href="http://statcounter.com/" target="_blank"><img
class="statcounter"
src="//c.statcounter.com/11477000/0/d49adba3/1/" alt="Web
Analytics"></a></div></noscript>
<!-- End of StatCounter Code for Default Guide -->
<script type="text/javascript" src="/w/skins/Bootstrap2/jquery-1.11.2.js"></script>
<script type="text/javascript" src="/w/skins/Bootstrap2/bootstrap-3.3.4.js"></script>
</footer><!-- /#contentinfo -->
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

@@ -0,0 +1,19 @@
<!DOCTYPE html>
<!--
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
-->
<html lang="en">
<head>
<meta charset="utf-8">
<title>charlesreid1 - <?php echo $this->html('title'); ?></title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
</head>
<body>

View File

@@ -0,0 +1,8 @@
Hooks provided by the MonoBook skin.
'MonoBookTemplateToolboxEnd': DEPRECATED. Called by Monobook skin after toolbox
links have been rendered (useful for adding more). Note: this is only run for
the Monobook skin. To add items to the toolbox you should use the
SkinTemplateToolboxEnd hook instead, which works for all "SkinTemplate"-type
skins.
$tools: array of tools

View File

@@ -0,0 +1,9 @@
{
"@metadata": {
"authors": []
},
"skinname-monobook": "MonoBook",
"monobook-desc": "The classic MediaWiki skin since 2004, named after the black-and-white photo of a book in the page background",
"monobook.css": "/* CSS placed here will affect users of the MonoBook skin */",
"monobook.js": "/* Any JavaScript here will be loaded for users using the MonoBook skin */"
}

View File

@@ -0,0 +1,105 @@
.text-heading {
font-family: "Lucida Console";
font-size: 24px;
font-style: normal;
font-weight: bold;
text-transform: none;
letter-spacing: 4px;
text-indent: 10px;
vertical-align: middle;
color: #0066CC;
}
.text {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
padding-left: 10px;
padding-right: 10px;
color: #666666;
text-align: justify;
}
.footer {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #666666;
text-align: center;
border: 1px none #6699CC;
background-color: #0099CC;
}
.table2 {
border: 1px dotted #000066;
}
.company {
font-family: "Lucida Console";
font-size: 30px;
color: #0066CC;
text-align: left;
vertical-align: middle;
letter-spacing: 8px;
font-weight: normal;
}
.punchline {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #003366;
letter-spacing: 4px;
}
.menu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #0066CC;
text-align: center;
vertical-align: middle;
border: 1px solid #000000;
background-color: #C7D3F1;
}
.submenu {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
font-weight: lighter;
color: #0066CC;
text-align: center;
vertical-align: middle;
background-color: #E1E8F8;
border-top: 1px solid #000000;
border-right: 1px none #000000;
border-bottom: 1px solid #000000;
border-left: 1px none #000000;
}
.headtable {
border: 1px dotted #0066CC;
}
.header {
background-image: url(../images/bk.jpg);
border: 1px dotted #003399;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 14px;
color: #14388B;
text-decoration: none;
font-weight: bold;
}
a:hover {
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #333399;
text-decoration: none;
font-weight: bold;
}
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 18px;
color: #339;
color: #a00;
text-decoration: none;
background-color: #ddd;
}
p {
font-size: 14px;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

After

Width:  |  Height:  |  Size: 342 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,747 @@
/*
MediaWiki stuff
*/
@import url("../common.css");
/* disabled for now
blockquote {
font-family: Times, "Times New Roman", serif;
font-style: italic;
}*/
/*
code {
background-color: #f9f9f9;
}
*/
img {
text-decoration: none;
border: none;
}
p img {
margin: 0;
}
#navtable table {
border: solid 1px darkblue;
}
#navtable{
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size:12px;width:480px;
text-align:left;
/*
border-collapse:collapse;
border:1px solid #69c;
*/
margin:20px;
}
#navtable a{
font-family:"Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
font-size:12px;
}
#navtable th {
font-weight:normal;
font-size:14px;
color:#039;
border-bottom:1px dashed #69c;
padding:12px 17px;
}
#navtable td{
color:#669;
padding:7px 17px;
}
#navtable tbody {
border: darkblue;
color:#339;
background:#d0dafd;
}
#navtable tbody tr:hover td{
color:#339;
background:#d0dafd;
}