Skip to content

Commit 03a4ea1

Browse files
committed
Re-work lots of stuff
1 parent c3a31dd commit 03a4ea1

File tree

3 files changed

+58
-30
lines changed

3 files changed

+58
-30
lines changed

source/css/style.css

Lines changed: 31 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,10 @@
1-
body {
2-
font-size: 18px;
1+
.text p, .text ul, .text ol {
2+
font-size: 1.4em;
3+
line-height: 1.6em;
34
}
45

5-
p {
6-
line-height: 1.4;
7-
margin: 0 0 1em;
8-
}
9-
10-
code {
11-
font-size: 17px;
12-
}
13-
14-
li {
15-
margin: 0 0 5px;
6+
.text li, {
7+
margin-top: 10px;
168
}
179

1810
.jumbotron {
@@ -110,7 +102,7 @@ ul.avatars li a {
110102
.frameworks-logo-list {
111103
list-style: none;
112104
text-align: center;
113-
margin: 0;
105+
margin: 1.5em 0;
114106
}
115107

116108
.frameworks-logo-list > li {
@@ -121,3 +113,28 @@ ul.avatars li a {
121113
.frameworks-logo-list img {
122114
max-height: 60px;
123115
}
116+
117+
ol.conventions {
118+
margin: 1.5em 0;
119+
}
120+
121+
ol.conventions .no {
122+
background: #000000;
123+
color: #ffffff;
124+
border-radius: 999px;
125+
padding: 5px;
126+
width: 1em;
127+
text-align: center;
128+
margin: 0 auto 10px auto;
129+
}
130+
131+
@media (max-width: 767px) {
132+
ol.conventions li {
133+
padding-top: 0.2em;
134+
}
135+
ol.conventions .no {
136+
float: left;
137+
margin-right: 0.5em;
138+
margin-top: -0.2em;
139+
}
140+
}

source/img/kernel.png

28.7 KB
Loading

source/index.html

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,37 @@ <h1>Stack</h1>
2020

2121
<hr>
2222

23-
<div class="why">
24-
<h2>Why?</h2>
23+
<div class="about text">
24+
<h2>A common layer</h2>
2525
<p>
26-
Right now there is no easy way to re-use HTTP-specific code in PHP. Accessing superglobals and emitting headers and data as side effects is messy and unpredictable. While frameworks are becoming more decoupled, they still have their own implementation of anything that touches HTTP.
26+
What do we want? Re-use at the web layer!
2727
</p>
2828
<p>
29-
We want to fix this.
29+
Superglobals and side-effecting output mechanisms of PHP make this challenging and force every framework to re-invent.
3030
</p>
3131
<p>
32-
What worked for the Ruby world with <a href="http://rack.github.io/">Rack</a> (similar interfaces exist for Java, Python, Perl and others) can work for PHP with Stack.
32+
But Symfony's HttpKernelInterface provides a solid abstraction, which makes creating and sharing framework-agnostic HTTP filters a breeze!
3333
</p>
3434
</div>
3535

3636
<hr>
3737

38-
<div class="about">
39-
<h2>What is Stack?</h2>
38+
<div class="about text">
39+
<h2>HttpKernel</h2>
40+
<p>
41+
The <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernelInterface.php">HttpKernelInterface</a> models web request and response as PHP objects, giving them value semantics.
42+
</p>
43+
<figure>
44+
<img src="{{ site.url }}/img/kernel.png" alt="HttpKernel">
45+
</figure>
46+
</div>
47+
48+
<hr>
4049

50+
<div class="about text">
51+
<h2>What is Stack?</h2>
4152
<p>
42-
Stack is a convention for composing <a href="https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpKernelInterface.php">HttpKernelInterface</a> middlewares. Any framework based on Symfony2's HttpKernelInterface can use these middlewares. They allow an application to be extended in a generic way, simply by wrapping objects around the kernel.
53+
Stack is a convention for composing HttpKernelInterface middlewares.
4354
</p>
4455

4556
<!--
@@ -74,7 +85,7 @@ <h2>What is Stack?</h2>
7485
<hr>
7586

7687
<div class="frameworks">
77-
<h2>Works already with</h2>
88+
<h2 class="text-center">Supported frameworks</h2>
7889

7990
{% spaceless %}
8091
<ul class="frameworks-logo-list clearfix">
@@ -90,16 +101,16 @@ <h2>Works already with</h2>
90101

91102
<hr>
92103

93-
<div class="middleware">
104+
<div class="middleware text">
94105
<h2>Conventions</h2>
95106
<p>
96-
A stack middleware is just an object that follows these conventions:
107+
A stack middleware is just an object that follows these <strong>conventions</strong>:
97108
</p>
98-
<ul>
99-
<li>Implement the <code>HttpKernelInterface</code></li>
100-
<li>Take the decorated app as the first constructor argument</li>
101-
<li>Decorate the handle call, delegate to the decorated app</li>
102-
</ul>
109+
<ol class="conventions inline clearfix">
110+
<li class="span4 clearfix"><div class="no">1</div> Implement the <strong>HttpKernelInterface</strong></li>
111+
<li class="span4 clearfix"><div class="no">2</div> Take the <strong>decorated app</strong> as the first constructor argument</li>
112+
<li class="span4 clearfix"><div class="no">3</div> Decorate the handle call, <strong>delegate</strong> to the decorated app</li>
113+
</ol>
103114

104115
<p>
105116
Yes, leveraging the HTTP abstraction is that easy!

0 commit comments

Comments
 (0)