Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪄 refactor: UI Refresh & Agents/Code Interpreter Docs #174

Merged
merged 28 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
92b75ad
✨ feat: update home page layout and add usage statistics components
berry-13 Oct 29, 2024
b9b2c8e
🔃 chore: clean up eslint-module-utils dependency entries in pnpm-lock…
berry-13 Oct 30, 2024
62390ce
✨ feat: a lot of things
berry-13 Oct 31, 2024
e9a91df
✨ feat: UI adjustements
berry-13 Nov 1, 2024
98d400e
✨ feat: improve author card links, update background colors, and enha…
berry-13 Nov 24, 2024
acba347
chore: update bun
danny-avila Dec 5, 2024
6c3d54b
✨ feat: update GitHub stars and Docker pulls statistics
danny-avila Dec 6, 2024
ffd0548
✨ feat: update demo link to new preview URL
danny-avila Dec 6, 2024
dc47c9e
✨ feat: update features section with new Code Interpreter and adjust …
danny-avila Dec 6, 2024
e39c545
✨ feat: add emoji to Quick Start title for enhanced visibility
danny-avila Dec 6, 2024
f82c550
refactor: move user guides to features section
danny-avila Dec 6, 2024
ee89528
✨ feat: add emojis to installation and user guides for improved clarity
danny-avila Dec 6, 2024
d5f853a
✨ feat: update Hero component title and description for clarity and e…
danny-avila Dec 6, 2024
1dce5cc
feat: agents page
danny-avila Dec 6, 2024
039a8f6
✨ feat: update agents documentation to clarify built-in tools and men…
danny-avila Dec 6, 2024
76da3b8
✨ feat: add Code Interpreter API documentation and update agents meta…
danny-avila Dec 6, 2024
d80c1f0
✨ feat: add Code Interpreter page metadata and integrate sparkles eff…
danny-avila Dec 6, 2024
2100a72
chore: comment out NewsletterForm component in Home page
danny-avila Dec 6, 2024
f883be4
style: code interpreter gif for features box
danny-avila Dec 6, 2024
0a62a42
fix: update Agents link to point to the correct features documentation
danny-avila Dec 6, 2024
5a62116
fix: pnpm lockfile
danny-avila Dec 6, 2024
649bf7d
docs: API key notes for code interpreter api
danny-avila Dec 6, 2024
6589948
refactor: improve MobileSwitch component with TypeScript types and nu…
danny-avila Dec 6, 2024
86b9e0a
chore: types, packages
danny-avila Dec 7, 2024
6f73791
chore: update ESLint configuration and add linting step to CI workflow
danny-avila Dec 7, 2024
9f19204
docs: add section on intellectual property protection for Code Interp…
danny-avila Dec 7, 2024
7d1bad6
docs: refine agents customization features in documentation
danny-avila Dec 7, 2024
3a75534
style: hero page
danny-avila Dec 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ module.exports = {
root: true,
reportUnusedDisableDirectives: true,
ignorePatterns: ['next-env.d.ts'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@next/next/recommended',
'plugin:import/typescript',
'prettier',
],
overrides: [
// Rules for all files
{
Expand Down Expand Up @@ -56,7 +63,6 @@ module.exports = {
'plugin:react/recommended',
'plugin:react/jsx-runtime',
'plugin:react-hooks/recommended',
'plugin:@next/next/recommended',
],
rules: {
'react/prop-types': 'off',
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/nextjs_bundle_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ jobs:
# # change this if you prefer a more strict cache
# key: ${{ runner.os }}-build-${{ env.cache-name }}

- name: Install ESLint
run: pnpm add -D eslint @next/eslint-plugin-next

- name: Run ESLint
run: pnpm eslint .

- name: Build next.js app
# change this if your site requires a custom build command
run: ./node_modules/.bin/next build
Expand Down
Binary file modified bun.lockb
Binary file not shown.
7 changes: 4 additions & 3 deletions components/Author/AuthorProfile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ interface AuthorMetadata {
name: string
bio: string
ogImage: string
socials?: Record<string, string> // Dynamically match social media platforms
socials?: Record<string, string | undefined> // Dynamically match social media platforms
date: string | number | Date
}

interface AuthorProfileProps {
Expand All @@ -28,7 +29,7 @@ interface AuthorProfileProps {
const AuthorProfile: React.FC<AuthorProfileProps> = ({ authorId }) => {
const authors = getPagesUnderRoute('/authors') as Array<Page & { frontMatter: AuthorMetadata }>
const author = authors.find((a) => a.frontMatter.authorid === authorId)?.frontMatter
const blogPosts = getPagesUnderRoute('/blog') as Array<Page & { frontMatter: any }>
const blogPosts = getPagesUnderRoute('/blog') as Array<Page & { frontMatter: AuthorMetadata }>

// Filter posts by the current authorId
const authorPosts = blogPosts.filter((post) => post.frontMatter.authorid === authorId)
Expand Down Expand Up @@ -104,7 +105,7 @@ const AuthorProfile: React.FC<AuthorProfileProps> = ({ authorId }) => {
<BlogCard
key={post.route}
page={post}
handleTagClick={(tag) => console.log('Tag clicked:', tag)}
handleTagClick={(tag: unknown) => console.log('Tag clicked:', tag)}
selectedTags={undefined}
/>
))}
Expand Down
92 changes: 47 additions & 45 deletions components/FooterMenu.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
import Link from 'next/link'
import { SocialIcon } from 'react-social-icons'
import { FloatingDock } from '@/components/ui/floating-dock'
import {
IconBrandGithub,
IconBrandDiscord,
IconBrandLinkedin,
IconBrandTwitter,
IconBrandYoutube,
IconMail,
} from '@tabler/icons-react'
import { useMediaQuery } from 'react-responsive'

const menuItems: {
heading: string
Expand Down Expand Up @@ -97,6 +106,41 @@ const menuItems: {
]

const FooterMenu = () => {
const isMobile = useMediaQuery({ query: '(max-width: 640px)' })

const socialLinks = [
{
title: 'GitHub',
icon: <IconBrandGithub className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'https://github.librechat.ai/',
},
{
title: 'Discord',
icon: <IconBrandDiscord className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'https://discord.librechat.ai/',
},
{
title: 'LinkedIn',
icon: <IconBrandLinkedin className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'https://linkedin.librechat.ai/',
},
{
title: 'Twitter',
icon: <IconBrandTwitter className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'https://x.com/LibreChatAI',
},
{
title: 'YouTube',
icon: <IconBrandYoutube className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'https://www.youtube.com/@LibreChat',
},
{
title: 'Email',
icon: <IconMail className="h-full w-full text-neutral-500 dark:text-neutral-300" />,
href: 'mailto:[email protected]',
},
]

return (
<div className="w-full">
<div className="grid grid-cols-2 md:grid-cols-6 text-base gap-y-8 gap-x-2">
Expand All @@ -116,52 +160,10 @@ const FooterMenu = () => {
))}
<div className="flex items-center justify-between md:col-span-6">
<div className="font-sans text-sm">© {new Date().getFullYear()} LibreChat</div>
<div className="flex ml-auto">
<SocialIcon
url="https://github.librechat.ai/"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
<SocialIcon
url="https://discord.librechat.ai/"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
<SocialIcon
url="https://linkedin.librechat.ai/"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
<SocialIcon
url="https://x.com/LibreChatAI"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
<SocialIcon
url="https://www.youtube.com/@LibreChat"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
<SocialIcon
url="mailto:[email protected]"
className="absolute inset-0 w-full h-full transform scale-100 transition-transform opacity-100 hover:scale-90"
style={{ height: 40, width: 40 }}
bgColor="background"
fgColor="#9B9B9B80"
/>
</div>
{!isMobile && <FloatingDock items={socialLinks} desktopClassName="ml-auto" />}
</div>
</div>
{isMobile && <FloatingDock items={socialLinks} mobileClassName="mt-4" />}
</div>
)
}
Expand Down
2 changes: 1 addition & 1 deletion components/Newsletter/SubscribeForm.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import validator from 'validator'
import React, { useState } from 'react'
import toast, { Toaster } from 'react-hot-toast'
import validator from 'validator'
import style from './newsletterform.module.css'

const isDevelopment = true //TODO
Expand Down
80 changes: 40 additions & 40 deletions components/Newsletter/newsletterform.module.css
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
.container {
text-align: center;
text-align: center;
}

.form-wrapper {
max-width: 400px;
margin: 0 auto;
border-radius: 10px;
overflow: hidden;
background-color: #f1f1f1;
max-width: 400px;
margin: 0 auto;
border-radius: 10px;
overflow: hidden;
background-color: #f1f1f1;
}
:global(.dark) .form-wrapper {
background-color: #171717;
background-color: #111111;
}
.form-title {
padding: 15px;
color:#454545;
padding: 15px;
color: #454545;
}

:global(.dark) .form-title {
color:#9b9b9b;
color: #9b9b9b;
}

.form-container {
padding: 20px;
padding: 20px;
}

.email-input {
padding: 8px;
/* border: 1px solid #3e3e3e; */
border-radius: 5px;
margin-bottom: 10px;
width: 100%;
background-color: #fff;
padding: 8px;
/* border: 1px solid #3e3e3e; */
border-radius: 5px;
margin-bottom: 10px;
width: 100%;
background-color: #fff;
}

.email-input::placeholder {
color: #5a5a5a;
color: #5a5a5a;
}
.email-input::placeholder {
color: #5a5a5a;
color: #5a5a5a;
}

:global(.dark) .email-input {
background-color: #29292a;
background-color: #29292a;
}

.subscribe-button {
padding: 8px 16px;
background: linear-gradient(-45deg, #ffa63d, #ff3d77, #338aff, #3cf0c5);
background-size: 600%;
animation: anime 16s linear infinite;
color: rgba(255, 255, 255, 0.9);
border: none;
border-radius: 5px;
cursor: pointer;
width: 100%;
padding: 8px 16px;
background: linear-gradient(-45deg, #ffa63d, #ff3d77, #338aff, #3cf0c5);
background-size: 600%;
animation: anime 16s linear infinite;
color: rgba(255, 255, 255, 0.9);
border: none;
border-radius: 5px;
cursor: pointer;
width: 100%;
}

.subscribe-button:hover {
filter: brightness(110%);
filter: brightness(110%);
}

@keyframes anime {
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
0% {
background-position: 0% 50%;
}
50% {
background-position: 100% 50%;
}
100% {
background-position: 0% 50%;
}
}
2 changes: 1 addition & 1 deletion components/blog/BlogCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const BlogCard = ({ page, handleTagClick, selectedTags = [] }) => {

useEffect(() => {
const updateCardWidth = () => {
setCardWidth(document.querySelector('.blog-card').clientWidth)
setCardWidth(document.querySelector('.blog-card')?.clientWidth ?? 0)
}
window.addEventListener('resize', updateCardWidth)
updateCardWidth()
Expand Down
4 changes: 2 additions & 2 deletions components/callouts/style.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
}

:global(.dark) .callout-content {
background-color: #000000cc; /* Separate background color for content */
background-color: #080808cc; /* Separate background color for content */
color: #fff;
}

Expand Down Expand Up @@ -116,7 +116,7 @@
}

:global(.dark) .callout {
--content-background-color: #111111;
--content-background-color: #080808;

--default-border-color: #9e9e9e;
--default-background-color: #2b2e35;
Expand Down
Loading
Loading