Skip to content

Commit 47e1724

Browse files
committed
feat: sites.
1 parent d099943 commit 47e1724

File tree

10 files changed

+2246
-2322
lines changed

10 files changed

+2246
-2322
lines changed

assets/styles/styles.css

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,11 @@ html,
1010
body,
1111
#__nuxt {
1212
height: 100%;
13+
-webkit-text-size-adjust: 100%;
14+
font-family: scandia-web, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji,
15+
Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji !important;
1316
}
1417

1518
body {
16-
@apply bg-white dark:bg-neutral-800 text-gray-700 dark:text-gray-400;
19+
@apply antialiased text-gray-700 bg-white dark:bg-neutral-800 dark:text-gray-400;
1720
}

components/CourseCard.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<template>
22
<content-card class="grid grid-cols-3 gap-6">
3-
<nuxt-link :to="course.url"><img :src="course.image_url" class="bg-white border overflow-hidden rounded w-full object-cover" :alt="course.name" /></nuxt-link>
4-
<div class="col-span-2 space-y-4 flex flex-col">
5-
<nuxt-link :to="course.url" class="font-medium dark:text-gray-300">{{ course.name }}</nuxt-link>
3+
<nuxt-link :to="course.url"><img :src="course.image_url" class="object-cover w-full overflow-hidden bg-white border rounded" :alt="course.name" /></nuxt-link>
4+
<div class="flex flex-col col-span-2 space-y-4">
5+
<nuxt-link :to="course.url" class="font-semibold dark:text-gray-300">{{ course.name }}</nuxt-link>
66
<div class="text-sm text-gray-500">
77
来自 <nuxt-link :to="course.author_url" class="text-indigo-900 dark:text-indigo-400">{{ course.author }}</nuxt-link>
88
</div>
9-
<nuxt-link :to="course.url" class="block w-full flex-1 text-gray-500 dark:text-neutral-400">
9+
<nuxt-link :to="course.url" class="flex-1 block w-full text-gray-500 dark:text-neutral-400">
1010
{{ course.introduction }}
1111
</nuxt-link>
1212
</div>

components/DocCard.vue

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<template>
22
<nuxt-link :to="doc.url">
33
<content-card class="flex gap-6">
4-
<div class="rounded p-2 w-12 h-12 grid place-content-center" :class="doc.color">
5-
<img v-if="doc.logo_url" :src="doc.logo_url" :alt="doc.name" class="h-6 w-6" />
6-
<div v-else class="rounded-full h-6 w-6 bg-opacity-75 bg-white"></div>
4+
<div class="grid w-12 h-12 p-2 rounded place-content-center" :class="doc.color">
5+
<img v-if="doc.logo_url" :src="doc.logo_url" :alt="doc.name" class="w-6 h-6" />
6+
<div v-else class="w-6 h-6 bg-white bg-opacity-75 rounded-full"></div>
77
</div>
88
<div>
9-
<div class="dark:text-neutral-300 font-medium">{{ doc.name }}</div>
10-
<div class="text-neutral-400 text-sm">{{ doc.introduction }}</div>
9+
<div class="font-medium dark:text-neutral-300">{{ doc.name }}</div>
10+
<div class="h-12 text-sm text-gray-500">{{ doc.introduction }}</div>
1111
</div>
1212
</content-card>
1313
</nuxt-link>

components/SiteCard.vue

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
<template>
2+
<nuxt-link :to="site.url">
3+
<content-card class="space-y-4">
4+
<div class="flex items-center justify-between gap-6">
5+
<div>
6+
<div class="font-semibold dark:text-neutral-300">{{ site.name }}</div>
7+
<a :href="site.url" class="text-sm text-gray-500" target="_blank">{{ site.url }}</a>
8+
</div>
9+
<div
10+
class="flex items-center justify-center w-20 h-20 p-4 bg-gray-200 bg-opacity-75 rounded-full place-content-center"
11+
:style="site.logo_bg_color ? `background: ${site.logo_bg_color}` : '#fff'"
12+
>
13+
<img v-if="site.logo_url" :src="site.logo_url" :alt="site.name" class="object-scale-down" />
14+
<div v-else class="w-full h-full">
15+
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor">
16+
<path
17+
stroke-linecap="round"
18+
stroke-linejoin="round"
19+
d="M12.75 3.03v.568c0 .334.148.65.405.864l1.068.89c.442.369.535 1.01.216 1.49l-.51.766a2.25 2.25 0 01-1.161.886l-.143.048a1.107 1.107 0 00-.57 1.664c.369.555.169 1.307-.427 1.605L9 13.125l.423 1.059a.956.956 0 01-1.652.928l-.679-.906a1.125 1.125 0 00-1.906.172L4.5 15.75l-.612.153M12.75 3.031a9 9 0 00-8.862 12.872M12.75 3.031a9 9 0 016.69 14.036m0 0l-.177-.529A2.25 2.25 0 0017.128 15H16.5l-.324-.324a1.453 1.453 0 00-2.328.377l-.036.073a1.586 1.586 0 01-.982.816l-.99.282c-.55.157-.894.702-.8 1.267l.073.438c.08.474.49.821.97.821.846 0 1.598.542 1.865 1.345l.215.643m5.276-3.67a9.012 9.012 0 01-5.276 3.67m0 0a9 9 0 01-10.275-4.835M15.75 9c0 .896-.393 1.7-1.016 2.25"
20+
/>
21+
</svg>
22+
</div>
23+
</div>
24+
</div>
25+
<div class="h-24 text-sm text-neutral-500">{{ site.description }}</div>
26+
<div class="flex items-center gap-2" v-if="site.tags && site.tags.length">
27+
<div class="px-2 py-1 leading-4 text-white bg-gray-600 rounded" v-for="tag in site.tags">
28+
{{ tag }}
29+
</div>
30+
</div>
31+
</content-card>
32+
</nuxt-link>
33+
</template>
34+
<script lang="ts">
35+
export default {
36+
props: {
37+
site: {
38+
type: Object,
39+
required: true,
40+
},
41+
},
42+
}
43+
</script>

components/StarCard.vue

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
<template>
22
<content-card class="relative">
3-
<NuxtLink class="block text-center h-48 cursor-pointer" :to="star.html_url">
4-
<img :src="star.avatar_url" alt="" class="rounded-full h-32 w-32 my-4 mx-auto" />
5-
<h3 class="text-xl font-medium text-gray-700 dark:text-gray-300 m-0">{{ star.name }}</h3>
6-
<p class="text-neutral-400 line-clamp-2 text-sm overflow-hidden">{{ star.introduction || star.bio || '' }}</p>
3+
<NuxtLink class="block h-48 text-center cursor-pointer" :to="star.html_url">
4+
<img :src="star.avatar_url" alt="" class="w-32 h-32 mx-auto my-4 rounded-full" />
5+
<h3 class="m-0 text-xl font-semibold text-gray-700 dark:text-gray-300">{{ star.name }}</h3>
6+
<p class="mt-2 overflow-hidden text-sm text-gray-500 line-clamp-2">{{ star.introduction || star.bio || '' }}</p>
77
</NuxtLink>
88
<div class="flex justify-center mt-8">
9-
<div class="text-gray-500 flex space-x-1">
9+
<div class="flex space-x-1 text-gray-500">
1010
<a
1111
v-if="star.twitter_id"
1212
:href="`https://twitter.com/${star.twitter_id}`"
13-
class="hover:bg-neutral-300 hover:text-gray-700 dark:hover:bg-neutral-800 text-gray-400 dark:text-gray-500 hover:dark:text-gray-300 rounded-full p-2 flex items-center justify-center"
13+
class="flex items-center justify-center p-2 text-gray-400 rounded-full hover:bg-neutral-300 hover:text-gray-700 dark:hover:bg-neutral-800 dark:text-gray-500 hover:dark:text-gray-300"
1414
>
1515
<svg
1616
xmlns="http://www.w3.org/2000/svg"
17-
class="icon h-6 w-6"
17+
class="w-6 h-6 icon"
1818
viewBox="0 0 24 24"
1919
stroke-width="1.5"
2020
stroke="currentColor"
@@ -30,11 +30,11 @@
3030
</a>
3131
<a
3232
:href="star.html_url"
33-
class="hover:bg-neutral-300 hover:text-gray-700 dark:hover:bg-neutral-800 text-gray-400 dark:text-gray-500 hover:dark:text-gray-300 rounded-full p-2 flex items-center justify-center"
33+
class="flex items-center justify-center p-2 text-gray-500 rounded-full hover:bg-neutral-300 hover:text-gray-700 dark:hover:bg-neutral-800 dark:text-gray-500 hover:dark:text-gray-300"
3434
>
3535
<svg
3636
xmlns="http://www.w3.org/2000/svg"
37-
class="icon h-6 w-6"
37+
class="w-6 h-6 icon"
3838
viewBox="0 0 24 24"
3939
stroke-width="1.5"
4040
stroke="currentColor"

components/TheNavbar.vue

+19-9
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
href="/"
99
class="flex items-center space-x-2 text-2xl font-bold text-gray-800 transition-colors duration-200 transform dark:text-white lg:text-3xl hover:text-gray-600 dark:hover:text-gray-300"
1010
>
11-
<h1 class="text-3xl leading-none m-0">Laravel</h1>
12-
<span class="bg-blue-500 text-white text-sm px-2 py-1 rounded rounded-bl-none">小宇宙</span>
11+
<h1 class="m-0 text-3xl leading-none">Laravel</h1>
12+
<span class="px-2 py-1 text-sm text-white bg-blue-500 rounded rounded-bl-none">小宇宙</span>
1313
</a>
1414
</div>
1515

@@ -31,7 +31,7 @@
3131
<div class="flex-1 md:flex md:items-center md:justify-between">
3232
<div class="flex flex-col -mx-4 md:flex-row md:items-center md:mx-8">
3333
<the-nav-item to="/courses">
34-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
34+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
3535
<path
3636
stroke-linecap="round"
3737
stroke-linejoin="round"
@@ -41,7 +41,7 @@
4141
<span>教程</span>
4242
</the-nav-item>
4343
<the-nav-item to="/docs">
44-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
44+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
4545
<path
4646
stroke-linecap="round"
4747
stroke-linejoin="round"
@@ -51,7 +51,7 @@
5151
<span>文档</span>
5252
</the-nav-item>
5353
<the-nav-item to="/stars">
54-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
54+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
5555
<path
5656
stroke-linecap="round"
5757
stroke-linejoin="round"
@@ -61,7 +61,7 @@
6161
<span>人物</span>
6262
</the-nav-item>
6363
<the-nav-item to="/packages">
64-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
64+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
6565
<path
6666
stroke-linecap="round"
6767
stroke-linejoin="round"
@@ -70,11 +70,21 @@
7070
</svg>
7171
<span>扩展包</span>
7272
</the-nav-item>
73+
<the-nav-item to="/sites">
74+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
75+
<path
76+
stroke-linecap="round"
77+
stroke-linejoin="round"
78+
d="M15.042 21.672L13.684 16.6m0 0l-2.51 2.225.569-9.47 5.227 7.917-3.286-.672zM12 2.25V4.5m5.834.166l-1.591 1.591M20.25 10.5H18M7.757 14.743l-1.59 1.59M6 10.5H3.75m4.007-4.243l-1.59-1.59"
79+
/>
80+
</svg>
81+
<span>网站</span>
82+
</the-nav-item>
7383
<!-- <the-nav-item
7484
to="/jobs"
7585
7686
>
77-
<svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
87+
<svg xmlns="http://www.w3.org/2000/svg" class="w-4 h-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
7888
<path
7989
stroke-linecap="round"
8090
stroke-linejoin="round"
@@ -89,7 +99,7 @@
8999
<a href="https://github.com/overtrue/laravel.xyz" class="text-gray-600 dark:text-neutral-300 hover:text-gray-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-200">
90100
<svg
91101
xmlns="http://www.w3.org/2000/svg"
92-
class="icon h-6 w-6"
102+
class="w-6 h-6 icon"
93103
viewBox="0 0 24 24"
94104
stroke-width="1.5"
95105
stroke="currentColor"
@@ -106,7 +116,7 @@
106116
<a href="https://twitter.com/overtrue666" class="text-gray-600 dark:text-neutral-300 hover:text-gray-900 dark:hover:bg-neutral-800 dark:hover:text-neutral-200">
107117
<svg
108118
xmlns="http://www.w3.org/2000/svg"
109-
class="icon h-6 w-6"
119+
class="w-6 h-6 icon"
110120
viewBox="0 0 24 24"
111121
stroke-width="1.5"
112122
stroke="currentColor"

content/sites.json

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
[
2+
{
3+
"name": "Laravel Bootcamp",
4+
"url": "https://bootcamp.laravel.com/",
5+
"description": "Together let's walk through building and deploying a modern Laravel application from scratch.",
6+
"tags": ["course", "tutorials"],
7+
"logo_url": "https://bootcamp.laravel.com/img/logomark.min.svg"
8+
},
9+
{
10+
"name": "Laravel News",
11+
"url": "https://laravel-news.com",
12+
"description": "Laravel News is a community driven portal and newsletter aggregating all of the latest and most important news in the Laravel ecosystem, including new package releases and tutorials.",
13+
"tags": ["news"],
14+
"logo_url": "https://laravelnews.imgix.net/laravel-news__logo.png?dpr=2&ixlib=php-3.3.1"
15+
},
16+
{
17+
"name": "Laracasts",
18+
"url": "https://laracasts.com",
19+
"description": "Laracasts is a video tutorial website for web developers. It features over 1,000 videos on a variety of topics, including PHP, Laravel, JavaScript, and more.",
20+
"tags": ["tutorials", "videos"],
21+
"logo_url": "https://assets.laracasts.com/images/logo.svg"
22+
},
23+
{
24+
"name": "Laravel.io",
25+
"url": "https://laravel.io",
26+
"description": "Laravel.io is a community portal for Laravel developers. It features a forum, job board, and a list of useful resources.",
27+
"tags": ["community"],
28+
"logo_url": "https://laravel.io/images/laravelio-logo.svg"
29+
},
30+
{
31+
"name": "Laracasts Forum",
32+
"url": "https://laracasts.com/discuss",
33+
"description": "Laracasts is a video tutorial website for web developers. It features over 1,000 videos on a variety of topics, including PHP, Laravel, JavaScript, and more.",
34+
"tags": ["community", "videos"],
35+
"logo_url": "https://assets.laracasts.com/images/logo.svg"
36+
},
37+
{
38+
"name": "Laravel Podcast",
39+
"url": "https://laravelpodcast.com",
40+
"description": "The Laravel Podcast is a weekly podcast about the Laravel PHP framework. It features interviews with the creators of Laravel and other Laravel community members.",
41+
"tags": ["podcast"]
42+
},
43+
{
44+
"name": "Laravel Daily",
45+
"url": "https://laraveldaily.com",
46+
"description": "Laravel Daily is a blog that publishes articles about Laravel and other PHP frameworks. It also features a newsletter with the latest news in the Laravel ecosystem.",
47+
"tags": ["news", "tutorials"],
48+
"logo_url": "https://laraveldaily.com/img/logos/mono.svg",
49+
"logo_bg_color": "#2563eb"
50+
},
51+
{
52+
"name": "Learnku",
53+
"url": "https://learnku.com",
54+
"description": "Learnku is a Chinese community portal for Laravel developers. It features a forum, job board, and a list of useful resources.",
55+
"tags": ["community"],
56+
"logo_url": "https://cdn.learnku.com/uploads/images/201901/24/1/OyBnfB2vlk.png!/both/100x100"
57+
},
58+
{
59+
"name": "Larajobs",
60+
"url": "https://larajobs.com",
61+
"description": "Larajobs is a job board for Laravel developers. It features jobs from companies all over the world.",
62+
"tags": ["jobs"],
63+
"logo_url": "https://larajobs.com/img/logo.svg"
64+
},
65+
{
66+
"name": "Laravel Gurus",
67+
"url": "https://laravelgurus.com",
68+
"description": "Laravel Gurus is a job board for Laravel developers. It features jobs from companies all over the world.",
69+
"tags": ["jobs"]
70+
},
71+
{
72+
"name": "Laravel Playground",
73+
"url": "https://laravelplayground.com",
74+
"description": "Run and embed PHP code in your browser.",
75+
"tags": ["tools"]
76+
},
77+
{
78+
"name": "Laravel Tricks",
79+
"url": "https://laravel-tricks.com",
80+
"description": "Laravel tricks is a website that aggregates useful tips and tricks for Laravel PHP framework",
81+
"tags": ["tricks", "tutorials"],
82+
"logo_url": "https://laravel-tricks.com/svg/logo.svg"
83+
}
84+
]

0 commit comments

Comments
 (0)