Created
June 13, 2020 03:15
-
-
Save Sandip124/350bde4f2c8f38e7c5ac2338b1969e31 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Github Search User Semantic UI</title> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.css" integrity="sha256-9mbkOfVho3ZPXfM7W8sV2SndrGDuh7wuyLjtsWeTI1Q=" crossorigin="anonymous" /> | |
</head> | |
<body> | |
<div class="ui main container"> | |
<h1 class="ui header">Search</h1> | |
<div class="ui section divider"></div> | |
<div class="ui search" id="github"> | |
<div class="ui left icon input"> | |
<input class="prompt" type="text" placeholder="Search GitHub" /> | |
<i class="github icon"></i> | |
</div> | |
</div> | |
</div> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.4.1/semantic.min.js" integrity="sha256-t8GepnyPmw9t+foMh3mKNvcorqNHamSKtKRxxpUEgFI=" crossorigin="anonymous"></script> | |
<script> | |
$('#github') | |
.search({ | |
apiSettings: { | |
url: 'https://api.github.com/search/users?q={query}' | |
}, | |
fields: { | |
results: 'items', | |
title: 'login', | |
url: 'html_url', | |
description: 'html_url' | |
}, | |
minCharacters: 3 | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment