Skip to content

Commit 24e7afc

Browse files
authored
Remove Yii Bulma, logo file + simplify HTML and CSS (#227)
1 parent fc80837 commit 24e7afc

8 files changed

Lines changed: 206 additions & 157 deletions

File tree

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
"yiisoft/router": "^1.0",
4949
"yiisoft/router-fastroute": "^1.0",
5050
"yiisoft/view": "^4.0",
51-
"yiisoft/yii-bulma": "@dev",
5251
"yiisoft/yii-console": "^1.0",
5352
"yiisoft/yii-debug": "^3.0@dev",
5453
"yiisoft/yii-event": "^1.0",

public/images/yii-logo.jpg

-3.11 KB
Binary file not shown.

resources/assets/css/site.css

Lines changed: 68 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,85 @@
1-
.hero-footer {
2-
padding: 1rem 1.5rem 1rem !important;
1+
html, body {
2+
margin: 0;
3+
padding: 0;
4+
}
5+
html {
6+
height: 100%;
7+
}
8+
body {
9+
display: flex;
10+
flex-direction: column;
11+
height: 100%;
12+
font: 16px/24px "Trebuchet MS", Helvetica, sans-serif;
13+
background: #f8f8f8;
14+
color: #4b4b4b;
315
}
416

5-
.hero-footer a {
6-
color: #fff;
17+
.header {
18+
margin: 12px 12px;
19+
padding: 12px;
20+
border-radius: 12px;
21+
background: #fff;
22+
color: #888;
23+
box-shadow: 0 0 24px #f4f4f4;
24+
text-align: center;
25+
}
26+
.header svg {
27+
height: 48px;
728
}
829

9-
a:hover, a:active {
10-
text-decoration: underline;
11-
color: #72dcff;
30+
.content {
31+
flex-grow: 1;
32+
display: flex;
33+
align-items: center;
34+
}
35+
.content_i {
36+
flex-grow: 1;
37+
padding: 24px 5%;
38+
}
39+
.content a {
40+
color: #00617b;
41+
}
42+
.content a:hover {
43+
color: #1191b3;
44+
}
45+
46+
.footer {
47+
border-top: 1px solid #e6e8ec;
48+
margin: 24px 24px 0;
49+
padding: 24px;
50+
text-align: center;
1251
}
1352

14-
.hero.is-light a.navbar-item.is-active {
15-
background-color: transparent !important;
53+
.footer_copyright a {
54+
color: #838b99;
55+
text-decoration: none;
56+
}
57+
58+
.footer_copyright a:hover {
59+
color: #0b7794;
60+
text-decoration: underline;
1661
}
1762

18-
.navbar-item.is-active {
19-
color: #3273dc !important;
63+
.footer_icons {
64+
padding-top: 16px;
65+
display: flex;
66+
justify-content: center;
2067
}
2168

22-
.input::-moz-placeholder, .textarea::-moz-placeholder, .select select::-moz-placeholder {
23-
color: hsl(0, 0%, 40%);
69+
.footer_icons a {
70+
margin: 0 12px;
71+
text-decoration: none;
2472
}
2573

26-
.input::-webkit-input-placeholder, .textarea::-webkit-input-placeholder, .select select::-webkit-input-placeholder {
27-
color: hsl(0, 0%, 40%);
74+
.footer_icons svg {
75+
height: 32px;
76+
fill: #838b99;
2877
}
2978

30-
.input:-moz-placeholder, .textarea:-moz-placeholder, .select select:-moz-placeholder {
31-
color: hsl(0, 0%, 40%);
79+
.footer_icons a:hover svg {
80+
fill: #0b7794;
3281
}
3382

34-
.input:-ms-input-placeholder, .textarea:-ms-input-placeholder, .select select:-ms-input-placeholder {
35-
color: hsl(0, 0%, 40%);
83+
.text-center {
84+
text-align: center;
3685
}

resources/views/layout/main.php

Lines changed: 98 additions & 81 deletions
Large diffs are not rendered by default.

resources/views/site/404.php

Lines changed: 30 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,38 @@
11
<?php
22

3+
declare(strict_types=1);
4+
35
use Yiisoft\Html\Html;
46

5-
/** @var Yiisoft\View\WebView $this */
6-
/** @var Yiisoft\Router\UrlGeneratorInterface $urlGenerator */
7-
/** @var Yiisoft\Router\CurrentRoute $currentRoute */
7+
/**
8+
* @var Yiisoft\View\WebView $this
9+
* @var App\ApplicationParameters $applicationParameters
10+
* @var Yiisoft\Router\UrlGeneratorInterface $urlGenerator
11+
* @var Yiisoft\Router\CurrentRoute $currentRoute
12+
*/
813

914
$this->setTitle('404');
1015
?>
1116

12-
<h1 class="is-size-1">
13-
<b>404</b>
14-
</h1>
15-
16-
<p class="has-text-danger">
17-
The page
18-
<strong><?= Html::encode($currentRoute->getUri()->getPath()) ?></strong>
19-
not found.
20-
</p>
21-
22-
<p class="has-text-grey">
23-
The above error occurred while the Web server was processing your request.<br/>
24-
Please contact us if you think this is a server error. Thank you.
25-
</p>
26-
27-
<hr class="mb-2">
28-
29-
<a class ="button is-danger mt-5" href="<?= $urlGenerator->generate('home') ?>">
30-
Go Back Home
31-
</a>
17+
<div class="text-center">
18+
<h1>
19+
404
20+
</h1>
21+
22+
<p>
23+
The page
24+
<strong><?= Html::encode($currentRoute->getUri()->getPath()) ?></strong>
25+
not found.
26+
</p>
27+
28+
<p>
29+
The above error occurred while the Web server was processing your request.<br/>
30+
Please contact us if you think this is a server error. Thank you.
31+
</p>
32+
33+
<p>
34+
<a href="<?= $urlGenerator->generate('home') ?>">
35+
Go Back Home
36+
</a>
37+
</p>
38+
</div>

resources/views/site/index.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,14 @@
1010
$this->setTitle($applicationParameters->getName());
1111
?>
1212

13-
<h1 class="title">Hello!</h1>
13+
<div class="text-center">
14+
<h1>Hello!</h1>
1415

15-
<p class="subtitle">Let's start something great with <strong>Yii3</strong>!</p>
16+
<p>Let's start something great with <strong>Yii3</strong>!</p>
1617

17-
<p class="subtitle is-italic">
18-
<a href="https://github.com/yiisoft/docs/tree/master/guide/en" target="_blank" rel="noopener">
19-
Don't forget to check the guide.
20-
</a>
21-
</p>
18+
<p>
19+
<a href="https://github.com/yiisoft/docs/tree/master/guide/en" target="_blank" rel="noopener">
20+
<i>Don't forget to check the guide.</i>
21+
</a>
22+
</p>
23+
</div>

src/Asset/AppAsset.php

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,8 @@
55
namespace App\Asset;
66

77
use Yiisoft\Assets\AssetBundle;
8-
use Yiisoft\Yii\Bulma\Asset\BulmaAsset;
9-
use Yiisoft\Yii\Bulma\Asset\BulmaHelpersAsset;
10-
use Yiisoft\Yii\Bulma\Asset\BulmaJsAsset;
118

12-
class AppAsset extends AssetBundle
9+
final class AppAsset extends AssetBundle
1310
{
1411
public ?string $basePath = '@assets';
1512
public ?string $baseUrl = '@assetsUrl';
@@ -18,10 +15,4 @@ class AppAsset extends AssetBundle
1815
public array $css = [
1916
'site.css',
2017
];
21-
22-
public array $depends = [
23-
BulmaAsset::class,
24-
BulmaHelpersAsset::class,
25-
BulmaJsAsset::class,
26-
];
2718
}

src/Asset/CdnFontAwesomeAsset.php

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)