定制 primecorecz/ui 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

primecorecz/ui

Composer 安装命令:

composer require primecorecz/ui

包简介

View components for microsites

README 文档

README

composer require primecorecz/ui

Install Tailwind

https://tailwindcss.com/docs/guides/laravel

Install Tailwind plugins

npm install -D tailwindcss \
    @tailwindcss/vite \
    @tailwindcss/forms \
    @tailwindcss/typography

Update postcss.config.js

export default {
    plugins: {
        '@tailwindcss/postcss': {},
    },
};

Update vite.config.js

import { defineConfig } from 'vite';
import tailwindcss from '@tailwindcss/vite';
import laravel from 'laravel-vite-plugin';

export default defineConfig({
    plugins: [
        tailwindcss(),
        laravel({
            input: ['resources/css/app.css', 'resources/js/app.js'],
            refresh: true,
        }),
    ],
});

Update ./resources/css/app.css

@import url('../../vendor/primecorecz/ui/resources/css/app.css');

@theme {
    --color-accented: var(--color-lime-500);
}

Example usage

Base layout component

<x-primecore::layout
    :$metaTitle
    :$metaDescription
    :$metaKeywords
>

    <x-primecore::header
        slogan="Set slogan here ..."
        class="pb-16 from-blue-500 to-blue-800"
    />

    {{-- OR --}}

    <x-primecore::header class="pb-16 from-blue-500 to-blue-800">
        <x-primecore::header.ribbon/>
        <x-primecore::header.container>
            <x-primecore::header.hero
                name="WebsiteName"
                suffix=".cz"
                slogan="Set slogan here ..."
            />
        </x-primecore::header.container>
    </x-primecore::header>

    <x-primecore::container class="-mt-16">

        <x-primecore::section.calc>
            {{ $slot }}
        </x-primecore::section.calc>

        <x-primecore::section class="mt-8">
            Lorem ipsum ...
        </x-primecore::section>

    </x-primecore::container>

</x-primecore::layout>

Tabs

@props ([
    'active',
])

<x-primecore::tabs>

    <x-primecore::tabs.item href="..." @class($active == 'position'
        ? 'bg-white text-gray-700'
        : 'bg-orange-400 hover:bg-orange-200 text-orange-700 hover:text-gray-600'
    )>
        Lorem
    </x-primecore::tabs.item>

    <x-primecore::tabs.item href="..." @class($active == 'area'
        ? 'bg-white text-gray-700'
        : 'bg-orange-400 hover:bg-orange-200 text-orange-700 hover:text-gray-600'
    )>
        Ipsum
    </x-primecore::tabs.item>

</x-primecore::tabs>

Calc

<x-primecore::calc>

    <x-slot:input>

        <x-primecore::calc.input>

            <x-primecore::calc.input.tile>
                <x-primecore::calc.input.tile.label>...</x-primecore::calc.input.tile.label>
                <div>...</div>
            </x-primecore::calc.input.tile>

            <x-primecore::calc.input.tile.inline>
                <x-primecore::calc.input.tile.label>...</x-primecore::calc.input.tile.label>
                <input type="checkbox" ...>
            </x-primecore::calc.input.tile.inline>

        </x-primecore::calc.input>

    </x-slot:input>

    <x-slot:result>

        <x-primecore::calc.result
            title="Výpočet "
            disclaimer="Jedná se o orientační výpočet. Provozovatel neručí za jeho správnost."
            credits="Kalkulačku vám přináší"
        >
            <x-primecore::calc.result.table>
                <tr>
                    <td>...</td>
                    <td>...</td>
                </tr>
                ...
            </x-primecore::calc.result.table>
        </x-primecore::calc.result>

    </x-slot:result>

</x-primecore::calc>

Lists

<x-primecore::list.container>

    <x-primecore::list.select>
        <option disabled="disabled" value="">Vyberte profesi</option>
        @foreach ($positions as $position)
            <option value="{{ "pozice/{$position->slug}" }}">{{ $position->title }}</option>
        @endforeach
    </x-primecore::list.select>

    <x-primecore::stripes/>

    @foreach ($positionGroups as $groupTitle => $positions)
        <x-primecore::list.group>

            <x-primecore::list.group.title>
                {{ $groupTitle }}
            </x-primecore::list.group.title>

            <x-primecore::list.items>
                @foreach ($positions as $position)
                    <li>...</li>
                @endforeach
            </x-primecore::list.items>

        </x-primecore::list.group>
    @endforeach

</x-primecore::list.container>

Personalka Job Offers

<x-primecore::jobs>
    <x-primecore::jobs.header
        :$title
    />
    <x-primecore::jobs.offers
        :$jobs
        class="text-orange-800"
    />
    <x-primecore::jobs.footer
        :$title
        :$personalkaUrl
        class="text-orange-800 border-orange-200 bg-orange-100 hover:bg-orange-50 focus:outline-none focus:bg-orange-50"
    />
</x-primecore::jobs>

About page template

<x-primecore::page.about>
    <h1>...</h1>
    <p class="lead">
        ...
    </p>

    <x-slot:microsites>
        <x-primecore::microsite title="DůchodovýVěk.cz" url="https://duchodovyvek.cz">
            <x-slot:icon class="from-teal-600 to-teal-500">DV</x-slot>
            Vše, co potřebujete znát o vašem odchodu do důchodu
        </x-primecore::microsite>
        ...
    </x-slot:microsites>
</x-primecore::page.about>

primecorecz/ui 适用场景与选型建议

primecorecz/ui 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 215 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 09 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 primecorecz/ui 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 primecorecz/ui 我们能提供哪些服务?
定制开发 / 二次开发

基于 primecorecz/ui 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 215
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 2
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-19