{"id":16701701,"url":"https://github.com/coryodaniel/bs-tools","last_synced_at":"2025-06-20T02:38:16.685Z","repository":{"id":4387361,"uuid":"5524310","full_name":"coryodaniel/bs-tools","owner":"coryodaniel","description":"BS tools for bootstrap. Easy modal, easy hud, easy breadcrumbs.","archived":false,"fork":false,"pushed_at":"2012-08-23T11:54:43.000Z","size":114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-14T06:41:57.971Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coryodaniel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-23T10:57:43.000Z","updated_at":"2013-09-30T01:25:12.000Z","dependencies_parsed_at":"2022-09-20T23:11:37.540Z","dependency_job_id":null,"html_url":"https://github.com/coryodaniel/bs-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coryodaniel/bs-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fbs-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fbs-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fbs-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fbs-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coryodaniel","download_url":"https://codeload.github.com/coryodaniel/bs-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coryodaniel%2Fbs-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260867956,"owners_count":23074915,"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-10-12T18:45:14.114Z","updated_at":"2025-06-20T02:38:11.674Z","avatar_url":"https://github.com/coryodaniel.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# BS Tools - BS for Bootstrap\n\n\n# The tools included are:\n1. HUD    - for easily creating a queue of alerts that will auto-dismiss when the queue is full\n2. Modal  - a singleton-esque modal tool\n3. Breadcrumb - Popping and pushing breadcrumbs\n\nCheck out the sweet JS Fiddle demoing this instead of reading. READING SUCKS.\n\n[BS JS Fiddle](http://jsfiddle.net/coryodaniel/DMnfB/)\n\n# Using HUD\n\n```html\n\u003cdiv id=\"hud\"\u003e\u003c/div\u003e\n```\n\nInitialize the HUD object\n\n```javascript\n$(function(){\n  // Give it a jQuery selector and queue size\n  HUD.init('#hud', 3);\n...\n```\n\nCreate some alerts\n\n```javascript\n  HUD.success(\"Great Job!\");\n  HUD.error(\"Uh oh\", \"Stuff went crazy.\");\n  HUD.warning(\"Meh.\", \"Its all right we suppose\", true);\n  HUD.info(\"Great Socks.\")\n});\n```\n\nOther things you can do with it\n\n```javascript\n  HUD.dismiss(); //dismiss the oldest alert\n  HUD.clear(); //dismisses all alerts\n  HUD.success(\"Chain\").error(\"That\").warning(\"Ass\"); //In case you want to\n\n```\n\n# Using Breadcrumb\n\nBreadcrumb gives you an interface to push and pop breadcrumbs. Pass one argument for the\nfinal crumb (span) pass two arguments for a COOL link.\n\n```hrml\n\u003cul id=\"breadcrumbs\" class=\"breadcrumb\"\u003e\u003c/ul\u003e\n```\n\n```javascript\n$(function(){\n  //Init that bad boy \u0026 push some crumbs\n  Breadcrumb.init('#breadcrumb').\n    push(\"Home\", \"http://example.com\").\n    push(\"SockFarm\", \"http://example.com/socks\");\n\n  //Push a span onto the end\n  Breadcrumb.push(\"Destination\");\n\n  //Pop dat\n  Breadcrumb.pop();\n\n  //Clear them all except the root\n  Breadcrumb.clear();\n\n  //Clear the root too\n  Breadcrumb.clear(true);\n\n  //Set a bunch\n  Breadcrumb.set({\n    \"USA\": 'http://cool.com',\n    \"CA\": 'http://cooler.com',\n    \"Los Angeles\": 'http://coolest.com',\n    \"My House\" : null\n  });\n\n  Breadcrumb.last() // =\u003e Retreives the last href\n});\n```\n\n# Using Modal\nThere are two additional CSS classes added to modals with this tool.\n* modal-loading added to modal-body. Set up your loading modal\n* modal-form added to modal wrapper. Changes the css so bootstrap forms fit inside well.\n\n```javascript\nModal.init(true); //skip the footer, optional\nModal.loading(); \nModal.setBody(\"NICE BODY\");\nModal.setBody(\"NICE BODY\", true); // ads\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fbs-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoryodaniel%2Fbs-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoryodaniel%2Fbs-tools/lists"}