<commit_before><template>
	<div class="view">
		<div class="card">
			<div class="card-image">
				<figure>
					<img :src="user.avatar_url" :alt="user.login">
				</figure>
			</div>

			<div class="card-content">
				<h1 class="title"></h1>
				
				<!-- Bio -->
				<div class="content">
					
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'Profile',
		data() {
			return {
				user: '',
			};
		},
		created() {
			const username = this.$route.params.username;
			// Get a single user
			this.$http.get(`https://api.github.com/users/${username}`)
			.then(
				(user) => {
					const data = JSON.parse(user.bodyText);
					this.user = data;
					console.log(data);
				},
				(err) => {
					console.log(err);
				},
			);
		},
	};
</script>

<style>
	.card{
		width: 460px;
		margin: 0 auto;
	}
</style>
<commit_msg>Base of Profile component<commit_after><template>
	<div class="view">
		<div class="card">
			<div class="card-image">
				<figure>
					<a :href="user.html_url" target="blank">
						<img :src="user.avatar_url" :alt="user.login">
					</a>
				</figure>
			</div>

			<div class="card-content">
				<p class="title is-4">
					<a :href="user.html_url">
						{{ user.name }}
					</a>
				</p>
				<p class="subtitle is-6"> 
					{{ user.location }}
					-
					<a :href="user.blog"> {{ user.blog }} </a>
				</p>
				
				<!-- Bio -->
				<div class="content">
					{{ user.bio }}
				</div>
				
				<hr>

				<!-- Repositories -->
				<div class="content repositories">
					<h2 class="title"> Projects </h2>
					
					<!-- Single repository -->
					<a :href="repo.html_url" v-for="repo in repositories" target="blank">
						<div class="card repository">
							<p class="title is-4">
								<a :href="repo.html_url" target="blank"> {{ repo.name }} </a>
							</p>
							
							<span>Stars {{ repo.stargazers_count }} </span>
							<span>Forks {{ repo.forks }} </span>
						</div>
					</a>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default {
		name: 'Profile',
		data() {
			return {
				user: '',
				repositories: '',
			};
		},
		created() {
			// Get username from url param
			const username = this.$route.params.username;
			// Get a single user
			this.$http.get(`https://api.github.com/users/${username}`)
			.then(
				(user) => {
					const data = JSON.parse(user.bodyText);
					this.user = data;
					console.log(data);
					this.GetRepositories();
				},
				(err) => {
					console.log(err);
				},
			);
		},
		methods: {
			GetRepositories() {
				// Get username from url param
				const username = this.$route.params.username;

				this.$http.get(`https://api.github.com/search/repositories?q=user:${username}`)
				.then(
					(repo) => {
						this.repositories = JSON.parse(repo.bodyText).items;
						console.log(repo.bodyText);
					},
					(err) => {
						console.log(err);
					},
				);
			},
		},
	};
</script>

<style>
	.card{
		width: 460px;
		margin: 0 auto;
	}

	.card .card-image img{
		width: 100%;
	}

	.repositories .repository{
		margin-bottom: 10px;
		padding: 10px;
	}

	.repositories .repository::before{
		content: '';
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 4px;
		background-color: #EEE;
		-webkit-transition: background-color .5s;
		-moz-transition: background-color .5s;
		-ms-transition: background-color .5s;
		transition: background-color .5s;
	}

	.repositories .repository:hover::before{
		background-color: #00d1b2;
	}

	/*.repositories .repository:last-child{
		margin-bottom: 0;
	}*/
</style>

{'fraction_non_alphanumeric': 0.19692307692307692, 'fraction_numerical': 0.01034965034965035, 'mean_word_length': 2.32033426183844, 'pattern_counts': {'":': 0, '<': 74, '<?xml version=': 0, '>': 80, 'https://': 3, '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': '6407797', 'n_tokens_mistral': 1730, 'n_tokens_neox': 1294, 'n_words': 254}