kisphp/calendar-bundle
Composer 安装命令:
composer require kisphp/calendar-bundle
包简介
Kisphp calendar bundle
README 文档
README
Installation
composer require kisphp/calendar-bundle
Usage
<?php
use Kisphp\CalendarBundle\Translations\LangRo;
use Kisphp\CalendarBundle\Services\Calendar;
$translation = new LangRo();
$calendar = new Calendar($translation);
$calendar->generateData($year, $month, date('d'));
// get generated days as array
$calendar->getDays();
Add css to your page (Symfony)
<link href="bundles/calendar/css/calendar.css" rel="stylesheet" />
Extend calendar
Here is an example on how to make the callendar responsive. All you have to do is to extend the scss file:
$column_width: 100%/7;
$column_height: 35px;
$font-size: 16px;
$active_background: #369;
$active_color: #fff;
$col_border_width: 0;
@import "vendor/kisphp/calendar-bundle/gulp/assets/scss/calendar.scss";
.kisphp-calendar {
.col {
&:hover {
background: #ccc;
.out {
color: #fff;
}
}
.active {
a {
color: #fff;
}
}
.day {
a {
font-weight: bold;
&:hover {
color: #a30000;
}
}
}
}
}
统计信息
- 总下载量: 28
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-07-22