Added ability to load javascript libraries for articles only when they're needed.
This commit is contained in:
		| @@ -115,6 +115,11 @@ | |||||||
|  |  | ||||||
|     <script src="{{ .Site.BaseURL }}/js/script.js"></script> |     <script src="{{ .Site.BaseURL }}/js/script.js"></script> | ||||||
|     {{ block "scripts" . }}{{ end }} |     {{ block "scripts" . }}{{ end }} | ||||||
|  |  | ||||||
|  |     {{ if in .Params.js "juxtapose" }} | ||||||
|  |       <script src="https://cdn.knightlab.com/libs/juxtapose/latest/js/juxtapose.min.js"></script> | ||||||
|  |       <link rel="stylesheet" href="https://cdn.knightlab.com/libs/juxtapose/latest/css/juxtapose.css"> | ||||||
|  |     {{ end }} | ||||||
|   </body> |   </body> | ||||||
|  |  | ||||||
|   </html> |   </html> | ||||||
|   | |||||||
| @@ -17,7 +17,7 @@ | |||||||
|   background-color: white; |   background-color: white; | ||||||
|   box-shadow: 0 0 20px 0 rgba(0, 0, 0, .1); |   box-shadow: 0 0 20px 0 rgba(0, 0, 0, .1); | ||||||
| } | } | ||||||
| #content img { | #content figure img { | ||||||
|   max-width: 100%; |   max-width: 100%; | ||||||
|   height: auto; |   height: auto; | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user