Skip to content

Commit 11be0e0

Browse files
committed
Changes
1 parent fcb53fd commit 11be0e0

26 files changed

Lines changed: 429 additions & 24558 deletions

.github/workflows/site.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,3 @@ jobs:
3232
github_token: ${{ secrets.GITHUB_TOKEN }}
3333
publish_dir: ./dist
3434
cname: grahamsh.com
35-

.prettierignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
*/*.png
2+
# .png is unformattable (binary)
3+
*/*.ico
4+
# .ico is unformattable (same as above)
5+
*/*.svg
6+
# Prettier doesn't support svg yet
7+
.*
8+
# Most . files shouldn't be formatted
9+
.*/
10+
# Most . folders shouldn't be formatted
11+
.github/*

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
# GrahamSH
2+
23
This is the repository for @GrahamSH-LLK's new Nuxt & Tailwind site. It's a WIP, and it will change regularly. You can check the site out at https://grahamsh.com.
3-
### Contributing:
4+
5+
### Contributing:
6+
47
#### To contribute a blog post:
8+
59
First, make an issue or contact GrahamSH. If he accepts, make a PR with your content.
10+
611
#### Code:
12+
713
I don't accept contributions, this is my personal website.

components/Author.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export default {
2424
props: {
2525
author: {
2626
type: Object,
27-
required: true
28-
}
29-
}
30-
}
27+
required: true,
28+
},
29+
},
30+
};
3131
</script>

components/Icon.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export default {
3434
data() {
3535
return {
3636
icon: this.name ? require(`~/assets/icons/${this.name}.svg?raw`) : null,
37-
}
37+
};
3838
},
39-
}
39+
};
4040
</script>

components/Nav.vue

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
<template>
2-
3-
<nav class="bg-gray-800 p-2 mt-0 fixed w-full z-10 top-0">
2+
<nav class="bg-gray-800 p-2 mt-0 fixed w-full z-10 top-0">
43
<div class="container mx-auto flex flex-wrap items-center">
5-
<div class="flex w-full md:w-1/2 justify-center md:justify-start text-white font-bold">
6-
<NuxtLink class="text-white no-underline hover:text-white hover:no-underline font-bold" to="/">
7-
<span class="text-2xl"><img class='h-10 pr-2 inline-block' src='/logo.svg'>GrahamSH</span>
8-
</NuxtLink>
9-
</div>
10-
<div class="flex w-full content-center justify-between md:w-1/2 md:justify-end">
11-
<ul class="list-reset flex justify-between flex-1 md:flex-none items-center">
12-
<NavLink to="/" >Home</NavLink>
13-
<NavLink to="/blog" >Blog</NavLink>
14-
<NavLink to="/about" >About</NavLink>
15-
<NavLink to="/contact" >Contact</NavLink>
16-
17-
18-
</ul>
19-
<Search/>
20-
</div>
4+
<div
5+
class="flex w-full md:w-1/2 justify-center md:justify-start text-white font-bold"
6+
>
7+
<NuxtLink
8+
class="text-white no-underline hover:text-white hover:no-underline font-bold"
9+
to="/"
10+
>
11+
<span class="text-2xl"
12+
><img
13+
class="h-10 pr-2 inline-block"
14+
src="/logo.svg"
15+
/>GrahamSH</span
16+
>
17+
</NuxtLink>
18+
</div>
19+
<div
20+
class="flex w-full content-center justify-between md:w-1/2 md:justify-end"
21+
>
22+
<ul
23+
class="list-reset flex justify-between flex-1 md:flex-none items-center"
24+
>
25+
<NavLink to="/">Home</NavLink>
26+
<NavLink to="/blog">Blog</NavLink>
27+
<NavLink to="/about">About</NavLink>
28+
<NavLink to="/contact">Contact</NavLink>
29+
</ul>
30+
<Search />
31+
</div>
2132
</div>
22-
</nav>
33+
</nav>
2334
</template>
2435
<style class="postcss">
2536
.active {
26-
@apply text-gray-200 !important;
37+
@apply text-gray-200 !important;
2738
}
2839
</style>

components/Repo.vue

Lines changed: 65 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,56 @@
11
<template>
22
<div>
3-
<div class="mx-4 border px-4 py-4 mb-4
4-
-mr-2
5-
rounded text-sm">
6-
<div class="flex">
3+
<div class="mx-4 border px-4 py-4 mb-4 -mr-2 rounded text-sm">
4+
<div class="flex">
75
<div class="mr-2">
8-
<svg class="octicon octicon-repo mr-2 text-gray flex-shrink-0" viewBox="0 0 16 16" version="1.1" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"></path></svg>
9-
</div>
6+
<svg
7+
class="octicon octicon-repo mr-2 text-gray flex-shrink-0"
8+
viewBox="0 0 16 16"
9+
version="1.1"
10+
width="16"
11+
height="16"
12+
aria-hidden="true"
13+
>
14+
<path
15+
fill-rule="evenodd"
16+
d="M2 2.5A2.5 2.5 0 014.5 0h8.75a.75.75 0 01.75.75v12.5a.75.75 0 01-.75.75h-2.5a.75.75 0 110-1.5h1.75v-2h-8a1 1 0 00-.714 1.7.75.75 0 01-1.072 1.05A2.495 2.495 0 012 11.5v-9zm10.5-1V9h-8c-.356 0-.694.074-1 .208V2.5a1 1 0 011-1h8zM5 12.25v3.25a.25.25 0 00.4.2l1.45-1.087a.25.25 0 01.3 0L8.6 15.7a.25.25 0 00.4-.2v-3.25a.25.25 0 00-.25-.25h-3.5a.25.25 0 00-.25.25z"
17+
></path>
18+
</svg>
19+
</div>
1020
<div>
11-
<a href="#" class="no-underline text-blue-500">
12-
{{ name }}
13-
</a>
14-
<span class="table text-gray-500">{{ description }}</span>
15-
21+
<a href="#" class="no-underline text-blue-500">
22+
{{ name }}
23+
</a>
24+
<span class="table text-gray-500">{{ description }}</span>
1625
</div>
17-
<br>
18-
</div>
19-
<div class="flex text-sm mt-6">
26+
<br />
27+
</div>
28+
<div class="flex text-sm mt-6">
2029
<div class="mr-4 font-thin text-xs">
21-
{{ language }}
30+
{{ language }}
2231
</div>
2332
<div class="mr-4 font-thin text-xs">
24-
<svg aria-label="stars" class="octicon octicon-star inline" viewBox="0 0 16 16" version="1.1" width="16" height="16" role="img"><path fill-rule="evenodd" d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"></path></svg> {{ nFormatter(stars) }}
33+
<svg
34+
aria-label="stars"
35+
class="octicon octicon-star inline"
36+
viewBox="0 0 16 16"
37+
version="1.1"
38+
width="16"
39+
height="16"
40+
role="img"
41+
>
42+
<path
43+
fill-rule="evenodd"
44+
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"
45+
></path>
46+
</svg>
47+
{{ nFormatter(stars) }}
2548
</div>
2649
<div class="mr-4 font-thin text-xs">
27-
{{ nFormatter(forks) }}
50+
{{ nFormatter(forks) }}
2851
</div>
52+
</div>
2953
</div>
30-
</div>
3154
</div>
3255
</template>
3356

@@ -63,31 +86,32 @@ export default {
6386
Vue: "vuejs",
6487
TypeScript: "typescript",
6588
JavaScript: "javascript",
66-
}
67-
return icons[this.language] || false
89+
};
90+
return icons[this.language] || false;
6891
},
6992
},
7093
methods: {
7194
nFormatter(num, digits) {
72-
var si = [
73-
{ value: 1, symbol: "" },
74-
{ value: 1E3, symbol: "k" },
75-
{ value: 1E6, symbol: "M" },
76-
{ value: 1E9, symbol: "G" },
77-
{ value: 1E12, symbol: "T" },
78-
{ value: 1E15, symbol: "P" },
79-
{ value: 1E18, symbol: "E" }
80-
];
81-
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
82-
var i;
83-
for (i = si.length - 1; i > 0; i--) {
84-
if (num >= si[i].value) {
85-
break;
86-
}
87-
}
88-
return (num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol;
89-
}
90-
91-
}
92-
}
95+
var si = [
96+
{ value: 1, symbol: "" },
97+
{ value: 1e3, symbol: "k" },
98+
{ value: 1e6, symbol: "M" },
99+
{ value: 1e9, symbol: "G" },
100+
{ value: 1e12, symbol: "T" },
101+
{ value: 1e15, symbol: "P" },
102+
{ value: 1e18, symbol: "E" },
103+
];
104+
var rx = /\.0+$|(\.[0-9]*[1-9])0+$/;
105+
var i;
106+
for (i = si.length - 1; i > 0; i--) {
107+
if (num >= si[i].value) {
108+
break;
109+
}
110+
}
111+
return (
112+
(num / si[i].value).toFixed(digits).replace(rx, "$1") + si[i].symbol
113+
);
114+
},
115+
},
116+
};
93117
</script>

components/Search.vue

Lines changed: 68 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,51 @@
11
<template>
22
<div>
3-
<div class="md:block lg:block mx-auto text-gray-600 hidden">
3+
<div class="md:block lg:block mx-auto text-gray-600 hidden">
4+
<input
5+
class="border-2 border-gray-300 bg-white h-10 px-5 pr-16 rounded-lg text-sm focus:outline-none"
6+
autocomplete="off"
7+
type="search"
8+
name="search"
9+
v-model="searchQuery"
10+
placeholder="Search blog"
11+
/>
412

5-
<input class="border-2 border-gray-300 bg-white h-10 px-5 pr-16 rounded-lg text-sm focus:outline-none"
6-
7-
autocomplete="off" type="search" name="search" v-model="searchQuery" placeholder="Search blog">
8-
9-
<button type="submit" class="absolute right-10 mt-3 mr-4">
10-
<svg v-show="searchQuery" class="text-gray-600 h-4 w-4 fill-current text-1xl" @click="searchQuery = ''" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"> <path fill-rule="evenodd" d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z" clip-rule="evenodd" /> </svg>
11-
<svg v-show="!searchQuery" class="text-gray-600 h-4 w-4 fill-current" xmlns="http://www.w3.org/2000/svg"
12-
13-
xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px"
14-
15-
viewBox="0 0 56.966 56.966" style="enable-background:new 0 0 56.966 56.966;" xml:space="preserve"
16-
17-
width="512px" height="512px">
18-
19-
<path
20-
21-
d="M55.146,51.887L41.588,37.786c3.486-4.144,5.396-9.358,5.396-14.786c0-12.682-10.318-23-23-23s-23,10.318-23,23 s10.318,23,23,23c4.761,0,9.298-1.436,13.177-4.162l13.661,14.208c0.571,0.593,1.339,0.92,2.162,0.92 c0.779,0,1.518-0.297,2.079-0.837C56.255,54.982,56.293,53.08,55.146,51.887z M23.984,6c9.374,0,17,7.626,17,17s-7.626,17-17,17 s-17-7.626-17-17S14.61,6,23.984,6z" />
22-
23-
</svg>
24-
25-
</button>
26-
27-
</div>
13+
<button type="submit" class="absolute right-10 mt-3 mr-4">
14+
<svg
15+
v-show="searchQuery"
16+
class="text-gray-600 h-4 w-4 fill-current text-1xl"
17+
@click="searchQuery = ''"
18+
xmlns="http://www.w3.org/2000/svg"
19+
viewBox="0 0 20 20"
20+
fill="currentColor"
21+
>
22+
<path
23+
fill-rule="evenodd"
24+
d="M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z"
25+
clip-rule="evenodd"
26+
/>
27+
</svg>
28+
<svg
29+
v-show="!searchQuery"
30+
class="text-gray-600 h-4 w-4 fill-current"
31+
xmlns="http://www.w3.org/2000/svg"
32+
xmlns:xlink="http://www.w3.org/1999/xlink"
33+
version="1.1"
34+
id="Capa_1"
35+
x="0px"
36+
y="0px"
37+
viewBox="0 0 56.966 56.966"
38+
style="enable-background: new 0 0 56.966 56.966"
39+
xml:space="preserve"
40+
width="512px"
41+
height="512px"
42+
>
43+
<path
44+
d="M55.146,51.887L41.588,37.786c3.486-4.144,5.396-9.358,5.396-14.786c0-12.682-10.318-23-23-23s-23,10.318-23,23 s10.318,23,23,23c4.761,0,9.298-1.436,13.177-4.162l13.661,14.208c0.571,0.593,1.339,0.92,2.162,0.92 c0.779,0,1.518-0.297,2.079-0.837C56.255,54.982,56.293,53.08,55.146,51.887z M23.984,6c9.374,0,17,7.626,17,17s-7.626,17-17,17 s-17-7.626-17-17S14.61,6,23.984,6z"
45+
/>
46+
</svg>
47+
</button>
48+
</div>
2849

2950
<ul
3051
v-if="articles.length"
@@ -45,30 +66,40 @@
4566
export default {
4667
data() {
4768
return {
48-
searchQuery: '',
49-
articles: []
50-
}
69+
searchQuery: "",
70+
articles: [],
71+
};
5172
},
5273
watch: {
5374
async searchQuery(searchQuery) {
5475
if (!searchQuery) {
55-
this.articles = []
56-
return
76+
this.articles = [];
77+
return;
5778
}
58-
this.articles = await this.$content('articles')
79+
this.articles = await this.$content("articles")
5980
.limit(6)
6081
.search(searchQuery)
61-
.fetch()
62-
}
63-
}
64-
}
82+
.fetch();
83+
},
84+
},
85+
};
6586
</script>
6687
<style>
67-
input[type=search]::-ms-clear { display: none; width : 0; height: 0; }
68-
input[type=search]::-ms-reveal { display: none; width : 0; height: 0; }
88+
input[type="search"]::-ms-clear {
89+
display: none;
90+
width: 0;
91+
height: 0;
92+
}
93+
input[type="search"]::-ms-reveal {
94+
display: none;
95+
width: 0;
96+
height: 0;
97+
}
6998
/* clears the ‘X’ from Chrome */
7099
input[type="search"]::-webkit-search-decoration,
71100
input[type="search"]::-webkit-search-cancel-button,
72101
input[type="search"]::-webkit-search-results-button,
73-
input[type="search"]::-webkit-search-results-decoration { display: none; }
102+
input[type="search"]::-webkit-search-results-decoration {
103+
display: none;
104+
}
74105
</style>

components/Skeleton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export default {
8080
data() {
8181
return {
8282
itemLoaded: false,
83-
}
83+
};
8484
},
85-
}
85+
};
8686
</script>

0 commit comments

Comments
 (0)