docgen-tool 3.2.12 → 3.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -256,6 +256,15 @@ function DocGen(process) {
256
256
  url: { type: 'string' },
257
257
  },
258
258
  },
259
+ sponsorLink: {
260
+ type: 'object',
261
+ required: ['name', 'url', 'logo'],
262
+ properties: {
263
+ name: { type: 'string' },
264
+ url: { type: 'string' },
265
+ logo: { type: 'string' },
266
+ },
267
+ },
259
268
  backlink: {
260
269
  type: 'object',
261
270
  required: ['name', 'url'],
@@ -582,7 +591,7 @@ function DocGen(process) {
582
591
  var backlink = '';
583
592
  if (meta.parameters.backlink.url !== '') {
584
593
  backlink +=
585
- '<a href="' +
594
+ '<a class="button inverted" href="' +
586
595
  meta.parameters.backlink.url +
587
596
  '">' +
588
597
  meta.parameters.backlink.name +
@@ -591,6 +600,10 @@ function DocGen(process) {
591
600
  else {
592
601
  backlink += meta.parameters.backlink.name;
593
602
  }
603
+ var sponsorLink = '';
604
+ if (meta.parameters.sponsorLink) {
605
+ sponsorLink = "\n <div id=\"headerSponsor\">\n <span>".concat(meta.parameters.sponsorLink.name, "</span>\n <a href=\"").concat(meta.parameters.sponsorLink.url, "\">\n <img id=\"sponsorLogo\" src=\"").concat(meta.parameters.sponsorLink.logo, "\" alt=\"sponsor logo\">\n </a>\n </div>\n ");
606
+ }
594
607
  var contributors = '';
595
608
  meta.parameters.contributors.forEach(function (contributor) {
596
609
  if (contributor.url !== '') {
@@ -613,7 +626,6 @@ function DocGen(process) {
613
626
  var logoUrl = logoPath;
614
627
  $('#dg-logo').css('background-image', 'url(' + logoUrl + ')');
615
628
  $('#dg-logo').css('height', logoHeight + 'px');
616
- $('#dg-logo').css('line-height', logoHeight + 'px');
617
629
  $('#dg-logo').css('padding-left', logoWidth + 25 + 'px');
618
630
  }
619
631
  else {
@@ -621,7 +633,7 @@ function DocGen(process) {
621
633
  }
622
634
  //parameters
623
635
  $('title').text(meta.parameters.title);
624
- $('#dg-homelink').attr('href', homelink);
636
+ $('.dg-homelink').attr('href', homelink);
625
637
  $('#dg-title').text(meta.parameters.title);
626
638
  $('#dg-owner').html(owner);
627
639
  $('#dg-version').text(releaseVersion);
@@ -634,6 +646,7 @@ function DocGen(process) {
634
646
  $('#dg-id').html(meta.parameters.id);
635
647
  $('#dg-website').html(website);
636
648
  $('#dg-backlink').html(backlink);
649
+ $('#headerLeftText').append(sponsorLink);
637
650
  $('#dg-summary').text(meta.parameters.summary);
638
651
  $('#dg-copyright').html(copyright);
639
652
  $('#dg-marking').text(meta.parameters.marking);
@@ -357,8 +357,7 @@ input[type='submit']:focus {
357
357
  reused entities
358
358
  */
359
359
  .w-clear-after::after,
360
- .w-clear,
361
- header::after {
360
+ .w-clear {
362
361
  clear: both;
363
362
  height: 0;
364
363
  visibility: hidden;
@@ -437,27 +436,51 @@ header .w-false-link,
437
436
  header .w-false-link:hover {
438
437
  color: rgb(1, 3, 4);
439
438
  }
440
- header .header-title {
441
- display: table-cell;
442
- vertical-align: middle;
443
- padding: 30px 0 30px 0;
439
+ header .header {
440
+ display: flex;
441
+ align-items: center;
442
+ height: 102px;
443
+ padding-right: 40px;
444
444
  }
445
- header .header-title > a {
446
- text-decoration: none;
445
+ header .headerLeftBlock {
446
+ display: flex;
447
+ align-items: center;
448
+ }
449
+ header #dg-logo {
450
+ background-repeat: no-repeat;
451
+ }
452
+ header #headerLeftText {
453
+ display: flex;
454
+ flex-direction: column;
447
455
  font-weight: bold;
448
456
  font-size: 16px;
449
457
  }
450
- header .header-title > a div {
451
- background-repeat: no-repeat;
452
- height: 42px;
453
- line-height: 42px;
454
- padding-left: 115px;
458
+ header #headerLeftText a {
459
+ text-decoration: none;
455
460
  }
456
- header .header-extra {
457
- display: table-cell;
458
- vertical-align: middle;
459
- text-align: right;
461
+ header #headerLeftText #headerSponsor {
462
+ display: flex;
463
+ align-items: center;
464
+ font-weight: normal;
465
+ font-size: 11px;
466
+ margin: 5px 0 0 0;
467
+ opacity: 0.6;
468
+ }
469
+ header #headerLeftText #headerSponsor span {
470
+ margin-right: 6px;
471
+ }
472
+ header #headerLeftText #headerSponsor #sponsorLogo {
473
+ height: 12px;
474
+ margin: 0 auto;
475
+ display: block;
476
+ }
477
+ header #headerRightBlock {
478
+ margin-left: auto;
479
+ }
480
+ header #headerRightBlock a {
481
+ padding: 5px 10px;
460
482
  }
483
+
461
484
  /*
462
485
  footer
463
486
  */
@@ -62,15 +62,20 @@ MathJax.Hub.Config({"HTML-CSS": { preferredFont: "TeX", availableFonts: ["STIX",
62
62
 
63
63
  <header>
64
64
  <div class="w-fixed-width header-container">
65
- <div class="header-title">
66
- <a id="dg-homelink" href="#">
67
- <div id="dg-logo" style="background-image:url('docs/images/logo.svg');">
68
- <span id="dg-title"></span> <span id="dg-web-title-version" style="font-weight:normal;"></span>
65
+ <div class="header">
66
+ <div class="headerLeftBlock">
67
+ <a class="dg-homelink" href="#">
68
+ <div id="dg-logo"></div>
69
+ </a>
70
+ <div id="headerLeftText">
71
+ <a class="dg-homelink" href="#">
72
+ <span id="dg-title"></span> <span id="dg-web-title-version" style="font-weight:normal;"></span>
73
+ </a>
69
74
  </div>
70
- </a>
71
- </div>
72
- <div class="header-extra">
73
- <span id="dg-backlink"></span>
75
+ </div>
76
+ <div id="headerRightBlock">
77
+ <span id="dg-backlink"></span>
78
+ </div>
74
79
  </div>
75
80
  </div>
76
81
  </header>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docgen-tool",
3
- "version": "3.2.12",
3
+ "version": "3.2.13",
4
4
  "description": "A tool for creating HTML and PDF documentation",
5
5
  "main": "dist/docgen.js",
6
6
  "bin": {