├── .gitignore ├── META-INF └── plugin.xml ├── README.adoc ├── bootstrap3.iml ├── convert.js ├── doc ├── Development.txt └── TODO.txt ├── generateReadme.groovy ├── generateReadmeFA.groovy ├── resources ├── images │ └── plus.png ├── liveTemplates │ ├── Bootstrap3-jade.xml │ ├── Bootstrap3.xml │ ├── Bootstrap4.xml │ ├── FontAwesome-jade.xml │ └── FontAwesome.xml ├── messages │ └── bootstrapBundle.properties └── partials │ └── cards.xml ├── screencasts └── starter-template.gif ├── src └── com │ └── intellij │ └── plugin │ └── bootstrap │ ├── BootstrapBundle.java │ ├── BootstrapPluginApplicationComponent.java │ ├── BootstrapPluginState.java │ ├── BootstrapPluginUpdateProjectComponent.java │ ├── BootstrapSettings.java │ ├── Version.java │ └── templates │ └── BootstrapTemplatesProvider.java └── x.form /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | out 3 | .DS_Store 4 | bootstrap3.jar 5 | bootstrap3.zip 6 | test.html 7 | css -------------------------------------------------------------------------------- /META-INF/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | nl.jworks.intellij.bootstrap3 3 | Bootstrap 3 4 | 4.1.0 5 | Jworks 6 | 7 | Bootstrap 3 and Bootstrap 4 live templates / snippets. 9 | 10 | Documentation / list of snippets 11 | 12 | Follow me on Twitter: @epragt 13 | ]]> 14 | 15 | 17 | 4.0.4 Fixed issue 56 and 55 18 | 4.0.3 Fixed issue 54 19 | 4.0.2 Fixed cards support for Bootstrap 4 Beta. 20 | 4.0.1 Bugfix. 21 | 4.0 Fixed some small issues, added Bootstrap 4 Beta support 22 | ]]> 23 | 24 | 25 | 26 | 27 | 28 | 30 | com.intellij.modules.lang 31 | com.intellij.modules.platform 32 | 33 | 34 | 35 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | com.intellij.plugin.bootstrap.BootstrapPluginApplicationComponent 46 | 47 | 48 | 49 | 50 | 51 | 52 | com.intellij.plugin.bootstrap.BootstrapPluginUpdateProjectComponent 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /README.adoc: -------------------------------------------------------------------------------- 1 | = Bootstrap IntelliJ Plugin 2 | 3 | The IntelliJ Bootstrap plugin for Bootstrap 3 and Bootstrap 4. This plugin enhances productivity by providing live templates - lots of live templates! This plugin works for the following JetBrains products: 4 | 5 | * IntelliJ IDEA 6 | * WebStorm and PhpStorm 7 | * Android Studio 8 | * PyCharm 9 | * RubyMine 10 | * AppCode 11 | * CLion 12 | * Gogland 13 | * Rider 14 | 15 | And supports *Bootstrap 3.3.7* and *Bootstrap 4.0.0-beta*. 16 | 17 | If you like the Bootstrap plugin, please consider donating: image:https://www.paypal.com/en_US/i/btn/btn_donate_SM.gif[Donate,link=https://paypal.me/intellijbootstrap] 18 | 19 | image:https://raw.githubusercontent.com/bodiam/intellij-bootstrap3/master/screencasts/starter-template.gif[Plugin in action] 20 | 21 | Feel free to let me know what else you want added via the https://github.com/bodiam/intellij-bootstrap3/issues[issues]. 22 | 23 | Suggestions, feedback and other comments welcome via https://twitter.com/epragt[@epragt] on Twitter. 24 | 25 | === Installation (in 3 easy steps) 26 | 27 | To install the plugin open your editor (IntelliJ) and hit: 28 | 29 | 1) ``File`` > ``Settings`` > ``Plugins`` and click on the ``Browse repositories`` button. 30 | 31 | 2) Look for `Bootstrap 3` the right click and select `Download plugin`. 32 | 33 | 3) Finally hit the `Apply` button, agree to restart your IDE and you're all done! 34 | 35 | === Usage 36 | 37 | To use the plugin, open an editor, and start typing `bs3-` for Bootstrap 3, or `bs4-` for Bootstrap 4 templates followed by pressing CMD+J. 38 | A list of templates will show up. 39 | Alternatively, you can type e.g. `alert`, followed by CMD+J, to immediately show only the alert templates. 40 | 41 | == What's new 42 | 43 | Since 4.1.0 (15 April 2018) 44 | 45 | * Added new template (bs3-panel:default) thanks to cedriczie 46 | 47 | Since 4.0 (1 Oct 2017) 48 | 49 | * Bugfixes 50 | * Initial Bootstrap 4 support (expect more to come soon) 51 | 52 | _Note: version 3.0 was skipped to better align with Bootstrap versioning_ 53 | 54 | Since 2.4 (12 Mar 2017) 55 | 56 | * Added bs3-form-field:select, thanks to https://github.com/JeyKeu[JQ] 57 | 58 | Since 2.3 (13 Feb 2017) 59 | 60 | * Bootstrap 3.3.7 61 | * Code will now be reformatted, thanks to https://github.com/azeemhassni[Azeem Hassni]. 62 | 63 | Since 2.2.1 (7 Jan 2016) 64 | 65 | * bugfixes, thanks to https://github.com/azeemhassni[Azeem Hassni]. 66 | 67 | Since 2.2 (14 Dec 2015) 68 | 69 | * upgraded to Bootstrap 3.3.6 70 | 71 | Since 2.1 (22 Jul 2015) 72 | 73 | * upgraded to Bootstrap 3.3.5 thanks to https://github.com/lihaibh[Chuck Housley]. 74 | 75 | Since 2.0 (26 May 2015) 76 | 77 | * Jade support 78 | * Small bugfixes 79 | 80 | Thanks https://github.com/pjedwabny[Paweł Jedwabny], https://github.com/lihaibh[Lihai Ben-Haim] and https://github.com/oscarbatlle[Oscar Batlle]! 81 | 82 | == What's included - contents 83 | 84 | * link:#alert[Alert] 85 | * link:#alert-link[Alert-link] 86 | * link:#alert[Alert] 87 | * link:#badge[Badge] 88 | * link:#breadcrumbs[Breadcrumbs] 89 | * link:#button-group[Button-group] 90 | * link:#button-toolbar[Button-toolbar] 91 | * link:#button[Button] 92 | * link:#cdn[Cdn] 93 | * link:#checkbox[Checkbox] 94 | * link:#clearfix[Clearfix] 95 | * link:#col[Col] 96 | * link:#container[Container] 97 | * link:#dismissable-alert[Dismissable-alert] 98 | * link:#feature[Feature] 99 | * link:#form[Form] 100 | * link:#form-field[Form-field] 101 | * link:#form[Form] 102 | * link:#icon[Icon] 103 | * link:#image[Image] 104 | * link:#input[Input] 105 | * link:#jumbotron[Jumbotron] 106 | * link:#label[Label] 107 | * link:#list-group[List-group] 108 | * link:#media-object[Media-object] 109 | * link:#modal[Modal] 110 | * link:#navbar[Navbar] 111 | * link:#page-header[Page-header] 112 | * link:#pager[Pager] 113 | * link:#pagination[Pagination] 114 | * link:#panel[Panel] 115 | * link:#pills[Pills] 116 | * link:#progress-bar[Progress-bar] 117 | * link:#radio[Radio] 118 | * link:#responsive-embed[Responsive-embed] 119 | * link:#row[Row] 120 | * link:#select[Select] 121 | * link:#submit[Submit] 122 | * link:#table[Table] 123 | * link:#tabs[Tabs] 124 | * link:#template[Template] 125 | * link:#thumbnail[Thumbnail] 126 | * link:#well[Well] 127 | 128 | === Alert 129 | 130 | |=== 131 | |Component |Snippet code |Context 132 | 133 | |Alert |bs3-alert |HTML 134 | |=== 135 | 136 | === Alert-link 137 | 138 | |=== 139 | |Component |Snippet code |Context 140 | 141 | |Alert with alert link (warning) |bs3-alert-link |HTML 142 | |=== 143 | 144 | === Alert 145 | 146 | |=== 147 | |Component |Snippet code |Context 148 | 149 | |Alert (Danger) |bs3-alert:danger |HTML 150 | |Alert (Info) |bs3-alert:info |HTML 151 | |Alert (Success) |bs3-alert:success |HTML 152 | |Alert (Warning) |bs3-alert:warning |HTML 153 | |=== 154 | 155 | === Badge 156 | 157 | |=== 158 | |Component |Snippet code |Context 159 | 160 | |Badge |bs3-badge |HTML 161 | |=== 162 | 163 | === Breadcrumbs 164 | 165 | |=== 166 | |Component |Snippet code |Context 167 | 168 | |Breadcrumbs |bs3-breadcrumbs |HTML 169 | |=== 170 | 171 | === Button-group 172 | 173 | |=== 174 | |Component |Snippet code |Context 175 | 176 | |Button group |bs3-button-group |HTML 177 | |Button group (Vertical orientation) |bs3-button-group:vertical |HTML 178 | |=== 179 | 180 | === Button-toolbar 181 | 182 | |=== 183 | |Component |Snippet code |Context 184 | 185 | |Button toolbar |bs3-button-toolbar |HTML 186 | |=== 187 | 188 | === Button 189 | 190 | |=== 191 | |Component |Snippet code |Context 192 | 193 | |Full dropdown example |bs3-button:dropdown |HTML 194 | |=== 195 | 196 | === Cdn 197 | 198 | |=== 199 | |Component |Snippet code |Context 200 | 201 | |Bootstrap 3 CSS & JS CDN |bs3-cdn |HTML 202 | |Bootstrap 3 CSS CDN |bs3-cdn:css |HTML 203 | |Bootstrap 3 JavaScript CDN |bs3-cdn:js |HTML 204 | |=== 205 | 206 | === Checkbox 207 | 208 | |=== 209 | |Component |Snippet code |Context 210 | 211 | |Checkbox Input Field |bs3-checkbox |HTML 212 | |=== 213 | 214 | === Clearfix 215 | 216 | |=== 217 | |Component |Snippet code |Context 218 | 219 | |Clearfix |bs3-clearfix |HTML 220 | |=== 221 | 222 | === Col 223 | 224 | |=== 225 | |Component |Snippet code |Context 226 | 227 | |Column 1 |bs3-col:1 |HTML 228 | |Column 10 |bs3-col:10 |HTML 229 | |Column 11 |bs3-col:11 |HTML 230 | |Column 12 |bs3-col:12 |HTML 231 | |Column 2 |bs3-col:2 |HTML 232 | |Column 3 |bs3-col:3 |HTML 233 | |Column 4 |bs3-col:4 |HTML 234 | |Column 5 |bs3-col:5 |HTML 235 | |Column 6 |bs3-col:6 |HTML 236 | |Column 7 |bs3-col:7 |HTML 237 | |Column 8 |bs3-col:8 |HTML 238 | |Column 9 |bs3-col:9 |HTML 239 | |=== 240 | 241 | === Container 242 | 243 | |=== 244 | |Component |Snippet code |Context 245 | 246 | |Container |bs3-container |HTML 247 | |Container Fluid |bs3-container:fluid |HTML 248 | |=== 249 | 250 | === Dismissable-alert 251 | 252 | |=== 253 | |Component |Snippet code |Context 254 | 255 | |Dismissable alert (danger) |bs3-dismissable-alert:danger |HTML 256 | |Dismissable alert (info) |bs3-dismissable-alert:info |HTML 257 | |Dismissable alert (success) |bs3-dismissable-alert:success |HTML 258 | |Dismissable alert (warning) |bs3-dismissable-alert:warning |HTML 259 | |=== 260 | 261 | === Feature 262 | 263 | |=== 264 | |Component |Snippet code |Context 265 | 266 | |Carousel Rows |bs3-feature:carousel-rows |HTML 267 | |Carousel Rows |bs3-feature:carousel-rows-css |CSS 268 | |Beautiful image card with description |bs3-feature:image-card-with-description |HTML 269 | |Beautiful image card with description |bs3-feature:image-card-with-description-css |CSS 270 | |Thumbnail in gallery |bs3-feature:thumbnail |HTML 271 | |Thumbnail gallery |bs3-feature:thumbnail-gallery |HTML 272 | |=== 273 | 274 | === Form 275 | 276 | |=== 277 | |Component |Snippet code |Context 278 | 279 | |Form |bs3-form |HTML 280 | |=== 281 | 282 | === Form-field 283 | 284 | |=== 285 | |Component |Snippet code |Context 286 | 287 | |No description |bs3-form-field:button |HTML 288 | |No description |bs3-form-field:checkbox |HTML 289 | |No description |bs3-form-field:select |HTML 290 | |No description |bs3-form-field:text |HTML 291 | |No description |bs3-form-field:time |HTML 292 | |=== 293 | 294 | === Form 295 | 296 | |=== 297 | |Component |Snippet code |Context 298 | 299 | |Form (Horizontal) |bs3-form:horizontal |HTML 300 | |Form (Inline) |bs3-form:inline |HTML 301 | |Form (Label) |bs3-form:label |HTML 302 | |=== 303 | 304 | === Icon 305 | 306 | |=== 307 | |Component |Snippet code |Context 308 | 309 | |Font Awesome Icon |bs3-icon |HTML 310 | |Glyphicon |bs3-icon:glyphicon |HTML 311 | |=== 312 | 313 | === Image 314 | 315 | |=== 316 | |Component |Snippet code |Context 317 | 318 | |Image |bs3-image |HTML 319 | |=== 320 | 321 | === Input 322 | 323 | |=== 324 | |Component |Snippet code |Context 325 | 326 | |Input (Form Input) |bs3-input |HTML 327 | |Horizontal Form Input Field |bs3-input:h |HTML 328 | |=== 329 | 330 | === Jumbotron 331 | 332 | |=== 333 | |Component |Snippet code |Context 334 | 335 | |Jumbotron |bs3-jumbotron |HTML 336 | |=== 337 | 338 | === Label 339 | 340 | |=== 341 | |Component |Snippet code |Context 342 | 343 | |Label |bs3-label |HTML 344 | |Label (Danger) |bs3-label:danger |HTML 345 | |Label (Default) |bs3-label:default |HTML 346 | |Label (Info) |bs3-label:info |HTML 347 | |Label (Success) |bs3-label:success |HTML 348 | |Label (Warning) |bs3-label:warning |HTML 349 | |=== 350 | 351 | === List-group 352 | 353 | |=== 354 | |Component |Snippet code |Context 355 | 356 | |List group |bs3-list-group |HTML 357 | |List group with Badges |bs3-list-group:badges |HTML 358 | |List Group with Content |bs3-list-group:content |HTML 359 | |Linked List Group |bs3-list-group:linked |HTML 360 | |=== 361 | 362 | === Media-object 363 | 364 | |=== 365 | |Component |Snippet code |Context 366 | 367 | |Media object (single entry) |bs3-media-object |HTML 368 | |Example media object |bs3-media-object:example |HTML 369 | |=== 370 | 371 | === Modal 372 | 373 | |=== 374 | |Component |Snippet code |Context 375 | 376 | |Modal Dialog Box |bs3-modal |HTML 377 | |=== 378 | 379 | === Navbar 380 | 381 | |=== 382 | |Component |Snippet code |Context 383 | 384 | |Navbar |bs3-navbar |HTML 385 | |Navbar (Basic) |bs3-navbar:basic |HTML 386 | |Navbar (Brand) |bs3-navbar:brand |HTML 387 | |Navbar (Fixed Bottom) |bs3-navbar:fixed-bottom |HTML 388 | |Navbar (Fixed Top) |bs3-navbar:fixed-top |HTML 389 | |Navbar (Form) |bs3-navbar:form |HTML 390 | |Navbar (Inverse) |bs3-navbar:inverse |HTML 391 | |Navbar (Link) |bs3-navbar:link |HTML 392 | |Navbar (Links) |bs3-navbar:links |HTML 393 | |Navbar (Responsive) |bs3-navbar:responsive |HTML 394 | |Navbar (Static Top) |bs3-navbar:static-top |HTML 395 | |Navbar (Text) |bs3-navbar:text |HTML 396 | |=== 397 | 398 | === Page-header 399 | 400 | |=== 401 | |Component |Snippet code |Context 402 | 403 | |Page Header |bs3-page-header |HTML 404 | |=== 405 | 406 | === Pager 407 | 408 | |=== 409 | |Component |Snippet code |Context 410 | 411 | |Pager |bs3-pager |HTML 412 | |Pager (Aligned) |bs3-pager:aligned |HTML 413 | |=== 414 | 415 | === Pagination 416 | 417 | |=== 418 | |Component |Snippet code |Context 419 | 420 | |Pagination |bs3-pagination |HTML 421 | |Pagination (Large) |bs3-pagination:large |HTML 422 | |Pagination (Small) |bs3-pagination:small |HTML 423 | |=== 424 | 425 | === Panel 426 | 427 | |=== 428 | |Component |Snippet code |Context 429 | 430 | |Panel |bs3-panel |HTML 431 | |Panel (Danger) |bs3-panel:danger |HTML 432 | |Panel with footer |bs3-panel:footer |HTML 433 | |Panel with heading |bs3-panel:heading |HTML 434 | |Panel (Info) |bs3-panel:info |HTML 435 | |Panel (Primary) |bs3-panel:primary |HTML 436 | |Panel (Success) |bs3-panel:success |HTML 437 | |Panel with table |bs3-panel:table |HTML 438 | |Panel (Warning) |bs3-panel:warning |HTML 439 | |=== 440 | 441 | === Pills 442 | 443 | |=== 444 | |Component |Snippet code |Context 445 | 446 | |Pills |bs3-pills |HTML 447 | |Pills (With dropdown menu) |bs3-pills:dropdown |HTML 448 | |Pills (Justified) |bs3-pills:justified |HTML 449 | |Pills (Vertical) |bs3-pills:vertical |HTML 450 | |=== 451 | 452 | === Progress-bar 453 | 454 | |=== 455 | |Component |Snippet code |Context 456 | 457 | |Basic progress bar |bs3-progress-bar |HTML 458 | |Progress bar (danger) |bs3-progress-bar:danger |HTML 459 | |Progress bar (info) |bs3-progress-bar:info |HTML 460 | |Progress bar with label |bs3-progress-bar:label |HTML 461 | |Stacked progress bar |bs3-progress-bar:stacked |HTML 462 | |Striped progress bar |bs3-progress-bar:striped |HTML 463 | |Animated striped progress bar |bs3-progress-bar:striped-animated |HTML 464 | |Progress bar (success) |bs3-progress-bar:success |HTML 465 | |Progress bar (warning) |bs3-progress-bar:warning |HTML 466 | |=== 467 | 468 | === Radio 469 | 470 | |=== 471 | |Component |Snippet code |Context 472 | 473 | |Radio Form Field |bs3-radio |HTML 474 | |=== 475 | 476 | === Responsive-embed 477 | 478 | |=== 479 | |Component |Snippet code |Context 480 | 481 | |Responsive embed of video (16:9) |bs3-responsive-embed:16:9 |HTML 482 | |Responsive embed of video (4:3) |bs3-responsive-embed:4:3 |HTML 483 | |=== 484 | 485 | === Row 486 | 487 | |=== 488 | |Component |Snippet code |Context 489 | 490 | |Row |bs3-row |HTML 491 | |=== 492 | 493 | === Select 494 | 495 | |=== 496 | |Component |Snippet code |Context 497 | 498 | |Select Box Form Field |bs3-select |HTML 499 | |Horizontal Form Select Box Field |bs3-select:h |HTML 500 | |=== 501 | 502 | === Submit 503 | 504 | |=== 505 | |Component |Snippet code |Context 506 | 507 | |Submit Button for Form |bs3-submit |HTML 508 | |Submit Button for Horizontal Forms |bs3-submit:h |HTML 509 | |=== 510 | 511 | === Table 512 | 513 | |=== 514 | |Component |Snippet code |Context 515 | 516 | |Table |bs3-table |HTML 517 | |Table (Bordered) |bs3-table:bordered |HTML 518 | |Table (Condensed) |bs3-table:condensed |HTML 519 | |Table (Hover) |bs3-table:hover |HTML 520 | |Table (Responsive) |bs3-table:responsive |HTML 521 | |Table (Striped) |bs3-table:striped |HTML 522 | |=== 523 | 524 | === Tabs 525 | 526 | |=== 527 | |Component |Snippet code |Context 528 | 529 | |Tabs |bs3-tabs |HTML 530 | |Tabs (With dropdown menu) |bs3-tabs:dropdown |HTML 531 | |Tabs (Justified) |bs3-tabs:justified |HTML 532 | |=== 533 | 534 | === Template 535 | 536 | |=== 537 | |Component |Snippet code |Context 538 | 539 | |Bootstrap 3 HTML5 Template |bs3-template:html5 |HTML 540 | |Bootstrap 3 Starter Template |bs3-template:starter |HTML 541 | |=== 542 | 543 | === Thumbnail 544 | 545 | |=== 546 | |Component |Snippet code |Context 547 | 548 | |Thumbnail |bs3-thumbnail |HTML 549 | |Thumbnail with content |bs3-thumbnail:content |HTML 550 | |=== 551 | 552 | === Well 553 | 554 | |=== 555 | |Component |Snippet code |Context 556 | 557 | |Well |bs3-well |HTML 558 | |Well (large) |bs3-well:large |HTML 559 | |Well (small) |bs3-well:small |HTML 560 | |=== 561 | 562 | === License 563 | 564 | Bootstrap 3 - IntelliJ Plugin is open-sourced software licensed under the http://opensource.org/licenses/MIT[MIT license]. 565 | 566 | This plugin is based on https://github.com/JasonMortonNZ/bootstrap3-phpstorm-plugin[bootstrap-3-phpstorm-plugin] by https://twitter.com/jasonmortonnz[@JasonMortonNZ], 567 | who did all of the hard work of creating most of the templates. 568 | -------------------------------------------------------------------------------- /bootstrap3.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /convert.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'); 2 | var libxmljs = require('libxmljs'); 3 | var html2jade = require('html2jade'); 4 | var minify = require('html-minifier').minify; 5 | 6 | fs.readFile(process.argv[2], 'utf8', function (err, data) { 7 | var xmlDoc = libxmljs.parseXml(data); 8 | xmlDoc.childNodes().forEach(function (node) { 9 | if (node.type() == 'text') return; 10 | 11 | var html = node.attr('value').value(); 12 | //We need to minify html in order to remove spaces, new lines and other elements that could be interpreted by html2jade 13 | html = minify(html, 14 | { 15 | collapseWhitespace: true, 16 | conservativeCollapse: false 17 | } 18 | ); 19 | 20 | html = html.replace(/>\s+<'); //Remove empty text nodes ie. [space] 21 | var end = html.substr(-5) == '$END$'; 22 | if(end) 23 | html = html.replace('$END$',''); 24 | 25 | html2jade.convertHtml(html,{bodyless: true}, function(err,jade) { 26 | if(end) { 27 | jade += '$END$'; 28 | } 29 | node.attr('value').value(jade); 30 | }); 31 | 32 | //Remove all context elements and add JADE option 33 | node.get('context').childNodes().forEach(function(node) { 34 | node.remove(); 35 | }); 36 | 37 | node.get('context').node('option').attr({name:'JADE', value: true}); 38 | }); 39 | 40 | fs.writeFile(process.argv[3],xmlDoc.toString()); 41 | }); -------------------------------------------------------------------------------- /doc/Development.txt: -------------------------------------------------------------------------------- 1 | Templates can be found here: 2 | 3 | cd ~/Library/Preferences/IntelliJIdea2017.2/templates -------------------------------------------------------------------------------- /doc/TODO.txt: -------------------------------------------------------------------------------- 1 | Added this: 2 | 3 | http://www.bootstrapzero.com/bootstrap-template/basis 4 | http://www.bootstrapzero.com/bootstrap-template/binary 5 | 6 | http://bootsnipp.com/snippets/featured/responsive-mail-inbox-and-compose 7 | 8 | http://www.bootply.com/render/101053 9 | http://bootsnipp.com/snippets/featured/search-results 10 | http://bootsnipp.com/snippets/featured/blog-posts-with-picture 11 | http://danvswild.com/brew/ 12 | 13 | http://bootsnipp.com/snippets/featured/blog-post-list-with-photo 14 | http://bootsnipp.com/snippets/featured/event-list 15 | http://bootsnipp.com/snippets/featured/ui-comments 16 | http://bootsnipp.com/snippets/featured/responsive-event 17 | http://bootsnipp.com/tags/lists?page=3 18 | http://ironsummitmedia.github.io/startbootstrap-simple-sidebar/ 19 | 20 | 21 | http://bootstrapious.com/free-templates 22 | http://bootstrapious.com/p/coming-soon-template 23 | http://bootstrap-table.wenzhixin.net.cn/ 24 | http://www.bootstrap-switch.org/?utm_content=buffer7f135&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer 25 | https://cdnjs.com/libraries/bootstrap-switch 26 | 27 | http://jasny.github.io/bootstrap/getting-started/ -------------------------------------------------------------------------------- /generateReadme.groovy: -------------------------------------------------------------------------------- 1 | @Grapes( 2 | @Grab(group='com.google.guava', module='guava', version='18.0') 3 | ) 4 | import com.google.common.base.CaseFormat 5 | 6 | def file = new File("resources/liveTemplates/Bootstrap3.xml") 7 | def root = new XmlParser().parse(file) 8 | 9 | def templates = root.template 10 | 11 | def components = templates.collect { 12 | new Component(text:it.'@description', code: it.'@name', context:findMainContext(it)) 13 | } 14 | 15 | def sorted = components.sort { it.code } 16 | def groups = splitInGroups(sorted) 17 | 18 | printToc(groups) 19 | printComponents(groups) 20 | 21 | 22 | 23 | 24 | void printToc(groups) { 25 | groups.each { 26 | println "- [${it.name}](#${CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, it.name)})" 27 | } 28 | } 29 | 30 | void printComponents(groups) { 31 | groups.each { group -> 32 | println "" 33 | println "### ${group.name}" 34 | println "" 35 | println "| Component | Snippet code | Context |" 36 | println "|------------------------------- | -------------------------------| ------- |" 37 | 38 | group.components.each { 39 | println "| ${String.format("%-30s", it.text)} | ${String.format("%-30s", it.code)} | ${String.format("%-7s", it.context)} |" 40 | } 41 | } 42 | } 43 | 44 | def findMainContext(template) { 45 | template.context.option.'@name'.contains('HTML') ? "HTML" : "CSS" 46 | } 47 | 48 | private List splitInGroups(components) { 49 | def groups = [] 50 | Group lastGroup = null 51 | 52 | components.each { component -> 53 | def groupName = component.code.split(':')[0][4..-1].capitalize() 54 | def group = new Group(name:groupName) 55 | 56 | if(lastGroup == null || group.name != lastGroup.name) { 57 | lastGroup = new Group(name:groupName) 58 | groups << lastGroup 59 | } 60 | 61 | lastGroup.components.add(component) 62 | } 63 | 64 | return groups 65 | } 66 | 67 | class Group { 68 | String name 69 | List components = [] 70 | } 71 | 72 | class Component { 73 | String text, code, context 74 | 75 | String getText() { 76 | text ?: 'No description' 77 | } 78 | } -------------------------------------------------------------------------------- /generateReadmeFA.groovy: -------------------------------------------------------------------------------- 1 | @Grapes( 2 | @Grab(group='com.google.guava', module='guava', version='18.0') 3 | ) 4 | import com.google.common.base.CaseFormat 5 | 6 | def file = new File("resources/liveTemplates/FontAwesome.xml") 7 | def root = new XmlParser().parse(file) 8 | 9 | def templates = root.template 10 | 11 | def components = templates.collect { 12 | new Component(text:it.'@description', code: it.'@name', context:findMainContext(it)) 13 | } 14 | 15 | def sorted = components.sort { it.code } 16 | def groups = splitInGroups(sorted) 17 | 18 | printComponents(groups) 19 | 20 | void printComponents(groups) { 21 | groups.each { group -> 22 | println "" 23 | println "### ${group.name}" 24 | println "" 25 | println "| Component | Snippet code | Context |" 26 | println "|------------------------------- | -------------------------------| ------- |" 27 | 28 | group.components.each { 29 | println "| ${String.format("%-30s", it.text.capitalize())} | ${String.format("%-30s", it.code)} | ${String.format("%-7s", it.context)} |" 30 | } 31 | } 32 | } 33 | 34 | def findMainContext(template) { 35 | template.context.option.'@name'.contains('HTML') ? "HTML" : "CSS" 36 | } 37 | 38 | private List splitInGroups(components) { 39 | def groups = [] 40 | Group lastGroup = null 41 | 42 | components.each { component -> 43 | def groupName = "Font Awesome" 44 | def group = new Group(name:groupName) 45 | 46 | if(lastGroup == null || group.name != lastGroup.name) { 47 | lastGroup = new Group(name:groupName) 48 | groups << lastGroup 49 | } 50 | 51 | lastGroup.components.add(component) 52 | } 53 | 54 | return groups 55 | } 56 | 57 | class Group { 58 | String name 59 | List components = [] 60 | } 61 | 62 | class Component { 63 | String text, code, context 64 | 65 | String getText() { 66 | text ?: 'No description' 67 | } 68 | } -------------------------------------------------------------------------------- /resources/images/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodiam/intellij-bootstrap/bd16607021f160caf5bc677de1bdec8495b8a085/resources/images/plus.png -------------------------------------------------------------------------------- /resources/liveTemplates/Bootstrap3-jade.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | 394 | 395 | 396 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 404 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 417 | 418 | 419 | 420 | 421 | 422 | 423 | 424 | 425 | 426 | 427 | 428 | 429 | 430 | 431 | 432 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 507 | 508 | 509 | 510 | 511 | 512 | 513 | 514 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 522 | 523 | 524 | 525 | 526 | 527 | 528 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 539 | 540 | 541 | 542 | 543 | 544 | 545 | 546 | 547 | 548 | 549 | 550 | 551 | 552 | 553 | 554 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 566 | 567 | 568 | 569 | 570 | 571 | 572 | 573 | 574 | 575 | 576 | 577 | 578 | 579 | 580 | 581 | 582 | 583 | 584 | 585 | 586 | 587 | 588 | 589 | 590 | 591 | 592 | 593 | 594 | 595 | 596 | 597 | 598 | 599 | 600 | 601 | 602 | 603 | 604 | 605 | 606 | 607 | 608 | 609 | 610 | 611 | 612 | 613 | 614 | 615 | 616 | 617 | 618 | 619 | 620 | 621 | 622 | 623 | 624 | 625 | 626 | 627 | -------------------------------------------------------------------------------- /resources/messages/bootstrapBundle.properties: -------------------------------------------------------------------------------- 1 | daemon.donate.title=Bootstrap support plugin updated to v{0} 2 | daemon.donate.content=\ 3 | - 4.0.4: Fixed BS4 modal templates and added new BS3 horizontal form select.\ 4 | If you like the Bootstrap plugin, please donate a small amount \ 5 | to keep the development of this plugin going! 6 | -------------------------------------------------------------------------------- /resources/partials/cards.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | -------------------------------------------------------------------------------- /screencasts/starter-template.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodiam/intellij-bootstrap/bd16607021f160caf5bc677de1bdec8495b8a085/screencasts/starter-template.gif -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/BootstrapBundle.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | import com.intellij.CommonBundle; 4 | import org.jetbrains.annotations.NonNls; 5 | import org.jetbrains.annotations.PropertyKey; 6 | 7 | import java.util.ResourceBundle; 8 | 9 | /** 10 | * {@link java.util.ResourceBundle}/localization utils for the bootstrap plugin. 11 | */ 12 | public class BootstrapBundle { 13 | /** 14 | * The {@link java.util.ResourceBundle} path. 15 | */ 16 | @NonNls 17 | private static final String BUNDLE_NAME = "messages.bootstrapBundle"; 18 | 19 | /** 20 | * The {@link java.util.ResourceBundle} instance. 21 | */ 22 | private static final ResourceBundle BUNDLE = ResourceBundle.getBundle(BUNDLE_NAME); 23 | 24 | private BootstrapBundle() { 25 | } 26 | 27 | public static String message(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, Object... params) { 28 | return CommonBundle.message(BUNDLE, key, params); 29 | } 30 | 31 | public static String messageOrDefault(@PropertyKey(resourceBundle = BUNDLE_NAME) String key, String defaultValue, Object... params) { 32 | return CommonBundle.messageOrDefault(BUNDLE, key, defaultValue, params); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/BootstrapPluginApplicationComponent.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | import com.intellij.openapi.application.ApplicationManager; 4 | import com.intellij.openapi.components.ApplicationComponent; 5 | import com.intellij.openapi.diagnostic.Logger; 6 | import org.jetbrains.annotations.NotNull; 7 | 8 | /** 9 | * Main application component. 10 | */ 11 | public class BootstrapPluginApplicationComponent implements ApplicationComponent { 12 | private static final Logger LOG = Logger.getInstance(BootstrapPluginApplicationComponent.class.getName()); 13 | 14 | /** 15 | * Plugin has been updated with the current run. 16 | */ 17 | private boolean updated; 18 | 19 | /** 20 | * Plugin update notification has been shown. 21 | */ 22 | private boolean updateNotificationShown; 23 | 24 | /** 25 | * Checks if plugin was updated in the current run. 26 | * 27 | * @return plugin was updated 28 | */ 29 | public boolean isUpdated() { 30 | return updated; 31 | } 32 | 33 | public boolean isUpdateNotificationShown() { 34 | return updateNotificationShown; 35 | } 36 | 37 | public void setUpdateNotificationShown(boolean shown) { 38 | this.updateNotificationShown = shown; 39 | } 40 | 41 | /** 42 | * Get BootstrapPlugin Application Component 43 | * 44 | * @return BootstrapPlugin Application Component 45 | */ 46 | public static BootstrapPluginApplicationComponent getInstance() { 47 | return ApplicationManager.getApplication().getComponent(BootstrapPluginApplicationComponent.class); 48 | } 49 | 50 | @NotNull 51 | @Override 52 | public String getComponentName() { 53 | return "Bootstrap plugin for IntelliJ"; 54 | } 55 | 56 | @Override 57 | public void initComponent() { 58 | LOG.info("Bootstrap plugin initialized for IntelliJ"); 59 | 60 | final BootstrapSettings settings = BootstrapSettings.getInstance(); 61 | updated = !Version.PLUGIN_VERSION.equals(settings.getVersion()); 62 | if (updated) { 63 | settings.setVersion(Version.PLUGIN_VERSION); 64 | } 65 | } 66 | 67 | @Override 68 | public void disposeComponent() { 69 | LOG.info("Bootstrap plugin disposed for IntelliJ"); 70 | } 71 | 72 | } 73 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/BootstrapPluginState.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | public class BootstrapPluginState { 4 | private String pluginVersion = ""; 5 | 6 | public String getPluginVersion() { 7 | return pluginVersion; 8 | } 9 | 10 | public void setPluginVersion(String pluginVersion) { 11 | this.pluginVersion = pluginVersion; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/BootstrapPluginUpdateProjectComponent.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | 4 | import com.intellij.notification.Notification; 5 | import com.intellij.notification.NotificationDisplayType; 6 | import com.intellij.notification.NotificationGroup; 7 | import com.intellij.notification.NotificationListener; 8 | import com.intellij.notification.NotificationType; 9 | import com.intellij.notification.Notifications; 10 | import com.intellij.openapi.components.ProjectComponent; 11 | import org.jetbrains.annotations.NotNull; 12 | 13 | /** 14 | * Shows update notification 15 | */ 16 | public class BootstrapPluginUpdateProjectComponent implements ProjectComponent { 17 | private BootstrapPluginApplicationComponent application; 18 | 19 | @Override 20 | public void initComponent() { 21 | application = BootstrapPluginApplicationComponent.getInstance(); 22 | } 23 | 24 | @Override 25 | public void disposeComponent() { 26 | } 27 | 28 | @NotNull 29 | @Override 30 | public String getComponentName() { 31 | return this.getClass().getSimpleName(); 32 | } 33 | 34 | @Override 35 | public void projectOpened() { 36 | if (application.isUpdated() && !application.isUpdateNotificationShown()) { 37 | application.setUpdateNotificationShown(true); 38 | 39 | NotificationGroup group = new NotificationGroup(Version.PLUGIN_NAME, NotificationDisplayType.STICKY_BALLOON, true); 40 | Notification notification = group.createNotification( 41 | BootstrapBundle.message("daemon.donate.title", Version.PLUGIN_VERSION), 42 | BootstrapBundle.message("daemon.donate.content"), 43 | NotificationType.INFORMATION, 44 | new NotificationListener.UrlOpeningListener(false) 45 | ); 46 | 47 | Notifications.Bus.notify(notification); 48 | } 49 | } 50 | 51 | @Override 52 | public void projectClosed() { 53 | 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/BootstrapSettings.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | import com.intellij.openapi.components.*; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | /** 7 | * Persistent global settings object for the Bootstrap plugin. 8 | */ 9 | @State( 10 | name = "BootstrapSettings", 11 | storages = @Storage(id = "other", file = StoragePathMacros.APP_CONFIG + "/bootstrap.xml") 12 | ) 13 | public class BootstrapSettings implements PersistentStateComponent { 14 | 15 | /** 16 | * Get the instance of this service. 17 | * 18 | * @return the unique {@link BootstrapSettings} instance. 19 | */ 20 | public static BootstrapSettings getInstance() { 21 | return ServiceManager.getService(BootstrapSettings.class); 22 | } 23 | 24 | private BootstrapPluginState myState = new BootstrapPluginState(); 25 | 26 | @Nullable 27 | @Override 28 | public BootstrapPluginState getState() { 29 | return myState; 30 | } 31 | 32 | @Override 33 | public void loadState(BootstrapPluginState element) { 34 | myState = element; 35 | } 36 | 37 | public String getVersion() { 38 | return myState.getPluginVersion(); 39 | } 40 | 41 | public void setVersion(String version) { 42 | myState.setPluginVersion(version); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/Version.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap; 2 | 3 | public interface Version { 4 | String PLUGIN_NAME = "Bootstrap plugin"; 5 | /** 6 | * Current plugin version. 7 | */ 8 | String PLUGIN_VERSION = "4.1.0"; 9 | } 10 | -------------------------------------------------------------------------------- /src/com/intellij/plugin/bootstrap/templates/BootstrapTemplatesProvider.java: -------------------------------------------------------------------------------- 1 | package com.intellij.plugin.bootstrap.templates; 2 | 3 | import com.intellij.codeInsight.template.impl.DefaultLiveTemplatesProvider; 4 | import org.jetbrains.annotations.Nullable; 5 | 6 | /** 7 | * @author Erik Pragt 8 | */ 9 | public class BootstrapTemplatesProvider implements DefaultLiveTemplatesProvider { 10 | @Override 11 | public String[] getDefaultLiveTemplateFiles() { 12 | return new String[]{ 13 | "liveTemplates/Bootstrap3", 14 | "liveTemplates/Bootstrap4", 15 | "liveTemplates/Bootstrap3-jade", 16 | "liveTemplates/FontAwesome", 17 | "liveTemplates/FontAwesome-jade", 18 | }; 19 | } 20 | 21 | @Nullable 22 | @Override 23 | public String[] getHiddenLiveTemplateFiles() { 24 | return null; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /x.form: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bodiam/intellij-bootstrap/bd16607021f160caf5bc677de1bdec8495b8a085/x.form --------------------------------------------------------------------------------
Documentation / list of snippets
Follow me on Twitter: @epragt