You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# The text that will be displayed inside the button.
209
+
"content": "My button's text",
178
210
# An optional list of classes to add
179
211
"classes": ["one", "two"]
180
-
},
212
+
}
181
213
```
182
214
183
-
To add text without a link, simply omit the `url:` parameter.
215
+
Note tha **url** and **onclick** cannot both be provided in the same button's configuration.
216
+
217
+
#### Button icons
218
+
219
+
There are two kinds of icons you can control with the `icon` parameter:
220
+
221
+
-**FontAwesome icons**: FontAwesome icon classes like `fas fa-arrow-right`. See [the FontAwesome documentation](https://fontawesome.com/icons) for a list of classes and icons. For example:
222
+
223
+
```python
224
+
# Provided as a list item to `start:` or `end:`
225
+
{
226
+
# Specifies the `button` component
227
+
"type": "button",
228
+
"icon": "fab fa-github"
229
+
"url": "https://github.com"
230
+
}
231
+
```
232
+
-**A path to an image**: Any local image you include with your documentation.
Finally, if a button is configured **only with an icon**, it will have a special class `icon-button` added to it that will make it contract slightly in size and spacing.
184
259
185
260
### Dropdown menus
186
261
@@ -196,7 +271,7 @@ To add dropdown components to header sections, use the following component confi
196
271
"type": "dropdown",
197
272
# Text to be displayed on the button
198
273
"content": "EBP Projects",
199
-
# A list of dropdown links. Each defines a content string and a url
274
+
# A list of dropdown links. Each is a configuration for a button.
200
275
"items": [
201
276
{
202
277
"url": "https://executablebooks.org",
@@ -212,79 +287,38 @@ To add dropdown components to header sections, use the following component confi
212
287
},
213
288
```
214
289
215
-
### Icon links
290
+
### Groups
216
291
217
-
You can add a list of icon links to your header that link to external sites and services.
218
-
These are often used to link to social media accoutns like GitHub, Twitter, discussion forums, etc.
219
-
They will be displayed horizontally whether on wide or narrow screens.
292
+
Groups are a way of telling the theme that several UI components should be grouped together.
293
+
They will have a wrapping container, will have less spacing between them, and will be displayed _horizontally_ on narrow screens.
220
294
221
-
There are two kinds of icons you can control with `icon-links`:
222
-
223
-
-**FontAwesome icons**: FontAwesome icon classes like `fas fa-arrow-right`. See [the FontAwesome documentation](https://fontawesome.com/icons) for a list of classes and icons.
224
-
-**A path to an image**: Any local image you include with your documentation.
225
-
226
-
To add icon link components to header sections, use the following component configuration:
295
+
For example, to group several icon buttons together use a configuration like so:
227
296
228
297
```python
229
298
# Provided as a list item to `start:` or `end:`
230
299
{
231
-
# Specifies the `icon-links` component
232
-
"type": "icon-links",
233
-
# A list of icon links to include
234
-
"icons": [
235
-
# Configuration for icon one uses FontAwesome
300
+
# Specifies a `group` type
301
+
"type": "group",
302
+
# A list of group items. Each is a configuration for a button.
303
+
"items": [
236
304
{
237
-
# Specifies that this icon is a FontAwesome icon
238
-
"type": "fontawesome",
239
-
# A url for icon one
240
-
"url": "https://twitter.com/executablebooks",
241
-
# A tooltip for icon one
242
-
"name": "Twitter",
243
-
# A FontAwesome icon class
244
-
"icon": "fab fa-twitter-square",
305
+
"icon": "fab fa-github",
306
+
"url": "https://github.com
245
307
},
246
-
# Configuration for icon two uses a local image path
0 commit comments