Home › Forums › Theone WordPress Theme › How to have separate logos
- This topic has 15 replies, 2 voices, and was last updated 11 years, 2 months ago by
dashmista.
-
AuthorPosts
-
February 17, 2015 at 12:40 am #6308
dashmista
ParticipantHi,
I want one logo for the small box before scrolling (used to have bowtie logo), and then one for the menu. It appears my logo width is too much for the small box, so I need to make a shortened version. Thanks.
February 17, 2015 at 2:15 am #6309HI,
it needs custom css, i don’t suggest use 2 logos, the animation will be not smooth.
You can try this way:
Please login wp-admin, go to Theone / General Settings / Custom Css, paste the style code to Custom Css(change as the logo url as yours.):
body.page #header.menu-default-hide #logo { background: url(http://xxxx.com/logo-in-box.png) no-repeat 50% 50%; } body.page #header.menu-default-hide #logo .logo-image {opacity:0; } @-webkit-keyframes logoAnimationZip { 0%{ left: 50%; -webkit-transform: translateX(-50%); background: url(http://xxxx.com/logo-in-box.png) no-repeat 50% 50%; } 50%{ left: 50%; -webkit-transform: translateX(-50%); background: none;} 100%{ left: 0; -webkit-transform: translateX(0); background:none} } @-moz-keyframes logoAnimationZip { 0%{ left: 50%; -webkit-transform: translateX(-50%); background: url(http://xxxx.com/logo-in-box.png) no-repeat 50% 50%; } 50%{ left: 50%; -webkit-transform: translateX(-50%); background: none;} 100%{ left: 0; -webkit-transform: translateX(0); background:none} } @keyframes logoAnimationZip { 0%{ left: 50%; -webkit-transform: translateX(-50%); background: url(http://xxxx.com/logo-in-box.png) no-repeat 50% 50%; } 50%{ left: 50%; -webkit-transform: translateX(-50%); background: none;} 100%{ left: 0; -webkit-transform: translateX(0); background:none} } @-webkit-keyframes logoImgZip { 0%{ max-height: 60px; opacity:0; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px;opacity:1; } } @-moz-keyframes logoImgZip { 0%{ max-height: 60px; opacity:0; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px;opacity:1; } } @keyframes logoImgZip { 0%{ max-height: 60px; opacity:0; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px;opacity:1; } }February 17, 2015 at 3:03 am #6318dashmista
ParticipantThank you.
Is that the technique used on http://www.pixelkicks.co.uk/? It seems their animation transition is smooth. How can I do one like this?
February 17, 2015 at 12:39 pm #6328Hi, I improved the custom css code. It is better now.
Note: Don’t paste the to Custom css, there is a issue for exporting quotation marks.
please use child theme, paste the css to ../themes/theone-child/custom.css;
Or: paste to last line of ../themes/theone/style.cssbody.page #header.menu-default-hide #logo .logo-image { opacity:1; } #logo a:before { content:''; position:absolute; left: 0;top: 0; width: 150px; height: 100%; background: url(http://xxx/Long-Logo-on-MenuBar.png) no-repeat 50% 50%; background-size: 120px auto; } body.page #header.menu-default-hide #logo a:before { opacity: 0; -webkit-animation:longlogoImgZip 1s ease normal both; -moz-animation:longlogoImgZip 1s ease normal both; animation:longlogoImgZip 1s ease normal both; } body.page #header.menu-default-hide.header-slide-down #logo a:before { opacity: 1; -webkit-animation:longlogoImgUnZip 1s ease normal both; -moz-animation:longlogoImgUnZip 1s ease normal both; animation:longlogoImgUnZip 1s ease normal both; } @-webkit-keyframes longlogoImgZip { 0%{ opacity:1; } 10%{ opacity:0; } 100%{ opacity:0; } } @-moz-keyframes longlogoImgZip { 0%{ opacity:1; } 10%{ opacity:0; } 100%{ opacity:0; } } @keyframes longlogoImgZip { 0%{ opacity:1; } 10%{ opacity:0; } 100%{ opacity:0; } } @-webkit-keyframes longlogoImgUnZip { 0%{ opacity:0; } 90%{ opacity:0; } 100%{ opacity:1; } } @-moz-keyframes longlogoImgUnZip { 0%{ opacity:0; } 90%{ opacity:0; } 100%{ opacity:1; } } @keyframes longlogoImgUnZip { 0%{ opacity:0; } 90%{ opacity:0; } 100%{ opacity:1; } } @-webkit-keyframes logoImgZip { 0%{ max-height: 60px; opacity:1; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px; opacity:0; } } @-moz-keyframes logoImgZip { 0%{ max-height: 60px; opacity:1; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px; opacity:0; } } @keyframes logoImgZip { 0%{ max-height: 60px; opacity:1; } 50%{ max-height: 40px; opacity:1; } 100%{ max-height: 40px; opacity:0; } }February 17, 2015 at 12:44 pm #6331- Put the logo in box by Theone / General Settings / Custom Logo
- Put the logo in menu bar by above css code(replace as yours url) :
...background: url(http://xxx/Long-Logo-on-MenuBar.png)...
February 17, 2015 at 2:45 pm #6337dashmista
ParticipantPerfect!! Thank you. One last thing: with this custom css, how can I increase the size of the logo? I tried the code you showed before (without this separate logo) but it does not work now.
February 18, 2015 at 12:30 am #6341Welcome, which logo? if that you mentioned is Long-Logo-on-MenuBar.png, in above custom css, there are 2 sizes, increase them:
#logo a:before { ... width: 150px; ... background-size: 120px auto; ... }February 18, 2015 at 2:52 am #6350dashmista
ParticipantI want to increase the size of both the logo in the box and the menu. Strange, with the custom css file uploaded, the css editor in wp-admin does not work?
February 18, 2015 at 4:21 am #6351For logo in box, add css code:
body.page #header.menu-default-hide #logo .logo-image { max-height: 80px; }change all
max-height: 60px;of above css asmax-height: 80px;all code I have tested, plz check yours double.
February 26, 2015 at 2:06 am #6424dashmista
ParticipantThanks.
So I have successfully gotten separate logos and the correct sizes. However… Now I am experiencing a problem because of this custom css: http://uxdash.com/?p=1814 do you see it creates both logos now in the header? The home page uxdash.com is working fine, but subpages are not working with the logos. How can I fix this?
February 26, 2015 at 2:35 am #6426Hi, it is not custom css issue. It is origin design, the header layout works only for page (https://www.dropbox.com/s/30gq33gtqfatly2/QQ20150226-2.jpg?dl=0), there is narmal header for all posts.
February 26, 2015 at 3:57 pm #6433dashmista
ParticipantOk thanks. So what do I do? How do I stop the overlap of both logos in the header here:http://uxdash.com/?p=1814 and for all sub-pages? I can’t have that.
February 27, 2015 at 7:10 am #6443Please add the custom css code:
body:not(.page) .logo-image {display: none;}February 28, 2015 at 6:54 am #6450dashmista
ParticipantPerfect. Thank you.
March 28, 2015 at 11:20 pm #6832dashmista
ParticipantThis reply has been marked as private.March 29, 2015 at 2:04 am #6837dashmista
ParticipantFixed it! My apologies.
-
AuthorPosts
- You must be logged in to reply to this topic.
