Skip to content

Commit

Permalink
Make logo Url/Path/Alt configurable/removable via extensions
Browse files Browse the repository at this point in the history
This is an alternative solution to fix #91, fix #47
  • Loading branch information
bago committed Jan 12, 2016
1 parent e745fea commit ee6de42
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 5 additions & 1 deletion src/js/viewmodel.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ function initializeEditor(content, blockDefs, thumbPathConverter, galleryUrl) {
showTheme: ko.observable(false),
showGallery: ko.observable(false),
debug: ko.observable(false),
contentListeners: ko.observable(0)
contentListeners: ko.observable(0),

logoPath: 'dist/img/mosaico32.png',
logoUrl: '.',
logoAlt: 'mosaico'
};

// viewModel.content = content._instrument(ko, content, undefined, true);
Expand Down
7 changes: 4 additions & 3 deletions src/tmpl/main.tmpl.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@

</div>


<!-- ko if: $root.logoPath -->
<div id="loading" class="loading" style="display: block; width: 300px; text-align: center; height: 32px; position: absolute; top:0; bottom: 0; left: 0; right: 0; margin: auto;" data-bind="attr: { style: 'position: absolute; top: 5px; left: 6px; z-index: 150;'}, css: { loading: false }">
<a href="/"><img src="dist/img/mosaico32.png" width="32" height="32" alt="mosaico" border="0" /></a>
<a href="/" data-bind="attr: { href: $root.logoUrl, alt: $root.logoAlt }"><img data-bind="attr: { src: $root.logoPath }" width="32" height="32" alt="mosaico" border="0" /></a>
<div style="opacity: 0" data-bind="visible: false">Oppps... !!</div>
</div>
</div>
<!-- /ko -->

0 comments on commit ee6de42

Please sign in to comment.