Skip to content

Commit 40fba88

Browse files
Merge pull request #153 from phel-lang/improve-homepage
Improve homepage
2 parents b467356 + afe2e6c commit 40fba88

File tree

9 files changed

+534
-72
lines changed

9 files changed

+534
-72
lines changed

content/_index.md

Lines changed: 100 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,22 @@ title = "Phel: A Functional Lisp Dialect for PHP Developers"
44

55
**Phel** is a functional programming language that compiles down to PHP. It's a modern Lisp dialect inspired by [Clojure](https://clojure.org/) and [Janet](https://janet-lang.org/), tailored to bring functional elegance and expressive code to the world of PHP development.
66

7-
<p align="center">
8-
<img src="/images/logo_phel.svg" width="350" alt="Phel language logo"/>
9-
</p>
7+
<img src="/images/logo_phel.svg" width="450" alt="Phel language logo"/>
108

11-
## Join the Phel Developer Community
9+
<div class="homepage-cta">
10+
<a href="#try-phel-instantly-with-docker" class="homepage-cta-button homepage-cta-primary">
11+
<svg class="homepage-cta-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><polygon points="5 3 19 12 5 21 5 3"></polygon></svg>
12+
Try Phel with Docker
13+
</a>
14+
<a href="/documentation/getting-started" class="homepage-cta-button homepage-cta-secondary">
15+
<svg class="homepage-cta-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>
16+
Read Documentation
17+
</a>
18+
</div>
1219

13-
Got questions? Want to chat about macros, tail recursion, or why parentheses are awesome?
14-
Swing by the [Phel Gitter channel](https://gitter.im/phel-lang/community)—we're friendly, nerdy, and always happy to talk code.
20+
<div class="homepage-code-section">
1521

16-
## Key Features of Phel
17-
18-
Why code in Phel? Here's what makes it click:
19-
20-
- ✅ Runs on the rock-solid PHP ecosystem
21-
- 🧠 Helpful and human-readable error messages
22-
- 📚 Built-in persistent data structures: Lists, Vectors, Maps, Sets
23-
- 🧩 Macro system for advanced metaprogramming
24-
- 🔁 Tail-recursive function support
25-
- ✨ Minimal, readable Lisp syntax
26-
- 💬 Interactive REPL for tinkering and prototyping
27-
28-
## Why Choose Phel for Functional Programming in PHP?
29-
30-
Phel started as an [experiment in writing functional PHP](/blog/functional-programming-in-php) and quickly turned into its own thing.
31-
32-
It exists because we wanted:
33-
34-
- A Lisp-inspired functional language
35-
- That runs on affordable PHP hosting
36-
- That's expressive, debug-friendly, and easy to pick up
37-
38-
If you've ever wished PHP was a bit more... functional, Phel is for you.
39-
40-
## See Phel in Action — Sample Code
22+
## See Phel in Action
4123

4224
```phel
4325
# Define a namespace
@@ -54,31 +36,101 @@ If you've ever wished PHP was a bit more... functional, Phel is for you.
5436
(print-name my-name)
5537
```
5638

57-
If you know Lisp or Clojure, you'll feel right at home. If you don't—this is a great place to start.
39+
</div>
5840

59-
## Try Phel Instantly with Docker
41+
## Key Features of Phel
6042

61-
No setup? No problem. You can run Phel's REPL right away:
43+
Built for modern PHP development with functional programming principles
6244

63-
```bash
64-
docker run -it --rm phellang/repl
65-
```
45+
{% features() %}
6646

67-
![Try Phel animation](/try-phel.gif "Try Phel Animation")
47+
{% feature_card(title="Built on PHP Ecosystem", description="Runs on the PHP ecosystem with access to all existing libraries", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 3l-7 7 7 7M15 3l7 7-7 7"/></svg>') %}
48+
<li>• Seamless PHP interoperability</li>
49+
<li>• Access to Composer packages</li>
50+
<li>• Familiar deployment patterns</li>
51+
{% end %}
6852

69-
## Get Started with Phel in Minutes
53+
{% feature_card(title="Immutable Data Structures", description="Built-in persistent data structures like Lists, Vectors, Maps, and Sets", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>') %}
54+
<li>• Structural sharing for performance</li>
55+
<li>• Thread-safe by default</li>
56+
<li>• Minimal, readable Lisp syntax</li>
57+
{% end %}
7058

71-
All you need is [PHP >=8.3](https://www.php.net/) and [Composer](https://getcomposer.org/).
59+
{% feature_card(title="Macro System", description="Advanced metaprogramming capabilities for code generation", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2v4M12 18v4M4.93 4.93l2.83 2.83M16.24 16.24l2.83 2.83M2 12h4M18 12h4M4.93 19.07l2.83-2.83M16.24 7.76l2.83-2.83"/></svg>') %}
60+
<li>• Powerful macro system</li>
61+
<li>• Code as data philosophy</li>
62+
<li>• Extensible language constructs</li>
63+
{% end %}
7264

73-
> Follow our [Getting Started Guide](/documentation/getting-started) to build and run your first Phel program today.
65+
{% feature_card(title="Interactive REPL", description="Interactive REPLs for iterating and prototyping", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path><circle cx="9" cy="7" r="4"></circle><path d="M23 21v-2a4 4 0 0 0-3-3.87"></path><path d="M16 3.13a4 4 0 0 1 0 7.75"></path></svg>') %}
66+
<li>• Live code evaluation</li>
67+
<li>• Rapid prototyping</li>
68+
<li>• Interactive development</li>
69+
{% end %}
7470

75-
## Development Status & How to Contribute
71+
{% feature_card(title="Lisp-inspired Syntax", description="Clean, expressive, and easy to pick up syntax", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"></path><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"></path></svg>') %}
72+
<li>• Minimal, readable syntax</li>
73+
<li>• Homoiconicity benefits</li>
74+
<li>• Expressive and concise</li>
75+
{% end %}
7676

77-
Phel is approaching its 1.0 release, but we're still actively refining the language —and yes, breaking changes may happen.
77+
{% feature_card(title="Modern Tooling", description="Comprehensive development tools and ecosystem", icon='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>') %}
78+
<li>• Package management</li>
79+
<li>• Testing frameworks</li>
80+
<li>• Development server</li>
81+
{% end %}
7882

79-
We're building this in the open. That means:
80-
- Found a bug? File an issue.
81-
- Got a cool idea? Open a pull request.
82-
- Want to shape the language's future? Let's talk.
83+
{% end %}
8384

84-
Your feedback, ideas, and code help Phel grow into something great.
85+
<div class="homepage-code-section homepage-why-section">
86+
87+
## Why Choose Phel for Functional Programming in PHP?
88+
89+
Phel started as an [experiment in writing functional PHP](/blog/functional-programming-in-php) and quickly turned into its own thing.
90+
91+
<div class="why-cards">
92+
<div class="why-card">
93+
<div class="why-card-icon">
94+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
95+
<circle cx="12" cy="12" r="10"></circle>
96+
<polyline points="12 6 12 12 16 14"></polyline>
97+
</svg>
98+
</div>
99+
<div class="why-card-text">A Lisp-inspired functional language</div>
100+
</div>
101+
<div class="why-card">
102+
<div class="why-card-icon">
103+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
104+
<rect x="2" y="7" width="20" height="14" rx="2" ry="2"></rect>
105+
<path d="M16 21V5a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v16"></path>
106+
</svg>
107+
</div>
108+
<div class="why-card-text">That runs on affordable PHP hosting</div>
109+
</div>
110+
<div class="why-card">
111+
<div class="why-card-icon">
112+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
113+
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
114+
<polyline points="14 2 14 8 20 8"></polyline>
115+
<line x1="16" y1="13" x2="8" y2="13"></line>
116+
<line x1="16" y1="17" x2="8" y2="17"></line>
117+
<polyline points="10 9 9 9 8 9"></polyline>
118+
</svg>
119+
</div>
120+
<div class="why-card-text">That's expressive, debug-friendly, and easy to pick up</div>
121+
</div>
122+
</div>
123+
124+
If you've ever wished PHP was a bit more... functional, Phel is for you.
125+
126+
</div>
127+
128+
## Try Phel Instantly with Docker
129+
130+
No setup? No problem. You can run Phel's REPL right away:
131+
132+
```bash
133+
docker run -it --rm phellang/repl
134+
```
135+
136+
![Try Phel animation](/try-phel.gif "Try Phel Animation")

css/components/dark-mode.css

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,3 +776,84 @@
776776
.dark ::-moz-selection {
777777
background: rgba(191, 164, 255, 0.3);
778778
}
779+
780+
/* Homepage Title Accent - Dark Mode */
781+
.dark .homepage-title-accent {
782+
color: var(--color-dark-text-accent);
783+
}
784+
785+
.dark .homepage-content > p:first-of-type {
786+
color: var(--color-dark-text-primary);
787+
}
788+
789+
.dark .why-card {
790+
background: var(--color-dark-bg);
791+
border-color: var(--color-dark-border);
792+
color: var(--color-dark-text-primary);
793+
}
794+
795+
.dark .why-card:hover {
796+
border-color: var(--color-dark-text-accent);
797+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
798+
}
799+
800+
.dark .why-card-icon {
801+
color: var(--color-dark-text-accent);
802+
}
803+
804+
/* Homepage Code Section - Dark Mode */
805+
.dark .homepage-code-section {
806+
background: rgba(191, 164, 255, 0.05);
807+
}
808+
809+
/* Homepage CTA Buttons - Dark Mode */
810+
.dark .homepage-cta-primary {
811+
background: var(--color-dark-text-accent);
812+
border-color: var(--color-dark-text-accent);
813+
color: var(--color-dark-bg);
814+
}
815+
816+
.dark .homepage-cta-primary:hover {
817+
background: #c2acf5;
818+
border-color: #c2acf5;
819+
color: var(--color-dark-bg);;
820+
}
821+
822+
.dark .homepage-cta-secondary {
823+
background: transparent;
824+
color: var(--color-dark-text-primary);
825+
border-color: var(--color-dark-border);
826+
}
827+
828+
.dark .homepage-cta-secondary:hover {
829+
border-color: var(--color-dark-text-accent);
830+
color: var(--color-dark-text-accent);
831+
}
832+
833+
/* Features Grid - Dark Mode */
834+
.dark .feature-card {
835+
background: var(--color-dark-surface);
836+
border-color: var(--color-dark-border);
837+
}
838+
839+
.dark .feature-card:hover {
840+
border-color: var(--color-dark-text-accent);
841+
box-shadow: var(--shadow-dark-sm);
842+
}
843+
844+
.dark .feature-icon {
845+
color: var(--color-dark-text-accent);
846+
}
847+
848+
.dark .feature-title {
849+
color: var(--color-dark-text-primary);
850+
}
851+
852+
.dark .feature-description {
853+
color: var(--color-dark-text-secondary);
854+
}
855+
856+
.dark .feature-items p,
857+
.dark .feature-items li {
858+
color: var(--color-dark-text-secondary);
859+
}

0 commit comments

Comments
 (0)