Skip to content
Snippets Groups Projects
Commit a5c15968 authored by Alexandre Bourlier's avatar Alexandre Bourlier
Browse files

Styling search form. What a pain...

parent 82fc64bb
No related branches found
No related tags found
No related merge requests found
HD app is the magic tool that allows the Happy Dev network to thrive in a decentralized way. HD app is the magic tool that allows the Happy Dev network to thrive in a decentralized way.
##Install (Ubuntu) ## Install (Ubuntu)
* `git clone --recurse-submodules https://git.happy-dev.fr/happy-dev/hd-app.git` * `git clone --recurse-submodules https://git.happy-dev.fr/happy-dev/hd-app.git`
* `cd hd-app` * `cd hd-app`
* `apt install npm` * `apt install npm`
* `npm install -g grunt-cli` * `npm install -g grunt-cli`
* `npm install` * `npm install`
##Compile SASS ## Compile SASS
* `grunt watch` * `grunt watch`
<div id="members" style="display: none"> <div id="members" style="display: none">
<div class="page-header"> <div class="page-header">
<h1>Membres</h1> <h1 class="h2 mt-2">Membres</h1>
</div> </div>
<ldp-display <ldp-display
...@@ -15,4 +15,34 @@ ...@@ -15,4 +15,34 @@
search-fields="firstname, lastname" search-fields="firstname, lastname"
next="member" next="member"
></ldp-display> ></ldp-display>
<script>// Bootstrap compliance
const addBootstrapClassesToMembers = function() {
window.setTimeout(function() {
const FORM = document.querySelector("ldp-display > ldp-form");
if (FORM) {
FORM.classList.add("mt-4");
FORM.classList.add("mb-4");
FORM.classList.add("d-block");
FORM.querySelectorAll("ldp-form-text").forEach(function(el) {
el.classList.add("form-group");
el.classList.add("d-block");
});
FORM.querySelectorAll('input[type="text"]').forEach(function(el) {
el.classList.add("form-control");
});
FORM.querySelectorAll('label').forEach(function(el) {
el.classList.add("text-capitalize");
});
FORM.querySelector('input[type="submit"]').classList.add("btn", "btn-primary");
}
else {
addBootstrapClassesToMembers();
}
}, 100)
};
window.onload = addBootstrapClassesToMembers();
</script>
</div> </div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment