Giter Site home page Giter Site logo

b5-snippets's Introduction

Currently NOT maintaining...

Bootstrap 5

Version Installs Ratings

The MIT License GitHub GitHub

The first, (currently only) and hands down BEST bootstrap 5 snippet extension. Includes templates, powerful utility snippets, and much more.

Features

  1. Templates one tab away
  2. Powerful utilities
  3. Font Awesome icons ! (currently 4.7, eventually 6.0)
  4. Much more hidden...
  1. Much more planned, so consider giving it a star on github or the marketplace, become a sponsor.

Open Source Marketplace

This may surprizes you but VS-Code and it's marketplace aren't really open source, is licensed under a not-FLOSS license and contains telemetry/tracking, read more...

This extension is built for open-vsx and published on the ONLY open source registry for VS Code extensions.

Learn more about open source versions of vscode such as vscodium, GitPod's IDE and more.

Notes

Bootstrap 5 is currently in alpha and this extension should be considered in the same status. Unlike a lot of other snippets, this extension aims to balence user simplicity, with power and flexibility by keeping the total number of snippets to a minimum.

In terms of user simplicity, other Bootstrap 4 snippets have 5 different snippets for the grid, whereas this will have 3, but each is more powerful.

Roadmap

  • v1.2.5 - Introduces Flex utilities, media-query and awesome awesome 4.7.0.
  • v1.6-8 - Each snippet with eventually have a gif demo (SOON).
  • v2 - All base templates and several others will be one tab away, so consider sponsoring this or giving it a star.

Powerful, Simple, Flex Snippets

Center, position or reorder any element, by any default breakpoint with under 10 snippets.

Trigger Description
!templates Sets the display type.
!utilities Sets the display type.
b5- Main component snippets.
fa- Font Awesome component snippets.

Templates/Layout

Templates are just one tab away. Most of the official example templates have been implmented.

Trigger Description
!b5-$ Shortcut creating an html document with cdn scripts included
!b5-$Offcanvas Offcanvas Template, one tab away.
!b5$Template-name More coming soon...

Powerful Utility Classes

There are two way to use utilities.

  1. Class utilities, which use ! as a prefix. For example, if you want to add a utility class to an existing HTML element, inside of class=" " you would add class="!spacing" then hit tab and fill out the options, the default will be class="mx-auto" which sets margin to auto on left and right (x).
  2. Wrapper elements, ex: b5-{txt,color,shadow,boder,spacing} which will create a div, p, h2 then allow you to tab through the options.
Trigger Description
!spacing or b5-spacing A single, powerful utility snippet. The default is mx-auto which adds margins on right and left. The options allow you to switch between (m)argin and (p)adding, x,y,(t)op,(r)ight, (b)ottom, (l)eft, etc. Read about the classes on the official bootstrap documentation.
!shadow or b5-shadow Useful whenever you want to make things look like paper or material design. Read about the classes on the official bootstrap documentation. https://v5.getbootstrap.com/docs/5.0/utilities/shadows/
!font or b5-text This intentionally uses two different names to differentiate between the class utility and the wrapper element. The options are responsive positions `{
b5-border change border attributes all border attributes. Read about the classes on the official bootstrap documentation.

Powerful, Simple, Flex Snippets

Center, position or reorder any element, by any default breakpoint with under 10 snippets.

Trigger Description
!!MQ Sets the display type.
!flex Sets the display type.
!justify Sets the display type.
!align Sets the display type.
!fill Sets the display type.
!grow-shrink Sets the display type.
!flex-wrap Sets the display type.
!flex-order Sets the display type.

Grid

This is works great but it may be simplified and rewritten. I'm also toying around with new utility snippet to that combines the display classes and flex classes. If you have any thoughts or suggestions, let me know on github.

Trigger Description
b5-container Grid container with options for -fluid, px, gy and more.
b5-row Powerful row, `${1
b5-col Pretty much all your need covered and more. Ex: `col${1

Navbar

Trigger Description
b5-navbar-default Navbar default
b5-navbar-scollspy V1 is here
b5-Nav-bottom V1 is here

b5-nav-item | item with link and options for common pages such as Home, About, Blog, Contact. b5-navlink | link b5-nav-dropdown | dropdown b5-nav-dropdown toggle | Navbar toggle b5-nav- | more in this category coming soon...

Button

Trigger Description
b5-btn Button with link
b5-btn-o Button with outline
b5-btn-close Close buttons...
b5-btn- more in this category coming soon...

Cards

Trigger Description
b5-card Basic Card
b5-card- more in this category coming soon...

modal

Trigger Description
b5-modal Basic modal
b5-modal- more in this category coming soon...

Collapse

Trigger Description
b5-btn-reveal Click a button and reveal some content.
b5-modal- more in this category coming soon...

JavaScript

I plan on eventually adding bootstrap snippet for the JavaScript but its not on the roadmap yet because I'm also working on this massive javascript extension which will replace about 5-10 of the most popular extensions add and add things like optional chaining among other methods.

Trigger Description
jb5 consider submitting a PR or becoming a sponsor.

Release Notes

Users appreciate release notes as you update your extension.

1.2.3 - Updated documentation, added templates and much more.

1.2.5 - Fixed Bugs

  • Flex Utilities !
  • added !round utility
  • Added CTA Button - with options for call and email
  • breadcrumb - fixed bug and added breadcrumb item
  • border- fixed bug and added !round option
  • [ ]

Supporting the Developers

If you use this a lot or want to see it improve consider giving it a star, following the dev on social media below, or becoming a githup sponsor.

Educational Repos

The author does a lot more than just publishing a json file for snippets.

Here are just a few things he's working on, while taking care of his ๐Ÿ‘ถ as a full-time single father, job hunting & competing in hackathons...

Trigger Description & Info
JavaScript-First An Open Source Book that teaches anyone how to code with JavaScript using the node.js runtime environment rather than a browser and by the end, you will build a server and a website using JavaScript..
Learn Mongo GitPod A repo designed to teach mongoDB to people with zero experiance and zero config, meaning you can learn on virtually any device that has a browser that GitPod can run on! This ๐Ÿคžmay๐Ÿคž become part of Free Code Camp [1], [2].

Future Snippets & Extensions

Name Description
JavaScript-First JavaScript First is a huge collection of snippets built to establish better code habits for working with JS-based servers, browser methods, react, mongo databases and more. It is also meant to be paired with the book, JavaScript-First.
Foundation 6 Snippets This will start as a snippets for sites and then be updated for.
Code Slides A snippet extension for creating educational slides with vscode-reveal and a custom theme. (not public yet)
Foundation 6 Snippets This will start as a snippets for sites and then be updated for.email. If sponsored, I will extend this to eventually replace the CLI and building blocks by implementing a custom feature that writes install kits in a similar way the web boilerplate writes an html, css, and js file. (not started yet)

Social Entrepreneurship: Open Source Non-Profit

I'm in the process of founding a non-profit dedicated to promoting open source by doing the following and can only commit to the first two without proper sponsorship:

Name Description
Creating open source curriculum Getting open source curriculum into the hands for high school students.
CTE Coding Students Bringing industry professionals into the class room to inspire them (via zoom). I already did this as a teacher by bringing people from Riot Games / Carvana, Choice Hotels, Auth0, and many others into my classroom. Now I want to streamline this for more schools.
Free Coding Classes on Twitch I stream open source classes for an introductory javaScript class every week to test the open source curriculum I write. Think of it as a free bootcamp online. I also despritely need a better computer that doesn't require iced gel packs to be able to stream ๐Ÿ˜…....
Lobbying for Open Source Certification When I taught in a public CTE high school, I couldn't believe that a multiple choice test like th MTA certifications were approved by the state over open source certifications such as Free Code Camp's. I know enough school board members and a few house members to help get the ball rolling but, it's a lot of leg work and I don't want to commit to this without funding...
Laptop Donating 4G latops/tablets to students struggling with remote academic life. Having taught a few students with bad internet, etc, this is especially important to me but I don't have the resources to address this without funding.

b5-snippets's People

Contributors

hansuxdev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

b5-snippets's Issues

Bootstrap snippets not updated

Hey there, thank you for taking the time to build these snippets. I noticed there are a lot of the component examples still missing.

For the most part, if you use the b4 snippets as a starting block the only change at least in components is adding -bs after data anything (data-bs-toggle, data-bs-dismiss, etc) Thanks

Please update the CDN code generated by "!b5-$"

Please update the CDN code generated by "!b5-$",
Now this generates:

   <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/css/bootstrap.min.css" integrity="sha384-r4NyP46KrjDleawBgD5tp8Y7UzmLA05oM1iAEQ17CSuDqnUK2+k9luXQOfXJCJ4I" crossorigin="anonymous">
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/5.0.0-alpha1/js/bootstrap.min.js" integrity="sha384-oesi62hOLfzrys4LxRF63OJCXdXDipiYWBnvTl9Y9/TRlw5xlKIEHpNyvvDShgf/" crossorigin="anonymous"></script> 

However GetBootstrap.com says the current version is v5.1
Thanks.
By the way, I really appreciate the clarity of your documentation.

Can be disabled the shortcode of templates?

The plugin is great, I really appreciate that it exists. I use it to recommend it to people who are just starting out in the world of programming or web design.
Even so, I would like to propose if you can disable the Templates part (such as Blog, Album, Carousel, etc.) because they are easy to call when it is not necessary and everyone to whom I have recommended it is easily confused. It's just an observation. Thank you..

Build Process Improvements

Goals:

  • Improve npm scripts to include npm version via "npm variables"
  • add watch Task - to watch json files for changes and run the
  • find out how to write tests for expected html output ??
  • custom script for snippets - read an html file name example, "b5-card.html", grab the html inside the body tag, convert it to json (like the following https://snippet-generator.app/)
  • auto documentation - read every json files in the types directory and output a readme file each to contain the prefix & descript and possibly the html output place inside a multiline code tag such as
 <div>   </div>

modal close button is wrong

generated

    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
      <span aria-hidden="true">&times;</span>
    </button>

bootstrap 5

<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.