Coder Social home page Coder Social logo

shakrmedia / petal Goto Github PK

View Code? Open in Web Editor NEW
129.0 129.0 9.0 1.8 MB

A modern, light CSS UI framework by Shakr

Home Page: https://shakrmedia.github.io/petal

License: MIT License

JavaScript 10.04% Handlebars 51.42% Less 38.54%
css css-framework framework less library

petal's People

Contributors

dependabot[bot] avatar gaeulbyul avatar log2-hwan avatar premist avatar zvuc 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  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  avatar  avatar  avatar  avatar  avatar  avatar

petal's Issues

Dropdown menu not closing

I am in the process of building a new site from scratch with Petal for the first time. I am at the wireframe / design stage. I am trying to create a menu bar out of buttons (extra vote for Nav component please).

When I click on the "caret" to instantiate the dropdown, there are no problems and the list appears but when I click on the "caret" again to hide the menu, it does not hide and the JS console displays an error:

Uncaught TypeError: can't access property "parentNode", dropdown_el is null

I have examined the source of your buttons in your Documentation and my code is a copy of that:

`


				<div class="btn-group">
					<!-- Home -->
					<button class="btn hollow whitetext navbtn" data-action="/" type="button">Home</button>
				</div>

				<!-- User not logged in -->
				<div class="btn-group">
					<button class="btn hollow whitetext" data-toggle="dropdown" id="usermenu">User&nbsp;<span class="caret"></span></button>
					<ul class="dropdown-menu whitetext" data-dropdown-align="right">
						<li><a href="#">Register</a></li>
						<li><a href="#">Login</a></li>
					</ul>
				</div>

				<div class="btn-group">
					<!-- User logged in -->
					<button class="btn hollow whitetext" data-toggle="dropdown" data-dropdown="membermenu">Member&nbsp;<span class="caret"></span></button>
					<ul class="dropdown-menu whitetext" id="membermenu" data-dropdown-align="right">
						<li><a href="#">Profile</a></li>
						<li><a href="#">Logout</a></li>
					</ul>
				</div>

			</div>
		</div>`

I have tried a few ideas (see in my code), but to no avail.

I could dive into your JS and probably fix it, but I am a bit confused why it works in your documentation but does not work on my system.

screenshot-treetest test-2020 12 08-15_51_50

Provise Sass/Scss version of styles

Hi there folks, Thanks for the effort to create such a nice boilerplate.
As SASS/SCSS is more adopted and accepted among developers, It would be nice to have a scss version of styles. I'd be glad to contribute for the scss version.

Form validation icon doesn't appear when using input group together.

When using input group and form validation(with icon).
form validation is work fine. but, icon doesn't appear right position. (hide back to the button...)

am I write HTML source wrong? or it is a bug?

ScreenShot
Demo Screen (Without Hide Button)
ScreenShot
Demo Screen (With Hide Button)

Here is a source code.

<form>
  <div class="form-group validation validation-icons valid">
    <label class="form-label" for="serialNumber">Serial Number</label>
    <div class="input-group">
      <input class="input" id="serialNumber" placeholder="시리얼 번호 입력" />
      <span class="input-addon-btn">
        <button id="launchQRScanner" class="btn green"><span class="alert-icon"><i class="petalicon petalicon-camera"></i></span></button>
      </span>
    </div>
    <p id="serialNumberNotice" class="form-caption">오른쪽의 버튼을 눌러 QR코드를 스캔할 수 있습니다.</p>
  </div>
</form>

Demo Page : https://devhaus.ikstudio.net/blobs/webview
(form validation status will be always valid on this page.)

JS Error on click handler

I'm getting an error every time I click with the js installed via npm.

petal.min.js:formatted:1 Uncaught TypeError: Cannot read property 'contains' of undefined
    at HTMLDocument.<anonymous> (petal.min.js:formatted:1)
    at HTMLDocument.<anonymous> (petal.min.js:formatted:1)
(anonymous) @ petal.min.js:formatted:1
(anonymous) @ petal.min.js:formatted:1
petal.min.js:formatted:1 Uncaught TypeError: Cannot read property 'contains' of undefined
    at HTMLDocument.<anonymous> (petal.min.js:formatted:1)

Looks like it could be the global click handler. This event is coming from the html tag

image

Add global variable for defining use of all-custom color shades, in place of individual custom parameters for btn generator

Petal currently uses global shade generator (.colorset()) in many places to utilize a shade of a specified base color to emphasize or differentiate from base color. The button generator (.generate-btn) mixin apparently was made before the global shade generator mixin, and it uses a separate 'custom' parameter to use custom-defined shade variables instead of using auto-generated shades.

In a generic use case, if one wants to use manually set color shades, it's likely that he will do so for all colors instead of just specific colors, so using a global variable like @disable-auto-shade-generator that controls the behavior globally would make more sense than having the 'custom' parameter in just button generator. (It simplifies the button generator mixin as well)

Spinner In Inputs

Hello,

I'm having trouble with implementing the spinner inside a textbox. Please, can you share the JavaScript to make this work?

Thanks.

Best Regards

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.