File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 77 < link rel ="stylesheet " href ="./css/style.css " />
88 </ head >
99 < body >
10+ < opencodelaw spec-url ="specs/opencon.yaml "> </ opencodelaw >
1011 <!-- Include opencon.js -->
1112 < script src ="https://cdn.jsdelivr.net/npm/marked/marked.min.js "> </ script >
1213 < script src ="https://cdnjs.cloudflare.com/ajax/libs/js-yaml/4.0.0/js-yaml.min.js "> </ script >
Original file line number Diff line number Diff line change @@ -10,7 +10,11 @@ function convertMarkdownToHTML(markdown) {
1010 // return markdown;
1111}
1212
13- fetch ( "specs/opencon.yaml" )
13+ // get src content from "<opencodelaw src="specs/opencon.yaml"></opencodelaw>" tag
14+ const opencodelawtag = document . querySelector ( "opencodelaw" ) ;
15+ const src = opencodelawtag . getAttribute ( "spec-url" ) ;
16+
17+ fetch ( src )
1418 . then ( ( response ) => response . text ( ) )
1519 . then ( ( yamlData ) => {
1620 const jsonData = jsyaml . load ( yamlData ) ;
@@ -193,8 +197,6 @@ fetch("specs/opencon.yaml")
193197 const subMenus = document . querySelectorAll ( ".sub-menu" ) ;
194198 const navLinks = document . querySelectorAll ( ".nav-a" ) ;
195199
196- console . log ( subMenus ) ;
197-
198200 // Function to toggle visibility of sub-menus
199201 function toggleSubMenu ( event ) {
200202 const subMenu = event . currentTarget . querySelector ( ".sub-nav" ) ;
You can’t perform that action at this time.
0 commit comments