homer
homer copied to clipboard
How to add Google search function to the page?
How to add Google search function to the page?
Hello @mucstudio,
It's not possible, the search bar is only intended to search in the dashboard items.
I have a search bar on the middle of my page for google.
message:
style: "is-warning"
title: "Google"
icon: "fab fa-google"
content: '<form action="https://google.com/search" method="get"><input type="text" name="q" placeholder="Search" style="width: 100%" spellcheck="false" autofocus="true" onkeydown="handleKeyPress(event)"/></form>'
Just throw this in your config.yml and save it :) I hope this is what you meant @mucstudio
I ended up with this, might not be perfect, but it's the right direction:
content: '<style>.logo{margin-top:0;margin-bottom:20px}.bar{margin:0 auto;width:575px;border-radius:30px;border:1px solid #dcdcdc}.bar:hover{box-shadow:1px 1px 8px 1px #dcdcdc}.bar:focus-within{box-shadow:1px 1px 8px 1px #dcdcdc;outline:0}.searchbar{height:45px;border:none;width:500px;font-size:16px;outline:0}.voice{height:20px;position:relative;top:5px;left:10px}.buttons{margin-top:30px}.button{background-color:#f5f5f5;border:none;color:#707070;font-size:15px;padding:10px 20px;margin:5px;border-radius:4px;outline:0;margin-left:auto;margin-right:auto;display:block}.button:hover{border:1px solid #c8c8c8;padding:9px 19px;color:grey}.button:focus{border:1px solid #4885ed;padding:9px 19px}</style><center><form action="https://www.google.com/search" method="get"><div class="logo"><img alt="Google" src="https://www.google.com/images/branding/googlelogo/1x/googlelogo_color_272x92dp.png"></div><div class="bar"><input name="q" class="searchbar" type="text" title="Search"></div><div class="buttons"><button class="button" type="submit">Google Search</button></div></form></center>'