{"id":21129084,"url":"https://github.com/ics-software-engineering/play-example-bootstrap","last_synced_at":"2025-07-09T00:31:42.886Z","repository":{"id":8302828,"uuid":"9846211","full_name":"ics-software-engineering/play-example-bootstrap","owner":"ics-software-engineering","description":"How to integrate Twitter Bootstrap 2.x with Play 2.x","archived":false,"fork":false,"pushed_at":"2013-07-25T22:54:44.000Z","size":612,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-03-27T04:19:22.640Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ics-software-engineering.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-05-03T22:50:25.000Z","updated_at":"2024-03-27T04:19:22.641Z","dependencies_parsed_at":"2022-08-07T02:01:05.885Z","dependency_job_id":null,"html_url":"https://github.com/ics-software-engineering/play-example-bootstrap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fplay-example-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fplay-example-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fplay-example-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ics-software-engineering%2Fplay-example-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ics-software-engineering","download_url":"https://codeload.github.com/ics-software-engineering/play-example-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225470732,"owners_count":17479368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-20T05:15:39.262Z","updated_at":"2024-11-20T05:15:39.875Z","avatar_url":"https://github.com/ics-software-engineering.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"![screenshot](https://raw.github.com/ics-software-engineering/play-example-bootstrap/master/doc/images/play-example-bootstrap-screenshot.png)\n\nAn example play application illustrating the use of Twitter Bootstrap 2.x with Play 2.x.\n\nKey Points\n----------\n\nDownload and install Bootstrap to your project:\n  * Modify [project/Build.scala](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/project/Build.scala) to download webjars and bootstrap libraries (CSS and Javascript) into your project.\n    Note that in order to support integration testing using HtmlUnit, the JQuery version is downgraded to 1.8.3. \n  \nMake Twitter Bootstrap files available within your application:\n  * Modify [conf/routes](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/conf/routes) with a routing for the webjars path.\n  * Modify [app/views/main.scala.html](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/app/views/main.scala.html) header to load bootstrap.min.css, bootstrap.min.js, and jquery.min.js via the webjar assets directory.\n\nTweak the body element so that it doesn't display underneath the \"fixed top\" navbar used in this example:\n  * Modify [public/stylesheets/main.css](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/public/stylesheets/main.css) to add 50px of padding to the body element (if you are using Bootstrap navbar-fixed-top class). \n\nIf using forms, provide a new Play \"helper\" definition so that forms display correctly:\n  * Create [app/views/helper/twitterBootstrapInput.scala.html](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/app/views/helper/twitterBootstrapInput.scala.html) \"helper\" which provides [Bootstrap 2.0 style form element layout](http://twitter.github.io/bootstrap/base-css.html#forms).\n  * In [pages with forms](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/app/views/index.scala.html), define your helper as the implicitFieldConstructor\n   \nMake the current page \"active\" in the navbar:\n  * Modify the [main template](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/app/views/main.scala.html) to support the \"active\" page through a currentPage parameter.\n  * Pass the currentPage parameter to the main template on [each page](https://github.com/ics-software-engineering/play-example-bootstrap/blob/master/app/views/index.scala.html) to tell it which navbar item to make active.\n  * (Note: in this example, all three navbar items go to the same page.)\n  \nUsage\n-----\n\nDownload the system, invoke `play run` from the top-level directory, then go to http://localhost:9000/ to see the system. It should look like the screen image at the top of this page. \n\nScreencast\n----------\n\nClick the image below to watch a 13 minute walkthrough of this example:\n\n[\u003cimg src=\"https://raw.github.com/ics-software-engineering/play-example-bootstrap/master/doc/images/play-example-bootstrap-youtube.png\" width=\"400\"\u003e](https://www.youtube.com/watch?v=d__EdOxINEw)\n\nNote this screencast was made in May, 2013 so does not show later changes to this system.\n\nComments? Questions?\n--------------------\n\nPlease create a [github issue](https://github.com/ics-software-engineering/play-example-bootstrap/issues).\n\nRevision History\n----------------\n\n  * May, 2013: Initial release for Play 2.1.0. \n  * July, 2013: Updated to Play 2.1.1.  Enhanced to show how Bootstrap javascript libraries are loaded. Since HtmlUnit (used for integration testing) currently supports only JQuery 1.8.3, special \n    webjar syntax is used in Build.scala to show how to load a recent version of Bootstrap with an older version of JQuery.\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fics-software-engineering%2Fplay-example-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fics-software-engineering%2Fplay-example-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fics-software-engineering%2Fplay-example-bootstrap/lists"}