Skip to content

Instantly share code, notes, and snippets.

@tyrw
tyrw / userfront-custom-button-color.css
Created January 31, 2022 16:24
Add a custom button color for a Userfront form
[id|="userfront"] .el-button.el-button--primary,
[id|="userfront"] .el-button.el-button--primary:active {
border-color: green;
background-color: green;
}
[id|="userfront"] .el-button.el-button--primary:hover,
[id|="userfront"] .el-button.el-button--primary:focus {
border-color: lightgreen;
background-color: lightgreen;
@tyrw
tyrw / gist:62cc4f2d5c3a05e53bf7411cd0cf8e4a
Created September 14, 2021 18:23
Example search with data attribute
curl --request POST \
--url https://api.userfront.com/v0/users/find \
--header 'Accept: */*' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer uf_test_readonly_demo1234_2d87b3d230bda5685276b43efdac2852' \
--data '{"filters":{"conjunction":"and","filterGroups":[{"conjunction":"and","filters":[{"attr":"data.accountName","type":"string","comparison":"contains","value":"bob"}]}]}}'
// As stored in state variable
facets = {
operator: 'AND',
filterGroups: [
{
operator: 'AND',
filters: [
{
attribute: 'name',
comparator: '$iLike',
@tyrw
tyrw / noscript.html
Created July 20, 2018 16:38
Anymod noscript snippet
<!-- Paste inside the <body> element -->
<noscript class="anmd">
Please enable JavaScript to view all available content on this page.
<style>noscript.anmd{position:fixed;left:0;right:0;bottom:0;padding:20px;background:#d9edf7;}</style>
</noscript>