├── .htaccess
├── assets
├── fonts
│ ├── Lato-Bold.ttf
│ └── Lato-Regular.ttf
├── icons
│ ├── dark
│ │ ├── key-icon.png
│ │ ├── zcash-icon.png
│ │ ├── github-icon.png
│ │ └── mobile-icon.png
│ └── default
│ │ ├── bitcoin.png
│ │ ├── globe.png
│ │ ├── coinbase.png
│ │ ├── facebook.png
│ │ ├── github-logo.png
│ │ ├── hacker-news.png
│ │ ├── mobile-phone.png
│ │ ├── zcash-icon.png
│ │ ├── reddit-big-logo.png
│ │ ├── vintage-key-outline.png
│ │ └── rsz_twitter-black-shape.png
├── css
│ └── style.css
└── js
│ └── script.js
├── README.md
├── LICENSE
├── index.html
└── script.php
/.htaccess:
--------------------------------------------------------------------------------
1 | RewriteEngine on
2 | RewriteRule ^(.*)\.png script.php
3 |
4 | Options -Indexes
--------------------------------------------------------------------------------
/assets/fonts/Lato-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/fonts/Lato-Bold.ttf
--------------------------------------------------------------------------------
/assets/fonts/Lato-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/fonts/Lato-Regular.ttf
--------------------------------------------------------------------------------
/assets/icons/dark/key-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/dark/key-icon.png
--------------------------------------------------------------------------------
/assets/icons/dark/zcash-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/dark/zcash-icon.png
--------------------------------------------------------------------------------
/assets/icons/default/bitcoin.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/bitcoin.png
--------------------------------------------------------------------------------
/assets/icons/default/globe.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/globe.png
--------------------------------------------------------------------------------
/assets/icons/dark/github-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/dark/github-icon.png
--------------------------------------------------------------------------------
/assets/icons/dark/mobile-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/dark/mobile-icon.png
--------------------------------------------------------------------------------
/assets/icons/default/coinbase.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/coinbase.png
--------------------------------------------------------------------------------
/assets/icons/default/facebook.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/facebook.png
--------------------------------------------------------------------------------
/assets/icons/default/github-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/github-logo.png
--------------------------------------------------------------------------------
/assets/icons/default/hacker-news.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/hacker-news.png
--------------------------------------------------------------------------------
/assets/icons/default/mobile-phone.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/mobile-phone.png
--------------------------------------------------------------------------------
/assets/icons/default/zcash-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/zcash-icon.png
--------------------------------------------------------------------------------
/assets/icons/default/reddit-big-logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/reddit-big-logo.png
--------------------------------------------------------------------------------
/assets/icons/default/vintage-key-outline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/vintage-key-outline.png
--------------------------------------------------------------------------------
/assets/icons/default/rsz_twitter-black-shape.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/onlineth/Keybase.io-Card-PHP/HEAD/assets/icons/default/rsz_twitter-black-shape.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Keybase Card
2 | A way to share your Keybase profile online easily through an image implemented through PHP.
3 |
4 | ### Install
5 | Simply clone this repository on an Apache-based web server with PHP support and it'll be up in no time.
6 |
7 | # Keybase.io Card Examples
8 |
9 | ### Default Theme:
10 |
11 | 
12 |
13 | ### Clean Theme:
14 |
15 | 
16 |
17 | *This one's transparent*
18 |
19 | ### Dark Theme:
20 |
21 | 
22 |
23 | ## 128 Fingerprint Length
24 |
25 | These are also available
26 |
27 | 
28 |
29 | # License
30 |
31 | This project is licensed under the [MIT License](https://github.com/onlineth/Keybase.io-Card-Node.js/blob/master/LICENSE)
32 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Thomas Hein
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/assets/css/style.css:
--------------------------------------------------------------------------------
1 | .vertical-center { margin-top: 3%; }
2 | .container-fluid { margin-right: auto; margin-left: auto; max-width: 550px; }
3 | .spinner { display: inline-block; opacity: 0; width: 0; -webkit-transition: opacity 0.25s, width 0.25s; -moz-transition: opacity 0.25s, width 0.25s; -o-transition: opacity 0.25s, width 0.25s; transition: opacity 0.25s, width 0.25s; }
4 | .has-spinner.active .spinner { opacity: 1; width: auto; }
5 | .has-spinner.btn-mini.active .spinner { width: 10px; }
6 | .has-spinner.btn-small.active .spinner { width: 13px; }
7 | .has-spinner.btn.active .spinner { width: 16px; }
8 | .has-spinner.btn-large.active .spinner { width: 19px; }
9 | .glyphicon-refresh-animate { -animation: spin .7s infinite linear; -ms-animation: spin .7s infinite linear; -webkit-animation: spinw .7s infinite linear; -moz-animation: spinm .7s infinite linear; }
10 | @keyframes spin {
11 | from { transform: scale(1) rotate(0deg); }
12 | to { transform: scale(1) rotate(360deg); }
13 | }
14 | @-webkit-keyframes spinw {
15 | from { -webkit-transform: rotate(0deg); }
16 | to { -webkit-transform: rotate(360deg); }
17 | }
18 | @-moz-keyframes spinm {
19 | from { -moz-transform: rotate(0deg); }
20 | to { -moz-transform: rotate(360deg); }
21 | }
22 | .theme-header { text-align: left }
--------------------------------------------------------------------------------
/assets/js/script.js:
--------------------------------------------------------------------------------
1 | //SSL!
2 | if (window.location.protocol != "https:")
3 | window.location.href = "https:" + window.location.href.substring(window.location.protocol.length);
4 |
5 | //Clear anything and focus on the input box
6 | $('#maininput').val('');
7 | $('#maininput').focus();
8 |
9 | //Check to see if there is any paramaters and if so, check to see if it's a username
10 | if(window.location.href.substring(window.location.href.lastIndexOf("/") + 1) != '') {
11 | if (window.location.href.substring(window.location.href.lastIndexOf("#") + 1) != window.location.href) {
12 | if (window.location.href.substring(window.location.href.lastIndexOf("#") + 1)) {
13 | if ((window.location.href.substr(window.location.href.length-1)) != "#") {
14 | $('#maininput').val(window.location.href.substring(window.location.href.lastIndexOf("#") + 1));
15 | start();
16 | }
17 | }
18 | }
19 | }
20 |
21 | //Bind the Go button and bind the enter key on the input box
22 | $('#GO').click(function() {
23 | start();
24 | });
25 | $('#maininput').keypress(function(e) {
26 | if (e.which == 13) {
27 | start();
28 | }
29 | });
30 |
31 | //Check to see if the url has changed
32 | window.onpopstate = function (event) {
33 | if (event.state) {
34 | //This script changed the url
35 | } else {
36 | //The user chaned the url
37 | if(window.location.href.substring(window.location.href.lastIndexOf("/") + 1) != '') {
38 | $('#maininput').val(window.location.href.substring(window.location.href.lastIndexOf("/") + 2));
39 | start();
40 | }
41 | }
42 | }
43 |
44 | //Bind Fingerprint Bit Pills
45 | $('#bit64').click(function() {
46 | $('#bit64').addClass('active');
47 | $('#bit128').removeClass('active');
48 | start();
49 | })
50 | $('#bit128').click(function() {
51 | $('#bit128').addClass('active');
52 | $('#bit64').removeClass('active');
53 | start();
54 | })
55 |
56 | //Start (close alert box, update image urls, add code, link images, and update url)
57 | function start(){
58 | $('#alertBox').hide();
59 | $('#GO').addClass('active');
60 | if ($('#bit128').hasClass('active')) {
61 | var bit = "&bit=128";
62 | var width = 210;
63 | var height = 58;
64 | } else {
65 | var bit = "";
66 | var width = 255;
67 | var height = 68;
68 | }
69 | document.getElementById('default-theme-card').src='https://keybase.onlineth.com/'+$("#maininput").val()+'.png?theme=default'+bit;
70 | document.getElementById('clean-theme-card').src='https://keybase.onlineth.com/'+$("#maininput").val()+'.png?theme=clean'+bit;
71 | document.getElementById('dark-theme-card').src='https://keybase.onlineth.com/'+$("#maininput").val()+'.png?theme=dark'+bit;
72 |
73 | $('#default-theme-code').val('');
74 | $('#clean-theme-code').val('
');
75 | $('#dark-theme-code').val('
');
76 | $('#default-theme-card-a').attr("href", 'https://keybase.io/'+$("#maininput").val());
77 | $('#clean-theme-card-a').attr("href", 'https://keybase.io/'+$("#maininput").val());
78 | $('#dark-theme-card-a').attr("href", 'https://keybase.io/'+$("#maininput").val());
79 | history.pushState('', $("#maininput").val() + ' Keybase.io Card', location.protocol + '//' + location.host + location.pathname + '#' + $("#maininput").val());
80 | }
81 |
82 | //Show images
83 | function checkImageLoad() {
84 | $('#cards').show('400');
85 | $('#GO').removeClass('active');
86 | }
87 |
88 | //Show an error message
89 | function reportError(message) {
90 | $('#GO').removeClass('active');
91 | $('#alertMessage').html(message);
92 | $('#alertBox').show('400');
93 | }
94 |
95 | //Image didn't load
96 | function imgError() {
97 | reportError("There was an error (probably the username you typed in doesn't exist).");
98 | $('#cards').hide();
99 | }
100 |
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |