Embed your Stackoverflow account summary into your website using these beautiful cards.
Insert the following tag in your document where you wish to include the card. This card occupies available parent container's width
, so give some meaningful width to the parent element.
<div id="so-card-widget" data-userid="1482899" data-theme="default"></div>
data-userid
must be your stackoverflow user id(you can find that in your stackoverflow profile url).data-theme
is the name of the theme you wish to use (default or minimal or custom). If no theme is specified the default themedefault
is used.
In addition to that you need to include the following script
tag & voila !
<script type="text/javascript" src="//mudassir0909.github.io/stackoverflow-card/dist/1.0.0/so-card-widget.min.js"></script>
This card fires a callback if it is done rendering the card. You should have a function named soAsyncInit
defined globally. Stackoverflow profile data is passed along the callback;
window.soAsyncInit = function(profile_data) {
// Do stuff;
}
The card supports two themes out of the box
This removes profile picture from the card
When you specify this as an option. The stylesheet related to this card is not downloaded. You have to specify your own styles based on the class names. You can find the HTML structure here
These cards are not inserted using iframe
, so change the look and feel as you like using your website's css. You can find the css here. Feel free to override them classes !