Skip to content

Commit

Permalink
Small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
halfmoonui authored Aug 17, 2020
1 parent 70c457e commit dbb51a3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ The quickest way to get started with Halfmoon is by using the CDN to include the

```html
<!-- Halfmoon CSS -->
<link href="https://cdn.jsdelivr.net/gh/halfmoonui/[email protected].3/css/halfmoon.min.css" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/gh/halfmoonui/[email protected].4/css/halfmoon.min.css" rel="stylesheet" />

<!-- Halfmoon JS -->
<script src="https://cdn.jsdelivr.net/gh/halfmoonui/[email protected].3/js/halfmoon.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/halfmoonui/[email protected].4/js/halfmoon.min.js"></script>
```

## Using npm
Expand All @@ -39,14 +39,14 @@ require("halfmoon/css/halfmoon.min.css");
var halfmoon = require("halfmoon");
```

Please note that manual initialization is required for some components, that is, after the DOM is loaded, the following method needs to be called:
Please note that this method requires manual initialization, that is, after the DOM is loaded, the following method needs to be called:

```javascript
// Call this method after the DOM has been loaded
halfmoon.onDOMContentLoaded();
```

This initializes all of the components that require JavaScript, such as dropdowns, custom file inputs, shortcuts, etc.
This initializes all of the components that require JavaScript, such as dropdowns,, custom file inputs, shortcuts, etc.

In this way, Halfmoon can be used with frameworks that use the virtual DOM, such as React and Vue. For instance, in the case of Vue, the `halfmoon.onDOMContentLoaded()` method would be called inside the `mounted()` hook of your component.

Expand Down
3 changes: 3 additions & 0 deletions starter-template.html
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ <h1 class="content-title">Halfmoon starter template</h1>
<div>
<a href="https://www.gethalfmoon.com/docs/page-building/#starter-template-generator" class="btn btn-link px-0">Starter template generator</a>
</div>
<div>
<a href="https://www.twitter.com/halfmoonui" class="btn btn-link px-0">Follow on Twitter for updates</a>
</div>
<div class="mt-20">
Toggles:
<button class="btn btn-sm" type="button" onclick="halfmoon.toggleDarkMode()">Dark mode</button>
Expand Down

0 comments on commit dbb51a3

Please sign in to comment.