Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Vanilla Logo displays instead of the user's logo #60

Open
4yx opened this issue Oct 9, 2018 · 5 comments
Open

Vanilla Logo displays instead of the user's logo #60

4yx opened this issue Oct 9, 2018 · 5 comments

Comments

@4yx
Copy link

4yx commented Oct 9, 2018

I have Sanmyaku installed on my Vanilla Forum version 2.6.3, located at https://www.mofh.ooo

I have gone to Settings --> Branding and put this:
image as my logo, however when I visit the forum the Vanilla custom logo by Sanmyaku shows up instead.

Any ideas on why this is happening?

Thanks to @R-J for telling me to open a new issue about it

@4yx
Copy link
Author

4yx commented Oct 9, 2018

I actually found what is possibly causing this.

In the settings.scss file of the Dark theme this line is present:
$tab-bar-logo: 'images/#{$theme-name}/vanilla-logo.png';

This line overrides the user selection logo as far as I can tell.

Upon even more research it occurs to me that the developers added it on purpose:
b1f6c81

Can anything be done to allow custom logos?

@R-J
Copy link
Collaborator

R-J commented Oct 10, 2018

This is in default.master.tpl and should display the logo: <div class="logo">{logo}</div>. But in the end, if there is no logo defined, {logo} doesn't display anything at all. In such cases it might be of interest to show the Vanilla logo as default. Only if a picture is chosen, that background picture will be deisplayed, but in such a case it prevents showing the chosen picture.
Therefore the current behavior is bogus.

It surely can and should be changed. I'm not sure how this has evolved, but there is some decision to be made.

Should there be a default logo shown if none is chosen?
If yes, then this should be set in config in the themehooks file.
If no, the css should simply be removed.

I would say no, since the picture chosen is nothing theme related and to me it looks much better without a logo at all

@valeryan
Copy link
Collaborator

The intention, in the beginning, was to have a default logo that can be overridden by the settings in the control panel. I don't work with vanilla anymore so It would seem that at some point the functionality became messed up and now it is only showing the default.

Not showing a default is fine with me or fixing the default so that is its overridden correctly would work as well. @R-J if you have a solution in mind do a PR and assign me as the reviewer. Otherwise, it could be a while before I have an opportunity to look into this.

@R-J
Copy link
Collaborator

R-J commented Oct 13, 2018

Adding that default logo is no problem at all, but I'm unsure how much I have to remove from the css/sass. The width of the Vanilla logo is hard coded in there and I think it would be great to not have to give a pixel number in there since that makes it very unflexible. But I'm not experienced with css so I do not know how to rewrite this in a general way

.tab-bar{
	.title{
		padding-left: 20px;
		.logo{
			width: $logo-width;
			background: url($tab-bar-logo) no-repeat center;
			background-size: contain;
			text-indent: -99999px;
		}
	}
}

@valeryan
Copy link
Collaborator

I think some of this could be avoided if I wrote better documentation for how we intended this theme to be used. The theme was meant to be a framework or kickstarter for a theme. We provided the framework for being able to create new variant themes and to be able to add specialized partials through a smarty plugin. The idea would be that instead of using light or dark that a user would simply create their own variant based on the theme. The dark variant illustrates how easy it is to add a new variant to the project. However, we have never really documented the process and spent the time to really explain that.

But it would be nice if the logo replacement function in the dashboard worked and this style simple constrained it. I think that could be done with a specialized selector that actually only applies this style if the .logo div does not contain an image. I will have to research selectors and see if that can be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants