├── .travis.yml ├── AUTHORS.md ├── LICENSE ├── README.md ├── _test └── general.test.php ├── action.php ├── all.css ├── exe ├── help.php ├── help │ ├── accordion.txt │ ├── affix.txt │ ├── alert.txt │ ├── badge.txt │ ├── bar.txt │ ├── button.txt │ ├── callout.txt │ ├── caption.txt │ ├── carousel.txt │ ├── col.txt │ ├── collapse.txt │ ├── grid.txt │ ├── image.txt │ ├── jumbotron.txt │ ├── label.txt │ ├── lead.txt │ ├── list-group.txt │ ├── macro.txt │ ├── menu.txt │ ├── modal.txt │ ├── nav.txt │ ├── page-header.txt │ ├── pane.txt │ ├── panel-body.txt │ ├── panel.txt │ ├── pills.txt │ ├── popover.txt │ ├── progress.txt │ ├── row.txt │ ├── tabs.txt │ ├── text.txt │ ├── thumbnail.txt │ ├── tooltip.txt │ └── well.txt ├── popup.js └── popup.php ├── images └── bootstrap.png ├── lang ├── de │ └── settings.php ├── en │ └── settings.php ├── fr │ └── settings.php ├── ja │ └── settings.php ├── ko │ └── settings.php └── pl │ └── settings.php ├── plugin.info.txt ├── script.js └── syntax ├── accordion.php ├── affix.php ├── alert.php ├── badge.php ├── bootstrap.php ├── button.php ├── callout.php ├── caption.php ├── carousel.php ├── collapse.php ├── column.php ├── grid.php ├── hidden.php ├── image.php ├── invisible.php ├── jumbotron.php ├── label.php ├── lead.php ├── list.php ├── macros.php ├── modal.php ├── nav.php ├── pageheader.php ├── pane.php ├── panel.php ├── panelbody.php ├── pills.php ├── popover.php ├── progress.php ├── progressbar.php ├── row.php ├── show.php ├── slide.php ├── tabs.php ├── text.php ├── thumbnail.php ├── tooltip.php ├── well.php └── wrapper.php /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | php: 3 | - "7.3" 4 | - "7.2" 5 | - "7.1" 6 | - "7.0" 7 | - "5.6" 8 | env: 9 | - DOKUWIKI=master 10 | - DOKUWIKI=stable 11 | before_install: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh 12 | install: sh travis.sh 13 | script: cd _test && ./phpunit.phar --stderr --group plugin_bootswrapper 14 | -------------------------------------------------------------------------------- /AUTHORS.md: -------------------------------------------------------------------------------- 1 | # Bootstrap Wrapper Plugin for DokuWiki 2 | 3 | ## Author 4 | 5 | * Giuseppe Di Terlizzi ([LotarProject](https://github.com/LotarProject)) 6 | 7 | ## Contributors 8 | 9 | * Jos ([Rojoss](https://github.com/Rojoss)) 10 | * HavocKKS ([HavocKKS](https://github.com/HavocKKS)) 11 | * Hideaki SAWADA ([sawachan](https://github.com/sawachan)) 12 | * Dominik Reichardt ([Soeldner](https://github.com/Soeldner)) 13 | 14 | *For a list of people who have contributed to the template, see [GitHub's list of contributors](https://github.com/LotarProject/dokuwiki-plugin-bootswrapper/contributors).* 15 | 16 | ## Translators 17 | 18 | * Japanese, Hideaki SAWADA ([sawachan](https://github.com/sawachan)) 19 | * German, Dominik Reichardt ([Soeldner](https://github.com/Soeldner)) 20 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. 340 | 341 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Bootstrap Wrapper Plugin for DokuWiki 2 | ===================================== 3 | 4 | Bootstrap Wrapper for DokuWiki 5 | 6 | All documentation for this plugin can be found at 7 | http://www.dokuwiki.org/plugin:bootswrapper 8 | 9 | If you install this plugin manually, make sure it is installed in 10 | lib/plugins/icons/ - if the folder is called different it 11 | will not work! 12 | 13 | Please refer to http://www.dokuwiki.org/plugins for additional info 14 | on how to install plugins in DokuWiki. 15 | 16 | ---- 17 | Copyright (C) Giuseppe Di Terlizzi 18 | 19 | This program is free software; you can redistribute it and/or modify 20 | it under the terms of the GNU General Public License as published by 21 | the Free Software Foundation; version 2 of the License 22 | 23 | This program is distributed in the hope that it will be useful, 24 | but WITHOUT ANY WARRANTY; without even the implied warranty of 25 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 26 | GNU General Public License for more details. 27 | 28 | See the COPYING file in your DokuWiki folder for details 29 | 30 | -------------------------------------------------------------------------------- /_test/general.test.php: -------------------------------------------------------------------------------- 1 | assertFileExists($file); 17 | 18 | $info = confToHash($file); 19 | 20 | $this->assertArrayHasKey('base', $info); 21 | $this->assertArrayHasKey('author', $info); 22 | $this->assertArrayHasKey('email', $info); 23 | $this->assertArrayHasKey('date', $info); 24 | $this->assertArrayHasKey('name', $info); 25 | $this->assertArrayHasKey('desc', $info); 26 | $this->assertArrayHasKey('url', $info); 27 | 28 | $this->assertEquals('bootswrapper', $info['base']); 29 | $this->assertRegExp('/^https?:\/\//', $info['url']); 30 | $this->assertTrue(mail_isvalid($info['email'])); 31 | $this->assertRegExp('/^\d\d\d\d-\d\d-\d\d$/', $info['date']); 32 | $this->assertTrue(false !== strtotime($info['date'])); 33 | } 34 | } 35 | 36 | -------------------------------------------------------------------------------- /action.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | 11 | /** 12 | * Bootstrap Wrapper Action Plugin 13 | * 14 | * Add external CSS file to DokuWiki 15 | */ 16 | class action_plugin_bootswrapper extends DokuWiki_Action_Plugin 17 | { 18 | 19 | /** 20 | * Syntax with section edit 21 | * 22 | * @var array 23 | */ 24 | private $section_edit_buttons = array( 25 | 'plugin_bootswrapper_pane', 26 | 'plugin_bootswrapper_panel', 27 | ); 28 | 29 | /** 30 | * Register events 31 | * 32 | * @param Doku_Event_Handler $controller 33 | */ 34 | public function register(Doku_Event_Handler $controller) 35 | { 36 | $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, '_insert_button'); 37 | $controller->register_hook('HTML_SECEDIT_BUTTON', 'BEFORE', $this, '_secedit_button'); 38 | $controller->register_hook('HTML_EDIT_FORMSELECTION', 'BEFORE', $this, '_editform'); // deprecated 39 | $controller->register_hook('EDIT_FORM_ADDTEXTAREA', 'BEFORE', $this, '_editform'); // replacement 40 | } 41 | 42 | /** 43 | * Edit Form 44 | * 45 | * @param Doku_Event &$event 46 | */ 47 | public function _editform(Doku_Event $event) 48 | { 49 | if (!in_array($event->data['target'], $this->section_edit_buttons)) { 50 | return; 51 | } 52 | 53 | $event->data['target'] = 'section'; 54 | return; 55 | } 56 | 57 | /** 58 | * Set Section Edit button 59 | * 60 | * @param Doku_Event &$event 61 | */ 62 | public function _secedit_button(Doku_Event $event) 63 | { 64 | global $lang; 65 | 66 | if (!in_array($event->data['target'], $this->section_edit_buttons)) { 67 | return; 68 | } 69 | 70 | $event->data['name'] = $lang['btn_secedit'] . ' - ' . ucfirst(str_replace('plugin_bootswrapper_', '', $event->data['target'])); 71 | } 72 | 73 | /** 74 | * Set toolbar button in edit mode 75 | * 76 | * @param Doku_Event &$event 77 | */ 78 | public function _insert_button(Doku_Event $event, $param) 79 | { 80 | $event->data[] = array( 81 | 'type' => 'mediapopup', 82 | 'title' => 'Bootstrap Wrapper', 83 | 'icon' => '../../plugins/bootswrapper/images/bootstrap.png', 84 | 'url' => 'lib/plugins/bootswrapper/exe/popup.php?ns=', 85 | 'name' => 'bootstrap-wrapper', 86 | 'options' => 'width=800,height=600,left=20,top=20,toolbar=no,menubar=no,scrollbars=yes,resizable=yes', 87 | 'block' => false, 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /all.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * DokuWiki Bootstrap Wrapper Plugin 3 | * 4 | * Home http://dokuwiki.org/plugin:bootswrapper 5 | * Author Giuseppe Di Terlizzi 6 | * License GPL 2 (http://www.gnu.org/licenses/gpl.html) 7 | */ 8 | 9 | .bs-wrap .nav-tabs { 10 | margin-bottom: 15px; 11 | } 12 | 13 | .bs-wrap-modal[data-remote] .modal-content { 14 | padding: 0 15px; 15 | } 16 | 17 | .bs-wrap-accordion .panel-heading a { 18 | color: inherit; 19 | text-decoration: none; 20 | } 21 | 22 | 23 | /* Bootstrap 3 Template */ 24 | aside ul.dropdown-menu { 25 | font-size: 1em; 26 | padding-left: 0 !important; 27 | } 28 | 29 | 30 | /* 31 | * Callouts (from Twitter Bootstrap Documentation) 32 | * 33 | * Not quite alerts, but custom and helpful notes for folks reading the docs. 34 | * Requires a base and modifier class. 35 | */ 36 | 37 | /* Common styles for all types */ 38 | .bs-callout { 39 | padding: 20px; 40 | margin: 20px 0; 41 | border: 1px solid #eee; 42 | border-left-width: 5px; 43 | border-radius: 3px; 44 | } 45 | .bs-callout h4 { 46 | margin-top: 0; 47 | margin-bottom: 5px; 48 | } 49 | .bs-callout p:last-child { 50 | margin-bottom: 0; 51 | } 52 | .bs-callout code { 53 | border-radius: 3px; 54 | } 55 | .bs-callout+.bs-callout { 56 | margin-top: -5px; 57 | } 58 | .bs-callout-default { 59 | border-left-color: #777; 60 | } 61 | .bs-callout-default h4 { 62 | color: #777; 63 | } 64 | .bs-callout-primary { 65 | border-left-color: #428bca; 66 | } 67 | .bs-callout-primary h4 { 68 | color: #428bca; 69 | } 70 | .bs-callout-success { 71 | border-left-color: #5cb85c; 72 | } 73 | .bs-callout-success h4 { 74 | color: #5cb85c; 75 | } 76 | .bs-callout-danger { 77 | border-left-color: #d9534f; 78 | } 79 | .bs-callout-danger h4 { 80 | color: #d9534f; 81 | } 82 | .bs-callout-warning { 83 | border-left-color: #f0ad4e; 84 | } 85 | .bs-callout-warning h4 { 86 | color: #f0ad4e; 87 | } 88 | .bs-callout-info { 89 | border-left-color: #5bc0de; 90 | } 91 | .bs-callout-info h4 { 92 | color: #5bc0de; 93 | } 94 | 95 | .bs-callout { 96 | overflow: hidden; 97 | } 98 | 99 | 100 | i.bs-callout-icon { font-size: 2em; } 101 | 102 | 103 | .bs-callout-info .bs-callout-icon { color: #5bc0de; } 104 | .bs-callout-warning .bs-callout-icon { color: #f0ad4e; } 105 | .bs-callout-danger .bs-callout-icon { color: #d9534f; } 106 | .bs-callout-success .bs-callout-icon { color: #5cb85c; } 107 | .bs-callout-primary .bs-callout-icon { color: #428bca; } 108 | .bs-callout-default .bs-callout-icon { color: #777; } 109 | 110 | 111 | @media print { 112 | .bs-page-break { 113 | page-break-after: always; 114 | } 115 | } 116 | -------------------------------------------------------------------------------- /exe/help.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | $doku_inc_dirs = array( 11 | '/opt/bitnami/dokuwiki', # Bitnami (Docker) 12 | '/usr/share/webapps/dokuwiki', # Arch Linux 13 | '/usr/share/dokuwiki', # Debian/Ubuntu 14 | '/app/dokuwiki', # LinuxServer.io (Docker), 15 | realpath(dirname(__FILE__) . '/../../../../'), # Default DokuWiki path 16 | ); 17 | 18 | # Load doku_inc.php file 19 | # 20 | if (file_exists(dirname(__FILE__) . '/../doku_inc.php')) { 21 | require_once dirname(__FILE__) . '/../doku_inc.php'; 22 | } 23 | 24 | if (!defined('DOKU_INC')) { 25 | foreach ($doku_inc_dirs as $dir) { 26 | if (!defined('DOKU_INC') && @file_exists("$dir/inc/init.php")) { 27 | define('DOKU_INC', "$dir/"); 28 | } 29 | } 30 | } 31 | 32 | if (!file_exists(DOKU_INC)) { 33 | print 'Problem with DOKU_INC directory. Please check your DokuWiki installation directory!'; 34 | die; 35 | } 36 | 37 | define('DOKU_MEDIAMANAGER', 1); // needed to get proper CSS/JS 38 | 39 | global $lang; 40 | global $INPUT; 41 | global $ACT; 42 | global $INFO; 43 | 44 | require_once DOKU_INC . 'inc/init.php'; 45 | 46 | session_write_close(); //close session 47 | 48 | $syntax = $INPUT->get->str('syntax'); 49 | 50 | if ($syntax) { 51 | 52 | $help_file = dirname(__FILE__) . '/help/' . $syntax . '.txt'; 53 | 54 | if (file_exists($help_file)) { 55 | 56 | $INFO['exists'] = true; 57 | $ACT = 'show'; 58 | 59 | $help_content = file_get_contents($help_file); 60 | 61 | echo str_replace(array('class="inline"'), array('class="inline table"'), p_render('xhtml', p_get_instructions($help_content), $info)); 62 | 63 | } 64 | 65 | } 66 | -------------------------------------------------------------------------------- /exe/help/accordion.txt: -------------------------------------------------------------------------------- 1 | ====== Accordion ====== 2 | 3 | An accordion with the panel component. 4 | 5 | ===== Example ===== 6 | 7 | 8 | 9 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 10 | 11 | 12 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 13 | 14 | 15 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 16 | 17 | 18 | 19 | \\ 20 | 21 | 22 | 23 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. 24 | 25 | [...] 26 | [...] 27 | 28 | -------------------------------------------------------------------------------- /exe/help/affix.txt: -------------------------------------------------------------------------------- 1 | ~~NOTOC~~ 2 | ====== Affix ====== 3 | 4 | The affix plugin toggles ''position: fixed;'' on and off, emulating the effect found with ''position: sticky;''. 5 | 6 | ==== Sample ==== 7 | 8 | 9 | 10 | 11 | Scroll the page! 12 | 13 | 14 | 15 | 16 | 17 | 18 | Scroll the page! 19 | 20 | 21 | 22 | ==== Options ==== 23 | 24 | ^ Attribute ^ Default Value ^ Description 25 | | ''offset-top'' | optional | Offset from top of target (in ''px|em|%'') | 26 | | ''offset-bottom'' | optional | Offset from bottom of target (in ''px|em|%'') | 27 | | ''position-top'' | optional | Top position of Affix element (in ''px|em|%'') | 28 | | ''position-bottom'' | optional | Bottom position of Affix element (in ''px|em|%'') | 29 | | ''position-left'' | optional | Left position of Affix element (in ''px|em|%'') | 30 | | ''position-right'' | optional | Right position of Affix element (in ''px|em|%'') | 31 | | ''target'' | Window Document | Target element (eg. ''#dokuwiki__site'') | 32 | -------------------------------------------------------------------------------- /exe/help/alert.txt: -------------------------------------------------------------------------------- 1 | ====== Alerts ====== 2 | 3 | Provide contextual feedback messages for typical user actions with the handful of available and flexible alert messages. 4 | 5 | ===== Examples ===== 6 | 7 | 8 | **Well done!** You successfully read this important alert message. 9 | 10 | 11 | 12 | **Heads up!** This alert needs your attention, but it's not super important. 13 | 14 | 15 | 16 | **Warning!** Better check yourself, you're not looking too good. 17 | 18 | 19 | 20 | **Oh snap!** Change a few things up and try submitting again. 21 | 22 | 23 | 24 | ... 25 | ... 26 | ... 27 | ... 28 | 29 | 30 | ==== Dismissible alerts ==== 31 | 32 | Build on any alert by adding an optional ''dismiss'' option. 33 | 34 | **Warning!** Better check yourself, you're not looking too good. 35 | 36 | **Warning!** Better check yourself, you're not looking too good. 37 | 38 | ==== Alert with icon ==== 39 | 40 | **Warning!** Better check yourself, you're not looking too good. 41 | 42 | **Warning!** Better check yourself, you're not looking too good. 43 | 44 | ===== Options ===== 45 | 46 | 47 | ^ Name ^ Default ^ Values ^ Description ^ 48 | | ''type'' | ''info'' | ''success'' ''info'' ''warning'' ''danger'' | Type of alert | 49 | | ''dismiss'' | optional | ''true'' | Create a dismissible alert | 50 | | ''icon'' | optional | | Font icon class (eg. Glyphicon or Font-Awesome) | 51 | -------------------------------------------------------------------------------- /exe/help/badge.txt: -------------------------------------------------------------------------------- 1 | ====== Badges ====== 2 | 3 | ===== Examples ===== 4 | 5 | 6 | Inbox 42 7 | 8 | Messages 4 9 | 10 | 11 | \\ 12 | 13 | Inbox 42 14 | 15 | Messages 4 16 | -------------------------------------------------------------------------------- /exe/help/bar.txt: -------------------------------------------------------------------------------- 1 | progress.txt -------------------------------------------------------------------------------- /exe/help/button.txt: -------------------------------------------------------------------------------- 1 | ====== Buttons ====== 2 | 3 | ===== Examples ===== 4 | 5 | | Default | Standard button | 6 | | Primary | Provides extra visual weight and identifies the primary action in a set of buttons | 7 | | Success | Indicates a successful or positive action | 8 | | Info | Contextual button for informational alert messages | 9 | | Warning | Indicates caution should be taken with this action | 10 | | Danger | Indicates a dangerous or potentially negative action | 11 | | Link | Deemphasize a button by making it look like a link while maintaining button behavior | 12 | 13 | \\ 14 | 15 | 16 | Default 17 | Primary 18 | Success 19 | Info 20 | Warning 21 | Danger 22 | Link 23 | 24 | 25 | \\ 26 | 27 | ==== Link button ==== 28 | 29 | [[:wiki:welcome]] 30 | 31 | [[:wiki:welcome]] 32 | 33 | \\ 34 | 35 | ==== Sizes ==== 36 | 37 | Fancy larger or smaller buttons? Add ''size="lg"'', ''size="sm"'', or ''size="xs"'' for additional sizes. 38 | 39 | Large button 40 | Large button 41 | 42 | Default button 43 | Default button 44 | 45 | Small button 46 | Small button 47 | 48 | Extra small button 49 | Extra small button 50 | 51 | \\ 52 | 53 | 54 | Large button 55 | Large button 56 | 57 | Default button 58 | Default button 59 | 60 | Small button 61 | Small button 62 | 63 | Extra small button 64 | Extra small button 65 | 66 | 67 | \\ 68 | 69 | ==== Block ==== 70 | 71 | Create block level buttons—those that span the full width of a parent -- by adding ''block="true"'' option. 72 | 73 | Block level button 74 | \\ 75 | Block level button 76 | 77 | \\ 78 | 79 | 80 | Block level button 81 | Block level button 82 | 83 | 84 | \\ 85 | 86 | 87 | ==== Active state ==== 88 | 89 | Buttons will appear pressed (with a darker background, darker border, and inset shadow) when active. Bootstrap Wrapper Plugin detect automatically the active state of current page. 90 | 91 | [[button]] [[panel]] 92 | 93 | 94 | [[button]] [[panel]] 95 | 96 | 97 | \\ 98 | 99 | ==== Disabled state ==== 100 | 101 | Make buttons look unclickable by fading them back with ''opacity''. 102 | 103 | [[button]] [[panel]] 104 | 105 | 106 | [[button]] [[panel]] 107 | 108 | 109 | ===== Options ===== 110 | 111 | 112 | ^ Attribute ^ Default Value ^ Allowed Values ^ Description ^ 113 | | ''type'' | ''default'' | ''default'' ''primary'' ''success'' ''info'' ''warning'' ''danger'' ''link'' | Type of button | 114 | | ''icon'' | optional | | Font icon class (eg. Glyphicon or Font-Awesome) | 115 | | ''size'' | optional | ''lg'' ''sm'' | Button size | 116 | | ''block'' | optional | ''true'' ''false'' | Block level buttons | 117 | | ''collapse'' | optional | | Target element selector to collapse (see [[collapse]]) | 118 | | ''disabled'' | optional | ''true'' ''false'' | Disable the button | 119 | | ''modal'' | optional | | Modal ID (see [[modal]]) | 120 | -------------------------------------------------------------------------------- /exe/help/callout.txt: -------------------------------------------------------------------------------- 1 | ======= Callouts ====== 2 | 3 | ~~NOTOC~~ 4 | 5 | 6 | === What is the Callout component ? === 7 | The Bootstrap documentation has really nice callouts to draw attention to important information, but for some reason these callouts are not included in the actual Bootstrap distribution. 8 | 9 | This plugin include the original Callout from Bootstrap documentation for //info//, //warning// and //danger// and the extension for //default//, //success// and //primary// from http://cpratt.co/twitter-bootstrap-callout-css-styles. 10 | 11 | 12 | ===== Basic usage ===== 13 | 14 | 15 | 16 | === Default Callout === 17 | This is a default callout. 18 | 19 | 20 | 21 | OR 22 | 23 | 24 | 25 | This is a default callout. 26 | 27 | 28 | 29 | 30 | === Default Callout === 31 | This is a default callout. 32 | 33 | 34 | ===== Contextual colors ===== 35 | 36 | 37 | === Primary Callout === 38 | This is a primary callout. 39 | 40 | 41 | 42 | === Success Callout === 43 | This is a success callout. 44 | 45 | 46 | 47 | === Info Callout === 48 | This is an info callout. 49 | 50 | 51 | 52 | === Warning Callout === 53 | This is a warning callout. 54 | 55 | 56 | 57 | === Danger Callout === 58 | This is a danger callout. 59 | 60 | 61 | 62 | ===== Contextual Icons ===== 63 | 64 | Create a contextual colors callout by adding ''icon="true"'' attribute. 65 | 66 | 67 | === Primary Callout === 68 | This is a primary callout. 69 | 70 | 71 | 72 | === Success Callout === 73 | This is a success callout. 74 | 75 | 76 | 77 | === Info Callout === 78 | This is an info callout. 79 | 80 | 81 | 82 | === Warning Callout === 83 | This is a warning callout. 84 | 85 | 86 | 87 | === Danger Callout === 88 | This is a danger callout. 89 | 90 | 91 | 92 | [...] 93 | [...] 94 | [...] 95 | [...] 96 | [...] 97 | 98 | 99 | ==== Additional contextual icons ==== 100 | 101 | 102 | === Question Callout === 103 | This is a question callout (alias of ''important''). 104 | 105 | 106 | 107 | === Tip Callout === 108 | This is a tip callout (alias of ''warning''). 109 | 110 | 111 | 112 | [...] 113 | [...] 114 | 115 | 116 | ===== Custom icons ===== 117 | 118 | Add custom icon via ''icon'' attribute. 119 | 120 | 121 | This is default callout with ''fa fa-user'' icon 122 | 123 | 124 | [...] 125 | 126 | 127 | This is success callout with ''fa fa-plus'' icon 128 | 129 | 130 | [...] 131 | 132 | ===== Custom colors ===== 133 | 134 | 135 | This is callout with custom color (''blue'') and icon (''fa fa-user'') 136 | 137 | 138 | 139 | [...] 140 | 141 | 142 | ===== Options ===== 143 | 144 | 145 | ^ Attribute ^ Default Value ^ Allowed Values ^ Description ^ 146 | | ''type'' | ''default'' | ''default'' ''primary'' ''success'' ''info'' ''warning'' ''danger'' (''question'' ''tip'') | Type of callout \\ \\ ''question'' and ''tip'' are available only for ''icon'' attribute. | 147 | | ''title'' | | | Title of callout | 148 | | ''icon'' | | ''true'' or icon class from Glyphicon or FontAwesome (eg. ''fa fa-plus'') | Icon of callout | 149 | | ''color'' | | W3C Color name (eg. ''blue'', ''orange'', etc) or HEX (eg. ''#FF3300'', ''#777'') | Color of callout | 150 | 151 | -------------------------------------------------------------------------------- /exe/help/caption.txt: -------------------------------------------------------------------------------- 1 | thumbnail.txt -------------------------------------------------------------------------------- /exe/help/carousel.txt: -------------------------------------------------------------------------------- 1 | ====== Carousel ====== 2 | 3 | ===== Basic Syntax ===== 4 | 5 | 6 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 7 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 8 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 9 | 10 | 11 | === OR === 12 | 13 | 14 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 15 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 16 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 17 | 18 | 19 | \\ 20 | 21 | 22 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 23 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 24 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 25 | 26 | 27 | ===== Caption ===== 28 | 29 | 30 | 31 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 32 | 33 | === First slide label === 34 | Nulla vitae elit libero, a pharetra augue mollis interdum. 35 | 36 | 37 | [...] 38 | 39 | 40 | \\ 41 | 42 | 43 | 44 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 45 | 46 | === First slide label === 47 | Nulla vitae elit libero, a pharetra augue mollis interdum. 48 | 49 | 50 | 51 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 52 | 53 | === Second slide label === 54 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. 55 | 56 | 57 | 58 | {{:wiki:plugin:bootswrapper:image-placeholder-big.jpg?nolink|}} 59 | 60 | === Third slide label === 61 | Praesent commodo cursus magna, vel scelerisque nisl consectetur. 62 | 63 | 64 | 65 | 66 | \\ 67 | 68 | ===== Attributes ====== 69 | 70 | 71 | ^ Attibute ^ Type ^ Default Value ^ Description ^ 72 | | ''interval'' | number | ''5000'' | The amount of time to delay between automatically cycling an item. If false, carousel will not automatically cycle. | 73 | | ''pause'' | string | ''hover'' | Pauses the cycling of the carousel on mouseenter and resumes the cycling of the carousel on mouseleave. | 74 | | ''wrap'' | boolean | ''true'' | Whether the carousel should cycle continuously or have hard stops. | 75 | | ''keyboard'' | boolean | ''true'' | Whether the carousel should react to keyboard events. | 76 | -------------------------------------------------------------------------------- /exe/help/col.txt: -------------------------------------------------------------------------------- 1 | grid.txt -------------------------------------------------------------------------------- /exe/help/collapse.txt: -------------------------------------------------------------------------------- 1 | ====== Collapse ====== 2 | 3 | ===== Examples ===== 4 | 5 | 6 | 7 | 8 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. 9 | 10 | \\ 11 | 12 | 13 | 14 | 15 | 16 | Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. 17 | 18 | 19 | ==== Accordion ==== 20 | 21 | See [[accordion]] example page. 22 | 23 | ===== Options ===== 24 | 25 | 26 | ^ Attribute ^ Default Value ^ Allowed values ^ Description ^ 27 | | ''id'' | | | Target id of collapsed element | 28 | | ''collapsed'' | ''false'' | ''true'' ''false'' | Enable/Disable collapsed status | 29 | -------------------------------------------------------------------------------- /exe/help/grid.txt: -------------------------------------------------------------------------------- 1 | ====== Grids ====== 2 | 3 | \\ 4 | **Note:** Instead of '''' you can use '''' alias. 5 | \\ 6 | 7 | 8 | .col-sm-6 9 | .col-sm-6 10 | 11 | 12 | \\ 13 | \\ 14 | 15 | 16 | .col-sm-6 17 | .col-sm-6 18 | 19 | 20 | \\ 21 | \\ 22 | 23 | 24 | .col-xs-12 .col-sm-6 .col-lg-8 25 | .col-xs-6 .col-lg-4 26 | 27 | 28 | \\ 29 | \\ 30 | 31 | 32 | .col-xs-12 .col-sm-6 .col-lg-8 33 | .col-xs-6 .col-lg-4 34 | 35 | 36 | \\ 37 | \\ 38 | 39 | ==== Attributes for "col" ==== 40 | 41 | ^ Attribute ^ Description | 42 | | ''xs'' | Column size (1 ~ 12) | 43 | | ''sm'' | Column size (1 ~ 12) | 44 | | ''lg'' | Column size (1 ~ 12) | 45 | | ''md'' | Column size (1 ~ 12) | 46 | -------------------------------------------------------------------------------- /exe/help/image.txt: -------------------------------------------------------------------------------- 1 | ====== Image ====== 2 | 3 | ===== Shapes ===== 4 | 5 | | {{:wiki:dokuwiki-128.png?nolink&100|}} | 6 | {{:wiki:dokuwiki-128.png?nolink&100|}} 7 | | 8 | | {{:wiki:dokuwiki-128.png?nolink&100|}} | 9 | {{:wiki:dokuwiki-128.png?nolink&100|}} 10 | | 11 | | {{:wiki:dokuwiki-128.png?nolink&100|}} | 12 | {{:wiki:dokuwiki-128.png?nolink&100|}} 13 | | 14 | 15 | ==== Attributes ==== 16 | 17 | ^ Attribute ^ Allowed Values ^ Description ^ 18 | | ''shape'' | ''rounded'', ''circle'', ''thumbnail'' | Image shape | 19 | -------------------------------------------------------------------------------- /exe/help/jumbotron.txt: -------------------------------------------------------------------------------- 1 | ====== Jumbotron ====== 2 | 3 | A lightweight, flexible component that can optionally extend the entire viewport to showcase key content on your site. 4 | 5 | 6 |

Hello, world!

7 | 8 | This is a simple hero unit, a simple jumbotron-style 9 | component for calling extra attention to featured 10 | content or information. 11 | 12 | [[#|Learn more]] 13 |
14 | 15 | \\ 16 | 17 | 18 | ====== Hello, world! ====== 19 | 20 | This is a simple hero unit, a simple jumbotron-style 21 | component for calling extra attention to featured 22 | content or information. 23 | 24 | [[#|Learn more]] 25 | 26 | 27 | ===== Background and text colors ===== 28 | 29 | 30 | ====== Lorem ipsum! ====== 31 | 32 | Lorem ipsum dolor sit amet, [...] 33 | 34 | 35 | 36 | ====== Lorem ipsum! ====== 37 | 38 | Lorem ipsum dolor sit amet, consectetur adipisici elit, sed eiusmod tempor incidunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquid ex ea commodi consequat. Quis aute iure reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint obcaecat cupiditat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. 39 | 40 | Link 41 | 42 | 43 | ^ Attribute ^ Description ^ 44 | | ''background'' | Background URL or DokuWiki Media link (eg '':wiki:logo.png'') | 45 | | ''color'' | Color name or HEX (eg. ''#ffffff'') of text | 46 | -------------------------------------------------------------------------------- /exe/help/label.txt: -------------------------------------------------------------------------------- 1 | ====== Labels ====== 2 | 3 | 4 | This tag have two version (lowercase and uppercase). 5 | 6 | * The //lowercase// version '''' create a __inline__ element (''''). 7 | * The //uppercase// version '''' create a __block__ element (''
''). 8 | 9 | See the samples. 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | ==== Attributes ==== 30 | 31 | ^ Attribute ^ Default Value ^ Allowed Values ^ Description ^ 32 | | ''type'' | ''info'' | ''default'', ''primary'', ''success'', ''info'', ''warning'', ''danger'' | Type of label | 33 | | ''icon'' | optional | | Font icon class (eg. Glyphicon or Font-Awesome) | 34 | -------------------------------------------------------------------------------- /exe/help/lead.txt: -------------------------------------------------------------------------------- 1 | ====== Lead ====== 2 | 3 | Make a paragraph stand out by '''' syntax. 4 | 5 | Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus. 6 | 7 | Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus. 8 | 9 | -------------------------------------------------------------------------------- /exe/help/list-group.txt: -------------------------------------------------------------------------------- 1 | ====== List Group ====== 2 | 3 | ===== Basic example ===== 4 | 5 | 6 | * Cras justo odio 7 | * Dapibus ac facilisis in 8 | * Morbi leo risus 9 | * Porta ac consectetur ac 10 | * Vestibulum at eros 11 | 12 | 13 | \\ 14 | 15 | 16 | * Cras justo odio 17 | * Dapibus ac facilisis in 18 | * Morbi leo risus 19 | * Porta ac consectetur ac 20 | * Vestibulum at eros 21 | 22 | 23 | ===== Badges ===== 24 | 25 | 26 | * Cras justo odio 14 27 | * Dapibus ac facilisis in 2 28 | * Morbi leo risus 1 29 | 30 | 31 | \\ 32 | 33 | 34 | * Cras justo odio 14 35 | * Dapibus ac facilisis in 2 36 | * Morbi leo risus 1 37 | 38 | 39 | ===== Linked items ===== 40 | 41 | 42 | * [[.:]] 43 | * [[:wiki:welcome]] 44 | * [[:wiki:syntax]] 45 | 46 | 47 | \\ 48 | 49 | 50 | * [[.:]] 51 | * [[:wiki:welcome]] 52 | * [[:wiki:syntax]] 53 | 54 | 55 | ===== Custom content ===== 56 | 57 | 58 | * [[.:]] \\ Bootstrap samples 59 | * [[:wiki:welcome]] \\ DokuWiki Welcome 60 | * [[:wiki:syntax]] \\ DokuWiki Syntax 61 | 62 | 63 | \\ 64 | 65 | 66 | * [[.:]] \\ Bootstrap samples 67 | * [[:wiki:welcome]] \\ DokuWiki Welcome 68 | * [[:wiki:syntax]] \\ DokuWiki Syntax 69 | 70 | 71 | ===== Icons Plugin ===== 72 | 73 | 74 | * {{fa>home}} [[:start|Home-Page]] 75 | 76 | 77 | \\ 78 | 79 | 80 | * {{fa>home}} [[:start|Home-Page]] 81 | 82 | -------------------------------------------------------------------------------- /exe/help/macro.txt: -------------------------------------------------------------------------------- 1 | ====== Macros ====== 2 | 3 | This plugin provide a special macro to control the flow of the page. 4 | 5 | ^ Macro ^ Description ^ 6 | | ''~~CLEARFIX~~'' | Clear the float | 7 | | ''~~PAGEBREAK~~'' | Add a page break | 8 | -------------------------------------------------------------------------------- /exe/help/menu.txt: -------------------------------------------------------------------------------- 1 | * [[macro]] 2 | * [[accordion]] 3 | * [[affix]] 4 | * [[alert]] 5 | * [[badge]] 6 | * [[button]] 7 | * [[callout]] 8 | * [[carousel]] 9 | * [[collapse]] 10 | * [[grid]] 11 | * [[image]] 12 | * [[jumbotron]] 13 | * [[label]] 14 | * [[lead]] 15 | * [[list-group]] 16 | * [[modal]] 17 | * [[nav]] 18 | * [[page-header]] 19 | * [[panel]] 20 | * [[popover]] 21 | * [[progress-bar]] 22 | * [[text]] 23 | * [[thumbnail]] 24 | * [[tooltip]] 25 | * [[well]] -------------------------------------------------------------------------------- /exe/help/modal.txt: -------------------------------------------------------------------------------- 1 | ====== Modal ====== 2 | 3 | Modals are streamlined, but flexible, dialog prompts with the minimum required functionality and smart defaults. 4 | 5 | 6 | ===== Examples ===== 7 | 8 | ==== Live Demo ==== 9 | 10 | Launch demo modal 11 | 12 | 13 | === Text in a modal === 14 | 15 | Duis mollis, est non commodo luctus, nisi erat porttitor ligula. 16 | 17 | === Popover in a modal === 18 | 19 | This button should trigger a popover on click. 20 | 21 | === Tooltips in a modal === 22 | 23 | This [[modal|link]] and that [[modal|link]] should have tooltips on hover. 24 | 25 | === Overflowing text to show scroll behavior === 26 | 27 | Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. 28 | 29 | Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. 30 | 31 | Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 32 | 33 | Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. 34 | 35 | Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. 36 | 37 | Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 38 | 39 | Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros. 40 | 41 | Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. 42 | 43 | Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla. 44 | 45 | 46 | \\ 47 | 48 | 49 | Launch demo modal 50 | 51 | 52 | === Text in a modal === 53 | 54 | Duis mollis, est non commodo luctus, nisi erat porttitor ligula. [...] 55 | 56 | 57 | 58 | \\ 59 | 60 | ==== Optional sizes ==== 61 | 62 | Modals have two optional sizes, available via ''size'' attribute. 63 | 64 | Large modal Small modal 65 | 66 | ... 67 | ... 68 | 69 | \\ 70 | 71 | 72 | Large modal Small modal 73 | 74 | ... 75 | ... 76 | 77 | 78 | \\ 79 | 80 | ===== Remove animation ===== 81 | 82 | For modals that simply appear rather than fade in to view, set to ''false'' the ''fade'' attribute. 83 | 84 | No fade animation 85 | 86 | ... 87 | 88 | 89 | \\ 90 | 91 | 92 | No fade animation 93 | 94 | ... 95 | 96 | 97 | \\ 98 | 99 | ===== Remote ===== 100 | 101 | Use ''remote'' attribute to display DokuWiki pages inside a modal window. 102 | 103 | Welcome to DokuWiki! 104 | 105 | 106 | 107 | \\ 108 | 109 | 110 | Welcome to DokuWiki! 111 | 112 | 113 | 114 | 115 | \\ 116 | 117 | ===== Options ===== 118 | 119 | 120 | ^ Name ^ Default ^ Values ^ Description ^ 121 | | ''backdrop'' | ''true'' | ''true'' ''false'' ''static'' | Includes a modal-backdrop element. Alternatively, specify ''static'' for a backdrop which doesn't close the modal on click. | 122 | | ''keyboard'' | ''true'' | ''true'' ''false'' | Closes the modal when escape key is pressed | 123 | | ''show'' | ''false'' | ''true'' ''false'' | Shows the modal when initialized | 124 | | ''fade'' | ''false'' | ''true'' ''false'' | Enable the fade animation | 125 | | ''dismiss'' | ''true'' | ''true'' ''false'' | Display a dismiss button | 126 | | ''size'' | NULL | ''sm'' ''lg'' | Modal size with | 127 | | ''id'' | NULL | | Modal ID (see [[button]]) | 128 | | ''title'' | NULL | | Modal title | 129 | | ''remote'' | NULL | | Display DokuWiki pages inside a Modal window | 130 | -------------------------------------------------------------------------------- /exe/help/nav.txt: -------------------------------------------------------------------------------- 1 | ====== Navs (Tabs & Pills) ====== 2 | 3 | ===== Tabs with DropDown menu ===== 4 | 5 | 13 | 14 | \\ 15 | 16 | 24 | 25 | \\ 26 | 27 | 28 | Instead of ''
'; 144 | } 145 | 146 | $renderer->doc .= $markup; 147 | return true; 148 | } 149 | 150 | return true; 151 | } 152 | } 153 | -------------------------------------------------------------------------------- /syntax/caption.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_caption extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'caption'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/carousel.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_carousel extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'carousel'; 17 | public $tag_attributes = array( 18 | 19 | 'interval' => array( 20 | 'type' => 'integer', 21 | 'values' => null, 22 | 'required' => false, 23 | 'default' => 5000), 24 | 25 | 'pause' => array( 26 | 'type' => 'string', 27 | 'values' => null, 28 | 'required' => false, 29 | 'default' => 'hover'), 30 | 31 | 'wrap' => array( 32 | 'type' => 'boolean', 33 | 'values' => null, 34 | 'required' => false, 35 | 'default' => true), 36 | 37 | 'keyboard' => array( 38 | 'type' => 'boolean', 39 | 'values' => null, 40 | 'required' => false, 41 | 'default' => true), 42 | 43 | ); 44 | 45 | public function render($mode, Doku_Renderer $renderer, $data) 46 | { 47 | 48 | if (empty($data)) { 49 | return false; 50 | } 51 | 52 | if ($mode !== 'xhtml') { 53 | return false; 54 | } 55 | 56 | /** @var Doku_Renderer_xhtml $renderer */ 57 | list($state, $match, $pos, $attributes) = $data; 58 | 59 | if ($state == DOKU_LEXER_ENTER) { 60 | $html5_attributes = array(); 61 | 62 | foreach ($attributes as $attribute => $value) { 63 | $html5_attributes[] = 'data-' . $attribute . '="' . $value . '"'; 64 | } 65 | 66 | $markup = '
'; 82 | return true; 83 | } 84 | 85 | return true; 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /syntax/collapse.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_collapse extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'collapse'; 17 | public $tag_attributes = array( 18 | 19 | 'id' => array( 20 | 'type' => 'string', 21 | 'values' => null, 22 | 'required' => true, 23 | 'default' => null), 24 | 25 | 'collapsed' => array( 26 | 'type' => 'boolean', 27 | 'values' => array(0, 1), 28 | 'required' => false, 29 | 'default' => false), 30 | 31 | ); 32 | 33 | public function render($mode, Doku_Renderer $renderer, $data) 34 | { 35 | 36 | if (empty($data)) { 37 | return false; 38 | } 39 | 40 | if ($mode !== 'xhtml') { 41 | return false; 42 | } 43 | 44 | /** @var Doku_Renderer_xhtml $renderer */ 45 | list($state, $match, $pos, $attributes) = $data; 46 | 47 | if ($state == DOKU_LEXER_ENTER) { 48 | $id = $attributes['id']; 49 | $collapsed = $attributes['collapsed']; 50 | $markup = '
'; 51 | 52 | $renderer->doc .= $markup; 53 | return true; 54 | 55 | } 56 | 57 | if ($state == DOKU_LEXER_EXIT) { 58 | $renderer->doc .= '
'; 59 | return true; 60 | } 61 | 62 | return true; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /syntax/column.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_column extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'col'; 17 | public $tag_attributes = array( 18 | 19 | 'lg' => array( 20 | 'type' => 'integer', 21 | 'values' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 22 | 'min' => 1, 23 | 'max' => 12, 24 | 'required' => false, 25 | 'default' => null), 26 | 27 | 'md' => array( 28 | 'type' => 'integer', 29 | 'values' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 30 | 'min' => 1, 31 | 'max' => 12, 32 | 'required' => false, 33 | 'default' => null), 34 | 35 | 'sm' => array( 36 | 'type' => 'integer', 37 | 'values' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 38 | 'min' => 1, 39 | 'max' => 12, 40 | 'required' => false, 41 | 'default' => null), 42 | 43 | 'xs' => array( 44 | 'type' => 'integer', 45 | 'values' => array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12), 46 | 'min' => 1, 47 | 'max' => 12, 48 | 'required' => false, 49 | 'default' => null), 50 | 51 | ); 52 | 53 | public function render($mode, Doku_Renderer $renderer, $data) 54 | { 55 | 56 | if (empty($data)) { 57 | return false; 58 | } 59 | 60 | if ($mode !== 'xhtml') { 61 | return false; 62 | } 63 | 64 | /** @var Doku_Renderer_xhtml $renderer */ 65 | list($state, $match, $pos, $attributes) = $data; 66 | 67 | if ($state == DOKU_LEXER_ENTER) { 68 | $col = ''; 69 | 70 | foreach (array('lg', 'md', 'sm', 'xs') as $device) { 71 | $col .= isset($attributes[$device]) ? "col-$device-{$attributes[$device]} " : ''; 72 | } 73 | 74 | $markup = '
'; 75 | 76 | $renderer->doc .= $markup; 77 | return true; 78 | } 79 | 80 | if ($state == DOKU_LEXER_UNMATCHED) { 81 | $renderer->doc .= $match; 82 | return true; 83 | 84 | } 85 | 86 | if ($state == DOKU_LEXER_EXIT) { 87 | $renderer->doc .= "
"; 88 | return true; 89 | } 90 | 91 | return true; 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /syntax/grid.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_grid extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'grid'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/hidden.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_hidden extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = ''; 18 | public $tag_name = 'hidden'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/image.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_image extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'image'; 17 | public $tag_attributes = array( 18 | 'shape' => array( 19 | 'type' => 'string', 20 | 'values' => array('rounded', 'circle', 'thumbnail', 'responsive'), 21 | 'required' => false, 22 | 'default' => ''), 23 | ); 24 | 25 | public function render($mode, Doku_Renderer $renderer, $data) 26 | { 27 | 28 | if (empty($data)) { 29 | return false; 30 | } 31 | 32 | if ($mode !== 'xhtml') { 33 | return false; 34 | } 35 | 36 | /** @var Doku_Renderer_xhtml $renderer */ 37 | list($state, $match, $pos, $attributes) = $data; 38 | 39 | if ($state == DOKU_LEXER_ENTER) { 40 | extract($attributes); 41 | 42 | $html5_data = array(); 43 | 44 | if ($shape) { 45 | $html5_data[] = 'data-img-shape="' . $shape . '"'; 46 | } 47 | 48 | $markup = ''; 49 | 50 | $renderer->doc .= $markup; 51 | return true; 52 | } 53 | 54 | if ($state == DOKU_LEXER_EXIT) { 55 | $renderer->doc .= ''; 56 | return true; 57 | } 58 | 59 | return true; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /syntax/invisible.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_invisible extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = ''; 18 | public $tag_name = 'invisible'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/jumbotron.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_jumbotron extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $pattern_start = '<(?:JUMBOTRON|jumbotron).*?>(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $tag_name = 'jumbotron'; 16 | public $tag_attributes = array( 17 | 18 | 'background' => array( 19 | 'type' => 'string', 20 | 'values' => null, 21 | 'required' => false, 22 | 'default' => null), 23 | 24 | 'color' => array( 25 | 'type' => 'string', 26 | 'values' => null, 27 | 'required' => false, 28 | 'default' => null), 29 | 30 | ); 31 | 32 | public function render($mode, Doku_Renderer $renderer, $data) 33 | { 34 | 35 | if (empty($data)) { 36 | return false; 37 | } 38 | 39 | if ($mode !== 'xhtml') { 40 | return false; 41 | } 42 | 43 | /** @var Doku_Renderer_xhtml $renderer */ 44 | list($state, $match, $pos, $attributes, $is_block) = $data; 45 | 46 | if ($state == DOKU_LEXER_ENTER) { 47 | $background = $attributes['background']; 48 | $color = $attributes['color']; 49 | 50 | $styles = array(); 51 | 52 | if ($background) { 53 | $styles[] = 'background-image:url(' . ml($background) . ')'; 54 | } 55 | 56 | if ($color) { 57 | $styles[] = 'color:' . hsc($color); 58 | } 59 | 60 | $markup = '
'; 61 | 62 | $renderer->doc .= $markup; 63 | return true; 64 | } 65 | 66 | if ($state == DOKU_LEXER_EXIT) { 67 | $renderer->doc .= '
'; 68 | return true; 69 | } 70 | 71 | return true; 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /syntax/label.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_label extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'normal'; 14 | public $pattern_start = '<(?:LABEL|label).*?>(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'label'; 17 | public $tag_attributes = array( 18 | 19 | 'type' => array( 20 | 'type' => 'string', 21 | 'values' => array('default', 'primary', 'success', 'info', 'warning', 'danger'), 22 | 'required' => true, 23 | 'default' => 'default'), 24 | 25 | 'icon' => array( 26 | 'type' => 'string', 27 | 'values' => null, 28 | 'required' => false, 29 | 'default' => null), 30 | 31 | ); 32 | 33 | public function render($mode, Doku_Renderer $renderer, $data) 34 | { 35 | 36 | if (empty($data)) { 37 | return false; 38 | } 39 | 40 | if ($mode !== 'xhtml') { 41 | return false; 42 | } 43 | 44 | /** @var Doku_Renderer_xhtml $renderer */ 45 | list($state, $match, $pos, $attributes, $is_block) = $data; 46 | 47 | global $label_tag; 48 | 49 | if ($state == DOKU_LEXER_ENTER) { 50 | $label_tag = (($is_block) ? 'div' : 'span'); 51 | $type = $attributes['type']; 52 | $icon = $attributes['icon']; 53 | 54 | $markup = '<' . $label_tag . ' class="bs-wrap bs-wrap-label label label-' . $type . '">'; 55 | 56 | if ($icon) { 57 | $markup .= ' '; 58 | } 59 | 60 | $renderer->doc .= $markup; 61 | return true; 62 | } 63 | 64 | if ($state == DOKU_LEXER_EXIT) { 65 | $renderer->doc .= ""; 66 | return true; 67 | } 68 | 69 | return true; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /syntax/lead.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_lead extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'lead'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/list.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_list extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'list-group'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/macros.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_macros extends DokuWiki_Syntax_Plugin 11 | { 12 | 13 | private $macros = array( 14 | '~~CLEARFIX~~', 15 | '~~PAGEBREAK~~', 16 | ); 17 | 18 | public function getType() 19 | { 20 | return 'substition'; 21 | } 22 | 23 | public function getSort() 24 | { 25 | return 99; 26 | } 27 | 28 | public function getPType() 29 | { 30 | return 'normal'; 31 | } 32 | 33 | public function connectTo($mode) 34 | { 35 | 36 | foreach ($this->macros as $macro) { 37 | $this->Lexer->addSpecialPattern($macro, $mode, 'plugin_bootswrapper_macros'); 38 | } 39 | 40 | } 41 | 42 | public function handle($match, $state, $pos, Doku_Handler $handler) 43 | { 44 | return array($match, $state, $pos); 45 | } 46 | 47 | public function render($mode, Doku_Renderer $renderer, $data) 48 | { 49 | if (empty($data)) { 50 | return false; 51 | } 52 | 53 | if ($mode !== 'xhtml') { 54 | return false; 55 | } 56 | 57 | list($match, $state, $pos) = $data; 58 | 59 | switch ($match) { 60 | case '~~CLEARFIX~~': 61 | $renderer->doc .= ''; 62 | break; 63 | case '~~PAGEBREAK~~': 64 | $renderer->doc .= ''; 65 | break; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /syntax/modal.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Jos Roossien 8 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 9 | */ 10 | 11 | class syntax_plugin_bootswrapper_modal extends syntax_plugin_bootswrapper_bootstrap 12 | { 13 | 14 | public $p_type = 'normal'; 15 | public $pattern_start = '(?=.*?)'; 16 | public $pattern_end = ''; 17 | public $tag_name = 'modal'; 18 | public $tag_attributes = array( 19 | 20 | 'id' => array( 21 | 'type' => 'string', 22 | 'values' => null, 23 | 'required' => true, 24 | 'default' => null), 25 | 26 | 'size' => array( 27 | 'type' => 'string', 28 | 'values' => array('lg', 'sm'), 29 | 'required' => false, 30 | 'default' => null), 31 | 32 | 'title' => array( 33 | 'type' => 'string', 34 | 'values' => null, 35 | 'required' => false, 36 | 'default' => null), 37 | 38 | 'keyboard' => array( 39 | 'type' => 'boolean', 40 | 'values' => array(0, 1), 41 | 'required' => false, 42 | 'default' => null), 43 | 44 | 'dismiss' => array( 45 | 'type' => 'boolean', 46 | 'values' => array(0, 1), 47 | 'required' => false, 48 | 'default' => true), 49 | 50 | 'show' => array( 51 | 'type' => 'boolean', 52 | 'values' => array(0, 1), 53 | 'required' => false, 54 | 'default' => false), 55 | 56 | 'fade' => array( 57 | 'type' => 'boolean', 58 | 'values' => array(0, 1), 59 | 'required' => false, 60 | 'default' => true), 61 | 62 | 'backdrop' => array( 63 | 'type' => 'string', 64 | 'values' => array('true', 'false', 'static'), 65 | 'required' => false, 66 | 'default' => null), 67 | 68 | 'remote' => array( 69 | 'type' => 'string', 70 | 'values' => null, 71 | 'required' => false, 72 | 'default' => null), 73 | 74 | ); 75 | 76 | public function render($mode, Doku_Renderer $renderer, $data) 77 | { 78 | 79 | if (empty($data)) { 80 | return false; 81 | } 82 | 83 | if ($mode !== 'xhtml') { 84 | return false; 85 | } 86 | 87 | /** @var Doku_Renderer_xhtml $renderer */ 88 | list($state, $match, $pos, $attributes) = $data; 89 | 90 | if ($state == DOKU_LEXER_ENTER) { 91 | $id = $attributes['id']; 92 | $size = $attributes['size']; 93 | $title = $attributes['title']; 94 | $keyboard = $attributes['keyboard']; 95 | $dismiss = $attributes['dismiss']; 96 | $show = $attributes['show']; 97 | $fade = $attributes['fade'] === true ? 'fade' : ''; 98 | $backdrop = $attributes['backdrop']; 99 | $remote = $attributes['remote']; 100 | 101 | $html5_attributes = array(); 102 | 103 | if ($remote) { 104 | $html5_attributes['data-remote'] = wl($remote, array('do' => 'export_xhtmlbody'), true); 105 | } 106 | 107 | if ($title) { 108 | $html5_attributes['data-labelledby'] = $title; 109 | } 110 | 111 | if ($show) { 112 | $html5_attributes['data-show'] = $show; 113 | } 114 | 115 | if ($backdrop) { 116 | $html5_attributes['data-backdrop'] = $backdrop; 117 | } 118 | 119 | if ($keyboard) { 120 | $html5_attributes['data-keyboard'] = $keyboard; 121 | } 122 | 123 | //Modal 124 | $markup = ''; 153 | return true; 154 | } 155 | 156 | return true; 157 | } 158 | } 159 | -------------------------------------------------------------------------------- /syntax/nav.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_nav extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $nav_type = null; 17 | public $tag_name = 'nav'; 18 | public $tag_attributes = array( 19 | 20 | 'type' => array( 21 | 'type' => 'string', 22 | 'values' => array('tabs', 'pills'), 23 | 'required' => true, 24 | 'default' => 'pills'), 25 | 26 | 'stacked' => array( 27 | 'type' => 'boolean', 28 | 'values' => array(0, 1), 29 | 'required' => false, 30 | 'default' => false), 31 | 32 | 'justified' => array( 33 | 'type' => 'boolean', 34 | 'values' => array(0, 1), 35 | 'required' => false, 36 | 'default' => false), 37 | 38 | 'fade' => array( 39 | 'type' => 'boolean', 40 | 'values' => array(0, 1), 41 | 'required' => false, 42 | 'default' => false), 43 | 44 | ); 45 | 46 | public function render($mode, Doku_Renderer $renderer, $data) 47 | { 48 | 49 | if (empty($data)) { 50 | return false; 51 | } 52 | 53 | if ($mode !== 'xhtml') { 54 | return false; 55 | } 56 | 57 | /** @var Doku_Renderer_xhtml $renderer */ 58 | list($state, $match, $pos, $attributes) = $data; 59 | 60 | if ($state == DOKU_LEXER_ENTER) { 61 | $html5data = array(); 62 | 63 | if (!empty($this->nav_type)) { 64 | $attributes['type'] = $this->nav_type; 65 | } 66 | 67 | foreach ($attributes as $key => $value) { 68 | $html5data[] = 'data-nav-' . $key . '="' . $value . '"'; 69 | } 70 | 71 | $markup = '
'; 72 | 73 | $renderer->doc .= $markup; 74 | return true; 75 | } 76 | 77 | if ($state == DOKU_LEXER_EXIT) { 78 | $renderer->doc .= "
"; 79 | return true; 80 | } 81 | 82 | return true; 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /syntax/pageheader.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_pageheader extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $pattern_start = ''; 14 | public $pattern_end = ''; 15 | public $template_start = ''; 17 | public $tag_name = 'page-header'; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /syntax/pane.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_pane extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'pane'; 17 | public $tag_attributes = array( 18 | 19 | 'id' => array( 20 | 'type' => 'string', 21 | 'values' => null, 22 | 'required' => true, 23 | 'default' => null), 24 | 25 | ); 26 | 27 | public function render($mode, Doku_Renderer $renderer, $data) 28 | { 29 | 30 | if (empty($data)) { 31 | return false; 32 | } 33 | 34 | if ($mode !== 'xhtml') { 35 | return false; 36 | } 37 | 38 | /** @var Doku_Renderer_xhtml $renderer */ 39 | list($state, $match, $pos, $attributes) = $data; 40 | 41 | if ($state == DOKU_LEXER_ENTER) { 42 | $id = $attributes['id']; 43 | $markup = '
'; 44 | 45 | $renderer->doc .= $markup; 46 | 47 | if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions 48 | $renderer->startSectionEdit($pos, array('target' => 'plugin_bootswrapper_pane', 'name' => $state)); 49 | } else { 50 | $renderer->startSectionEdit($pos, 'plugin_bootswrapper_pane', $state); 51 | } 52 | 53 | return true; 54 | } 55 | 56 | if ($state == DOKU_LEXER_EXIT) { 57 | $renderer->finishSectionEdit($pos + strlen($match)); 58 | $renderer->doc .= '
'; 59 | 60 | return true; 61 | } 62 | 63 | return true; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /syntax/panel.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_panel extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $pattern_start = '(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $tag_name = 'panel'; 16 | public $tag_attributes = array( 17 | 18 | 'type' => array( 19 | 'type' => 'string', 20 | 'values' => array('default', 'primary', 'success', 'info', 'warning', 'danger'), 21 | 'required' => true, 22 | 'default' => 'default'), 23 | 24 | 'title' => array( 25 | 'type' => 'string', 26 | 'values' => null, 27 | 'required' => false, 28 | 'default' => null), 29 | 30 | 'footer' => array( 31 | 'type' => 'string', 32 | 'values' => null, 33 | 'required' => false, 34 | 'default' => null), 35 | 36 | 'subtitle' => array( 37 | 'type' => 'string', 38 | 'values' => null, 39 | 'required' => false, 40 | 'default' => null), 41 | 42 | 'icon' => array( 43 | 'type' => 'string', 44 | 'values' => null, 45 | 'required' => false, 46 | 'default' => null), 47 | 48 | 'no-body' => array( 49 | 'type' => 'boolean', 50 | 'values' => array(0, 1), 51 | 'required' => false, 52 | 'default' => false), 53 | 54 | ); 55 | 56 | public function render($mode, Doku_Renderer $renderer, $data) 57 | { 58 | 59 | if (empty($data)) { 60 | return false; 61 | } 62 | 63 | if ($mode !== 'xhtml') { 64 | return false; 65 | } 66 | 67 | /** @var Doku_Renderer_xhtml $renderer */ 68 | list($state, $match, $pos, $attributes) = $data; 69 | 70 | global $nobody, $footer; 71 | 72 | if ($state == DOKU_LEXER_ENTER) { 73 | $type = $attributes['type']; 74 | $title = (isset($attributes['title']) ? $attributes['title'] : false); 75 | $footer = (isset($attributes['footer']) ? $attributes['footer'] : false); 76 | $subtitle = (isset($attributes['subtitle']) ? $attributes['subtitle'] : false); 77 | $icon = (isset($attributes['icon']) ? $attributes['icon'] : false); 78 | $nobody = (isset($attributes['no-body']) ? $attributes['no-body'] : false); 79 | 80 | $markup = '
'; 81 | 82 | if ($title || $subtitle) { 83 | 84 | if ($icon) { 85 | $title = ' ' . $title; 86 | } 87 | 88 | $markup .= '

' . $title . '

' . $subtitle . '
'; 89 | 90 | } 91 | 92 | if (!$nobody) { 93 | $markup .= '
'; 94 | } 95 | 96 | if (defined('SEC_EDIT_PATTERN')) { // for DokuWiki Greebo and more recent versions 97 | $renderer->startSectionEdit($pos, array('target' => 'plugin_bootswrapper_panel', 'name' => $state)); 98 | } else { 99 | $renderer->startSectionEdit($pos, 'plugin_bootswrapper_panel', $state); 100 | } 101 | 102 | $renderer->doc .= $markup; 103 | 104 | return true; 105 | } 106 | 107 | if ($state == DOKU_LEXER_EXIT) { 108 | $markup = ''; 109 | 110 | if (!$nobody) { 111 | $markup = '
'; 112 | } 113 | 114 | if ($footer) { 115 | $markup .= ''; 116 | } 117 | 118 | $markup .= '
'; 119 | $renderer->doc .= $markup; 120 | 121 | $renderer->finishSectionEdit($pos + strlen($match)); 122 | 123 | return true; 124 | } 125 | 126 | return true; 127 | } 128 | } 129 | -------------------------------------------------------------------------------- /syntax/panelbody.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_panelbody extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'panel-body'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/pills.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_pills extends syntax_plugin_bootswrapper_nav 11 | { 12 | 13 | public $pattern_start = '(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $nav_type = 'pills'; 16 | public $tag_name = 'pills'; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /syntax/popover.php: -------------------------------------------------------------------------------- 1 | 7 | * @author Giuseppe Di Terlizzi 8 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 9 | */ 10 | 11 | class syntax_plugin_bootswrapper_popover extends syntax_plugin_bootswrapper_bootstrap 12 | { 13 | 14 | public $p_type = 'normal'; 15 | public $pattern_start = '(?=.*?)'; 16 | public $pattern_end = ''; 17 | public $tag_name = 'popover'; 18 | public $tag_attributes = array( 19 | 20 | 'placement' => array( 21 | 'type' => 'string', 22 | 'values' => array('top', 'bottom', 'left', 'right', 'auto', 'auto top', 'auto bottom', 'auto left', 'auto right'), 23 | 'required' => true, 24 | 'default' => 'right'), 25 | 26 | 'title' => array( 27 | 'type' => 'string', 28 | 'values' => null, 29 | 'required' => false, 30 | 'default' => null), 31 | 32 | 'content' => array( 33 | 'type' => 'string', 34 | 'values' => null, 35 | 'required' => true, 36 | 'default' => null), 37 | 38 | 'trigger' => array( 39 | 'type' => 'multiple', 40 | 'values' => array('click', 'hover', 'focus'), 41 | 'required' => true, 42 | 'default' => 'click'), 43 | 44 | 'html' => array( 45 | 'type' => 'boolean', 46 | 'values' => array(0, 1), 47 | 'required' => false, 48 | 'default' => false), 49 | 50 | 'animation' => array( 51 | 'type' => 'boolean', 52 | 'values' => array(0, 1), 53 | 'required' => false, 54 | 'default' => true), 55 | 56 | 'delay' => array( 57 | 'type' => 'integer', 58 | 'values' => null, 59 | 'required' => false, 60 | 'default' => 0), 61 | 62 | 'delay-show' => array( 63 | 'type' => 'integer', 64 | 'values' => null, 65 | 'required' => false, 66 | 'default' => 0), 67 | 68 | 'delay-hide' => array( 69 | 'type' => 'integer', 70 | 'values' => null, 71 | 'required' => false, 72 | 'default' => 0), 73 | 74 | ); 75 | 76 | public function render($mode, Doku_Renderer $renderer, $data) 77 | { 78 | 79 | if (empty($data)) { 80 | return false; 81 | } 82 | 83 | if ($mode !== 'xhtml') { 84 | return false; 85 | } 86 | 87 | /** @var Doku_Renderer_xhtml $renderer */ 88 | list($state, $match, $pos, $attributes) = $data; 89 | 90 | if ($state == DOKU_LEXER_ENTER) { 91 | $html5_data = array(); 92 | 93 | extract($attributes); 94 | 95 | if ($html) { 96 | $title = hsc(p_render('xhtml', p_get_instructions($title), $info)); 97 | $content = hsc(p_render('xhtml', p_get_instructions($content), $info)); 98 | } 99 | 100 | if ($trigger) { 101 | $html5_data[] = 'data-trigger="' . $trigger . '"'; 102 | } 103 | 104 | if ($animation) { 105 | $html5_data[] = 'data-animation="' . $animation . '"'; 106 | } 107 | 108 | if ($html) { 109 | $html5_data[] = 'data-html="' . $html . '"'; 110 | } 111 | 112 | if ($placement) { 113 | $html5_data[] = 'data-placement="' . $placement . '"'; 114 | } 115 | 116 | if ($content) { 117 | $html5_data[] = 'data-content="' . $content . '"'; 118 | } 119 | 120 | if ($delay) { 121 | $html5_data[] = 'data-delay="' . $delay . '"'; 122 | } 123 | 124 | if (!$delay && ($attributes['delay-hide'] || $attributes['delay-show'])) { 125 | $delays = array(); 126 | $show = $attributes['delay-show']; 127 | $hide = $attributes['delay-hide']; 128 | 129 | if ($hide) { 130 | $delays['hide'] = $hide; 131 | } 132 | 133 | if ($show) { 134 | $delays['show'] = $show; 135 | } 136 | 137 | $html5_data[] = "data-delay='" . json_encode($delays) . "'"; 138 | } 139 | 140 | $markup = ''; 141 | 142 | $renderer->doc .= $markup; 143 | 144 | return true; 145 | } 146 | 147 | if ($state == DOKU_LEXER_EXIT) { 148 | $renderer->doc .= ''; 149 | return true; 150 | } 151 | 152 | return true; 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /syntax/progress.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 9 | */ 10 | 11 | class syntax_plugin_bootswrapper_progress extends syntax_plugin_bootswrapper_bootstrap 12 | { 13 | 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'progress'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/progressbar.php: -------------------------------------------------------------------------------- 1 | 8 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 9 | */ 10 | 11 | class syntax_plugin_bootswrapper_progressbar extends syntax_plugin_bootswrapper_bootstrap 12 | { 13 | 14 | public $p_type = 'block'; 15 | public $pattern_start = '<(?:bar).*?>(?=.*?)'; 16 | public $pattern_end = ''; 17 | public $tag_name = 'bar'; 18 | public $tag_attributes = array( 19 | 20 | 'type' => array( 21 | 'type' => 'string', 22 | 'values' => array('success', 'info', 'warning', 'danger'), 23 | 'required' => false, 24 | 'default' => 'info'), 25 | 26 | 'value' => array( 27 | 'type' => 'integer', 28 | 'min' => 0, 29 | 'max' => 100, 30 | 'values' => null, 31 | 'required' => true, 32 | 'default' => 0), 33 | 34 | 'striped' => array( 35 | 'type' => 'boolean', 36 | 'values' => array(0, 1), 37 | 'required' => false, 38 | 'default' => false), 39 | 40 | 'showvalue' => array( 41 | 'type' => 'boolean', 42 | 'values' => array(0, 1), 43 | 'required' => false, 44 | 'default' => false), 45 | 46 | 'animate' => array( 47 | 'type' => 'boolean', 48 | 'values' => array(0, 1), 49 | 'required' => false, 50 | 'default' => false), 51 | ); 52 | 53 | public function render($mode, Doku_Renderer $renderer, $data) 54 | { 55 | 56 | if (empty($data)) { 57 | return false; 58 | } 59 | 60 | if ($mode !== 'xhtml') { 61 | return false; 62 | } 63 | 64 | /** @var Doku_Renderer_xhtml $renderer */ 65 | list($state, $match, $pos, $attributes) = $data; 66 | 67 | if ($state == DOKU_LEXER_ENTER) { 68 | $classes = ""; 69 | $striped = (isset($attributes['striped']) ? $attributes['striped'] : $this->tag_attributes['striped']['default']); 70 | $animate = (isset($attributes['animate']) ? $attributes['animate'] : $this->tag_attributes['animate']['default']); 71 | $showvalue = (isset($attributes['showvalue']) ? $attributes['showvalue'] : $this->tag_attributes['showvalue']['default']); 72 | $value = (isset($attributes['value']) ? $attributes['value'] : $this->tag_attributes['value']['default']); 73 | $type = (isset($attributes['type']) ? $attributes['type'] : $this->tag_attributes['type']['default']); 74 | 75 | if ($striped) { 76 | $classes = "progress-bar-striped"; 77 | } 78 | 79 | if ($animate) { 80 | $classes .= " active"; 81 | } 82 | 83 | $markup = '
'; 84 | 85 | if ($showvalue) { 86 | $markup .= "$value%"; 87 | } else { 88 | $markup .= '' . $value . '% '; 89 | } 90 | 91 | $renderer->doc .= $markup; 92 | 93 | return true; 94 | } 95 | 96 | if ($state == DOKU_LEXER_EXIT) { 97 | $renderer->doc .= '
'; 98 | return true; 99 | } 100 | 101 | return true; 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /syntax/row.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_row extends syntax_plugin_bootswrapper_grid 11 | { 12 | 13 | public $pattern_start = ''; 14 | public $pattern_end = ''; 15 | public $tag_name = 'row'; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /syntax/show.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_show extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'show'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/slide.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_slide extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'slide'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/tabs.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_tabs extends syntax_plugin_bootswrapper_nav 11 | { 12 | 13 | public $pattern_start = '(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $nav_type = 'tabs'; 16 | public $tag_name = 'tabs'; 17 | 18 | } 19 | -------------------------------------------------------------------------------- /syntax/text.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_text extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'normal'; 14 | public $pattern_start = '<(?:TEXT|text).*?>(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'text'; 17 | public $tag_attributes = array( 18 | 19 | 'type' => array( 20 | 'type' => 'string', 21 | 'values' => array('muted', 'primary', 'success', 'info', 'warning', 'danger'), 22 | 'required' => false, 23 | 'default' => null), 24 | 25 | 'size' => array( 26 | 'type' => 'string', 27 | 'values' => null, 28 | 'required' => false, 29 | 'default' => null), 30 | 31 | 'background' => array( 32 | 'type' => 'string', 33 | 'values' => array('primary', 'success', 'info', 'warning', 'danger'), 34 | 'required' => false, 35 | 'default' => null), 36 | 37 | 'align' => array( 38 | 'type' => 'string', 39 | 'values' => array('left', 'center', 'right', 'justify', 'nowrap'), 40 | 'required' => false, 41 | 'default' => null), 42 | 43 | 'transform' => array( 44 | 'type' => 'string', 45 | 'values' => array('lowercase', 'uppercase', 'capitalize'), 46 | 'required' => false, 47 | 'default' => null), 48 | 49 | ); 50 | 51 | public function render($mode, Doku_Renderer $renderer, $data) 52 | { 53 | 54 | if (empty($data)) { 55 | return false; 56 | } 57 | 58 | if ($mode !== 'xhtml') { 59 | return false; 60 | } 61 | 62 | /** @var Doku_Renderer_xhtml $renderer */ 63 | list($state, $match, $pos, $attributes, $is_block) = $data; 64 | 65 | global $text_tag; 66 | 67 | if ($state == DOKU_LEXER_ENTER) { 68 | $text_tag = (($is_block) ? 'div' : 'span'); 69 | $color = (isset($attributes['type']) ? $attributes['type'] : null); 70 | $size = (isset($attributes['size']) ? $attributes['size'] : null); 71 | $background = (isset($attributes['background']) ? $attributes['background'] : null); 72 | $align = (isset($attributes['align']) ? $attributes['align'] : null); 73 | $transform = (isset($attributes['transform']) ? $attributes['transform'] : null); 74 | 75 | $classes = array(); 76 | $styles = array(); 77 | 78 | $classes[] = 'bs-wrap'; 79 | $classes[] = 'bs-wrap-text'; 80 | $classes[] = 'text'; 81 | 82 | if ($align && $is_block) { 83 | $classes[] = "text-$align"; 84 | } 85 | 86 | if ($color) { 87 | $classes[] = "text-$color"; 88 | } 89 | 90 | if ($transform) { 91 | $classes[] = "text-$transform"; 92 | } 93 | 94 | if ($background) { 95 | $classes[] = "bg-$background"; 96 | } 97 | 98 | if ($size) { 99 | if (strtolower($size) == 'small') { 100 | $classes[] = 'small'; 101 | } else { 102 | $styles['font-size'] = $size; 103 | } 104 | } 105 | 106 | $text_attributes = $this->buildAttributes(array( 107 | 'class' => $classes, 108 | 'style' => $styles 109 | )); 110 | 111 | $markup = "<$text_tag $text_attributes>"; 112 | 113 | $renderer->doc .= $markup; 114 | return true; 115 | } 116 | 117 | if ($state == DOKU_LEXER_EXIT) { 118 | $renderer->doc .= ""; 119 | return true; 120 | } 121 | 122 | return true; 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /syntax/thumbnail.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_thumbnail extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'block'; 14 | public $pattern_start = ''; 15 | public $pattern_end = ''; 16 | public $template_start = '
'; 17 | public $template_end = '
'; 18 | public $tag_name = 'thumbnail'; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /syntax/tooltip.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_tooltip extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | public $p_type = 'normal'; 13 | public $pattern_start = '(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $tag_name = 'tooltip'; 16 | public $tag_attributes = array( 17 | 18 | 'placement' => array( 19 | 'type' => 'string', 20 | 'values' => array('top', 'bottom', 'left', 'right', 'auto'), 21 | 'required' => true, 22 | 'default' => 'top'), 23 | 24 | 'title' => array( 25 | 'type' => 'string', 26 | 'values' => null, 27 | 'required' => true, 28 | 'default' => null), 29 | 30 | 'html' => array( 31 | 'type' => 'boolean', 32 | 'values' => array(0, 1), 33 | 'required' => false, 34 | 'default' => false), 35 | 36 | ); 37 | 38 | public function render($mode, Doku_Renderer $renderer, $data) 39 | { 40 | 41 | if (empty($data)) { 42 | return false; 43 | } 44 | 45 | if ($mode !== 'xhtml') { 46 | return false; 47 | } 48 | 49 | /** @var Doku_Renderer_xhtml $renderer */ 50 | list($state, $match, $pos, $attributes) = $data; 51 | 52 | if ($state == DOKU_LEXER_ENTER) { 53 | $placement = $attributes['placement']; 54 | $title = $attributes['title']; 55 | $html = $attributes['html']; 56 | 57 | if ($html) { 58 | $title = hsc(p_render('xhtml', p_get_instructions($title), $info)); 59 | } 60 | 61 | $markup = ''; 62 | 63 | $renderer->doc .= $markup; 64 | return true; 65 | } 66 | 67 | if ($state == DOKU_LEXER_EXIT) { 68 | $renderer->doc .= ''; 69 | return true; 70 | } 71 | 72 | return true; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /syntax/well.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_well extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $p_type = 'normal'; 14 | public $pattern_start = '(?=.*?)'; 15 | public $pattern_end = ''; 16 | public $tag_name = 'well'; 17 | public $tag_attributes = array( 18 | 19 | 'size' => array( 20 | 'type' => 'string', 21 | 'values' => array('lg', 'sm'), 22 | 'required' => false, 23 | 'default' => null), 24 | 25 | ); 26 | 27 | public function render($mode, Doku_Renderer $renderer, $data) 28 | { 29 | 30 | if (empty($data)) { 31 | return false; 32 | } 33 | 34 | if ($mode !== 'xhtml') { 35 | return false; 36 | } 37 | 38 | /** @var Doku_Renderer_xhtml $renderer */ 39 | list($state, $match, $pos, $attributes) = $data; 40 | 41 | if ($state == DOKU_LEXER_ENTER) { 42 | $size = ($attributes['size']) ? 'well-' . $attributes['size'] : ''; 43 | $markup = '
'; 44 | 45 | $renderer->doc .= $markup; 46 | return true; 47 | } 48 | 49 | if ($state == DOKU_LEXER_EXIT) { 50 | $renderer->doc .= '
'; 51 | return true; 52 | } 53 | 54 | return true; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /syntax/wrapper.php: -------------------------------------------------------------------------------- 1 | 7 | * @copyright (C) 2015-2020, Giuseppe Di Terlizzi 8 | */ 9 | 10 | class syntax_plugin_bootswrapper_wrapper extends syntax_plugin_bootswrapper_bootstrap 11 | { 12 | 13 | public $pattern_start = '<(?:WRAPPER|wrapper).*?>(?=.*?)'; 14 | public $pattern_end = ''; 15 | public $tag_name = 'wrapper'; 16 | 17 | public $tag_attributes = array( 18 | 19 | 'screen' => array( 20 | 'type' => 'boolean', 21 | 'values' => array(0, 1), 22 | 'required' => false, 23 | 'default' => false), 24 | 25 | 'print' => array( 26 | 'type' => 'boolean', 27 | 'values' => array(0, 1), 28 | 'required' => false, 29 | 'default' => false), 30 | 31 | ); 32 | 33 | public function render($mode, Doku_Renderer $renderer, $data) 34 | { 35 | 36 | if (empty($data)) { 37 | return false; 38 | } 39 | 40 | if ($mode !== 'xhtml') { 41 | return false; 42 | } 43 | 44 | /** @var Doku_Renderer_xhtml $renderer */ 45 | list($state, $match, $pos, $attributes, $is_block) = $data; 46 | 47 | global $wrapper_tag; 48 | 49 | if ($state == DOKU_LEXER_ENTER) { 50 | $wrapper_tag = ($is_block) ? 'div' : 'span'; 51 | $wrap_classes = $attributes['class']; 52 | $wrap_classes[] = 'bs-wrapper'; 53 | $wrapper_attributes = $this->buildAttributes($attributes, array('class' => $wrap_classes)); 54 | $markup = "<$wrapper_tag $wrapper_attributes>"; 55 | 56 | $renderer->doc .= $markup; 57 | 58 | return true; 59 | } 60 | 61 | if ($state == DOKU_LEXER_EXIT) { 62 | $renderer->doc .= ""; 63 | return true; 64 | } 65 | 66 | return false; 67 | } 68 | } 69 | --------------------------------------------------------------------------------