|
19 | 19 | [](https://www.proangular.com)
|
20 | 20 | [](https://gitter.im/ProAngular/community)
|
21 | 21 | [](https://discord.com/channels/1003103094588055552)
|
22 |
| -[](https://github.com/ProAngular/ngx-gist/actions/workflows/on-merge-main-deploy-gpr.yml) |
23 |
| -[](https://github.com/ProAngular/ngx-gist/actions/workflows/on-merge-main-deploy-npmjs.yml) |
24 | 22 | [](https://github.com/sponsors/ProAngular)
|
25 | 23 | [](/LICENSE)
|
| 24 | +[](https://github.com/ProAngular/ngx-gist/actions/workflows/on-merge-main-deploy-gpr.yml) |
| 25 | +[](https://github.com/ProAngular/ngx-gist/actions/workflows/on-merge-main-deploy-npmjs.yml) |
26 | 26 |
|
27 | 27 | <!--
|
28 | 28 | []()
|
@@ -104,12 +104,30 @@ export class FeatureModule { }
|
104 | 104 |
|
105 | 105 | ## Dependencies
|
106 | 106 |
|
107 |
| -### Styling |
| 107 | +### Styling UX - Angular Material |
108 | 108 |
|
109 | 109 | You should have an Angular Material theme set up prior to using this, but it's not strictly neccessary. Disabled by default, you can alternatively use the `materialTheme` component input (see API documentation below) to auto load a pre-defined Angular Material theme from a CDN. I don't recommend depending on the CDN or this approach, but I wanted to make it possible for you. It's also possible to use this without an angular theme and style it yourself entirely!
|
110 | 110 |
|
111 | 111 | More information on theming Angular Material: https://material.angular.io/guide/theming
|
112 | 112 |
|
| 113 | +### Styling UX Code Snippets - Highlight.js |
| 114 | + |
| 115 | +You can pass in any theme name (string, excluding the file extension ".css") to the input `codeTheme` on _any_ `ngx-gist` element on a single page which will apply the theme to that pages gists. |
| 116 | + |
| 117 | +You can find the available styles here: https://unpkg.com/browse/highlight.js@11.6.0/styles/ |
| 118 | + |
| 119 | +Alternatively if you only want to use one style across the whole project or just apply to specific features, I recommend importing the styles directly. To do this install the `highlight.js` package and apply the style. Example below: |
| 120 | + |
| 121 | +```bash |
| 122 | +npm install highlight.js --save |
| 123 | +``` |
| 124 | + |
| 125 | +```diff |
| 126 | +... |
| 127 | ++ @import "highlight.js/styles/github.css"; |
| 128 | +... |
| 129 | +``` |
| 130 | + |
113 | 131 | ### Core Packages
|
114 | 132 |
|
115 | 133 | Depending on how your project is set up, you may also need the following imports either in your `FeatureModule` for example or your root module (generally these are already imported in `AppModule` or similar, they are common features of Angular). These dependencies are needed for animating the Angular Material tabs click transition and making an HTTP request to GitHub to retrieve the remote gist information.
|
|
0 commit comments