<commit_before>extends layout

block content

	script(type="text/javascript", src="http://cdn.binaryjs.com/0/binary.js")
	script(type="text/javascript", src="/socket.io/socket.io.js")
	script(type="text/javascript", src="/javascripts/socket.io-stream.js")
	script(type="text/javascript", src="/javascripts/profile.js")

	input(type="button", value="Index" onclick="window.location.href='/'")
	if !user.guest
		input(type="button", value="Profile" onclick="window.location.href='/profile'")
	input(type="button", value="Study" onclick="window.location.href='/study'")
	input(type="button", value="Coding" onclick="window.location.href='/coding'")
	input(type="button", value="Sumorobot" onclick="window.location.href='/sumorobot'")

	div#profile
		h3 Change profile:
		
		p.messages #{message}
		each error in errors
			p.errors #{error.msg}

		div#mugshot-box(style="height: 50px;") Connecting...
		img(class="mugshot", src="#{user.profile.mugshot}", alt="mugshot")

		form#profile(name="profile", action="/profile/update", method="post")
			div Email: #{user.email} (ask admin to change email xD)
			div Date joined: #{new Date(user.profile.joined_date).toDateString()}
			div Points: #{user.profile.points}
			div Name:
				br
				input(type="text", name="name", value="#{user.name}")
			div Description:
			textarea(type="text", name="description", placeholder="personal info")
				| #{user.profile.description}
			div Location:
				br
				input(type="text", name="location", placeholder="location", value="#{user.profile.location}")
			div Website:
				br
				input(type="text", name="website", placeholder="website", value="#{user.profile.website}")
			input(type="submit", value="Save")

		h3 Change password:
		form(name="password", action="/profile/password", method="post")
			input(type="password" name="password" placeholder="<PASSWORD>")
			br
			input(type="password" name="passwordConfirm" placeholder="<PASSWORD>")
			br
			input(type="submit", value="Save")

		h3 Other accounts:
		each provider in user.profile.providers
			div
				img(class="mugshot", src="#{provider.mugshot}", alt="mugshot")
				div(style="text-transform:capitalize;") #{provider.name}
					br
					input(type="button", value="#{provider.display_name}" onclick="window.location.href='#{provider.url}'")
					&nbsp;
					input(type="button", value="Set as Mugshot" onclick="window.location.href='/profile/mugshot/#{provider.name}'")
					&nbsp;
					input(type="button", value="Disconnect" onclick="window.location.href='/profile/remove/#{provider.name}'")
		div#oauths
			each login in logins
				input(type="button", value="Connect #{login[0]}" onclick="window.location.href='#{login[1]}'")
				br<commit_msg>views/profile.jade added username to profile<commit_after>extends layout

block content

	script(type="text/javascript", src="http://cdn.binaryjs.com/0/binary.js")
	script(type="text/javascript", src="/socket.io/socket.io.js")
	script(type="text/javascript", src="/javascripts/socket.io-stream.js")
	script(type="text/javascript", src="/javascripts/profile.js")

	input(type="button", value="Index" onclick="window.location.href='/'")
	if !user.guest
		input(type="button", value="Profile" onclick="window.location.href='/profile'")
	input(type="button", value="Study" onclick="window.location.href='/study'")
	input(type="button", value="Coding" onclick="window.location.href='/coding'")
	input(type="button", value="Sumorobot" onclick="window.location.href='/sumorobot'")

	div#profile
		h3 Change profile:
		
		p.messages #{message}
		each error in errors
			p.errors #{error.msg}

		div#mugshot-box(style="height: 50px;") Connecting...
		img(class="mugshot", src="#{user.profile.mugshot}", alt="mugshot")

		form#profile(name="profile", action="/profile/update", method="post")
			div Username: #{user.username}
			div Email: #{user.email}
			div Date joined: #{new Date(user.profile.joined_date).toDateString()}
			div Points: #{user.profile.points}
			div Display Name:
				br
				input(type="text", name="name", value="#{user.name}")
			div Description:
			textarea(type="text", name="description", placeholder="personal info")
				| #{user.profile.description}
			div Location:
				br
				input(type="text", name="location", placeholder="location", value="#{user.profile.location}")
			div Website:
				br
				input(type="text", name="website", placeholder="website", value="#{user.profile.website}")
			input(type="submit", value="Save")

		h3 Change password:
		form(name="password", action="/profile/password", method="post")
			input(type="password" name="password" placeholder="<PASSWORD>")
			br
			input(type="password" name="passwordConfirm" placeholder="<PASSWORD>")
			br
			input(type="submit", value="Save")

		h3 Other accounts:
		each provider in user.profile.providers
			div
				img(class="mugshot", src="#{provider.mugshot}", alt="mugshot")
				div(style="text-transform:capitalize;") #{provider.name}
					br
					input(type="button", value="#{provider.display_name}" onclick="window.location.href='#{provider.url}'")
					&nbsp;
					input(type="button", value="Set as Mugshot" onclick="window.location.href='/profile/mugshot/#{provider.name}'")
					&nbsp;
					input(type="button", value="Disconnect" onclick="window.location.href='/profile/remove/#{provider.name}'")
		div#oauths
			each login in logins
				input(type="button", value="Connect #{login[0]}" onclick="window.location.href='#{login[1]}'")
				br
{'fraction_non_alphanumeric': 0.1915011037527594, 'fraction_numerical': 0.0029433406916850625, 'mean_word_length': 5.59030303030303, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3262015', 'n_tokens_mistral': 1945, 'n_tokens_neox': 1708, 'n_words': 299}