diff --git a/playbook.yml b/playbook.yml index 6682daec..54575e43 100644 --- a/playbook.yml +++ b/playbook.yml @@ -67,6 +67,9 @@ content: branches: HEAD start_path: docs + - url: https://github.com/OpenZeppelin/cairo-contracts + branches: HEAD + start_path: docs ui: bundle: url: ./ui/theme diff --git a/ui/package.json b/ui/package.json index c7e21624..d0a4423f 100644 --- a/ui/package.json +++ b/ui/package.json @@ -30,8 +30,9 @@ "fromentries": "^1.3.2", "glob": "^7.1.7", "handlebars": "^4.7.7", - "highlight.js": "^11.5.1", + "highlight.js": "^11.6.0", "highlightjs-solidity": "^2.0.5", + "highlightjs-cairo": "^0.1.0", "live-server": "^1.2.2", "lodash.debounce": "^4.0.8", "rimraf": "^3.0.2", diff --git a/ui/preview/model.yml b/ui/preview/model.yml index c43df7c3..2bba829d 100644 --- a/ui/preview/model.yml +++ b/ui/preview/model.yml @@ -51,6 +51,16 @@ site: version: '1.x' displayVersion: '1.x' latestVersion: *latest_version_contracts + contracts-cairo: + name: contracts-cairo + title: Contracts for Cairo + url: '#' + versions: + - &latest_version_abc + url: '#' + version: '0.2.x' + displayVersion: '0.2.x' + latestVersion: *latest_version_abc cli: name: cli title: CLI diff --git a/ui/src/js/highlight.js b/ui/src/js/highlight.js index eb11e385..8bec452f 100644 --- a/ui/src/js/highlight.js +++ b/ui/src/js/highlight.js @@ -8,4 +8,5 @@ hljs.registerLanguage('python', require('highlight.js/lib/languages/python')); hljs.registerLanguage('shell', require('highlight.js/lib/languages/shell')); hljs.registerLanguage('xml', require('highlight.js/lib/languages/xml')); require('highlightjs-solidity')(hljs); +require('highlightjs-cairo')(hljs); hljs.initHighlightingOnLoad(); diff --git a/ui/theme/images/icons/contracts-cairo.svg b/ui/theme/images/icons/contracts-cairo.svg new file mode 100644 index 00000000..bde3a023 --- /dev/null +++ b/ui/theme/images/icons/contracts-cairo.svg @@ -0,0 +1,12 @@ + + diff --git a/ui/theme/partials/navigation.hbs b/ui/theme/partials/navigation.hbs index b7bf23ca..f5261d59 100644 --- a/ui/theme/partials/navigation.hbs +++ b/ui/theme/partials/navigation.hbs @@ -2,7 +2,8 @@ data-is-site-aspect="{{component.siteAspect}}" data-version="{{component.version.string}}" role="navigation"> @@ -14,7 +15,7 @@ {{/each}}