Skip to content

Commit

Permalink
Package bootstrap asset
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisDN committed Jan 18, 2025
1 parent 1582074 commit d5a5144
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 5 deletions.
1 change: 1 addition & 0 deletions assets/bootstrap.css
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import 'bootstrap/dist/css/bootstrap.css';
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"prettier": "prettier --write \"assets/**/*.(js|css)\""
},
"dependencies": {
"bootstrap": "^3.4.1",
"jquery": "^3.5.1"
},
"devDependencies": {
Expand Down
16 changes: 16 additions & 0 deletions src/assets/BootstrapAsset.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

declare(strict_types=1);

namespace app\assets;

use yii\web\AssetBundle;

final class BootstrapAsset extends AssetBundle
{
public $baseUrl = '/build';

public $css = [
'bootstrap.css',
];
}
4 changes: 3 additions & 1 deletion src/modules/landing/views/default/git-composer.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?php declare(strict_types=1);

use app\assets\BootstrapAsset;
use yii\helpers\Url;
use yii\web\View;

/**
* @var View $this
*/
BootstrapAsset::register($this);

$this->title = 'Git и Composer для начинающих';
?>

<?php $this->beginBlock('meta'); ?>
<meta name="robots" content="index, nofollow">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,700&amp;subset=latin,cyrillic-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:400italic,700italic,400,700&amp;subset=latin,cyrillic-ext,cyrillic" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>

<?php $this->beginBlock('styles'); ?>
Expand Down
4 changes: 3 additions & 1 deletion src/modules/landing/views/default/laravel-board.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?php declare(strict_types=1);

use app\assets\BootstrapAsset;
use yii\helpers\Url;
use yii\web\View;

/**
* @var View $this
*/
BootstrapAsset::register($this);

$this->title = 'Мастер-класс по разработке доски объявлений на Laravel Framework';
?>

<?php $this->beginBlock('meta'); ?>
<meta name="robots" content="index, nofollow">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700&amp;subset=latin,cyrillic-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&amp;subset=latin,cyrillic-ext,cyrillic" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>

<?php $this->beginBlock('styles'); ?>
Expand Down
4 changes: 3 additions & 1 deletion src/modules/landing/views/default/oop-week.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?php declare(strict_types=1);

use app\assets\BootstrapAsset;
use yii\helpers\Url;
use yii\web\View;

/**
* @var View $this
*/
BootstrapAsset::register($this);

$this->title = 'Неделя ООП – Онлайн-интенсив по объектно-ориентированному программированию';
?>

<?php $this->beginBlock('meta'); ?>
<meta name="robots" content="index, nofollow">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700&amp;subset=latin,cyrillic-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&amp;subset=latin,cyrillic-ext,cyrillic" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>

<?php $this->beginBlock('styles'); ?>
Expand Down
4 changes: 3 additions & 1 deletion src/modules/landing/views/default/project-manager.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?php declare(strict_types=1);

use app\assets\BootstrapAsset;
use yii\helpers\Url;
use yii\web\View;

/**
* @var View $this
*/
BootstrapAsset::register($this);

$this->title = 'Мастер-класс по разработке менеджера проектов';
?>

<?php $this->beginBlock('meta'); ?>
<meta name="robots" content="index, nofollow">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700&amp;subset=latin,cyrillic-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&amp;subset=latin,cyrillic-ext,cyrillic" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>

<?php $this->beginBlock('styles'); ?>
Expand Down
4 changes: 3 additions & 1 deletion src/modules/landing/views/default/yii2-shop.php
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
<?php declare(strict_types=1);

use app\assets\BootstrapAsset;
use yii\helpers\Url;
use yii\web\View;

/**
* @var View $this
*/
BootstrapAsset::register($this);

$this->title = 'Мастер-класс по разработке интернет-магазина на Yii2 Framework';
?>

<?php $this->beginBlock('meta'); ?>
<meta name="robots" content="index, nofollow">
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,300,700&amp;subset=latin,cyrillic-ext" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Roboto+Condensed:300italic,400italic,700italic,400,300,700&amp;subset=latin,cyrillic-ext,cyrillic" rel="stylesheet">
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<?php $this->endBlock(); ?>

<?php $this->beginBlock('styles'); ?>
Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ module.exports = {
highlight: './assets/highlight.css',
jquery: './assets/jquery.js',
countdown: './assets/countdown.js',
bootstrap: './assets/bootstrap.css',
},
output: {
path: path.join(__dirname, '/public/build'),
Expand Down
5 changes: 5 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1361,6 +1361,11 @@ boolbase@^1.0.0:
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
integrity sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==

bootstrap@^3.4.1:
version "3.4.1"
resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-3.4.1.tgz#c3a347d419e289ad11f4033e3c4132b87c081d72"
integrity sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==

brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
Expand Down

0 comments on commit d5a5144

Please sign in to comment.