|
| 1 | +--- |
| 2 | +layout: layout_en |
| 3 | +navigation: portal.html |
| 4 | +title: "Profile" |
| 5 | +--- |
| 6 | + |
| 7 | +<div class="bg-gradient-to-r from-stone-800 to-stone-900 text-white py-12 sm:py-16 lg:py-20 px-4 sm:px-6 lg:px-8"> |
| 8 | + <div class="max-w-4xl mx-auto text-center"> |
| 9 | + <div class="mb-6"> |
| 10 | + <div class="w-24 h-24 bg-stone-700 rounded-full mx-auto mb-4 flex items-center justify-center"> |
| 11 | + <svg class="w-16 h-16 text-stone-400" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" aria-hidden="true"> |
| 12 | + <path stroke-linecap="round" stroke-linejoin="round" d="M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z" /> |
| 13 | + </svg> |
| 14 | + </div> |
| 15 | + <h1 class="heading-1 mb-2" id="profile-username">User Profile</h1> |
| 16 | + <p class="text-body text-gray-300">Manage your account and preferences</p> |
| 17 | + </div> |
| 18 | + </div> |
| 19 | +</div> |
| 20 | + |
| 21 | +<section class="max-w-4xl mx-auto container-padding section-padding"> |
| 22 | + <!-- Profile Information --> |
| 23 | + <div class="bg-white border-2 border-stone-200 rounded-lg p-6 sm:p-8 mb-8"> |
| 24 | + <h2 class="heading-3 text-stone-800 mb-6">Profile Information</h2> |
| 25 | + <div class="space-y-6"> |
| 26 | + <div> |
| 27 | + <label class="block text-sm font-semibold text-stone-700 mb-2">Username</label> |
| 28 | + <div class="bg-gray-50 border border-gray-300 rounded-lg px-4 py-3"> |
| 29 | + <p class="text-body text-gray-900" id="profile-username-display">-</p> |
| 30 | + </div> |
| 31 | + </div> |
| 32 | + <div> |
| 33 | + <label class="block text-sm font-semibold text-stone-700 mb-2">Email</label> |
| 34 | + <div class="bg-gray-50 border border-gray-300 rounded-lg px-4 py-3"> |
| 35 | + <p class="text-body text-gray-900" id="profile-email">-</p> |
| 36 | + </div> |
| 37 | + </div> |
| 38 | + <div> |
| 39 | + <label class="block text-sm font-semibold text-stone-700 mb-2">Member Since</label> |
| 40 | + <div class="bg-gray-50 border border-gray-300 rounded-lg px-4 py-3"> |
| 41 | + <p class="text-body text-gray-900">September 30, 2004</p> |
| 42 | + </div> |
| 43 | + </div> |
| 44 | + </div> |
| 45 | + </div> |
| 46 | + |
| 47 | + <!-- Account Settings --> |
| 48 | + <div class="bg-white border-2 border-stone-200 rounded-lg p-6 sm:p-8 mb-8"> |
| 49 | + <h2 class="heading-3 text-stone-800 mb-6">Account Settings</h2> |
| 50 | + <div class="space-y-4"> |
| 51 | + <div class="flex items-center justify-between py-4 border-b border-stone-200"> |
| 52 | + <div> |
| 53 | + <h3 class="text-lg font-semibold text-stone-800 mb-1">Email Notifications</h3> |
| 54 | + <p class="text-sm text-gray-600">Receive updates about your repositories and community activity</p> |
| 55 | + </div> |
| 56 | + <label class="relative inline-flex items-center cursor-pointer"> |
| 57 | + <input type="checkbox" class="sr-only peer" checked> |
| 58 | + <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-orange-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-orange-600"></div> |
| 59 | + </label> |
| 60 | + </div> |
| 61 | + <div class="flex items-center justify-between py-4 border-b border-stone-200"> |
| 62 | + <div> |
| 63 | + <h3 class="text-lg font-semibold text-stone-800 mb-1">Repository Notifications</h3> |
| 64 | + <p class="text-sm text-gray-600">Get notified about issues, pull requests, and discussions</p> |
| 65 | + </div> |
| 66 | + <label class="relative inline-flex items-center cursor-pointer"> |
| 67 | + <input type="checkbox" class="sr-only peer" checked> |
| 68 | + <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-orange-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-orange-600"></div> |
| 69 | + </label> |
| 70 | + </div> |
| 71 | + <div class="flex items-center justify-between py-4"> |
| 72 | + <div> |
| 73 | + <h3 class="text-lg font-semibold text-stone-800 mb-1">Public Profile</h3> |
| 74 | + <p class="text-sm text-gray-600">Make your profile visible to other community members</p> |
| 75 | + </div> |
| 76 | + <label class="relative inline-flex items-center cursor-pointer"> |
| 77 | + <input type="checkbox" class="sr-only peer"> |
| 78 | + <div class="w-11 h-6 bg-gray-200 peer-focus:outline-none peer-focus:ring-4 peer-focus:ring-orange-300 rounded-full peer peer-checked:after:translate-x-full peer-checked:after:border-white after:content-[''] after:absolute after:top-[2px] after:left-[2px] after:bg-white after:border-gray-300 after:border after:rounded-full after:h-5 after:w-5 after:transition-all peer-checked:bg-orange-600"></div> |
| 79 | + </label> |
| 80 | + </div> |
| 81 | + </div> |
| 82 | + </div> |
| 83 | + |
| 84 | + <!-- GitHub Integration --> |
| 85 | + <div class="bg-white border-2 border-stone-200 rounded-lg p-6 sm:p-8 mb-8"> |
| 86 | + <h2 class="heading-3 text-stone-800 mb-6">GitHub Integration</h2> |
| 87 | + <div class="bg-blue-50 border-l-4 border-blue-500 p-6 rounded-lg mb-6"> |
| 88 | + <p class="text-body text-gray-700 mb-4"> |
| 89 | + Your Coderic account is connected to GitHub. This allows you to: |
| 90 | + </p> |
| 91 | + <ul class="list-disc list-inside space-y-2 text-body text-gray-700 ml-4"> |
| 92 | + <li>Access Coderic repositories</li> |
| 93 | + <li>Contribute to open source projects</li> |
| 94 | + <li>Track your contributions and activity</li> |
| 95 | + <li>Participate in community discussions</li> |
| 96 | + </ul> |
| 97 | + </div> |
| 98 | + <div class="flex flex-col sm:flex-row gap-4"> |
| 99 | + <a href="https://github.com/Coderic" target="_blank" rel="noopener noreferrer" class="btn-secondary btn-md flex-1 text-center" aria-label="View GitHub profile"> |
| 100 | + View on GitHub |
| 101 | + </a> |
| 102 | + <a href="https://github.com/settings/connections/applications" target="_blank" rel="noopener noreferrer" class="btn-secondary btn-md flex-1 text-center" aria-label="Manage GitHub connections"> |
| 103 | + Manage Connections |
| 104 | + </a> |
| 105 | + </div> |
| 106 | + </div> |
| 107 | + |
| 108 | + <!-- Activity Summary --> |
| 109 | + <div class="bg-white border-2 border-stone-200 rounded-lg p-6 sm:p-8 mb-8"> |
| 110 | + <h2 class="heading-3 text-stone-800 mb-6">Activity Summary</h2> |
| 111 | + <div class="grid grid-cols-2 md:grid-cols-4 gap-4"> |
| 112 | + <div class="text-center p-4 bg-stone-50 rounded-lg"> |
| 113 | + <p class="text-2xl font-bold text-orange-600 mb-1" id="activity-repos">-</p> |
| 114 | + <p class="text-sm text-gray-600">Repositories</p> |
| 115 | + </div> |
| 116 | + <div class="text-center p-4 bg-stone-50 rounded-lg"> |
| 117 | + <p class="text-2xl font-bold text-orange-600 mb-1" id="activity-commits">-</p> |
| 118 | + <p class="text-sm text-gray-600">Commits</p> |
| 119 | + </div> |
| 120 | + <div class="text-center p-4 bg-stone-50 rounded-lg"> |
| 121 | + <p class="text-2xl font-bold text-orange-600 mb-1" id="activity-prs">-</p> |
| 122 | + <p class="text-sm text-gray-600">Pull Requests</p> |
| 123 | + </div> |
| 124 | + <div class="text-center p-4 bg-stone-50 rounded-lg"> |
| 125 | + <p class="text-2xl font-bold text-orange-600 mb-1" id="activity-issues">-</p> |
| 126 | + <p class="text-sm text-gray-600">Issues</p> |
| 127 | + </div> |
| 128 | + </div> |
| 129 | + </div> |
| 130 | + |
| 131 | + <!-- Danger Zone --> |
| 132 | + <div class="bg-red-50 border-2 border-red-200 rounded-lg p-6 sm:p-8"> |
| 133 | + <h2 class="heading-3 text-red-800 mb-4">Danger Zone</h2> |
| 134 | + <div class="space-y-4"> |
| 135 | + <div class="flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4"> |
| 136 | + <div> |
| 137 | + <h3 class="text-lg font-semibold text-red-800 mb-1">Disconnect Account</h3> |
| 138 | + <p class="text-sm text-gray-700">Disconnect your GitHub account from Coderic. You'll need to reconnect to access repositories.</p> |
| 139 | + </div> |
| 140 | + <button type="button" class="btn-secondary btn-sm whitespace-nowrap" onclick="if(confirm('Are you sure you want to disconnect your account?')) { alert('Feature coming soon'); }"> |
| 141 | + Disconnect |
| 142 | + </button> |
| 143 | + </div> |
| 144 | + </div> |
| 145 | + </div> |
| 146 | +</section> |
| 147 | + |
| 148 | +<script> |
| 149 | + // Load user information if authenticated |
| 150 | + if (typeof load === 'function') { |
| 151 | + load(); |
| 152 | + } |
| 153 | + |
| 154 | + // Update profile information |
| 155 | + document.addEventListener('DOMContentLoaded', function() { |
| 156 | + const username = document.getElementById('username'); |
| 157 | + const profileUsername = document.getElementById('profile-username'); |
| 158 | + const profileUsernameDisplay = document.getElementById('profile-username-display'); |
| 159 | + |
| 160 | + if (username && username.textContent) { |
| 161 | + profileUsername.textContent = username.textContent; |
| 162 | + profileUsernameDisplay.textContent = username.textContent; |
| 163 | + } |
| 164 | + |
| 165 | + // Try to get email from Auth0 if available |
| 166 | + if (typeof webAuth !== 'undefined') { |
| 167 | + webAuth.checkSession({}, function(err, result) { |
| 168 | + if (!err && result && result.accessToken) { |
| 169 | + webAuth.client.userInfo(result.accessToken, function(err, user) { |
| 170 | + if (!err && user && user.email) { |
| 171 | + document.getElementById('profile-email').textContent = user.email; |
| 172 | + } |
| 173 | + }); |
| 174 | + } |
| 175 | + }); |
| 176 | + } |
| 177 | + }); |
| 178 | +</script> |
0 commit comments