-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add search_widget and introduction #1
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got a little bit lost because of the documentation/file structure which seems to be copy&paste. Comments are in the documentation directory mostly.
Looks good to me!
@@ -0,0 +1,117 @@ | |||
<!DOCTYPE html> | |||
<html lang="en"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably be "de"
<textarea id="integreat_textarea_html" class="integreat_class_input"> | ||
<div id="integreat-search-widget"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Formatting is slightly off here. I usually use prettier in HTML/JS projects: https://prettier.io/
<textarea id="integreat_textarea_html" class="integreat_class_input"> | ||
<div id="integreat-search-widget"> | ||
<img src="./assets/integreat-app-logo.png"> | ||
<p>Mehrsprachige Informationen in <!-- Region --> finden!</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should there be a placeholder inserted at <!-- Region -->
?
<p>Mehrsprachige Informationen in <!-- Region --> finden!</p> | ||
<form method="get"> | ||
<input class="integreat_search" id="integreat_search" name="query" placeholder="z.B. Sprachkurse"> | ||
<input class="integreat_submit" id="integreat_submit" type="submit" value="SUCHEN"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can also use text-transform to make something uppercase: https://developer.mozilla.org/en-US/docs/Web/CSS/text-transform
CSS einbetten | ||
</h3> | ||
<textarea id="integreat_textarea_css" class="integreat_class_input"> | ||
<style> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think those styles can be moved to the .css
file.
</div> | ||
<div><h3>Javascript einbetten</h3> | ||
<textarea id="integreat_textarea_js" class="integreat_class_input"> | ||
<script> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be moved to the .js
file.
function add_to_clipboard(id) { | ||
let input_search_widget = document.getElementById(id) | ||
input_search_widget.select(); | ||
document.execCommand("Copy"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never used any copy API of the browser. But this API seems to be removed: https://developer.mozilla.org/en-US/docs/Web/API/Document/execCommand
This PR adds the search widget as a javascript file, based on the Integreat Search Widget Wordpress Plugin.