1
0
mirror of https://github.com/php/web-php.git synced 2026-03-23 23:02:13 +01:00

17 Commits

Author SHA1 Message Date
Marcos Marcolin
401acdad5c Add linkedin page to homepage (#1255)
Fix #1178

Co-authored-by: Sergey Panteleev <sergey@php.net>
2025-04-10 17:55:36 +03:00
Roman Pronskiy
c6525ac6e1 Add mastodon link on mainpage (#837) 2023-11-23 23:26:32 +03:00
Javier Eguiluz
f71b6c7396 Add woff2 fonts and other font related tweaks (#752)
The following changes are made in this commit:

**(1)** Add the WOFF2 variant of web fonts. [WOFF2 standard](https://w3c.github.io/woff/woff2/) reduces the file sizes significantly. This is important to make our website more accessible to folks with limited Internet connections.

96% of browsers support WOFF2 ([source](https://caniuse.com/?search=woff2)) and we still have WOFF and TTF/OTF/EOT formats for those edge-cases which don't support it.

Real examples of the file size reductions for php.net:

```
Fira Sans Regular: 183 KB (woff) -> 129 KB (woff2) --> 30% reduction in size
Fira Mono Regular:  87 KB (woff) ->  65 KB (woff2) --> 35% reduction in size
```

**(2)** Use `font-display: swap` for web fonts (see [MDN Docs for font-display](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/font-display))

This is recommended to not block the rendering the page for a long time if the web font is not available. Again, this is important for folks with suboptimal network connections.

The `swap` value is also the default option in popular font services like [Google Fonts](https://fonts.google.com/).

**(3)** Update the list of alternative font families.

I updated the sans-serif and mono font stack used in the design. The new stacks are much longer (not a problem in practice thanks to CSS variables) but they cover all common browsing devices (including smartphones). I crafted the list from the recommended font stacks of the most popular CSS frameworks and the most popular websites for developers.
2023-07-19 12:01:23 +01:00
hakre
177ef1af49 Improve local font-names (#478) 2021-12-09 10:10:37 +03:00
Hans Krentel (hakre)
2ceaff53a6 Improve fonts support
Closes #461
Closes #462
2021-11-26 10:16:16 +03:00
Peter Kokot
dd8d8bf863 Sync final and leading newlines
This patch adds some missing newlines, trims some multiple redundant
final newlines into a single one, and trims few redundant leading
newlines.

According to POSIX, a line is a sequence of zero or more non-'<newline>'
characters plus a terminating '<newline>' character. [1] Files should
normally have at least one final newline character.

C89 [2] and later standards [3] mention a final newline:
"A source file that is not empty shall end in a new-line character,
which shall not be immediately preceded by a backslash character."

Although it is not mandatory for all files to have a final newline
fixed, a more consistent and homogeneous approach brings less of commit
differences issues and a better development experience in certain text
editors and IDEs.

[1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206
[2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2
[3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
2018-10-17 12:37:26 +02:00
Peter Kokot
e235f79473 Trim trailing whitespace
This patch cleans all redundant trailing whitespace across the
repository except for the icalendar files.
2018-10-17 10:51:08 +02:00
Adam Harvey
f0fd64bc4e Update to Fira 4.106.
I'm hoping this might fix bug #71370, but we'll see, I guess. We should update
regardless.
2016-01-14 16:16:20 -08:00
Levi Morrison
18e415e4c5 Correct font weight usage.
Remove Fira Sans SemiBold from fira.css, since after these corrections
it is no longer in use. This is one less thing to download, and saves
80KB over the wire.
2014-11-13 14:00:08 -07:00
Levi Morrison
50f249ac45 Update Fira fonts to version 3.111
Also remove the Extra* and Ultra* variants as they are unused, and
unlikely to ever be used.
2014-11-13 13:31:49 -07:00
Levi Morrison
3cc2a48a92 Trim Fira fonts that were unused.
This trims out 5.0KB uncompressed and about 0.5KB when compressed.
If the removed font (700 weight) is actually used somewhere then the
savings are larger, but quality will suffer. The 600 weight font should
be used instead if anyone finds a 700 weight Fira Sans.
2014-11-13 13:03:53 -07:00
Adam Harvey
5335474af5 Add Twitter icon to the home page, linking to @official_php.
I've deliberately implemented this in such a way as to allow for further social
media buttons down the track if we want. I've also kept it intentionally
unobtrusive: it's there (previously, we only mentioned the Twitter account on
the mailing lists page, which was weird), but pretty subtle in the sidebar.

There's one additional dependency: a one glyph subset of Font Awesome (created
using Fontello) containing the Twitter icon. (Should we later want to include
other icons from Font Awesome, fonts/Font-Awesome/config.json can be fed back
into Fontello as a starting point.) The additional style sheet and font file
are cached correctly, and once loaded by the user, shouldn't need to be loaded
again, as with Fira Sans. On a cold page load, this adds two requests and just
under 3 kB to the page load.

I consider all of this reasonable, both technically and in terms of promoting
@official_php a little more, but I won't be terribly offended if someone wants
to revert this.
2014-07-02 15:19:25 -07:00
Levi Morrison
dbe081b807 Fixed local version name for Fira. 2014-05-27 14:39:17 -06:00
Levi Morrison
3af7e5c8cf Added missing woff files. 2014-05-27 13:23:48 -06:00
Levi Morrison
78286b7a10 Font URLs are now relative to root; cached.php was breaking the relative URLs. 2014-05-27 13:19:35 -06:00
Levi Morrison
b374d5b6f4 Comment out some font weights we definitely aren't using to not kill mobile 2014-05-27 12:09:24 -06:00
Levi Morrison
45ec556b07 Converted from Source Sans Pro/Source Code Pro to Fira Sans/Fira Mono. 2014-05-27 12:01:40 -06:00