Skip to content

Commit

Permalink
Improve documentation layout
Browse files Browse the repository at this point in the history
  • Loading branch information
nyamsprod committed Dec 11, 2024
1 parent b939cf4 commit daf134b
Show file tree
Hide file tree
Showing 13 changed files with 39 additions and 95 deletions.
6 changes: 3 additions & 3 deletions docs/2.0/field-values.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,9 @@ Item::true(): self;
Item::false(): self;
```

On error, those named constructor will throw an exception, if you do not want an exception
and prefer a softer approache where the named constructor would instead return `null`, you
can prepend the named constructor with the `try` prefix.
On error, the listed named constructors will throw an exception, if you do not want an exception
and prefer a softer approach where the named constructor would instead return `null`, you
can prepend the listed named constructor with the `try` prefix.

```php
Item::fromDecimal('42'); // will throw because the value is a string;
Expand Down
6 changes: 5 additions & 1 deletion docs/_layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ site.data.project.description }}">
<meta name="docsearch:version" content="{{ version }}">
<link rel="icon" href="{{ site.baseurl }}/assets/img/httpsf-logo.svg" type="image/svg+xml">
<title>{{ page.title }} - {{ site.data.project.title }}</title>
<link rel="apple-touch-icon-precomposed" href="//theme.thephpleague.com/img/apple-touch-icon-precomposed.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
Expand All @@ -25,6 +25,7 @@
<header class="flex items-center sm:justify-center pl-6 pr-6 pb-6 max-w-7xl mx-auto pb-32">
<div class="flex gap-6 md:gap-0 md:flex-row justify-between md:items-center p-3 md:p-6 w-full max-w-7xl">
<a class="flex items-center gap-2 sm:gap-3" href="{{ site.baseurl }}/">
<img src="{{ site.baseurl }}/assets/img/httpsf-logo.svg" alt="Logo" class="w-[40px] sm:w-[50px] h-[40px] sm:h-[50px]"/>
<div class="font-black">HTTP Structured Fields</div>
</a>
</div>
Expand Down Expand Up @@ -82,6 +83,9 @@ <h3 class="font-semibold tracking-tight text-slate-900">Older versions</h3>
<article class="content">
{{ content }}
</article>
<div class="flex justify-center items-center">
<img src="{{ site.baseurl }}/assets/img/httpsf.svg" alt="Logo" class="w-[240px] sm:w-[250px] h-[80px] sm:h-[82px]"/>
</div>
</div>
</main>
<footer class="p-6 max-w-7xl mx-auto pb-32">
Expand Down
10 changes: 8 additions & 2 deletions docs/_layouts/homepage.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="{{ site.data.project.description }}">
<meta name="docsearch:version" content="4.0">
<link rel="icon" href="{{ site.baseurl }}/assets/img/httpsf-logo.svg" type="image/svg+xml">
<title>{{ site.data.project.tagline }} - {{ site.data.project.title }}</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
Expand All @@ -15,7 +15,10 @@
<div class="relative z-10">
<header class="flex items-center sm:justify-center">
<div class="flex gap-6 md:gap-0 md:flex-row justify-between md:items-center p-3 md:p-6 w-full max-w-7xl">
<div class="flex items-center gap-2 sm:gap-3"></div>
<div class="flex items-center gap-2 sm:gap-3">
<img src="{{ site.baseurl }}/assets/img/httpsf-logo.svg" alt="Logo" class="w-[40px] sm:w-[50px] h-[40px] sm:h-[50px]"/>
<div class="font-black text-2xl">HTTP Structured Fields</div>
</div>
<div class="flex items-center gap-0 md:gap-0">
<a href="{{ site.data.project.repository_url }}" class="px-2 py-2 sm:px-6 sm:py-3 font-black text-md text-black-50 hover:text-csv-dark hover:underlines whitespace-nowrap">SOURCE CODE</a>
<a href="{{ site.baseurl }}/{{ site.data.project.release_major }}/" class="px-2 py-2 sm:px-6 sm:py-3 text-md text-white bg-csv-base hover:bg-csv-dark transition-all whitespace-nowrap rounded">Documentation</a>
Expand Down Expand Up @@ -48,6 +51,9 @@ <h2 class="font-medium text-3xl text-light">Work with HTTP Structured Fields in
<div class="flex flex-col gap-3 my-16 content">
{{ content }}
</div>
<div class="flex justify-center items-center">
<img src="{{ site.baseurl }}/assets/img/httpsf.svg" alt="Logo" class="w-[240px] sm:w-[250px] h-[80px] sm:h-[82px]"/>
</div>
</div>
</main>

Expand Down
6 changes: 5 additions & 1 deletion docs/_layouts/redirect.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="docsearch:version" content="4.0">
<meta name="description" content="{{ site.data.project.description }}">
<link rel="icon" href="{{ site.baseurl }}/assets/img/httpsf-logo.svg" type="image/svg+xml">
<title>{{ page.title }} - {{ site.data.project.title }}</title>
<meta http-equiv="refresh" content="0; url={{ page.redirect.to }}">
<title>{{ site.data.project.tagline }} - {{ site.data.project.title }}</title>
<link rel="stylesheet"href="{{ site.baseurl }}{{ site.data.manifest['docs.css'] }}">
Expand Down Expand Up @@ -34,6 +35,9 @@ <h1>Redirecting…</h1>
<article class="content">
{{ content }}
</article>
<div class="flex justify-center items-center">
<img src="{{ site.baseurl }}/assets/img/httpsf.svg" alt="Logo" class="w-[240px] sm:w-[250px] h-[80px] sm:h-[82px]"/>
</div>
</div>
</main>
<footer class="p-6 max-w-7xl mx-auto pb-32">
Expand Down
22 changes: 0 additions & 22 deletions docs/assets/img/csv-logo-big.svg

This file was deleted.

4 changes: 0 additions & 4 deletions docs/assets/img/csv-logo.svg

This file was deleted.

10 changes: 0 additions & 10 deletions docs/assets/img/github-logo.svg

This file was deleted.

9 changes: 9 additions & 0 deletions docs/assets/img/httpsf-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions docs/assets/img/httpsf.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit daf134b

Please sign in to comment.