Those buttons are populated in loginform.mustache by:
{{#hasidentityproviders}}
<h6 class="mt-2">{{#str}} potentialidps, auth {{/str}}</h6>
<div class="potentialidplist" class="mt-3">
{{#identityproviders}}
<div class="potentialidp">
<a href="{{url}}" title={{#quote}}{{name}}{{/quote}} class="btn btn-secondary btn-block">
{{#iconurl}}
<img src="{{iconurl}}" alt="" width="24" height="24"/>
{{/iconurl}}
{{name}}
</a>
</div>
{{/identityproviders}}
</div>
{{/hasidentityproviders}}
therefore just use that as a starting point to adapt your own overridden version.