Skip to content

Commit 01788fb

Browse files
committed
Update readme with new version, removing FA examples and documenting the qm-icon class.
1 parent 013c7ff commit 01788fb

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ For a quick and simple way to implement the Quick Menu into your project, we can
4242
The customisation capabilities are reduced by using a CDN, however you should still be able to make modifications by overwriting the Quick Menu styling properties in your own custom CSS.
4343

4444
```html
45-
<!-- Latest compiled CSS. To be placed in the <head> above over stylesheets. -->
46-
<link href="https://cdn.jsdelivr.net/npm/quickmenu@1.3.0/dist/css/quickmenu.min.css" rel="stylesheet" integrity="sha384-cgCuPlQWxTOydBb7K003NbZr2kylNPA7Mx7YMYtQPKu/co0fkW9E1mPMmqy2xJ/8" crossorigin="anonymous">
45+
<!-- Latest compiled CSS. To be placed in the <head> above other stylesheets. -->
46+
<link href="https://cdn.jsdelivr.net/npm/quickmenu@1.4.0/dist/css/quickmenu.min.css" rel="stylesheet" integrity="sha384-Pkbhc09gBjDEhzyc88npCxlMrSPAxIyYgOlEO5OhdueX8OihlI+3/pKABNrF09ET" crossorigin="anonymous">
4747

48-
<!-- Latest compiled JS. To be placed before the closing <body> tag above over scripts. -->
49-
<script src="https://cdn.jsdelivr.net/npm/quickmenu@1.3.0/dist/js/quickmenu.min.js" integrity="sha384-J+7UVhxvYUPTb1N2qLj0dvniUcy8M1Ssxsic1xFI31naqNI4KlXP+r4D5eLVxhgg" crossorigin="anonymous"></script>
48+
<!-- Latest compiled JS. To be placed before the closing <body> tag above other scripts. -->
49+
<script src="https://cdn.jsdelivr.net/npm/quickmenu@1.4.0/dist/js/quickmenu.min.js" integrity="sha384-J+7UVhxvYUPTb1N2qLj0dvniUcy8M1Ssxsic1xFI31naqNI4KlXP+r4D5eLVxhgg" crossorigin="anonymous"></script>
5050
```
5151

5252
We recommend placing the stylesheet before any of your own custom stylesheets, which will ensure your customisations take precedence where possible. Similarly, it's required to place the script before any of your own custom scripts too.
@@ -132,29 +132,34 @@ When in responsive mode for mobiles and tablets, the menu is fixed at the bottom
132132

133133
#### Full Fledged
134134
```html
135-
<!-- Full Fledged: including FontAwesome icons, menu heading content, customised wording on open and close buttons. -->
135+
<!-- Full Fledged: including SVGs as icons (not supplied), menu heading content, customised wording on open and close buttons. -->
136136
<div class="quick-menu navigation">
137-
<div class="button"><i class="fas fa-bars"></i> My Menu</div>
137+
<div class="button"><img src="/icons/bars.svg">My Menu</div>
138138
<div class="menu">
139139
<div class="menu-heading">
140-
<i class="far fa-compass"></i>
140+
<div class="qm-icon"><img src="/icons/compass.svg"></div>
141141
<span>My Menu</span>
142142
<p>Explore the contents of this site by jumping around using the following handy menu.</p>
143143
</div>
144144
<hr>
145145
<nav>
146146
<ul>
147-
<li><a href="/"><i class="fas fa-home qm-only"></i>Home</a></li>
148-
<li><a href="/about"><i class="far fa-user-circle qm-only"></i>About</a></li>
149-
<li><a href="/work"><i class="fas fa-briefcase qm-only"></i>Work</a></li>
150-
<li><a href="/contact"><i class="far fa-paper-plane qm-only"></i>Contact</a></li>
147+
<li><a href="/"><div class="qm-icon qm-only"><img src="/icons/home.svg"></div>Home</a></li>
148+
<li><a href="/about"><div class="qm-icon qm-only"><img src="/icons/about.svg"></div>About</a></li>
149+
<li><a href="/work"><div class="qm-icon qm-only"><img src="/icons/work.svg"></div>Work</a></li>
150+
<li><a href="/contact"><div class="qm-icon qm-only"><img src="/icons/contact.svg"></div>Contact</a></li>
151151
</ul>
152152
</nav>
153153
<div class="menu-close">Dismiss</div>
154154
</div>
155155
</div>
156156
```
157157

158+
##### The `.qm-icon` Class
159+
The Quick Menu has been designed to enable you to use any iconography set on the menu, including images/SVGs, fonts and etc. Any icon styling will need to be applied from your own custom CSS. However we have introduced a `qm-icon` class to provide minimal styling to reduce your workload.
160+
161+
If you're using FontAwesome icons via the `<i>` element for example, you can apply the `.qm-icon` class directly to the element. Otherwise you can wrap your icons in a `div` element with the `.qm-icon` class.
162+
158163
### The `.qm-only` Class
159164
As a part of your requirements you may need to present additional content or features (e.g. such as a search field) inside the Quick Menu. You can embed additional content inside the `.menu` div (as illustrated in the "Minimal: Renaming Close Button" and "Full Fledged" HTML examples above).
160165

@@ -220,7 +225,6 @@ We appreciate your contributions to making this a better project for all of us.
220225
During participation on the Quick Menu project, we maintain a [Code of Conduct](https://github.com/aullah/quickmenu/blob/main/CODE_OF_CONDUCT.md) which we require all individuals to adhere to.
221226

222227
## To-Do / Future Plans
223-
* Remove FontAwesome specific styling and ensure compatibility with any iconography.
224228
* Provide the ability to toggle themes manually.
225229
* Implement the ability to have sub-menus for both desktop and mobile devices.
226230

0 commit comments

Comments
 (0)