-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #380 from yalesites-org/develop
Release
- Loading branch information
Showing
61 changed files
with
1,204 additions
and
764 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
import hljs from 'highlight.js/lib/core'; | ||
import c from 'highlight.js/lib/languages/c'; | ||
import cpp from 'highlight.js/lib/languages/cpp'; | ||
import csharp from 'highlight.js/lib/languages/csharp'; | ||
import css from 'highlight.js/lib/languages/css'; | ||
import html from 'highlight.js/lib/languages/vbscript-html'; | ||
import java from 'highlight.js/lib/languages/java'; | ||
import javascript from 'highlight.js/lib/languages/javascript'; | ||
import json from 'highlight.js/lib/languages/json'; | ||
import matlab from 'highlight.js/lib/languages/matlab'; | ||
import php from 'highlight.js/lib/languages/php'; | ||
import python from 'highlight.js/lib/languages/python'; | ||
import r from 'highlight.js/lib/languages/r'; | ||
import twig from 'highlight.js/lib/languages/twig'; | ||
import typescript from 'highlight.js/lib/languages/typescript'; | ||
import scss from 'highlight.js/lib/languages/scss'; | ||
import shell from 'highlight.js/lib/languages/shell'; | ||
import sql from 'highlight.js/lib/languages/sql'; | ||
import yaml from 'highlight.js/lib/languages/yaml'; | ||
import vim from 'highlight.js/lib/languages/vim'; | ||
|
||
// Register the languages we need | ||
hljs.registerLanguage('c', c); | ||
hljs.registerLanguage('cpp', cpp); | ||
hljs.registerLanguage('csharp', csharp); | ||
hljs.registerLanguage('css', css); | ||
hljs.registerLanguage('html', html); | ||
hljs.registerLanguage('java', java); | ||
hljs.registerLanguage('javascript', javascript); | ||
hljs.registerLanguage('json', json); | ||
hljs.registerLanguage('matlab', matlab); | ||
hljs.registerLanguage('php', php); | ||
hljs.registerLanguage('python', python); | ||
hljs.registerLanguage('r', r); | ||
hljs.registerLanguage('twig', twig); | ||
hljs.registerLanguage('typescript', typescript); | ||
hljs.registerLanguage('scss', scss); | ||
hljs.registerLanguage('shell', shell); | ||
hljs.registerLanguage('sql', sql); | ||
hljs.registerLanguage('yaml', yaml); | ||
hljs.registerLanguage('vim', vim); | ||
|
||
hljs.configure({ | ||
languages: [ | ||
'c', | ||
'cpp', | ||
'csharp', | ||
'css', | ||
'html', | ||
'java', | ||
'javascript', | ||
'json', | ||
'matlab', | ||
'php', | ||
'python', | ||
'r', | ||
'twig', | ||
'typescript', | ||
'scss', | ||
'shell', | ||
'sql', | ||
'yaml', | ||
'vim', | ||
], | ||
}); | ||
|
||
Drupal.behaviors.textHighlight = { | ||
attach(context) { | ||
// Selectors | ||
const codeBlocks = context.querySelectorAll('pre > code'); | ||
|
||
codeBlocks.forEach((codeBlock) => { | ||
if (typeof codeBlock === 'object') { | ||
hljs.highlightBlock(codeBlock); | ||
} | ||
}); | ||
}, | ||
}; |
3 changes: 2 additions & 1 deletion
3
components/02-molecules/content-spotlight-portrait/content-spotlights.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.