介绍Introducing

Gradient-Palette-iPhone-preview

Gradient-Palette-iPad-preview

介绍一下Gradient Palette,这是一款专为网页设计师和开发人员打造的终极工具!您是否已经厌倦了为网站背景创建自己的配色方案?那么Gradient Palette将成为您的最佳选择。它是一个免费的集合,包含180个令人惊叹的渐变,可用作网站的任何部分的内容背景。使用这些渐变色调非常简单,只需轻松复制粘贴即可。我们还为每个渐变提供了PNG版本,方便您使用。告别繁琐的自制渐变,拥抱Gradient Palette带来的轻松美丽!

Introducing Gradient Palette, the ultimate tool for web designers and developers! Are you tired of creating your own color schemes for your website backgrounds? Look no further than Gradient Palette, a free collection of 180 stunning gradients that can be used as content backdrops on any part of your website. With easy copy used colors. We’ve also provided a PNG version of each gradient for added convenience. Say goodbye to the hassle of creating your own gradients and hello to the ease and beauty of Gradient Palette!

App Store下载
Download on the App Store

有任何疑问或者建议,可以通过 Email 联系。

If you have any questions or suggestions, you can contact them through Email.

隐私政策

本隐私政策描述了我们如何收集,使用和披露与服务有关的个人信息,您通过访问服务即表示同意。“个人信息”是指有关可识别个人的信息,但不包括商业信息。

收集哪些信息

本应用希望使您与我们的体验令人满意且安全。我们的数据收集政策使您可以选择向我们提供多少个人信息,并控制我们如何使用这些信息。我们的目标是为您提供满意的体验,同时让您控制自己的隐私。本应用收集和使用信息主要是为了使您使用我们的服务更轻松,更有意义。如果您选择向我们注册,则可能会在不同时间要求您提供信息,我们将竭尽所能使本应用满足您的服务并只为您提供所需的内容。

收集的信息与用途

为识别您的设备 ID 并预防恶意程序、提高服务安全性、保障运营质量及效率,我们使用的第三方平台包括Firebase 会收集您的设备信息(包括IMEI、MEID、IMSI、GUID、MAC地址)、您安装的应用信息或运行中的进程信息。

匿名信息是指无法与特定个人联系在一起的信息,我们不知道您的姓名,住处或出生日期。匿名信息可能以多种方式收集,包括通过使用 Cookie,网络信标或从您使用的设备中收集。

第三方分析工具

我们的服务可能包含来自我们服务提供商的第三方跟踪以及数据收集和分析工具,例如 Google Analytics(分析)和 Google Firebase 。此类第三方可以在我们的服务中使用 Cookie,API 和 SDK,以使他们能够代表我们收集和分析与用户和设备相关的数据和信息。第三方可能会访问并收集有关您的数据和信息,例如您的设备标识符(包括IMEI、MEID、IMSI、GUID、MAC地址及其他相关信息),语言环境(使用特定语言的特定位置),地理位置信息,IP 地址,应用程序使用情况,访问权限和会话时间,传感器数据,设备上存在的或在设备上特定时间使用的应用程序以及您对广告的观看和互动,以提供其服务,包括例如启用,提供和投放广告在下面有更详细的说明。

我们的服务提供商的隐私政策可能包括有关其数据收集和使用惯例以及跟踪技术的其他条款和披露,我们鼓励您检查这些隐私政策以了解有关其数据收集和使用惯例以及 Cookie 的使用的更多信息以及其他类似的跟踪技术。

为识别您的设备 ID 并预防恶意程序、提高服务安全性、保障运营质量及效率,我们使用的第三方平台将获取设备序列号。

第三方广告合作伙伴

我们与各种广告商,广告网络,广告服务器和分析公司合作。这些广告商,广告网络,广告服务器和分析公司使用各种技术以及第三方公司的技术来收集数据,以便向您和其他用户发送(或投放)相关广告。这些技术可能包括放置Cookie或网络信标,使用唯一或非唯一的非个人标识符,或在我们的服务上使用其他技术,并且这些技术可用于跟踪用户行为,跟踪我们如何服务正在使用中,有可能为您提供更多相关的广告。这些目标广告可能会出现在我们的服务或您访问的其他服务上。本隐私政策不涵盖广告商,广告网络,广告服务器和分析公司对各种技术的使用。这些公司还可能从您从其他公司使用的服务中获取信息,这些服务包括但不限于其他网站,移动网站,可移动下载的应用程序和可下载的桌面应用程序,并将这些信息与他们通过我们的服务通过这些第三方技术获取的信息结合在一起。您应该意识到,我们无法控制这些第三方技术或其中包含的信息。

更新

本应用可以随时修改本隐私政策。请经常检查是否有任何更改。继续使用服务,即表示您接受本隐私政策的所有更新。此版本于 2023 年 03 月 17 日更新。

联系我们

我们希望此声明能为您提供丰富而清晰的信息。如果您有任何疑问或进一步的信息,请给我们发送电子邮件。

App 与服务反馈: 531sunlight@gmail.com

Privacy Policy

This privacy policy describes how we collect, use, and disclose personal information related to the service you agree to by accessing the service. “Personal information” means information about identifiable individuals, but does not include business information.

What information we collect

We aim to make your experience with our application satisfactory and secure. Our data collection policy allows you to choose how much personal information to provide us with and control how we use that information. Our goal is to provide you with a satisfactory experience while giving you control over your privacy. Our application primarily collects and uses information to make it easier and more meaningful for you to use our service. If you choose to register with us, we may ask for information at various times, and we will do our best to make the application meet your needs and provide you with only the necessary content.

Information Collected and its Purpose

To identify your device ID and prevent malicious programs, improve service security, guarantee operational quality and efficiency, we use third-party platforms, including Firebase, to collect your device information (including IMEI, MEID, IMSI, GUID, MAC address), information on the applications you have installed or running processes.

“Anonymous information” refers to information that cannot be associated with specific individuals, and we do not know your name, address, or date of birth. Anonymous information may be collected in various ways, including through the use of cookies, web beacons, or collected from the device you use.

Third-Party Analytics Tools

Our service may contain third-party tracking and data collection and analysis tools from our service providers, such as Google Analytics (analytics) and Google Firebase. Such third parties may use cookies, APIs, and SDKs in our service to collect and analyze data and information related to users and devices on our behalf. Third parties may access and collect data and information about you, such as your device identifier (including IMEI, MEID, IMSI, GUID, MAC address, and other relevant information), language environment (specific locations using specific languages), geographical location information, IP address, application usage, access permissions and session time, sensor data, applications that exist on the device or have been used at specific times on the device, and your viewing and interaction with advertisements to provide their services, including enabling, providing, and serving ads. There is more detailed information on this below.

The privacy policies of our service providers may include other terms and disclosures regarding their data collection and use practices, as well as other similar tracking technologies such as cookies. We encourage you to review these privacy policies for more information about their data collection and use practices and the use of cookies and similar tracking technologies.

To identify your device ID and prevent malicious programs, improve service security, guarantee operational quality and efficiency, the third-party platforms we use will obtain the device serial number.

Google
Privacy Policy: https://policies.google.com/privacy

Third-Party Advertising Partners

We work with various advertisers, ad networks, ad servers, and analytics companies. These advertisers, ad networks, ad servers, and analytics companies use various technologies as well as technologies from third-party companies to collect data to send (or serve) relevant ads to you and other users. These technologies may include placing cookies or web beacons, using unique or non-unique non-personal identifiers, or using other technologies on our service, and these technologies may be used to track user behavior, track how our service is being used, and potentially provide you with more relevant ads. These targeted ads may appear on our service or other services you visit. This privacy policy does not cover the use of various technologies by advertisers, ad networks, ad servers, and analytics companies. These companies may also obtain information from the services you use from other companies, including but not limited to other websites, mobile websites, downloadable applications, and downloadable desktop applications, and combine this information with the information they obtain through these third-party technologies via our service. You should be aware that we have no control over these third-party technologies or the information contained therein.

Updates

This application may modify this Privacy Policy at any time. Please check for any changes frequently. Your continued use of the service indicates your acceptance of all updates to this Privacy Policy. This version was updated on March 17th, 2023.

Contact Us

We hope this statement provides you with rich and clear information. If you have any questions or further information, please email us.

App and Service Feedback:

介绍Introducing

VoiceAI-Chat-iPhone-preview

VoiceAI-Chat-mac-preview

VoiceAI Chat是一个简单且用户友好的AI聊天应用程序,支持文本和语音输入,能够识别口语并将其转录为文本。此外,该应用程序可以大声朗读AI生成的响应。在先进的OpenAI技术的支持下,用户可以在获得API密钥后轻松与应用程序聊天。
此外,开源代码使应用程序透明且值得信赖。

VoiceAI Chat is a simple and user-friendly AI chat application that supports both text and voice input, with the ability to recognize and transcribe spoken language into text. In addition, the app can read out AI-generated responses aloud. Powered by advanced OpenAI technology, users can easily chat with the app after obtaining an API key.

Moreover, the open-source code makes the application transparent and trustworthy.

App Store下载
Download on the App Store

有任何疑问或者建议,可以通过 Email 联系。

If you have any questions or suggestions, you can contact them through Email.

隐私政策Privacy policy

本App不进行任何隐私信息收集或上传。

This App does not collect or upload any private information.

介绍Introducing

SecretDiary-iPhone-preview

SecretDiary-iPad-preview

SecretDiary-mac-preview

秘密日记是一款专门为用户提供安全保护的日记应用。这款应用能够帮助用户记录日常生活中的点点滴滴,同时还能够保护用户的隐私。

使用秘密日记,您可以设置密码,而非指纹或面容,确保只有您可以访问您的日记。此外,秘密日记还提供多种精美的字体可供选择,帮助您将日记记录得更加精美和个性化。

秘密日记的界面简洁明了,易于使用。您可以根据内容对已有的日记进行搜索,方便您快速查找想要的内容。

总的来说,秘密日记是一款简单好用、功能强大的日记应用,它能够帮助您更好地记录生活中的点滴,并保护您的隐私。如果您正在寻找一款安全、易用的日记应用,秘密日记绝对是您的最佳选择。

The Secret Diary is a diary application designed specifically to provide users with secure protection. This application helps users record their daily lives and protects their privacy at the same time.

With the Secret Diary, you can set a password, rather than relying on fingerprints or facial recognition, to ensure that only you can access your diary. In addition, the Secret Diary offers a variety of beautiful fonts for you to choose from, helping you make your diary entries more beautiful and personalized.

The interface of the Secret Diary is clear and easy to use. You can search for existing diary entries based on content, making it easy for you to quickly find what you’re looking for.

Overall, the Secret Diary is a simple and powerful diary application that helps you better record the moments of your life while protecting your privacy. If you’re looking for a safe and user-friendly diary application, the Secret Diary is definitely your best choice.

App Store下载
Download on the App Store

有任何疑问或者建议,可以通过 Email 联系。

If you have any questions or suggestions, you can contact them through Email.

隐私政策Privacy policy

本App不进行任何隐私信息收集或上传。

This App does not collect or upload any private information.

English Help

测试Wi-Fi和以太网有多快和可靠?

Speedtest、Netflix的FASTDSLReports这样的在线测试会告诉你你的互联网连接总体上有多快,但你的服务提供商的速度不是唯一因素。Wi-Fi本身会大大影响速度、延迟和可靠性。而随着宽带互联网连接速度越来越快,Wi-Fi通常已经成为瓶颈。iPerfman帮助你测试你的Wi-Fi连接速度和波动。

性能测试是如何进行的?

你需要一台电脑来运行它,用网线连接到你的家庭网络的路由器上。最好是运行软路由器,这样路由器传输数据,最接近真实互联网模式。

第一步

你需要在macOS安装iPerfman,打开监听,找到局域网IP地址,如192.168.8.8,设为服务端,点击开始。

iPerfman-listen-macOS-zh_CN

iPerfman-server-macOS-zh_CN

第二步

你需要在iPhone或者iPad上运行iPerfman,地址填写第一步设置的局域网IP地址,如192.168.8.8,设为客户端,点击开始。

iPerfman-client-iOS-zh_CN

很快测试完成,我们就得到测试结果了。这里我们可以分别测试下载和上传两个模式。这里只是简单例子。你可以测试任意两台设备,不管局域网还是万维网,IPv4还是IPv6。

关于在macOS上安装iPerf 3需要熟悉命令行和安装Homebrew

在Linux和Windows上,请参考iperf.fr网站。

分析测试结果

主要分析平均速度和波动图。

可以从以下方面优化网速:路由器位置、WiFi连接5G或6G、避免隔墙,有条件网线连接每个房间。

更多参数

你可以在用户界面中调整一些设置,以下是它们的含义。

协议

不同应用场景和应用会使用不同网络协议,TCP和UDP是最常见两者,所以有必要分别测试。 UDP可以设置不同速率,以达到限速测试。

流数量

在测试期间应使用多少个平行的数据流,以测试数据并发传输的情况。

结束条件

有两种方式:时长字节数,只可选其一。

时长

单位是秒,选择你想运行测试的时间,30秒是获得稳定数据的好时间,但可以随意设置得更高,在家里或办公室周围走走,看看带宽如何变化。

字节数

选择你想运行测试的数据量大小为制定的字节数。

测试可以在任何时候停止,所以可以随意设置一个较高的持续时间,在你满意的时候停止。

报告间隔

定期吞吐量报告之间的秒数

连接超时

单位是秒,控制连接设置超时。

保持运行

当作为服务端时,每次其它客户端测试完成后,服务端保持运行。关闭此选项,单次测试结束是,服务端也停止运行。

该应用程序目前使用的是iPerf 3.9代码,使用不同版本的服务器也能正常工作。

仍需帮助?

应用使用有任何问题或建议,欢迎邮件联系:531sunlight@gmail.com。最好附带应用截图和相关环境情况。

中文帮助

Test how fast and reliable is Wi-Fi and Ethernet?

Online tests like Speedtest、Netflix‘s FAST and DSLReports will tell you how fast your Internet connection is overall, but the speed of your service provider isn’t the only factor. Wi-Fi itself can greatly affect speed, latency, and reliability. And as broadband Internet connections get faster and faster, Wi-Fi has often become a bottleneck. iPerfman helps you test the speed and volatility of your Wi-Fi connection. iPerfman helps you test your Wi-Fi connection in isolation from your Internet connection.

How to test?

You need a computer to run it on that is connected to your home network’s router with a network cable. It is best to run a soft router so that the router transmits data that is closest to the real Internet mode.

Step 1

You need to install iPerfman in macOS, open the listen, find the LAN IP address, such as 192.168.8.8, set it as the server, and click start button.
iPerfman-listen-macOS-en

iPerfman-server-macOS-en

Step 2

You need to run iPerfman on your iPhone or iPad, address fill in the LAN IP address set in the first step, such as 192.168.8.8, set as client, click start button.

iPerfman-client-iOS-en

Soon the test is finished and we get the test results. Here we can test both download and upload modes separately. Here is basic example, you can test any two devices, regardless of LAN or World Wide Web, IPv4 or IPv6.

Installing iPerf 3 on macOS, here is a guide on the website iperf.fr.
On Linux or Windows, installing an iPerf 3 server requires familiarity with the command-line and installing Homebrew.

Analyze test results

Mainly analyze the average speed and speeds chart.

Internet speed can be optimized in the following ways: router location, WiFi connection 5G or 6G, avoiding partition walls, and use network cable connection to each room.

More parameters

You can adjust some settings in the user interface, here’s what they mean.

Protocol

Different applications and scenarios will use different network protocols, TCP and UDP are the most common two, so it is necessary to test them separately. UDP can be set at different Rate to achieve the speed limit test.

Streams

How many parallel streams should be used during the test to test the concurrent data transmission.

End Condition

There are two ways to choose: Duration and Number of bytes . You choose only one of them.

Duration

in seconds, choose how long you want to run the test. 30 seconds is a good time to get stable data, but feel free to set it higher and walk around your home or office to see how the bandwidth changes.

Number of bytes

Select the size of the amount of data you want to run the test.

The test can be stopped at any time, so feel free to set a higher duration and stop when you are satisfied.

Reporting interval:

seconds between periodic throughput reports.

Connection timeout:

timeout for control connection setup in seconds.

Keep running

When acting as the server side, the server side keep running after each other client test is finished. If you close this option, after single test, server side will stop running.

The application is currently using iPerf 3.9 code and works fine with a different version of the server.

Still need help?

If you have any questions or suggestions about using the application, please feel free to contact us by email: 531sunlight@gmail.com. It is best to attach screenshots of the application and relevant environment conditions.

一句话使用SF Symbols复制一份,导出为Symbol,导入Xcode Asset即可。

SF Symbols复制一份

Duplicate as Custom Symbol

导出为Symbol

Export Symbol

导入Xcode Asset

这里显示Symbol Image,同样支持symbol样式调整。

Import Xcode Asset

SwiftUI 示例代码

SwiftUI Code

预览:成功🎉

SwiftUI Code

介绍

Relationship-iPhone-preview

Relationship-iPad-preview

逢年过节遇到三姑六婆,拒绝叫不出口的尴尬!轻松搞定亲戚关系~

亲属是基于婚姻、血缘和法律拟制而形成的社会关系。亲属关系包括夫妻、父母、子女、兄弟姊妹、祖父母和外祖父母、孙子女和外孙子女、儿媳和公婆、女婿和岳父母、以及其他三代以内的旁系血亲,如伯、叔、姑、舅、姨、侄子女、甥子女、堂兄弟姊妹、表兄弟姊妹、姨兄弟姊妹等。

​ 亲属称谓指是以本人为中心确定亲族成员和本人关系的名称,是基于血亲姻亲基础上的亲属之间相互称呼的名称、叫法。汉族的家族亲属关系条理分明尊卑有序:比自己长一辈的称呼有姨姑舅叔伯,同辈的有兄弟姊妹、堂表亲等等,下一辈有甥侄等等。中国人由于姻亲而产生的亲戚关系相当庞杂,“祖宗十八代”、“五服”、“六亲”、“九族”让人难以区分,其派生出的各种称谓也是中华文化的一大特征。

​ 如今由于工作生活节奏差异,很多关系稍疏远的亲戚之间来往并不多,年龄差异长幼辈分模糊。春节拜年走亲戚遇到七大姑八大姨,往往会搞不清楚哪位亲戚应该喊什么称呼,很是尴尬。不仅小孩搞不清亲戚关系和亲戚称谓,就连年轻一代的大人也都常常模糊混乱。

​ “亲戚关系计算器”为你避免了叫错、不会叫亲戚的尴尬,收录了中国亲戚关系称呼大全,只需简单的输入即可完成称呼计算。称呼计算器同时兼容了不同地域的方言叫法,你可以称呼父亲为:“老爸”、“爹地”、“老爷子”等等。让您准确的叫出亲戚称谓,理清亲属之间的亲戚关系,轻松掌握中国式的亲戚关系换算,让你更了解中国文化。

支持iOS、iPadOS和macOS。

下载地址:App Store

有任何疑问或者建议,可以通过 Email 联系。

感谢 算法开源

​ 本项目致力于让更多人了解中国传统文化,学习各式各样的中国亲戚称谓。本人深感项目的完善仅凭一己之力是远远不够的,如果你对此感兴趣,欢迎关注本项目 或 提交代码,与我一起完善它,使它被更多人熟知和使用。你也可以通过本项目提供的方法和教程,打造更符合自己使用习惯的亲戚计算器版本。

​ 算法基于「MIT许可协议」开源,除需在源码中保留版权信息和许可声明外,你有权利使用、复制、修改、合并、出版发行、散布、再授权及贩售软件及软件的副本。算法持续更新中,如发现错漏或有想法建议可在此 反馈问题。

隐私政策

本隐私政策描述了我们如何收集,使用和披露与服务有关的个人信息,您通过访问服务即表示同意。“个人信息”是指有关可识别个人的信息,但不包括商业信息。

收集哪些信息

亲戚关系计算器希望使您与我们的体验令人满意且安全。我们的数据收集政策使您可以选择向我们提供多少个人信息,并控制我们如何使用这些信息。我们的目标是为您提供满意的体验,同时让您控制自己的隐私。亲戚关系计算器收集和使用信息主要是为了使您使用我们的服务更轻松,更有意义。如果您选择向我们注册,则可能会在不同时间要求您提供信息,我们将竭尽所能使亲戚关系计算器满足您的服务并只为您提供所需的内容。

收集的信息与用途

为识别您的设备 ID 并预防恶意程序、提高服务安全性、保障运营质量及效率,我们使用的第三方平台包括Firebase 会收集您的设备信息(包括IMEI、MEID、IMSI、GUID、MAC地址)、您安装的应用信息或运行中的进程信息。

匿名信息是指无法与特定个人联系在一起的信息,我们不知道您的姓名,住处或出生日期。匿名信息可能以多种方式收集,包括通过使用 Cookie,网络信标或从您使用的设备中收集。

第三方分析工具

我们的服务可能包含来自我们服务提供商的第三方跟踪以及数据收集和分析工具,例如 Google Analytics(分析)和 Google Firebase 。此类第三方可以在我们的服务中使用 Cookie,API 和 SDK,以使他们能够代表我们收集和分析与用户和设备相关的数据和信息。第三方可能会访问并收集有关您的数据和信息,例如您的设备标识符(包括IMEI、MEID、IMSI、GUID、MAC地址及其他相关信息),语言环境(使用特定语言的特定位置),地理位置信息,IP 地址,应用程序使用情况,访问权限和会话时间,传感器数据,设备上存在的或在设备上特定时间使用的应用程序以及您对广告的观看和互动,以提供其服务,包括例如启用,提供和投放广告在下面有更详细的说明。

我们的服务提供商的隐私政策可能包括有关其数据收集和使用惯例以及跟踪技术的其他条款和披露,我们鼓励您检查这些隐私政策以了解有关其数据收集和使用惯例以及 Cookie 的使用的更多信息以及其他类似的跟踪技术。

为识别您的设备 ID 并预防恶意程序、提高服务安全性、保障运营质量及效率,我们使用的第三方平台将获取设备序列号。

第三方广告合作伙伴

我们与各种广告商,广告网络,广告服务器和分析公司合作。这些广告商,广告网络,广告服务器和分析公司使用各种技术以及第三方公司的技术来收集数据,以便向您和其他用户发送(或投放)相关广告。这些技术可能包括放置Cookie或网络信标,使用唯一或非唯一的非个人标识符,或在我们的服务上使用其他技术,并且这些技术可用于跟踪用户行为,跟踪我们如何服务正在使用中,有可能为您提供更多相关的广告。这些目标广告可能会出现在我们的服务或您访问的其他服务上。本隐私政策不涵盖广告商,广告网络,广告服务器和分析公司对各种技术的使用。这些公司还可能从您从其他公司使用的服务中获取信息,这些服务包括但不限于其他网站,移动网站,可移动下载的应用程序和可下载的桌面应用程序,并将这些信息与他们通过我们的服务通过这些第三方技术获取的信息结合在一起。您应该意识到,我们无法控制这些第三方技术或其中包含的信息。

更新

亲戚关系计算器可以随时修改本隐私政策。请经常检查是否有任何更改。继续使用服务,即表示您接受本隐私政策的所有更新。此版本于 2023 年 02 月 01 日更新。

联系我们

我们希望此声明能为您提供丰富而清晰的信息。如果您有任何疑问或进一步的信息,请给我们发送电子邮件。

App 与服务反馈: 531sunlight@gmail.com

参考大头蔡Cass的教程【黑苹果】全新的定制USB教程「黑苹果」USB定制补充内容,该选择哪种USB定制方式? 感谢🙏。

Windows下步骤

运行USBToolBox

下载地址:https://github.com/USBToolBox/toolhttps://github.com/USBToolBox/kext

USBToolBox-main

D:插拔USB2和USB3等设备

USBToolBox-Port-Discovery

S:生成UTBMap.kext

修改UTBMap.kext

如果超过15个需要删除多余的,主要这里填写ports的最大值。

UTBMap

生成UTBMap.kext和下载USBToolBox.kext导入EFI,启动macOS

macOS下步骤

Hackintool生成USBPorts.kext

对应HS设置USB2,SS设置USB,导出USBPorts.kext

特别需要主要的是Name中数字后缀,不是portHackintool

USBPorts.kext导入EFI

使用OCAuxiliaryTools,生成的USBPorts.kext导入EFI,并关闭UTBMap.kextUSBToolBox.kext,重启验证。

OCAuxiliaryTools

tvOS上.frame只能修改label,而非button。通过自定义PrimitiveButtonStyle,可以自由修改button。tvOS还需要手动处理@FocusState

下面例子就是写一个固定大小的按钮样式,这样就不会因为文字或者图片大小而产生差异。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import SwiftUI

struct FixedSizeButtonStyle: PrimitiveButtonStyle {
@FocusState private var isFocused: Bool
var size: CGSize
var cornerRadius: CGFloat
func makeBody(configuration: Configuration) -> some View {
configuration.label
.frame(width: size.width, height: size.height)
.foregroundColor(.accentColor)
.background(
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.stroke()
.foregroundStyle(.linearGradient(colors: [.white.opacity(0.5), .clear, .white.opacity(0.5), .clear], startPoint: .topLeading, endPoint: .bottomTrailing))
)
.background(
RoundedRectangle(cornerRadius: cornerRadius, style: .continuous)
.fill((isFocused ? Color.white : Color.gray).opacity(0.5).gradient)
)
.scaleEffect(isFocused ? 1.2 : 1)
.animation(.easeOut(duration: 0.2), value: isFocused)
.focusable()
.focused($isFocused)
.onTapGesture {
configuration.trigger()
}
}
}

extension Button {
func fixedSizeButtonStyle(size: CGSize = CGSize(width: 122, height: 80), cornerRadius: CGFloat = 20) -> some View {
buttonStyle(FixedSizeButtonStyle(size: size, cornerRadius: cornerRadius))
.frame(width: size.width, height: size.height)
}
}

效果图:

iPerfman-tv-screenshot

添加 source/_data/head.njk

1
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lxgw-wenkai-webfont@1.6.0/style.css" />

修改 _config.next.yml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
custom_file_path:
head: source/_data/head.njk

font:
enable: true

# Uri of fonts host, e.g. https://fonts.googleapis.com (Default).
host: https://fonts.googleapis.com

# Font options:
# `external: true` will load this font family from `host` above.
# `family: Times New Roman`. Without any quotes.
# `size: x.x`. Use `em` as unit. Default: 1 (16px)

# Global font settings used for all elements inside <body>.
global:
external: false
family: "LXGW WenKai"
size:

# Font settings for site title (.site-title).
title:
external: true
family:
size:

# Font settings for headlines (<h1> to <h6>).
headings:
external: true
family:
size:

# Font settings for posts (.post-body).
posts:
external: true
family:

# Font settings for <code> and code blocks.
codes:
external: false
family: "LXGW WenKai Mono, Source Code Pro"

完成✅

0%