Skip to content

Commit 1738c56

Browse files
Merge pull request #158 from phel-lang/fix-cards-home
Fix cards home
2 parents 7e148f7 + c144a7f commit 1738c56

File tree

6 files changed

+59
-35
lines changed

6 files changed

+59
-35
lines changed

content/_index.md

Lines changed: 39 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -45,39 +45,39 @@ Built for modern PHP development with functional programming principles
4545
{% features() %}
4646

4747
{% 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>
48+
• Seamless PHP interoperability
49+
• Access to Composer packages
50+
• Familiar deployment patterns
5151
{% end %}
5252

5353
{% 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>
54+
• Structural sharing for performance
55+
• Thread-safe by default
56+
• Minimal, readable Lisp syntax
5757
{% end %}
5858

5959
{% 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>
60+
• Powerful macro system
61+
• Code as data philosophy
62+
• Extensible language constructs
6363
{% end %}
6464

6565
{% 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>
66+
• Live code evaluation
67+
• Rapid prototyping
68+
• Interactive development
6969
{% end %}
7070

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>
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.5v-15A2.5 2.5 0 0 1 6.5 2H20v20H6.5a2.5 2.5 0 0 1 0-5H20"></path><polyline points="10 2 10 10 12.5 7.5 15 10 15 2"></polyline></svg>') %}
72+
• Minimal, readable syntax
73+
• Homoiconicity benefits
74+
• Expressive and concise
7575
{% end %}
7676

7777
{% 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>• Plugin support</li>
79-
<li>• Package management</li>
80-
<li>• Testing frameworks</li>
78+
• Plugin support
79+
• Package management
80+
• Testing frameworks
8181
{% end %}
8282

8383
{% end %}
@@ -92,29 +92,40 @@ Phel started as an [experiment in writing functional PHP](/blog/functional-progr
9292
<div class="why-card">
9393
<div class="why-card-icon">
9494
<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>
95+
<path d="M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5"></path>
96+
<path d="M9 18h6"></path>
97+
<path d="M10 22h4"></path>
9798
</svg>
9899
</div>
99100
<div class="why-card-text">A Lisp-inspired functional language</div>
100101
</div>
101102
<div class="why-card">
102103
<div class="why-card-icon">
103104
<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>
105+
<path d="M12 20a8 8 0 1 0 0-16 8 8 0 0 0 0 16Z"></path>
106+
<path d="M12 14a2 2 0 1 0 0-4 2 2 0 0 0 0 4Z"></path>
107+
<path d="M12 2v2"></path>
108+
<path d="M12 22v-2"></path>
109+
<path d="m17 20.66-1-1.73"></path>
110+
<path d="M11 10.27 7 3.34"></path>
111+
<path d="m20.66 17-1.73-1"></path>
112+
<path d="m3.34 7 1.73 1"></path>
113+
<path d="M14 12h8"></path>
114+
<path d="M2 12h2"></path>
115+
<path d="m20.66 7-1.73 1"></path>
116+
<path d="m3.34 17 1.73-1"></path>
117+
<path d="m17 3.34-1 1.73"></path>
118+
<path d="m11 13.73-4 6.93"></path>
106119
</svg>
107120
</div>
108121
<div class="why-card-text">That runs on affordable PHP hosting</div>
109122
</div>
110123
<div class="why-card">
111124
<div class="why-card-icon">
112125
<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>
126+
<path d="M18 16l4-4-4-4"></path>
127+
<path d="M6 8l-4 4 4 4"></path>
128+
<path d="M14.5 4l-5 16"></path>
118129
</svg>
119130
</div>
120131
<div class="why-card-text">That's expressive, debug-friendly, and easy to pick up</div>

content/documentation/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ require __DIR__ . '/../vendor/autoload.php';
8383
php -S localhost:8000 ./src/index.php
8484
```
8585

86-
> 📘 [More on running code](/documentation/cli-commands#run-a-script)
86+
> <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" style="width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 4px;"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> [More on running code](/documentation/cli-commands#run-a-script)
8787
8888
## REPL
8989

@@ -98,15 +98,15 @@ Try:
9898
(println "Hello" name)
9999
```
100100

101-
> 📘 [More on REPL](/documentation/repl)
101+
> <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" style="width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 4px;"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> [More on REPL](/documentation/repl)
102102
103103
## Testing
104104

105105
```bash
106106
vendor/bin/phel test --filter foo
107107
```
108108

109-
> 📘 [More on testing](/documentation/testing)
109+
> <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" style="width: 16px; height: 16px; display: inline-block; vertical-align: middle; margin-right: 4px;"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg> [More on testing](/documentation/testing)
110110
111111
## Editor Support
112112

css/components/code-block.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
.copy-code-button {
1818
position: absolute;
19-
top: 0;
19+
top: -0.5rem;
2020
right: 0.75rem;
2121
width: 36px;
2222
height: 36px;

css/components/dark-mode.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,12 @@
358358

359359
.dark .two-column-layout__sidebar::-webkit-scrollbar-thumb {
360360
background: var(--color-dark-border);
361+
background-clip: padding-box;
362+
}
363+
364+
.dark .two-column-layout__sidebar::-webkit-scrollbar-thumb:hover {
365+
background: var(--color-gray-base);
366+
background-clip: padding-box;
361367
}
362368

363369
/* Dark TOC */

css/components/layout.css

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,20 +154,23 @@
154154

155155
/* Custom scrollbar for sidebar */
156156
.two-column-layout__sidebar::-webkit-scrollbar {
157-
width: 6px;
157+
width: 8px;
158158
}
159159

160160
.two-column-layout__sidebar::-webkit-scrollbar-track {
161161
background: transparent;
162+
margin: 8px 0;
162163
}
163164

164165
.two-column-layout__sidebar::-webkit-scrollbar-thumb {
165166
background: var(--color-light-border);
166167
border-radius: var(--radius-full);
168+
background-clip: padding-box;
167169
}
168170

169171
.two-column-layout__sidebar::-webkit-scrollbar-thumb:hover {
170172
background: var(--color-gray-base);
173+
background-clip: padding-box;
171174
}
172175
}
173176

templates/shortcodes/feature_card.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<h3 class="feature-title">{{ title }}</h3>
66
<p class="feature-description">{{ description }}</p>
77
<ul class="feature-items">
8-
{{ body | safe }}
8+
{% set lines = body | trim | split(pat="\n") %}
9+
{% for line in lines %}
10+
{% if line | trim %}
11+
<li>{{ line | trim }}</li>
12+
{% endif %}
13+
{% endfor %}
914
</ul>
1015
</div>
11-

0 commit comments

Comments
 (0)