File tree 2 files changed +22
-1
lines changed
2 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -219,4 +219,24 @@ function loadChapter(project) {
219
219
hash . scrollIntoView ( ) ;
220
220
}
221
221
222
- }
222
+ }
223
+
224
+ function system_html ( sys , url = null ) {
225
+ let input_port_html = "" ;
226
+ if ( 'input_ports' in sys ) {
227
+ sys . input_ports . forEach ( port => {
228
+ input_port_html += `<tr><td align=right style=\"padding:5px 0px 5px 0px\">${ port } →</td></tr>` ;
229
+ } ) ;
230
+ }
231
+ let output_port_html = "" ;
232
+ if ( 'output_ports' in sys ) {
233
+ sys . output_ports . forEach ( port => {
234
+ output_port_html += `<tr><td align=left style=\"padding:5px 0px 5px 0px\">→ ${ port } </td></tr>` ;
235
+ } ) ;
236
+ }
237
+ let name_html = sys . name ;
238
+ if ( url ) {
239
+ name_html = `<a href="${ url } ">${ sys . name } </a>` ;
240
+ }
241
+ return `<table align=center cellpadding=0 cellspacing=0><tr align=center><td style=\"vertical-align:middle\"><table cellspacing=0 cellpadding=0>${ input_port_html } </table></td><td align=center style=\"border:solid;padding-left:20px;padding-right:20px;vertical-align:middle\" bgcolor=#F0F0F0>${ name_html } </td><td style=\"vertical-align:middle\"><table cellspacing=0 cellpadding=0>${ output_port_html } </table></td></tr></table>` ;
242
+ }
You can’t perform that action at this time.
0 commit comments