regionhalland / region-halland-plugin-get-popular-services
前端插件,从我们的电子服务门户返回最受欢迎的服务
v1.1.0
2021-03-04 13:55 UTC
This package is not auto-updated.
Last update: 2024-09-27 08:51:08 UTC
README
如何使用Region Hallands插件"RhGetPopularServices"
以下是使用插件"RhGetPopularServices"的说明。
应用范围
此插件返回一个包含电子服务的数组
许可证模型
此插件使用许可证模型GPL-3.0。您可以通过附带文件了解更多关于此许可证模型的信息
LICENSE (https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhNavigation?path=%2FLICENSE&version=GBmaster)
安装和激活
A) Hämta pluginen via Git eller läs in det med Composer
B) Installera Region Hallands plugin i Wordpress plugin folder
C) Aktivera pluginet inifrån Wordpress admin
通过Git获取插件
git clone https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhGetPopularServices
通过composer导入插件
以下部分需要添加到您的composer文件中
Repositories = 存储插件的位置,在此例中为github
"repositories": [
{
"type": "vcs",
"url": "https://regionhalland.visualstudio.com/public.RhWpPlugIns/_git/RhGetPopularServices"
},
],
Require = 指定您要使用的插件版本,在此例中为1.0.0
注意!请调整以获取最新版本。
"require": {
"regionhalland/region-halland-plugin-get-popular-services": "1.0.0"
},
参数
get_region_halland_popular_services($numberOfServices = 6)
通过插件获取数据
@if(function_exists('get_region_halland_popular_services'))
@php($services = get_region_halland_popular_services())
<section class="rh-section rh-section--lg bg-secondary text-secondary-contrast">
<div class="container mx-auto">
<div class="flex justify-between mb-4">
<h1 class="m-0">Populära e-tjänster</h1>
<a role="button" tabindex="0" href="https://etjanster.regionhalland.se/" class="rh-button rh-button--secondary rh-button--contrast rh-button--outlined">
<div class="rh-iconLabel">
<span class="rh-icon rh-icon--link"></span><span class="ml-2 rh-label">Visa alla e-tjänster</span>
</div>
</a>
</div>
<nav aria-label="Populära e-tjänster" class="flex flex-wrap -mx-4">
@foreach ($services as $service)
<div class="{{ App\gridGenerator(count($services), 3)}}">
@include('partials.navigation.link-block-item', array(
'title' => $service["Name"],
'text' => strip_tags(html_entity_decode($service["ShortDescription"])),
'className' => 'rh-linkBlockItem--white rh-linkBlockItem__Border--transparent text-secondary-contrast bg-secondary-900',
'linkURI' => $service["URL"],
'icon' => 'rh-icon--white rh-icon--file',
'iconLabelStyle' => 'text-white ml-2',
'iconLabelClassNames' => 'rh-iconLabel--top',
'headlineLevel' => 'h2',
))
</div>
@endforeach
</nav>
</div>
</section>
@endif
版本历史
1.1.0
- 功能:能够运行将数据保存到磁盘的cron作业
- 功能:从磁盘获取数据
1.0.0
- 第一个版本