Skip to content

Commit 541ee33

Browse files
committed
Use CSS Grid, plus some other minor amends
Fixes #170
1 parent 7efdf3f commit 541ee33

15 files changed

+30
-55
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
[![Greenkeeper badge](https://badges.greenkeeper.io/textpattern/textpattern-com-website.svg)](https://greenkeeper.io/)
44
[![Build Status](https://img.shields.io/travis/textpattern/textpattern-com-website.svg)](https://travis-ci.org/textpattern/textpattern-com-website)
55

6-
Official 2017+ website of the [Textpattern](https://textpattern.com/) project. **Requires Textpattern 4.7dev.**
6+
Official 2017+ website of the [Textpattern](https://textpattern.com/) project. **Requires Textpattern 4.7.2 or later.**
77

88
## Supported web browsers
99

1010
* Internet Explorer 11.
1111
* Chrome, Edge, Firefox, Safari and Opera the last two recent stable releases.
12+
* Firefox ESR latest major point release.
1213

1314
Older versions of the above and other browsers may work, but these are the ones we verify.
1415

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "textpattern-com",
33
"description": "Official website of the Textpattern project.",
4-
"version": "1.3.0",
4+
"version": "1.4.0",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/textpattern/textpattern-com-website"

public/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/.htaccess
22
/assets/*/
3+
/component.php
34
/css.php
45
/design-patterns.html
56
/files

src/assets/sass/modules/_grid.scss

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,21 @@
33
========================================================================== */
44

55
/**
6-
* Flexbox container.
7-
*
8-
* TODO: remove this when we drop IE11 and browser CSS Grid support is widespread.
6+
* Grid container.
97
*/
108

119
.layout-container {
12-
display: flex;
13-
flex-wrap: wrap;
14-
justify-content: space-between;
15-
margin: 0 -1em;
16-
17-
> * {
18-
min-width: 0;
19-
padding: 0 1em;
20-
box-sizing: border-box;
21-
}
10+
display: grid;
11+
grid-template-columns: repeat(12, 1fr);
12+
grid-gap: 2em;
2213
}
2314

24-
/**
25-
* Grid container.
26-
*
27-
* TODO: use this when we drop IE11 and browser CSS Grid support is widespread.
28-
*/
29-
30-
//.layout-container {
31-
// display: grid;
32-
// grid-template-columns: repeat(12, 1fr);
33-
// grid-gap: 2em;
34-
//}
35-
3615
/**
3716
* Generate sizes all for grid column cells.
3817
*
3918
* Because this is mobile first, cells are all initially a 1 column span
4019
* (full width, 12 cell span). We will then adjust them at various breakpoints.
4120
*
42-
* TODO: remove `width` and use `grid-column` for `.layout-x` when we move to CSS Grid.
43-
*
4421
* Example HTML:
4522
*
4623
* <div class="layout-1col"></div>
@@ -59,6 +36,5 @@
5936
.layout-4col,
6037
.layout-4col-2span,
6138
.layout-4col-3span {
62-
//grid-column: span 12;
63-
width: 100%;
39+
grid-column: span 12;
6440
}

src/assets/sass/modules/_responsive.scss

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44

55
@media screen and (min-width: $breakpoint-1) {
66

7+
/**
8+
* Screen size-specific elements.
9+
*/
10+
711
.screen-small {
812
display: none;
913
}
@@ -17,8 +21,7 @@
1721
*/
1822

1923
.layout-4col:not(.sidebar) {
20-
//grid-column: span 6;
21-
width: 50%;
24+
grid-column: span 6;
2225
}
2326

2427
/**
@@ -155,18 +158,15 @@
155158
*/
156159

157160
.layout-2col {
158-
//grid-column: span 6;
159-
width: 50%;
161+
grid-column: span 6;
160162
}
161163

162164
.layout-3col {
163-
//grid-column: span 4;
164-
width: 33.333%;
165+
grid-column: span 4;
165166
}
166167

167168
.layout-3col-2span {
168-
//grid-column: span 8;
169-
width: 66.666%;
169+
grid-column: span 8;
170170
}
171171

172172
/**
@@ -372,18 +372,15 @@
372372

373373
.layout-4col,
374374
.layout-4col:not(.sidebar) {
375-
//grid-column: span 3;
376-
width: 25%;
375+
grid-column: span 3;
377376
}
378377

379378
.layout-4col-2span {
380-
//grid-column: span 6;
381-
width: 50%;
379+
grid-column: span 6;
382380
}
383381

384382
.layout-4col-3span {
385-
//grid-column: span 9;
386-
width: 73%;
383+
grid-column: span 9;
387384
}
388385

389386
/**

src/mockups/blog-article.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ <h4 class="accessibility">Host details</h4>
443443
<!-- Footer -->
444444
<footer class="site-footer">
445445
<p class="legal">
446-
Copyright 2004–2017 The Textpattern Development Team.
446+
Copyright 2004–2018 The Textpattern Development Team.
447447
<a href="contact.html">Contact us</a>.
448448
<a href="https://textpattern.com/privacy">Privacy</a>.
449449
<a href="https://textpattern.com/humans.txt">Colophon</a>.

src/mockups/blog-landing.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ <h4 class="accessibility">Host details</h4>
424424
<!-- Footer -->
425425
<footer class="site-footer">
426426
<p class="legal">
427-
Copyright 2004–2017 The Textpattern Development Team.
427+
Copyright 2004–2018 The Textpattern Development Team.
428428
<a href="contact.html">Contact us</a>.
429429
<a href="https://textpattern.com/privacy">Privacy</a>.
430430
<a href="https://textpattern.com/humans.txt">Colophon</a>.

src/mockups/contact.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ <h4 class="accessibility">Host details</h4>
261261
<!-- Footer -->
262262
<footer class="site-footer">
263263
<p class="legal">
264-
Copyright 2004–2017 The Textpattern Development Team.
264+
Copyright 2004–2018 The Textpattern Development Team.
265265
<a href="contact.html">Contact us</a>.
266266
<a href="https://textpattern.com/privacy">Privacy</a>.
267267
<a href="https://textpattern.com/humans.txt">Colophon</a>.

src/mockups/documentation-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ <h4 class="accessibility">Host details</h4>
383383
<!-- Footer -->
384384
<footer class="site-footer">
385385
<p class="legal">
386-
Copyright 2004–2017 The Textpattern Development Team.
386+
Copyright 2004–2018 The Textpattern Development Team.
387387
<a href="contact.html">Contact us</a>.
388388
<a href="https://textpattern.com/privacy">Privacy</a>.
389389
<a href="https://textpattern.com/humans.txt">Colophon</a>.

src/mockups/error.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ <h4 class="accessibility">Host details</h4>
136136
<!-- Footer -->
137137
<footer class="site-footer">
138138
<p class="legal">
139-
Copyright 2004–2017 The Textpattern Development Team.
139+
Copyright 2004–2018 The Textpattern Development Team.
140140
<a href="contact.html">Contact us</a>.
141141
<a href="https://textpattern.com/privacy">Privacy</a>.
142142
<a href="https://textpattern.com/humans.txt">Colophon</a>.

0 commit comments

Comments
 (0)