{"id":28147858,"url":"https://github.com/niroula-kushal/vue-bootstrap-theming","last_synced_at":"2026-02-14T11:04:06.807Z","repository":{"id":115959290,"uuid":"256473610","full_name":"niroula-kushal/vue-bootstrap-theming","owner":"niroula-kushal","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-13T14:00:30.000Z","size":3246,"stargazers_count":4,"open_issues_count":3,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T00:22:47.980Z","etag":null,"topics":["bootstrap","dark","js","theme","vue"],"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/niroula-kushal.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-17T10:33:49.000Z","updated_at":"2025-01-01T14:48:15.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd4c0300-003e-4962-8834-435d77033fdd","html_url":"https://github.com/niroula-kushal/vue-bootstrap-theming","commit_stats":null,"previous_names":["niroula-kushal/vue-bootstrap-theming"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/niroula-kushal/vue-bootstrap-theming","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niroula-kushal%2Fvue-bootstrap-theming","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niroula-kushal%2Fvue-bootstrap-theming/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niroula-kushal%2Fvue-bootstrap-theming/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niroula-kushal%2Fvue-bootstrap-theming/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/niroula-kushal","download_url":"https://codeload.github.com/niroula-kushal/vue-bootstrap-theming/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/niroula-kushal%2Fvue-bootstrap-theming/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29443447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T10:51:12.367Z","status":"ssl_error","status_checked_at":"2026-02-14T10:50:52.088Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bootstrap","dark","js","theme","vue"],"created_at":"2025-05-15T00:22:33.518Z","updated_at":"2026-02-14T11:04:06.792Z","avatar_url":"https://github.com/niroula-kushal.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Vue Theming Bootstrap\n\n[![Build Status](https://travis-ci.org/RehmatFalcon/vue-bootstrap-theming.svg?branch=master)](https://travis-ci.org/RehmatFalcon/vue-bootstrap-theming)\n\n## Project setup\n```\nnpm install\n```\n\n### Compiles and hot-reloads for development\n```\nnpm run serve\n```\n\n## Demo\nhttps://rehmatfalcon.github.io/vue-bootstrap-theming/\n\n## Screenshot\n\n![dark_light](https://user-images.githubusercontent.com/28915667/79636634-f3971b80-8198-11ea-809b-ca14809cac66.png)\n\n## Motivation\n\n1. To integrate bootstrap with vue and make theming possible.\n1. To adapt bootstrap according to project requirement by changing its variables.\n\n## Procedures followed:\n1. Add bootstrap to project\n```bash\nnpm i bootstrap jquery popper\n// Jquery and popper were added because \n// bootstrap relies on them for some of its functionality \n```\n\n2. Create a styles file and import bootstrap scss there.\n```scss\n@import '~bootstrap/scss/boostrap';\n// add any new styles / overrides\n```\n\n3. Import the styles file in our app.\n\u003e App.vue\n```js\n\u003cstyle\u003e\nimport './styles';\n\u003c/style\u003e\n```\n\nOnce we have done the above, we can use bootstrap classes in our application.\n\nBlog.vue (For example)\n```js\n\u003ctemplate\u003e\n    \u003cdiv class=\"row\"\u003e\n        \u003cdiv class=\"col\"\u003e\n            \u003cbutton class=\"btn btn-primary\"\u003e\n                Primary\n            \u003c/button\u003e\n        \u003c/div\u003e\n    \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## Theming\n\nBootstrap exposes its configuration as SASS variables. So, in order to have multiple theme, its just a matter of generating different classes with adjusted variable values.\n\n```scss\n.theme-dark {\n    $card-color : #d8d5d5;\n    $card-bg: rgb(65, 65, 65);\n    $card-cap-color: #ebebeb;\n    $card-cap-bg: darken($card-bg, 5%);\n}\n```\nThis sets the background color and text of the card component.\n\n\nCurrently two themes are supported : light and dark.\n\n~~When the theme is light, a `theme-light` class is added to the body element.~~\n\n~~When dark theme is chosen, a `theme-dark` class is added to the body element.~~\n\nIn order to allow for multiple themes for multiple component, now the classes `theme-light` and `theme-dark` are applied to the root element of the component.\n\nThe allows us to render different parts of the app with different theme.\n\n#### Js counterpart\nIn the js, we check the current theme and apply correct class to the body element.\n\nWe also add a `temp-transitional` class to the ~~body~~ component element for one second. This is done to ensure that the transition from light to dark theme and vice versa does not feel abrupt.\n\n```scss\n.temp-transitional {\n  \u0026, \u0026 *, \u0026 *:before, \u0026 *:after {\n    transition: all .3s;\n  }\n}\n```\ntemp-transitional is defined as above.\n\nWe also save the selected theme in localstorage, so that the user choice is persisted across request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniroula-kushal%2Fvue-bootstrap-theming","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fniroula-kushal%2Fvue-bootstrap-theming","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fniroula-kushal%2Fvue-bootstrap-theming/lists"}