投稿時間:2023-07-19 19:25:44 RSSフィード2023-07-19 19:00 分まとめ(37件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] PC作業もしっかりできる新しい座椅子「エノッツ フロアチェア」 その仕掛けをデザイナーに聞いた https://www.itmedia.co.jp/news/articles/2307/19/news175.html enots 2023-07-19 18:26:00
IT ITmedia 総合記事一覧 [ITmedia Mobile] 端末値引きの規制緩和で変わる「廉価スマホ」のラインアップ 一方で“抜け道”も残る? https://www.itmedia.co.jp/mobile/articles/2307/19/news174.html itmediamobile 2023-07-19 18:21:00
python Pythonタグが付けられた新着投稿 - Qiita sinθ^4+cosθ^4 最大値と最小値「2017長崎大学前期【1】(4)」をChatGPTとMathematicaとWolframAlphaとsympyでやってみたい。 https://qiita.com/mrrclb48z/items/e38fff5a5c4dddcd8bea chatgpt 2023-07-19 18:00:40
AWS AWSタグが付けられた新着投稿 - Qiita API Gateway を使って S3 へ直接ファイルをアップロードする https://qiita.com/Takayuki_Nakano/items/f7997b5533d5e98b5b6c apigateway 2023-07-19 18:39:12
golang Goタグが付けられた新着投稿 - Qiita Go言語のパッケージとモジュールについて https://qiita.com/Tester777/items/196cde1f9ff235d5f083 関連 2023-07-19 18:05:18
技術ブログ Developers.IO データアプリケーションの活用方法を知るためSnowflake Marketplaceで提供されている23種のNative Appsについて調べてみた https://dev.classmethod.jp/articles/snowflake-23-launch-native-apps/ snowflake 2023-07-19 09:24:50
技術ブログ Hatena::Engineering Hatena Engineer Seminar #26「エンジニアリングマネージャー編」を8月9日にオンライン開催します #hatenatech https://developer.hatenastaff.com/entry/engineer-seminar-26 HatenaEngineerSeminar「エンジニアリングマネージャー編」を月日にオンライン開催しますhatenatech年月日水にHatenaEngineerSeminar「エンジニアリングマネージャー編」を開催します。 2023-07-19 18:30:00
海外TECH MakeUseOf The Best Microsoft Surface Deals: Save Big on Tablets, Laptops, and Accessories https://www.makeuseof.com/best-microsoft-surface-deals/ surface 2023-07-19 09:15:00
海外TECH DEV Community Understanding PHP-FPM: A Comprehensive Guide https://dev.to/arsalanmee/understanding-php-fpm-a-comprehensive-guide-3ng8 Understanding PHP FPM A Comprehensive Guide IntroductionIn the world of web development PHP Hypertext Preprocessor remains one of the most widely used server side scripting languages As websites and web applications grow in complexity and demand developers are constantly seeking ways to optimize PHP s performance and efficiency One such solution that has gained popularity is PHP FPM FastCGI Process Manager a highly efficient alternative PHP FastCGI implementation In this article we will delve into the world of PHP FPM exploring its features benefits and how it can significantly enhance the performance of PHP based applications What is PHP FPM PHP FPM is an alternative PHP FastCGI implementation that was introduced to overcome the limitations of the traditional PHP CGI Common Gateway Interface It works as a process manager managing PHP processes and handling PHP requests separately from the web server By doing so it can efficiently handle multiple PHP requests concurrently leading to a significant reduction in latency and improved overall performance The Advantages of PHP FPM Increased PerformancePHP FPM s primary focus is on improving the performance of PHP based applications By maintaining separate PHP worker processes it can handle a larger number of concurrent requests more efficiently This approach significantly reduces the response time making web applications feel more responsive and enhancing user experience Resource EfficiencyWith PHP FPM resources can be managed more effectively Since it operates as a process manager it can control the number of active PHP processes based on the server s resources and the incoming request load This prevents resource wastage and optimizes the server s performance allowing it to serve more users with fewer resources Stability and IsolationPHP FPM provides a stable and secure environment for running PHP applications If one PHP process encounters an error or becomes unresponsive it won t affect other active processes This isolation ensures that individual requests are isolated and do not impact the overall system stability Customizable Pool ConfigurationDevelopers can fine tune PHP FPM s pool configuration to match the specific needs of their applications Configuration parameters such as the number of child processes the maximum number of requests each child can handle and other settings can be adjusted to achieve optimal performance for different scenarios How PHP FPM WorksPHP FPM operates in tandem with the web server e g Nginx or Apache When a PHP request is received the web server forwards it to the PHP FPM process manager which then handles the request via a pool of child processes These child processes are separate instances of PHP each capable of handling individual requests independently Configuring PHP FPMConfiguring PHP FPM can significantly impact the performance of a web application It is essential to optimize the settings based on the server s hardware and expected traffic Common configuration parameters include pm max childrenThis setting determines the maximum number of child processes allowed to run simultaneously Setting an appropriate value ensures efficient resource utilization without causing memory issues pm max requestsThe pm max requests parameter controls the number of requests each child process can handle before it is recycled Recycling processes regularly can help mitigate memory leaks in long running PHP applications pm process idle timeoutThis setting specifies the duration of time a child process can remain idle before it gets terminated It helps free up resources when they are not actively serving requests PHP FPM and Virtual HostingWhen hosting multiple websites or web applications on a single server virtual hosting is a common practice PHP FPM plays a vital role in virtual hosting environments as it allows different websites to run separate PHP FPM pools ensuring isolation and security between the sites ConclusionPHP FPM is undoubtedly a game changer in the realm of PHP based web development Its ability to manage PHP processes efficiently coupled with its resource optimization stability and customization options makes it a top choice for developers aiming to enhance the performance of their web applications By choosing PHP FPM developers can deliver faster more responsive web experiences to their users FAQs Frequently Asked Questions Is PHP FPM compatible with both Nginx and Apache web servers Yes PHP FPM is compatible with both Nginx and Apache web servers It can be integrated seamlessly with these servers to improve PHP s performance Does PHP FPM work with PHP versions other than PHP Yes PHP FPM is compatible with PHP versions and above However it is recommended to use the latest stable PHP version for better performance and security Can PHP FPM be used with shared hosting environments Yes PHP FPM can be utilized in shared hosting environments where multiple users share the same server resources It allows for improved resource management and enhances the overall performance of PHP applications What is the main difference between PHP FPM and PHP CGI The primary difference lies in the way they handle PHP requests PHP FPM operates as a process manager while PHP CGI executes each PHP request independently This process management approach in PHP FPM provides better performance and resource utilization How can I check if PHP FPM is running on my server To check if PHP FPM is running on your server you can use the command ps aux grep php fpm This will display the running PHP FPM processes if it is installed and running correctly 2023-07-19 09:52:13
海外TECH DEV Community Introducing Fuzzing with Alexandre https://dev.to/crabnebula/introducing-fuzzing-with-alexandre-4aid Introducing Fuzzing with AlexandreWelcome to the first of our Meet the CrabNebula Team series Each installment will feature a new member of the talented CrabNebula team and cover both the person as well as the nature of their work at CrabNebula We sat down with Alexandre Dang a Senior Security Engineer at CrabNebula to find out how he found his way here While his primary role is in developing and setting up security auditing tools specialized for Tauri he s been proactive in familiarizing himself with the security auditing process which plays a crucial role in our Auditing service Meet AlexandreQuestion How did you first find out about the position you now hold here at CrabNebula Alexandre In my previous company I worked a lot with Matthias Kandora and soon after met Daniel Thompson Yvetot The feeling when working with Matthias was really good I talked with Matthias about my situation and he told me that he had this good project for the future and introduced me to CrabNebula At that time CrabNebula wasn t even a thing yet it was still in plans Then I had a talk with Daniel who I had known for a month at the time about Tauri I had been seeing news about Tauri on Reddit and I saw it was gaining a lot of traction so I looked into the project The concept was really nice and after talking to the teams I joined the company Question When you re not working at CrabNebula what s your favorite thing to do and why Alexandre Actually I m a really big fan of a sport called padel It s a racquet sport and you play it as doubles It s a small tennis court with glass walls around so you can have the ball bounce on it So it s really fun and if you have the occasion to try it out I definitely recommend because it s easy to get the hang of it Question You said it s sort of like tennis but you are allowed to bounce on the walls or not Alexandre Yeah that s what s really different the point is never over because even if you let the ball pass by and it still bounces you can still save it Question When you were doing the research into Tauri what was it specifically really attracted you about the project that made you want to be a part of it Alexandre I was fed up with the current standard for apps in terms of them being super heavy and bloated So many applications use that standard so it uses a lot of space in your computer I m also biased because I m super into Rust especially at that time I was still learning about it so the fact that this project could really be useful to me and also integrate Rust was important You have a lot of projects that just use it because it s Rust and it s super hyped but now that was a really good use case for it and I really liked the idea Question How did you first get involved in software development Alexandre I think I went the classical path It s not like the coding geniuses you often hear about I was studying and did engineering school because I was good at science and then that s where there were some programming classes I got the knack of it and really liked it and what s really nice in engineering school is you have clubs and stuff I met people that were passionate about it and they conveyed their passion to me Bit by bit I got more into it and the most important thing about your passion is who you meet I guess Role at CrabNebulaQuestion What have you been working on since you ve started at CrabNebula Alexandre So my background is academic focused and the security team was being created when I joined and we had the idea to provide security audits We are lucky to have very good experienced security engineers We had trial audits to develop the current process I learned how to do a security audit and how to do it the CrabNebula way the whole process like first meeting customers really defining the scope of the project how much of working hours they want to pay for the objectives to be fulfilled Because we are focusing on Tauri applications and it can get really complex we can focus just on the Tauri side but we can also dive into the Rust code or the web code The web code has so many typical potential vulnerabilities that we can spend a lot of time on and the Rust code challenges us with logical flaws You have to be really precise about what the customer wants Question Besides participating in that audit process what else are you doing at CrabNebula Alexandre I m really focusing on research and development of security tools We want to develop tools that can help people at CrabNebula to detect vulnerabilities While I said CrabNebula I think some tools also may be shared back to the whole Tauri community to give back to the community But right now during most of my research I ve been focused on fuzzing Fuzzing What and Why Question What is fuzzing and what function does it serve that it s worth looking into Alexandre The goal of fuzzing is to feed pseudo random inputs to a system and try to find out what are the behaviors of your systems It s like testing but brute forcing with tons of inputs The idea with the fuzzing at CrabNebula and in Tauri applications is to have a framework so people can just take our template of it and build a fuzzer which is specialized for their application and then to have seamless integrations of the tool Question You said fuzzing creates a bunch of pseudo random data what sort of specifics would you use it for in testing for vulnerabilities Alexandre A kind of vulnerability you can have in applications is you can do code injection For example if you have forms on your web application you may have issues with certain types of scripts put into the forms Then in a malicious way you can exploit this and in the worst case make the server execute your script Fuzzing can be really useful for these kind of vulnerabilities It s because you feed so much data into the web application and cause unexpected behavior for example crash the server And the fuzzer it detects that Okay on this input the server has crashed which is really weird So we save this test case for analysis in the future And then me as a developer I just let the fuzzer run for let s say for weeks and then I just see all the different web behaviors it has detected and then I can investigate the interesting cases Question Is fuzzing more common practice now across the programming and software engineering industry or is this sort of a newer tool that s kind of just coming into fashion Alexandre Fuzzing has been existing a long time now but I think also with the fact that we have really strong computers and strong processors it has been used extensively If you go to security conferences or if you read blog posts about big tech companies they really use fuzzing a lot The only downside of fuzzing is it costs processing power and time But for critical software for example browsers like Microsoft Edge Google Chrome Firefox they use a lot of fuzzing to test all the potential behaviors and to try track down any vulnerabilities there could be I know also Google has a really nice initiative it s called Oss Fuzz It s a platform where open source projects can be fuzzed They also have a reward program to encourage open source projects to be fuzzed on their platform Question Because fuzzing is common practice is that one of the reasons you re developing this for the Tauri specific software at CrabNebula Alexandre Yeah it s a classic in security and I felt that Tauri applications have a certain structure so it could be really nice to have a framework that reads that and leverages it to build dedicated fuzzers One of the really good points is that fuzzing is an automatic tool so as a developer you just have to integrate it into your workflow and then it works for you The goal is just to make the integration process as painless as possible Fuzzing From Inception to Execution Automation and Use CasesQuestion Would you mind walking through what s your process of building a fuzzer Alexandre Okay when you re writing a fuzzer the idea is to create a fuzzing component which will be giving a lot of inputs to the program to be fuzzed You want your fuzzer to be built to call the entry points of the program Let s assume several things say we have a Tauri app where I source code access then I can check it Additionally in this particular case we imagine that the attacker has control of the webview because usually in the webview it s the frontend which is more vulnerable and easier to take control of it But in Tauri apps as I said it s more the backend side which has the critical stuff So we operate under the assumption that we have control of the webview and we want the fuzzer to call every entry point of the backend side of the Tauri application For starters I will look at the Tauri project and figure out what kind of Tauri commands the webview can call or what kind of event the webview can trigger in the backend Then I detect all these entry points and I want my fuzzer to go “okay you can call all these functions and try to brute force it feed it max inputs As a security researcher one thing I want to detect is crashing but that is only one part There are also several types of security vulnerabilities you want to look out for For example you want to make sure that some critical function has constant time execution You make sure that whatever input you give to a function they return in a certain amount of time and the time of execution doesn t depend on the input you have fed into it So you need to observe other metrics than just crashes The next step is also part of recon Make sure what the fuzzer can call and then you tell the fuzzer “you can call all these functions and try to detect odd behaviors Providing just random inputs is not really useful because usually the space of potential inputs is too big The step afterwards is to refine your fuzzing The idea is that your initial fuzzing comes from random data it then gets improved into pseudo random data For example you want to give inputs that reach deeper into the code to be sure to go through all the different branches of the code Maybe you have some function that only accepts a certain kind of input for example only accepts emails You have to feed it inputs that are formatted emails or it won t make any sense to fuzz it as it will never process the data aside from structure checks You refine the process so the fuzzing is more precise for what you want to find Then in general you have a step of triaging the feedback given by the fuzzer After the fuzzing you have tons of interesting behaviors that the fuzzing has reported to you Then you can check manually but usually it s a huge task so you also have programs to filter which kind of inputs are similar If you just analyze one of a type then it s usually enough and you don t need to look into the rest So you have a triage of results given from the fuzzer and then afterwards manually checking what kind of odd behavior was triggered and asking is it like a real vulnerability just bugs or a wrong specification of the application Question I see and so for the triaging and the reporting is that something you would build into the whole fuzzer project or a separate project that gets added on as an addition Alexandre For triaging I think it might sound like an option but it s kind of a must have because if you have too many false alarms then the developers won t want to use it because it s too painful to read So the goal is to have it the most convenient as possible so it will be an option which is almost built in in the fuzzer Question Now that you ve built a fuzzer do you need to tailor it for specific use cases How much modification is needed to use it on a wider scale Alexandre With having a manual part the thing that s difficult to automatize is the fuzzer as it needs to be given entry points so in Tauri apps you can be able scan the code and look for Tauri commands and find these functions Another part is that it s also that these functions may require some kind of inputs too So the formatting of inputs is at the point where I think it s really hard to automatize this process and the users will need to say okay on these kinds of functions you want email formatted inputs for example But you could use it randomly but it won t be as accurate so you really wouldn t like take advantage of the power of fuzzing Question You re in the process of developing this with the CrabNebula security team currently right What s the vision for this tool at CrabNebula Alexandre Yeah so right now we have a prototype for one Tauri application but the goal is to try it out on more and more Tauri applications and then understanding okay what parts can be automatized So we have a framework and then make people test it to see okay is it hard to use Do they find it useful What are the pain points And right now we only talked about fuzzing more for the backend which is more critical but into the future we could also think about whether we could also fuzz the webview to really check all the potential behaviors even though there are already a lot of tools to fuzz the webview but it could be future project additions The Future of Security and Adaptation to Emerging TechnologiesQuestion What do you see as the next set of tools being developed Either with fuzzing or any other tools you re considering developing for the security audit team as well Alexandre Fuzzing I think is only one part In the security team there are other projects too There is another one which is a static analyzer for Tauri configurations I think it s very good because in Tauri there is a configuration file where you allow a lot of features and the more precise your allowlist is the more secure your application The only issue is that in the Tauri apps we have investigated usually with the configuration developers tend to just allow everything so they don t have to configure it while creating the application I think the developers don t see the need to dive into the details or just for them it s not a priority in the beginning and maybe they plan to do it later There are a lot of security vulnerabilities coming from this part So this project that analyzes Tauri configuration files and will give recommendations on how the configurations should be or could be improved is what I am especially looking forward to Question And like a fuzzer do you see it also having a built in reporting feature that reports and advises best practices Alexandre Yeah exactly It will be a tool you use and tells you “okay you can improve your Tauri configuration file by adding this line or removing this So it will really be a tool to help the Tauri developers Question Are there any other research topics or anything else you see coming up on the horizon Alexandre These are projects that are ongoing right now and I think there s lots of topics that could be interesting for CrabNebula but their research is postponed because we don t have unlimited resources One area with a lots of things going on is with isolation and unikernels like making sure a critical code is executed in a safe way so that it cannot corrupt your whole environment That could be like things we want to look for For example for Tauri applications since you are downloading code from another source being able to run Tauri applications in a kind of isolated layer or sandbox could improve security There is also research on webviews because in web security it s always evolving so we need to keep with the pace Currently there is a big wave regarding AI and maybe in cybersecurity it s not talked about a lot But there is a lot of tools that are coming up which is use AI to attack programs but also to defend against it So it s not yet at our doors but I think it s worth it to be aware of what s coming Question Is that where there s a lot of talk about quantum computing Is that where this plays into that as well Alexandre Yes we don t dive in because it s more on the cryptographic side and we don t develop our own cryptographic libraries But we have to be up to date on what s the latest algorithm because even though we don t have quantum computers for the masses we already have to prepare for it and make sure that our current communication can t be decrypted later So we have to be sure to know what s going on with the latest quantum resistant algorithms Question Thanks for the interview Alexandre Would you like to share any tech tips or trends you found out about recently Alexandre Sure I m currently trying out Neovim AstroNvim as a code editor This is super cool because it s lightweight and packs all the needed base features to start coding immediately If you re a VIM user and don t want to spend hours customizing your tools I d definitely recommend it Question Thank you For a final thought what s your favorite food Alexandre My favorite food is “pho ga a Vietnamese noodle soup Check it out you won t be disappointed Thank you Alexandre for sharing these insights on fuzzing and the broader scope of security projects at CrabNebula We look forward to future updates on these exciting developments Find out more here Author The CrabNebula Team 2023-07-19 09:44:32
海外TECH DEV Community Unstyled PrimeVue Meets Bulma CSS https://dev.to/cagataycivici/unstyled-primevue-meets-bulma-css-2epn Unstyled PrimeVue Meets Bulma CSSThe new unstyled mode of PrimeVue allows integration with various CSS libraries In this post we ll try to use Bulma utilities to style the PrimeVue components PrimeVue SetupWe ll be using Vite Vue in our sample PrimeVue needs to run in unstyled mode so that the default styles are not added We don t want to override CSS just work with a plain canvas At main js begin with configuring PrimeVue import createApp from vue import PrimeVue from primevue config const app createApp App app use PrimeVue unstyled true Install BulmaBulma can be used with cdn or npm Since we use Vite let s go with npm and import it in our project at main js npm install bulmaimport bulma css bulma css PrimeVue ComponentsTime to add some PrimeVue magic to the mix by adding a couple of components so final main js becomes import createApp from vue import App from App vue import PrimeVue from primevue config import Button from primevue button import InputText from primevue inputtext import Textarea from primevue textarea import DataTable from primevue datatable import Column from primevue column import Panel from primevue panel import assets main css import bulma css bulma css const app createApp App app use PrimeVue unstyled true app component Button Button app component InputText InputText app component Textarea Textarea app component DataTable DataTable app component Column Column app component Panel Panel app mount app Input FieldsA Primevue input is easy to style with Bulma by adding the input style class lt InputText class input placeholder Text input gt ButtonsThe button class with variations applies class property of a PrimeVue button lt div class buttons gt lt Button class button is info gt Info lt Button gt lt Button class button is success gt Success lt Button gt lt Button class button is warning gt Warning lt Button gt lt Button class button is danger gt Danger lt Button gt lt div gt DataTableFor table we ll need the mighty Pass Through props of PrimeVue to access the component internals to add any arbitrary props lt DataTable value products pt table table is fullwidth stripes gt lt Column field code header Code gt lt Column gt lt Column field name header Name gt lt Column gt lt Column field category header Category gt lt Column gt lt Column field quantity header Quantity gt lt Column gt lt DataTable gt PanelJust like the table with pass through props we can pass the Bulma panel utilities to the PrimeVue panel easily lt Panel header Header pt root panel is primary header panel heading content panel block gt lt p gt Content lt p gt lt Panel gt DemoThe complete source code is available to StackBlitz 2023-07-19 09:44:31
海外TECH DEV Community How to Set Up an Azure Kubernetes Service Cluster with Terraform https://dev.to/bravinsimiyu/how-to-set-up-an-azure-kubernetes-service-cluster-with-terraform-3og9 How to Set Up an Azure Kubernetes Service Cluster with TerraformAzure Kubernetes Service AKS is a fully managed container orchestration service provided by Microsoft Azure AKS is a Kubernetes Cluster platform that hosts deployed cloud native Kubernetes applications It offers automatic management and scaling of containerized applications In this tutorial you will learn how to set up an Azure Kubernetes Service Cluster with Terraform Let s get started What is Terraform Terraform is an open source infrastructure as a code tool It is designed by HashiCorp and written in Go Programming Language Terraform is used to automate the creation of DevOps infrastructure and tasks Terraform provisions and configures your DevOps infrastructure It spins up new servers creates load balancers and node groups and performs network configurations Terraform is mostly applied to provision resources on cloud providers like AWS Google Cloud and Microsoft Azure It can automate and provision infrastructure on any cloud platform We will use Terraform to set up an Azure Kubernetes Service Cluster that has all the necessary cloud resources Infrastructure as code IaC allow the DevOps team to create all their infrastructure using configuration files and scripts rather than using a command line interface tool or graphical user interface In Terraform you can use the HashiCorp Configuration Language to write your configuration files and scripts The Terraform files are declarative and human readable Lets install Terraform Installing Terraform on WindowsTo Installing Terraform on Windows run this command on your Windows terminal choco install terraform Installing Terraform on macOsTo Installing Terraform on macOs run these commands on your macOS terminal brew tap hashicorp tapbrew install hashicorp tap terraform Installing Terraform on LinuxTo Installing Terraform on Linux run this command on your Linux terminal sudo apt get install terraform Verifying Terraform InstallationTo verify Terraform installation run this command terraform helpIf Terraform was installed successfully it will list all the available Terraform commands If you the commands then Terraform is working Let s now create a Microsoft Azure free account Create a Microsoft Azure Free AccountBefore we set up an Azure Kubernetes Service Cluster with Terraform you need a Microsoft Azure account In this tutorial we will sign up for a Microsoft Azure free account All the AKS Cluster resources and services that Terraform will provision will be covered in the Microsoft Azure free plan or subscription To create a Microsoft Azure free account follow this link You will use your Microsoft account to sign up for a Microsoft Azure free account You will then follow the instructions to verify your phone number and credit debit card details After creating the Microsoft Azure free account Microsoft will give you a credit for you to use in the first days The next step is to install the Azure CLI Installing Azure CLIAzure CLI is the command line interface tool that allows Azure users to access their Microsoft Azure account from the terminal They will use Azure CLI commands to manage their Azure account and resources Install the Azure CLI on LinuxTo install the Azure CLI on Linux run the following sudo command sudo apt get install azure cli Install Azure CLI on macOSTo install Azure CLI on macOS run the following brew command brew install azure cliLet s login into the Microsoft Azure account using the Azure CLI Login into the Microsoft Azure Account using the Azure CLITo login into the Microsoft Azure account using the Azure CLI run this Azure command az loginAfter executing the command above Azure CLI will open your default web browser where you will input your credentials for the Microsoft Azure account After logging in to your Microsoft Azure account you can run Azure CLI commands against your Microsoft Azure default subscription The next step is to install Kubectl using the Azure CLI Installing Kubectl using the Azure CLIKubectl is a command line interface tool for accessing any Kubernetes cluster We will use Kubectl to access the AKS Cluster that Terraform will provision Kubectl will access the AKS resource groups node groups Kubernetes Deployments and Services To install Kubectl run this Azure command az aks install cliYou should now have a Microsoft Azure Free Account a Terraform CLI Azure CLI and Kubectl Let s now set up an Azure Kubernetes Service Cluster with Terraform Set up an Azure Kubernetes Service Cluster with TerraformWe will use Terraform to set up an AKS cluster with nodes and an Azure resource group We will create Terraform files to provision the AKS cluster with nodes and an Azure resource group We will also create a Terraform file to specify the Terraform Provider that Terraform will use to interact with Microsoft Azure A Terraform Provider is an inbuilt plugin that enables Terraform to interact with third party APIs and Cloud Providers Google Cloud AWS and Microsoft Azure and other APIs From the official Terraform Provider registry Terraform supports providers There are different Terraform Providers that enable Terraform to interact with Microsoft Azure The most common one are Azure Stack AzureDevops AzureRM AzAPI and AzureAD In this tutorial we use the AzureRM Terraform Provider Let s create a Terraform file for the AzureRM Terraform Provider Create a Terraform file for the AzureRM Terraform ProviderIn your computer create a folder named terraform aks In the terraform aks folder create a new file named providers tf Open the file and add the following HashiCorp Configuration Language code provider azurerm features terraform required providers azurerm source hashicorp azurerm version Terraform will use the azurerm Terraform Provider It will enable Terraform to create and provision an AKS cluster The next step is to create a variables tf file Create a variables tf FileIn the terraform aks folder create a new file named variables tf Open the file and add the following HashiCorp Configuration Language code variable resource group name type string description Resource Group name in Microsoft Azure variable location type string description Resources location in Microsoft Azure variable cluster name type string description AKS name in Microsoft Azure variable kubernetes version type string description Kubernetes version variable system node count type number description Number of AKS worker nodes variable node resource group type string description Resource Group name for cluster resources in Microsoft Azure This file defines all the variables that our main Terraform file will use The next step is to create a terraform tfvars file Create a terraform tfvars FileIn the terraform aks folder create a new file named terraform tfvars Open the file and add the following HashiCorp Configuration Language code resource group name aks terraform rg location East Us cluster name aks terraform cluster kubernetes version system node count node resource group aks terraform node resources rg This file contains the actual values of the variables defined in the variables tf file The next step is to create a main tf file Create a main tf fileIn the terraform aks folder create a new file named main tf Open the file and add the following HashiCorp Configuration Language code resource azurerm resource group rg name var resource group name location var location resource azurerm kubernetes cluster aks name var cluster name kubernetes version var kubernetes version location var location resource group name azurerm resource group rg name dns prefix var cluster name node resource group var node resource group default node pool name system node count var system node count vm size Standard DS v type VirtualMachineScaleSets availability zones enable auto scaling false identity type SystemAssigned network profile load balancer sku Standard network plugin kubenet azure CNI This file will define all our Terraform resources for the infrastructure Terraform will use this file to provision the AKS cluster In this file you use Terraform resource blocks to define the resources of your Terraform infrastructure You can add as many resource blocks as you want in this file Here we have only two resource blocks for creating the azurerm resource group resource group and the azurerm kubernetes cluster AKS cluster The next step is to create an output tf file Create an output tf fileIn the terraform aks folder create a new file named output tf Open the file and add the following HashiCorp Configuration Language code output aks id value azurerm kubernetes cluster aks id output aks fqdn value azurerm kubernetes cluster aks fqdn output aks node rg value azurerm kubernetes cluster aks node resource group This file will specify the output to be displayed in the console after creating the AKS cluster with Terraform commands Terraform will output the AKS Cluster ID aks id AKS Cluster name aks fqdn and the resource group name aks node rg Let s now start applying the Terraform commands Applying the Terraform init commandThis comamnd will initilaze Terraform and download the azurerm Terraform Provider terraform initThe Terraform command will output the following Applying the Terraform plan commandThis command will scan the main tf file and determine the resources that Terraform will provision terraform planThe Terraform command will display the following outputs From the outputs Terraform will provision two resources Applying the Terraform apply commandThis command will provision the two resources and apply them in the AKS cluster terraform applyWhen you run the command you will be prompted to confirm if you want to provision the two resources Type yes to continue the process It will take a few minutes for Terraform to provision the two resources Upon completion Terraform will display the resources added and the outputs defined in the output tf file From the image Terraform has provisioned the two resources and displayed the outputs defined in the output tf file Let s login into the Azure Portal to view the provisioned resources Login into the Azure PortalAfter logging in to the Azure Portal click All resources It will display all the resources provisioned You will then click aks terraform cluster It will display the Kubernetes resource in our AKs cluster We have successfully set up an Azure Kubernetes Service Cluster with Terraform If you want to delete these resources run the following Terraform command terrorm destroyYou will then input Yes when prompted Terraform will destroy the two resources ConclusionIn this tutorial we have learned how to set up an Azure Kubernetes Service Cluster with Terraform We installed Terraform on Windows Linux and macOS Before we started setting up an Azure Kubernetes Service Cluster with Terraform we created a Microsoft Azure account After this we install the Azure CLI on Linux Windows and macOS We then logged in to the Microsoft Azure Account and installed Kubectl using the Azure CLI In the next steps we created Terraform files for provisioning the AKS cluster with nodes and an Azure resource group Finally we applied the Terraform init plan and apply commands The commands provided an AKS cluster and the resource group Using this tutorial you can successfully set up an Azure Kubernetes Service Cluster with Terraform 2023-07-19 09:31:01
海外TECH DEV Community Welcome Thread - v234 https://dev.to/devteam/welcome-thread-v236-29i1 Welcome Thread vLeave a comment below to introduce yourself You can talk about what brought you here what you re learning or just a fun fact about yourself Reply to someone s comment either with a question or just a hello If you are new to coding want to help beginners in their programming journey or just want another awesome place to connect with fellow developers check out the CodeNewbie Org 2023-07-19 09:30:00
海外TECH DEV Community Verifiable Random Functions (VRF) with Ruby https://dev.to/daviducolo/verifiable-random-functions-vrf-with-ruby-4io7 Verifiable Random Functions VRF with RubyVerifiable Random Functions VRF are cryptographic primitives that play a crucial role in secure communication and computation They allow the generation of a deterministic pseudorandom output verifiably associated with a specific input without revealing the underlying function s secret key VRFs are widely used in applications like digital signatures proof of stake blockchains and secure randomness generation In this article we will explore the concept of VRFs their properties and delve into the implementation of a VRF in the Ruby programming language Understanding Verifiable Random Functions VRF A VRF is a three step cryptographic process consisting of three algorithms KeyGen Eval and Verify KeyGen The KeyGen algorithm generates a public and private key pair The public key is used to verify the pseudorandom output while the private key is kept secret and used to generate the VRF output Eval The Eval algorithm takes an input message and the private key as inputs and deterministically produces the VRF output Importantly the VRF function is collision resistant meaning two different inputs cannot produce the same output Verify The Verify algorithm takes the public key the input message and the VRF output as inputs and verifies the correctness of the VRF output It ensures that the output was indeed generated using the corresponding private key and the input message Properties of VRFsVRFs possess several crucial properties that make them desirable for various cryptographic applications Deterministic and Unpredictable Output The VRF output is deterministic meaning the same input will always produce the same output However the output appears indistinguishable from a truly random value even to someone who knows the VRF private key Collision Resistance VRFs are collision resistant meaning it is infeasible to find two distinct inputs that produce the same VRF output Pseudorandomness and Unlinkability The VRF output appears pseudorandom and it is computationally infeasible to link the same input to multiple VRF outputs Non Malleability The VRF output cannot be altered by an attacker without knowledge of the VRF private key Code Import the necessary libraries for cryptographic operationsrequire openssl Function to generate VRF keysdef generate vrf keys group OpenSSL PKey EC Group new secpk private key OpenSSL PKey EC new group private key generate key public key private key public key return private key public keyend Function to evaluate VRFdef eval vrf private key input message digest OpenSSL Digest SHA new vrf output private key dsa sign asn input message return vrf outputend Function to verify VRF outputdef verify vrf public key input message vrf output digest OpenSSL Digest SHA new return public key dsa verify asn input message vrf output end Example usage private key public key generate vrf keysinput message Hello VRF vrf output eval vrf private key input message is verified verify vrf public key input message vrf output puts VRF Output vrf output puts VRF Verification Result is verified require openssl Function to generate VRF keysdef generate vrf keys group OpenSSL PKey EC Group new secpk private key OpenSSL PKey EC new group private key generate key public key private key public key return private key public keyend Function to evaluate VRFdef eval vrf private key input message digest OpenSSL Digest SHA new vrf output private key dsa sign asn input message return vrf outputend Function to verify VRF outputdef verify vrf public key input message vrf output digest OpenSSL Digest SHA new is verified public key dsa verify asn input message vrf output return is verifiedend Example usage def example usage private key public key generate vrf keys input message Hello VRF Generate VRF output vrf output eval vrf private key input message Verify the VRF output is verified verify vrf public key input message vrf output Print results puts Input Message input message puts VRF Output vrf output unpack H first Display output as hexadecimal puts VRF Verification Result is verified end In this code we ve completed the VRF implementation in Ruby using the OpenSSL library The generate vrf keys function generates a key pair the eval vrf function computes the VRF output and the verify vrf function verifies the correctness of the VRF output The example usage function demonstrates how to use these functions It generates a new key pair evaluates the VRF output for a sample input message Hello VRF and then verifies the VRF output The unpack H method converts the binary VRF output into a hexadecimal string for better readability When you run this code you should see the input message the VRF output in hexadecimal format and the result of the VRF verification The verification result should be true indicating that the VRF output was correctly generated using the private key associated with the public key This code snippet provides a practical and functional implementation of the VRF concept in Ruby showcasing the key generation VRF evaluation and verification process It can be extended to fit specific use cases and integrated into various cryptographic applications to enhance their security and integrity Security Properties of VRFsVRFs are designed with strong security properties ensuring their suitability for cryptographic applications Existential Unforgeability under Chosen Message Attack EUF CMA VRFs provide EUF CMA security meaning an adversary cannot forge a VRF output for any message they haven t seen before even after observing VRF outputs for other messages Non Interactivity VRFs are non interactive allowing for efficient and fast computation of the VRF output without requiring multiple rounds of communication between parties Forward Secrecy VRFs offer forward secrecy which means that the compromise of a long term private key does not jeopardize the security of previous VRF outputs Each VRF output remains secure even if the private key is later compromised Use Cases of VRFsVerifiable Random Functions find applications in a wide range of cryptographic scenarios Blockchain Technology VRFs are extensively used in blockchain systems especially in proof of stake PoS blockchains to randomly select block validators without revealing the underlying pseudorandom number generation process This ensures a secure and fair selection process while maintaining the integrity of the blockchain Secure Randomness Generation VRFs play a vital role in generating unbiased random numbers in distributed systems For example in cryptographic lotteries or shuffling algorithms VRFs help ensure unpredictability and fairness in the outcome Digital Signatures VRFs can be utilized to create deterministic yet unpredictable digital signatures When combined with appropriate cryptographic primitives VRF based signatures provide strong security guarantees while avoiding concerns related to quantum computing Decentralized Systems VRFs enable decentralized applications DApps to make pseudorandom decisions without relying on a central authority This allows for trustless and transparent applications in various domains such as gaming gambling and more Privacy Preserving Systems VRFs can be used in privacy preserving protocols such as anonymous authentication systems or private information retrieval ensuring the privacy of users while enabling secure interactions Challenges and ConsiderationsWhile VRFs offer powerful security properties and practical applications there are some challenges to consider Efficiency VRF implementations need to be computationally efficient especially in resource constrained environments like embedded systems or IoT devices where cryptographic operations might be more costly Cryptographic Assumptions The security of VRFs relies on certain cryptographic assumptions such as the hardness of the discrete logarithm problem or elliptic curve discrete logarithm problem As cryptographic research advances these assumptions may require updates Key Management Proper key management is crucial in VRF systems Private keys must be kept secure and backed up to prevent loss or unauthorized access Standardization Standardizing VRF implementations can promote interoperability and wider adoption across different systems and platforms ConclusionVerifiable Random Functions VRFs are fundamental cryptographic tools that strike a balance between determinism and unpredictability Their ability to generate verifiable pseudorandom outputs has found applications in blockchain systems secure randomness generation digital signatures and privacy preserving protocols By understanding the properties and challenges of VRFs developers can design robust and secure systems that benefit from the trust and integrity provided by these cryptographic primitives As the field of cryptography continues to evolve VRFs will likely remain at the forefront of ensuring security and privacy in a digitally interconnected world 2023-07-19 09:24:44
海外TECH DEV Community How to Create an Amazon Elastic Kubernetes Service Cluster With Terraform https://dev.to/bravinsimiyu/how-to-create-an-amazon-elastic-kubernetes-service-cluster-using-terraform-1iia How to Create an Amazon Elastic Kubernetes Service Cluster With TerraformAmazon Elastic Kubernetes Service Amazon EKS is a fully managed Kubernetes service provided by Amazon Web Services AWS Amazon EKS is a Kubernetes Cluster platform that automates the deployment and management of Kubernetes applications on the AWS cloud It automatically runs and scales the Kubernetes application containers across the multiple AWS cloud zones In this tutorial you will learn how to create an Amazon Elastic Kubernetes Service cluster using Terraform Let s get started with Terraform azure Getting started with TerraformTerraform is an open source infrastructure as code IaC tool written in Go and developed by HashiCorp Terraform is used to automate the creation and provisioning of infrastructure on the cloud We will use Terraform to provision resources and infrastructure on the AWS cloud We will write Terraform files using the HashiCorp Configuration Language to configure all the AWS resources for the Amazon EKS Cluster Terraform will use these files to create and provision the Amazon EKS cluster infrastructure Let s start by installing Terraform on Linux Windows and macOS Linux MachineTo install Terraform on a Linux machine run this sudo command on your terminal sudo apt get install terraform Windows MachineTo Install Terraform on a Windows machine run this Chocolatey command on your terminal choco install terraform macOS MachineTo Install Terraform on a macOS machine run this brew command on your terminal brew install hashicorp tap terraformAfter the installation you will verify the Terraform installation using the following command terraform helpWhen you run the command above Terraform will output the following Terraform commands on your terminal We will use the following commands to create and provision the Amazon EKS cluster using Terraform Let s now create an Amazon Web Services AWS free tier account Create an Amazon Web Services Free Tier AccountBefore you create an Amazon Elastic Kubernetes Service cluster using Terraform you need an Amazon Web Services AWS free account In this tutorial we will create an Amazon Web Services free tier Account To create an Amazon Web Services free Account use this link After creating the AWS free account and verifying your credit debit card information the next step is to install the AWS CLI Installing the AWS CLIAWS CLI is a powerful command line interface tool that allows AWS cloud users to access interact with their AWS Cloud account from the terminal There are various ways of downloading and installing the AWS CLI In this tutorial you will download and install the AWS CLI using this link Follow the link and install the AWS CLI on your specific operating system The next step is to configure the AWS account using the AWS CLI Configure the AWS account using the AWS CLITo configure the created AWS account using the AWS CLI run this AWS CLI command aws configureIt will enable you to access interact with your created AWS Cloud account from the terminal You will be required to input the Secret access key Access key ID Output format and AWS Region All these values are found in your AWS account If you do not know how to get these values you can read this Sweet Code article The next step is to install Kubectl on your machine Installing Kubectl on your machineKubectl is a command line interface tool that allows DevOps engineers and practitioners to communicate interact and access any Kubernetes cluster from their terminals We will use the Kubectl interface tool to access the Amazon EKS cluster that Terraform will create and provision To install Kubectl follow this link After installing Kubectl run the following command to verify the installation kubectl version short clientAt this point you should now have created an Amazon Web Services Free Tier Account You should have Terraform AWS CLI and Kubectl installed on your machine Let s now create an Amazon Elastic Kubernetes Service cluster using Terraform Creating an Amazon Elastic Kubernetes Service Cluster using TerraformWe will use Terraform to create and provision an Amazon Elastic Kubernetes Service Cluster with the following AWS resources AWS Virtual Private Cloud VPC Three public and three private AWS Subnets in different AWS Cloud availability zones One AWS Route Table Two AWS Route Table AssociationAWS Internet Gateway attached to the VPC AWS EKS Cluster It will have one master node to manage the Kubernetes application AWS EKS Node Group with two worker nodes AWS Security Group with an Ingress rule IAM Role for the AWS EKS Cluster with two policies IAM Role for the Node Group with three policies We will write Terraform files to configure all the AWS resources for the Amazon EKS Cluster Let s start working on our Terraform files Create variables tf fileIn your machine create a terraform provison eks folder Open the folder and create a new file named variables tf In the new file add the following Terraform code to define our Terraform variables variable region description AWS region type string default us east This file defines the region we will create the Amazon EKS cluster The default region is us east Create a terraform tf fileIn the terraform provison eks folder create a new file named terraform tf Open the terraform tf file and add the following Terraform code to configure the Terraform AWS provider terraform required providers aws source hashicorp aws version gt random source hashicorp random version gt tls source hashicorp tls version gt cloudinit source hashicorp cloudinit version gt kubernetes source hashicorp kubernetes version gt required version gt This file defines the Terraform AWS provider that allows Terraform infrastructure as code IaC to interact with the AWS cloud Terraform will use the AWS provider from hashicorp aws Create a vpc tf fileIn the terraform provison eks folder create a new file named vpc tf Open the vpc tf file and add the following Terraform code to configure the AWS VPC module vpc source terraform aws modules vpc aws version name Demo VPC cidr azs slice data aws availability zones available names private subnets public subnets enable nat gateway true single nat gateway true enable dns hostnames true public subnet tags kubernetes io cluster local cluster name shared kubernetes io role elb private subnet tags kubernetes io cluster local cluster name shared kubernetes io role internal elb Terraform will use the AWS VPC module from terraform aws modules vpc aws to create a VPC named Demo VPC It will also create three private subnets with private subnet tags It creates three public subnets with public subnet tags Create an eks cluster tf fileIn the terraform provison eks folder create a new file named eks cluster tf Open the eks cluster tf file and add the following Terraform code to configure the AWS EKS cluster module eks source terraform aws modules eks aws version cluster name local cluster name cluster version vpc id module vpc vpc id subnet ids module vpc private subnets cluster endpoint public access true eks managed node group defaults ami type AL x eks managed node groups one name node group instance types t small min size max size desired size two name node group instance types t small min size max size desired size Terraform will use the terraform aws modules eks aws module to configure and provision the AWS EKS cluster It will create a t small instance type for the eks managed node groups Create a main tf fileIn the terraform provison eks folder create a new file named main tf Open the main tf file and add the following Terraform code provider kubernetes host module eks cluster endpoint cluster ca certificate basedecode module eks cluster certificate authority data provider aws region var region data aws availability zones available locals cluster name demo eks random string suffix result resource random string suffix length special false This file defines the AWS Cloud availability zones and the AWS EKS Cluster name Create outputs tf fileIn the terraform provison eks folder create a new file named outputs tf Open the outputs tf file and add the following Terraform code output cluster name description Amazon Web Service EKS Cluster Name value module eks cluster name output cluster endpoint description Endpoint for Amazon Web Service EKS value module eks cluster endpoint output region description Amazon Web Service EKS Cluster region value var region output cluster security group id description Security group ID for the Amazon Web Service EKS Cluster value module eks cluster security group id This file defines the outputs to be displayed in your terminal after running the Terraform commands Using the following files Terraform will output the cluster name cluster endpoint region and cluster security group id Let s run the Terraform commands to create and provision the Amazon EKS cluster using Terraform We will start with the terraform init command Terraform init commandThis command will initialize the Terraform AWS EKS modules and the Terraform backend It will download the modules from the Terraform registry It will also download and install the AWS EKS provider plugins from the hashicorp aws terraform initThe Terraform init command will output the following in your console to show initialization Terraform plan commandThis command will show all the AWS resources defined in the Terraform files These are the AWS resources that Terraform will provision in the AWS EKS cluster terraform planThe Terraform plan command will display the following AWS resources in your terminal Terraform apply commandThis command will provision the AWS EKS Cluster and all the AWS resources defined in the Terraform files terraform applyTerraform will ask you for confirmation for Terraform to provision the AWS resources It will allow you to review the AWS resources displayed in your terminal If you are satisfied you will type yes and Terraform will provision these AWS resources After a few minutes Terraform will create the AWS EKS cluster with all the AWS resources Checking the AWS EKS Cluster InformationTo check the AWS EKS Cluster information run this command in your terminal kubectl cluster infoThe Kubectl command displays the following AWS EKS Cluster Information Getting the AWS EKS Cluster NodesTo get the AWS EKS Cluster Nodes run this command kubectl get nodesThe Kubectl command displays the following AWS EKS Cluster nodes Login into your AWS Management ConsoleThe next step is to login into your AWS management console to see the created AWS EKS cluster and the AWS resources AWS EKS ClusterThe created AWS EKS CLuster is shown below SubnetsThe created Subnets are shown below Route TablesThe created Route Tables are shown below Internet GatewaysThe created Internet Gateways are shown below VPCThe created VPC is shown below We have successfully created an Amazon Elastic Kubernetes Service cluster using Terraform Let s now destroy the AWS EKS Cluster and the AWS resources Terraform destroy commandTo destroy the AWS EKS Cluster and the AWS resources run this command terraform destroyYou will type yes to confirm and all the AWS resources for the EKS cluster will be destroyed as shown below ConclusionIn this tutorial you have learned how to create an Amazon Elastic Kubernetes Service cluster using Terraform I showed you how to install Terraform on Windows Linux and macOS machines Before we started creating an Amazon Elastic Kubernetes Service cluster using Terraform we created an Amazon Web Service free tier account After this we installed the AWS CLI that enabled us to interact with our AWS Cloud account from the terminal Next we created multiple Terraform files Terraform used these files to create the AWS EKS Cluster and provision the AWS resources Finally we used Terraform commands to create and provision the AWS EKS Cluster You can easily follow this tutorial and create an Amazon Elastic Kubernetes Service Amazon EKS cluster using Terraform Thanks for reading and all the best 2023-07-19 09:12:05
海外TECH DEV Community Using Tailwind CSS and Vue to Create Animated and Accessible Tabs https://dev.to/cruip_com/using-tailwind-css-and-vue-to-create-animated-and-accessible-tabs-4o0c Using Tailwind CSS and Vue to Create Animated and Accessible Tabs Live Demo Download Here we are to the third and final part of our series on Using Tailwind CSS and to Create Animated and Accessible Tabs If you ve read the first and second parts you re already familiar with the most typical use cases for tabs and how we at Cruip are big fans of this component for displaying multiple kinds of information For example Text variations on cards on this Startup landing page template Alternating screenshots on this Elegant HTML website template Image variations on this Dark Next js landing page templateYou can find plenty of additional examples in our gallery of premium Tailwind CSS templates or free Tailwind CSS landing pages websites and dashboards Let s create a tabs component using Tailwind CSS and Vue with comprehensive TypeScript compatibility similar to what we previously did for Next js Creating the single component fileLet s begin by creating a new file for the component named UnconventionalTabs vue As usual we will use TypeScript and the script setup syntax to leverage the Composition API within the Single File Component SFC lt script setup lang ts gt import Tab from assets tabs image jpg import Tab from assets tabs image jpg import Tab from assets tabs image jpg interface Tab title string img string tag string excerpt string link string const tabs Tab title Lassen Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link lt script gt lt template gt lt template gt To start we need to import the images we will use for the tabs and define the tab s interface Each tab will have a title an image a tag an excerpt and a link Next we will use the v for directive to iterate over this array of tabs and generate the HTML for each tab and tab panel Adding the markupIn the previous tutorial we demonstrated how to create an accessible tabs component in React using the Headless UI library We ll follow a similar approach for the Vue component which eliminates the need for manual handling of ARIA roles and attributes Headless UI provides the same set of components for both React and Vue although the syntax may vary slightly in some aspects Let s see how to achieve the exact equivalent of the Next js component in Vue lt script setup lang ts gt import TabGroup TabList Tab TabPanels TabPanel from headlessui vue import Tab from assets tabs image jpg import Tab from assets tabs image jpg import Tab from assets tabs image jpg interface Tab title string img string tag string excerpt string link string const tabs Tab title Lassen Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link lt script gt lt template gt lt TabGroup v slot selectedIndex gt lt Buttons gt lt div class flex justify center gt lt TabList class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Tab key index v for tab index in tabs as template gt lt button class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out class selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt TabList gt lt div gt lt Tab panels gt lt TabPanels class max w px mx auto gt lt div class relative flex flex col gt lt TabPanel key index v for tab index in tabs class focus visible outline none focus visible ring focus visible ring indigo class selectedIndex index order first gt lt article class w full bg white rounded xl shadow xl min px flex items stretch gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tab img alt tab img gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt tab tag lt div gt lt h class text xl font bold text slate gt tab title lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt tab excerpt lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt TabPanel gt lt div gt lt TabPanels gt lt TabGroup gt lt template gt What we ve made so far is a functional tabs component that that is fully accessible Now we want to add transitions when switching between panels To do this we will use another component from Headless UI the Transition component Adding transition effectsLet s import TransitionRoot from the external library and use it inside our TabPanel component as follows lt script setup lang ts gt import TabGroup TabList Tab TabPanels TabPanel TransitionRoot from headlessui vue import Tab from assets tabs image jpg import Tab from assets tabs image jpg import Tab from assets tabs image jpg interface Tab title string img string tag string excerpt string link string const tabs Tab title Lassen Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link lt script gt lt template gt lt TabGroup v slot selectedIndex gt lt Buttons gt lt div class flex justify center gt lt TabList class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Tab key index v for tab index in tabs as template gt lt button class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out class selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt TabList gt lt div gt lt Tab panels gt lt TabPanels class max w px mx auto gt lt div class relative flex flex col gt lt TabPanel key index v for tab index in tabs static true class focus visible outline none focus visible ring focus visible ring indigo class selectedIndex index order first gt lt TransitionRoot as article show selectedIndex index class w full bg white rounded xl shadow xl min px flex items stretch enter transition ease cubic bezier duration transform enterFrom opacity translate y enterTo opacity translate y leave transition ease cubic bezier duration transform absolute leaveFrom opacity translate y leaveTo opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tab img alt tab img gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt tab tag lt div gt lt h class text xl font bold text slate gt tab title lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt tab excerpt lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt TransitionRoot gt lt TabPanel gt lt div gt lt TabPanels gt lt TabGroup gt lt template gt In the TransitionRoot component we have defined the as article property to render the element as an lt article gt tag Then we have used Tailwind CSS classes to handle the enter and exit transitions as we did in the previous tutorials Additionally we ve utilized the selectedIndex slot prop provided by the TabGroup component to display only the selected panel based on the index in the tabs array In simpler terms if the panel index matches the selected index we will show the panel otherwise we will hide it To ensure the transitions function correctly it s important to set the static true prop must be set on the TabPanel making it static This means that the TabPanel element will ignore the selectedIndex prop leaving the TransitionRoot component responsible for handling the transition Modifying the component to make it reusableNow let s move on to the final step which is making our component reusable Instead of defining the data within the component itself we will pass it as props This way we will be able to use the component multiple times with different content To achieve this we will move the tabs array to the parent component along with the image imports The parent component will then look like this lt script setup lang ts gt import Tab from assets tabs image jpg import Tab from assets tabs image jpg import Tab from assets tabs image jpg import UnconventionalTabs from components UnconventionalTabs vue const tabs title Lassen Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img Tab tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link lt script gt lt template gt lt main class relative min h screen flex flex col justify center bg white overflow hidden gt lt div class w full max w xl mx auto px md px py gt lt UnconventionalTabs tabs tabs gt lt div gt lt main gt lt template gt Now that we have moved the data to the parent component we can safely remove it from our component Finally we need to use the defineProps compiler macro to define the props that we will receive from the parent component const props defineProps lt tabs Tab gt const tabs props tabsThere s nothing else to add We have completed our component and the final result is as follows lt script setup lang ts gt import TabGroup TabList Tab TabPanels TabPanel TransitionRoot from headlessui vue interface Tab title string img string tag string excerpt string link string const props defineProps lt tabs Tab gt const tabs props tabs lt script gt lt template gt lt TabGroup v slot selectedIndex gt lt Buttons gt lt div class flex justify center gt lt TabList class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Tab key index v for tab index in tabs as template gt lt button class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out class selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt TabList gt lt div gt lt Tab panels gt lt TabPanels class max w px mx auto gt lt div class relative flex flex col gt lt TabPanel key index v for tab index in tabs static true class focus visible outline none focus visible ring focus visible ring indigo class selectedIndex index order first gt lt TransitionRoot as article show selectedIndex index class w full bg white rounded xl shadow xl min px flex items stretch enter transition ease cubic bezier duration transform enterFrom opacity translate y enterTo opacity translate y leave transition ease cubic bezier duration transform absolute leaveFrom opacity translate y leaveTo opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tab img alt tab img gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt tab tag lt div gt lt h class text xl font bold text slate gt tab title lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt tab excerpt lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt TransitionRoot gt lt TabPanel gt lt div gt lt TabPanels gt lt TabGroup gt lt template gt ConclusionsAs we saw in the previous tutorials you can use tabs across every part of your landing page marketing site or application to arrange information attractively and elegantly If you wanto to learn how to build this component in Alpine js and Next js check out the first and second parts 2023-07-19 09:03:20
海外TECH DEV Community Using Tailwind CSS and Next.js to Create Animated and Accessible Tabs https://dev.to/cruip_com/using-tailwind-css-and-nextjs-to-create-animated-and-accessible-tabs-59jj Using Tailwind CSS and Next js to Create Animated and Accessible Tabs Live Demo Download In this second part of our article series we will show you how to use the code from our first tutorial creating animated and accessible tabs with Alpine js to build a reusable component for React and Next js If you ve read the first piece of this series you already know how powerful tabs are in creating related connected elements that differ in some way but are linked under the same content If you want to see how versatile tabs are at displaying similar but different information take a look at some of our Tailwind CSS templates where we use this component A dark SaaS website template created to show off your startup or software A simple website template developed for displaying any app or idea A modern landing page template for startups created to shine a spotlight on your next startup idea Creating the component structureLet s start by creating a new file for the component called unconventional tabs tsx Note that we will be using the tsx extension instead of jsx to be able to use TypeScript and make the code safer and more reliable use client import TabImage from public tabs image jpg import TabImage from public tabs image jpg import TabImage from public tabs image jpg import StaticImageData from next image interface Tab title string img StaticImageData tag string excerpt string link string export default function UnconventionalTabs const tabs Tab title Lassen Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link return lt gt lt gt Great As you noticed we have defined the content of the tabs using an array and imported the necessary images for the tab panels Each tab item is an object including title image tag excerpt and link properties In the next step we ll iterate over the array using a map loop to render each tab and its corresponding tab panel thereby avoiding repetitive code Additionally we have defined an interface called Tab to define the types for each tab object s property This allows us to use TypeScript to verify that the data we pass to the component is correct and provides us with an idea of the required data for the component Creating the component markupNow let s focus on what we will include in the return method In the previous tutorial we showed you how to use and handle ARIA roles and attributes to make the component fully accessible In this case instead of starting from scratch we have decided to use the Tabs component provided by the Headless UI library This way we don t have to worry about all the accessibility related aspects since they are already excellently handled by the library use client import Fragment from react import Image StaticImageData from next image import Tab from headlessui react import Caveat from next font google import TabImage from public tabs image jpg import TabImage from public tabs image jpg import TabImage from public tabs image jpg const caveat Caveat subsets latin variable font caveat display swap interface Tab title string img StaticImageData tag string excerpt string link string export default function UnconventionalTabs const tabs Tab title Lassen Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link return lt Tab Group gt selectedIndex gt lt div className caveat variable gt Buttons lt div className flex justify center gt lt Tab List className max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt tabs map tab index gt lt Tab key index as Fragment gt lt button className flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt Tab List gt lt div gt Tab panels lt Tab Panels className max w px mx auto gt lt div className relative flex flex col gt tabs map tab index gt lt Tab Panel key index as Fragment gt lt article className w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring gt lt figure className min px w p gt lt Image className w full h px min px h full object cover rounded lg width height src tab img alt tab title gt lt figure gt lt div className min px w flex flex col justify center p pl gt lt div className flex justify between mb gt lt header gt lt div className font caveat text xl font medium text sky gt tab tag lt div gt lt h className text xl font bold text slate gt tab title lt h gt lt header gt lt button className shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg className fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div className text slate text sm line clamp mb gt tab excerpt lt div gt lt div className text right gt lt a className text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt Tab Panel gt lt div gt lt Tab Panels gt lt div gt lt Tab Group gt The component is nearly complete and already fully accessible We followed the documentation and added Tailwind CSS classes to give the component the desired style But there s no animation yet Therefore we will use the Transition component to create transitions between tab panels One more thing worth mentioning We ve installed the headlessui tailwindcss package and imported it as a plugin in our tailwind config js file type import tailwindcss Config module exports content pages js ts jsx tsx mdx components js ts jsx tsx mdx app js ts jsx tsx mdx darkMode class theme extend fontFamily inter var font inter sans serif caveat var font caveat cursive plugins require headlessui tailwindcss This package allows us to use some aditional Tailwind CSS utilities for styling the components based on their state In particular we are using ui focus visible to make the ring around the focused tab visible only when users are navigating with the keyboard Adding transitions between tab panelsLet s import the Transition component from Headless UI and use it to replace the article tag use client import Fragment from react import Image StaticImageData from next image import Tab from headlessui react import Transition from headlessui react import Caveat from next font google import TabImage from public tabs image jpg import TabImage from public tabs image jpg import TabImage from public tabs image jpg const caveat Caveat subsets latin variable font caveat display swap interface Tab title string img StaticImageData tag string excerpt string link string export default function UnconventionalTabs const tabs Tab title Lassen Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link return lt Tab Group gt selectedIndex gt lt div className caveat variable gt Buttons lt div className flex justify center gt lt Tab List className max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt tabs map tab index gt lt Tab key index as Fragment gt lt button className flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt Tab List gt lt div gt Tab panels lt Tab Panels className max w px mx auto gt lt div className relative flex flex col gt tabs map tab index gt lt Tab Panel key index as Fragment static true gt lt Transition as article show selectedIndex index unmount false className w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo enter transition ease cubic bezier duration transform order first enterFrom opacity translate y enterTo opacity translate y leave transition ease cubic bezier duration transform absolute leaveFrom opacity translate y leaveTo opacity translate y gt lt figure className min px w p gt lt Image className w full h px min px h full object cover rounded lg width height src tab img alt tab title gt lt figure gt lt div className min px w flex flex col justify center p pl gt lt div className flex justify between mb gt lt header gt lt div className font caveat text xl font medium text sky gt tab tag lt div gt lt h className text xl font bold text slate gt tab title lt h gt lt header gt lt button className shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg className fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div className text slate text sm line clamp mb gt tab excerpt lt div gt lt div className text right gt lt a className text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt Transition gt lt Tab Panel gt lt div gt lt Tab Panels gt lt div gt lt Tab Group gt We have set static true in the lt Tab panel gt prop to preserve the tab panel and allow the transitions to work correctly However the transitions still have a flickering effect because there is a moment when two panels are visible simultaneously even though we have applied the absolute class to the leaving one We can solve this issue similarly to what was done in the testimonial component In short we will dynamically set the height of the entering panel on the panel container element To do this we will need to reference to the panel container element Next we will add a method called heightFix that calculates the height of the entering panel and set it on the panel container element This method will be called within the beforeEnter callback function provided by the Transition component Here s how the code will look like use client import useRef useEffect Fragment from react import Image StaticImageData from next image import Tab from headlessui react import Transition from headlessui react import Caveat from next font google import TabImage from public tabs image jpg import TabImage from public tabs image jpg import TabImage from public tabs image jpg const caveat Caveat subsets latin variable font caveat display swap interface Tab title string img StaticImageData tag string excerpt string link string export default function UnconventionalTabs const tabs Tab title Lassen Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link const tabsRef useRef lt HTMLDivElement gt null const heightFix gt if tabsRef current amp amp tabsRef current parentElement tabsRef current parentElement style height tabsRef current clientHeight px useEffect gt heightFix return lt Tab Group gt selectedIndex gt lt div className caveat variable gt Buttons lt div className flex justify center gt lt Tab List className max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt tabs map tab index gt lt Tab key index as Fragment gt lt button className flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt Tab List gt lt div gt Tab panels lt Tab Panels className max w px mx auto gt lt div className relative flex flex col ref tabsRef gt tabs map tab index gt lt Tab Panel key index as Fragment static true gt lt Transition as article show selectedIndex index unmount false className w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo enter transition ease cubic bezier duration transform order first enterFrom opacity translate y enterTo opacity translate y leave transition ease cubic bezier duration transform absolute leaveFrom opacity translate y leaveTo opacity translate y beforeEnter gt heightFix gt lt figure className min px w p gt lt Image className w full h px min px h full object cover rounded lg width height src tab img alt tab title gt lt figure gt lt div className min px w flex flex col justify center p pl gt lt div className flex justify between mb gt lt header gt lt div className font caveat text xl font medium text sky gt tab tag lt div gt lt h className text xl font bold text slate gt tab title lt h gt lt header gt lt button className shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg className fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div className text slate text sm line clamp mb gt tab excerpt lt div gt lt div className text right gt lt a className text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt Transition gt lt Tab Panel gt lt div gt lt Tab Panels gt lt div gt lt Tab Group gt Making the component reusableAs the final step in this tutorial we want to make the component reusable Currently the content of the tabs is hardcoded directly in the component This means that if we want to display another set of tabs we have to duplicate and modify the component As you may guess it would be much more advantageous to have a single component that renders the tabs and that we can configure using data passed as props from the parent component To achieve this let s move the image imports and the array with the tab content to the parent component and pass the data to our tabs component as a prop export const metadata title Unconventional Tabs Cruip Tutorials description Page description import TabImage from public tabs image jpg import TabImage from public tabs image jpg import TabImage from public tabs image jpg import UnconventionalTabs from components unconventional tabs export default function UnconventionalTabsPage const tabs title Lassen Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Mount Shasta img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link title Eureka Peak img TabImage tag Mountain excerpt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout link return lt main className relative min h screen flex flex col justify center bg white overflow hidden gt lt div className w full max w xl mx auto px md px py gt lt UnconventionalTabs tabs tabs gt lt div gt lt main gt Once that s done all that s left is to pass the props to the tabs component like this function UnconventionalTabs tabs tabs Tab Et voilà The component is now complete and it will look like this use client import useRef useEffect Fragment from react import Image StaticImageData from next image import Tab from headlessui react import Transition from headlessui react import Caveat from next font google const caveat Caveat subsets latin variable font caveat display swap interface Tab title string img StaticImageData tag string excerpt string link string export default function UnconventionalTabs tabs tabs Tab const tabsRef useRef lt HTMLDivElement gt null const heightFix gt if tabsRef current amp amp tabsRef current parentElement tabsRef current parentElement style height tabsRef current clientHeight px useEffect gt heightFix return lt Tab Group gt selectedIndex gt lt div className caveat variable gt Buttons lt div className flex justify center gt lt Tab List className max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt tabs map tab index gt lt Tab key index as Fragment gt lt button className flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none ui focus visible outline none ui focus visible ring ui focus visible ring indigo transition colors duration ease in out selectedIndex index bg white text slate text slate hover text slate gt tab title lt button gt lt Tab gt lt Tab List gt lt div gt Tab panels lt Tab Panels className max w px mx auto gt lt div className relative flex flex col ref tabsRef gt tabs map tab index gt lt Tab Panel key index as Fragment static true gt lt Transition as article show selectedIndex index unmount false className w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo enter transition ease cubic bezier duration transform order first enterFrom opacity translate y enterTo opacity translate y leave transition ease cubic bezier duration transform absolute leaveFrom opacity translate y leaveTo opacity translate y beforeEnter gt heightFix gt lt figure className min px w p gt lt Image className w full h px min px h full object cover rounded lg width height src tab img alt tab title gt lt figure gt lt div className min px w flex flex col justify center p pl gt lt div className flex justify between mb gt lt header gt lt div className font caveat text xl font medium text sky gt tab tag lt div gt lt h className text xl font bold text slate gt tab title lt h gt lt header gt lt button className shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg className fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div className text slate text sm line clamp mb gt tab excerpt lt div gt lt div className text right gt lt a className text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href tab link gt Read more amp gt lt a gt lt div gt lt div gt lt Transition gt lt Tab Panel gt lt div gt lt Tab Panels gt lt div gt lt Tab Group gt ConclusionsWe ve reached the end of the second part If you wanto to learn how to build this component in Alpine js and Vue check out the first and third parts 2023-07-19 09:03:15
海外TECH DEV Community Using Tailwind CSS and Alpine.js to Create Animated and Accessible Tabs https://dev.to/cruip_com/using-tailwind-css-and-alpinejs-to-create-animated-and-accessible-tabs-49cd Using Tailwind CSS and Alpine js to Create Animated and Accessible Tabs Live Demo Download Tabs coordinate a variety of use cases and tasks in the interface design You can see them in action for displaying multiple contents compared to each other or for highlighting the difference between various elements and information in a particular section We use tabs to group under a specific umbrella elements that are connected but differ in some ways At Cruip we have long been fans of tabs and implemented them in multiple Tailwind CSS templates For example you can see them in use in our recruitment website template called Talent or our elegant HTML website template called Tidy or our SaaS website template called Open Pro These examples give you a glimpse into how versatile tabs are in interface design and why they are so popular on landing pages or websites Ok as usual let s begin by creating the HTML document that will serve as the container for our animated tabs component We will import Tailwind CSS and Alpine js using the CDN It s important to note that using the CDN is not recommended for production websites but for our experiment it will suffice lt DOCTYPE html gt lt html lang en gt lt head gt lt meta charset utf gt lt title gt Unconventional Tabs lt title gt lt meta name viewport content width device width initial scale gt lt link rel preconnect href gt lt link rel preconnect href crossorigin gt lt link href wght amp family Caveat wght amp display swap rel stylesheet gt lt script src gt lt script gt lt script defer src x x dist cdn min js gt lt script gt lt script gt tailwind config theme extend fontFamily inter Inter sans serif caveat Caveat cursive lt script gt lt head gt lt body class relative font inter antialiased gt lt main class relative min h screen flex flex col justify center bg slate overflow hidden gt lt div class w full max w xl mx auto px md px py gt lt Tabs component gt lt div gt lt main gt lt body gt lt html gt Building the structure for the tabs componentNow let s start building the structure for our tabs component It will be organized as follows lt div x data activeTab gt lt Buttons gt lt div class flex justify center gt lt div class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Button gt lt Button gt lt Button gt lt div gt lt div gt lt Tab panels gt lt div class max w px mx auto gt lt div class relative flex flex col gt lt Panel gt lt Panel gt lt Panel gt lt div gt lt div gt lt div gt As you can see we have already defined a JavaScript object using Alpine js to manage the state of our component This object includes a property called activeTab which is initially set to This value represents the index of the active tab allowing us to display the corresponding panel Adding the buttonsNow let s add the navigation buttons We ll begin with the first button and then replicate the structure for the other ones lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate click activeTab gt Lassen Peak lt button gt We have a rather simple HTML structure styled using Tailwind CSS utility classes Additionally we have some JavaScript logic to handle the button s state The conditional class class dynamically changes the text and background color based on the value of the activeTab property The click event updates the activeTab property when the button is clicked It s important to note that when we replicate this structure for the other buttons we ll need to update the value of the activeTab property based on the button s index For instance the second button should have a value of and the third button should have a value of Similarly update the button s id attribute according to its index Building the tab panelsNow let s build the panels for our component We ll begin with the first panel and then replicate the structure for the remaining panels lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Lassen Peak lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt To ensure smooth animations for the panels entering and exiting the view we utilized Alpine js x transition directives along with Tailwind CSS classes The entry animation has a duration of seconds duration while the exit animation has a duration of seconds duration Additionally we ve implemented a custom easing effect to simulate a slight bounce using arbitrary variants ease cubic bezier Let s replicate the structure for the remaining two panels Make sure to modify the content and update the x show value to display the right panel based on the active tab Let s proceed to complete the missing buttons and panels The complete code will be as follows lt div x data activeTab gt lt Buttons gt lt div class flex justify center gt lt div class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate click activeTab gt Lassen Peak lt button gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate click activeTab gt Mount Shasta lt button gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate click activeTab gt Eureka Peak lt button gt lt div gt lt div gt lt Tab panels gt lt div class max w px mx auto gt lt div class relative flex flex col gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Lassen Peak lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Mount Shasta lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Eureka Peak lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt div gt lt div gt lt div gt This code already provides us with a fully functional component but there is still much to be done in terms of accessibility In today s web development practices the importance of accessibility is often unknown or underestimated However ensuring equal access to information for all individuals is a fundamental aspect that should not be overlooked In this tutorial we will focus on enhancing the accessibility of our component making it more inclusive and user friendly Making the component accessible Using ARIA roles and attributesARIA stands for “Accessible Rich Internet Applications and represents a set of roles and attributes that aim to make web applications more accessible to all users ARIA is supported by all modern browsers and allows us to provide additional information to HTML elements For instance we can use ARIA to specify the role or state of elements This enables screen readers to interpret and convey this extra information to users with disabilities To begin let s assign the role of tablist to the container element that holds the buttons and assign the role of tab to each individual button element lt div role tablist class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb gt lt Button gt lt button id tab role tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate click activeTab gt Lassen Peak lt button gt Next let s add the role of tabpanel to each of the panels lt article id tabpanel role tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt Now in addition to the previously mentioned ARIA roles we need to define some additional ARIA attributes for our buttons Each button element should have the following attributes An aria selected attribute which should be set to true if the button is active and false otherwise An aria controls attribute which should match the id of the corresponding panel lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate aria selected activeTab aria controls tabpanel click activeTab focus activeTab gt Lassen Peak lt button gt As you can see we have used the Alpine js x bind directive in the shorthand version aria selected to dynamically define the boolean value of the aria selected attribute For the panels we simply need to add an aria labelledby attribute where the value is the same as the id of the corresponding button This association allows screen readers to read the description or label to visually impaired users lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo role tabpanel aria labelledby tab gt Using tabindex attributesTo allow screen readers to navigate from the active tab to its corresponding tab panel we need to ensure that only the active button has a tabindex attribute while all other buttons have a tabindex attribute We ll again use Alpine js x bind directive tabindex to dynamically assign these values lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate tabindex activeTab aria selected activeTab aria controls tabpanel click activeTab focus activeTab gt Lassen Peak lt button gt Finally we will add a tabindex to the tabpanel to include it in the page s Tab sequence lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo role tabpanel tabindex aria labelledby tab Improving keyboard accessibilityAs a final step we want to ensure that keyboard navigation of our tabs component provides an optimized experience Currently due to the custom tabindex attributes we ve applied the natural keyboard navigation flow is disrupted and users cannot navigate between the buttons using the Tab key Instead when the focus is on a tab pressing the Tab key moves the focus to the corresponding tabpanel So how can we enable navigation between the buttons when one of them is focused We can achieve this by utilizing the Left and Right arrow keys To implement this functionality we can rely on the helpful Focus plugin provided by Alpine js First ensure that you include the library in the head tag of your HTML page lt script defer src alpinejs focus x x dist cdn min js gt lt script gt Now we can start using the plugin directives in our code lt div role tablist class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb keydown right prevent stop focus wrap next keydown left prevent stop focus wrap prev gt lt Button gt lt button focus activeTab gt Lassen Peak lt button gt lt Button gt lt button focus activeTab gt Mount Shasta lt button gt lt Button gt lt button focus activeTab gt Eureka Peak lt button gt lt div gt In summary we are ensuring the following three things When the Right key is pressed move the focus to the next button When the Left key is pressed move the focus to the previous button When the focus is on one of the buttons update the value of the activeTab variable to display the corresponding tabpanel But we re not finished yet To provide an optimal experience in line with accessibility guidelines we want users to be able to quickly return to the first tab by pressing the Home key and to the last tab by pressing the End key To achieve this we will use the keydown home and keydown end directives lt div role tablist class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb keydown right prevent stop focus wrap next keydown left prevent stop focus wrap prev keydown home prevent stop focus first keydown end prevent stop focus last gt Now we re done We have created an accessible tabs component optimized for keyboard navigation Here s the complete code lt div x data activeTab gt lt Buttons gt lt div class flex justify center gt lt div role tablist class max px max w px inline flex flex wrap justify center bg slate rounded px p mb min px mb keydown right prevent stop focus wrap next keydown left prevent stop focus wrap prev keydown home prevent stop focus first keydown end prevent stop focus last gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate tabindex activeTab aria selected activeTab aria controls tabpanel click activeTab focus activeTab gt Lassen Peak lt button gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate tabindex activeTab aria selected activeTab aria controls tabpanel click activeTab focus activeTab gt Mount Shasta lt button gt lt Button gt lt button id tab class flex text sm font medium h px rounded xl whitespace nowrap focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out class activeTab bg white text slate text slate hover text slate tabindex activeTab aria selected activeTab aria controls tabpanel click activeTab focus activeTab gt Eureka Peak lt button gt lt div gt lt div gt lt Tab panels gt lt div class max w px mx auto gt lt div class relative flex flex col gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo role tabpanel tabindex aria labelledby tab x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Lassen Peak lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo role tabpanel tabindex aria labelledby tab x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Mount Shasta lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt Panel gt lt article id tabpanel class w full bg white rounded xl shadow xl min px flex items stretch focus visible outline none focus visible ring focus visible ring indigo role tabpanel tabindex aria labelledby tab x show activeTab x transition enter transition ease cubic bezier duration transform order first x transition enter start opacity translate y x transition enter end opacity translate y x transition leave transition ease cubic bezier duration transform absolute x transition leave start opacity translate y x transition leave end opacity translate y gt lt figure class min px w p gt lt img class w full h px min px h full object cover rounded lg width height src tabs image jpg alt Tab gt lt figure gt lt div class min px w flex flex col justify center p pl gt lt div class flex justify between mb gt lt header gt lt div class font caveat text xl font medium text sky gt Mountain lt div gt lt h class text xl font bold text slate gt Eureka Peak lt h gt lt header gt lt button class shrink h px w px border border slate hover border slate rounded full shadow inline flex items center justify center focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease in out aria label Like gt lt svg class fill red xmlns width height gt lt path d M C A a l a l a C Zm a c a c a Z gt lt svg gt lt button gt lt div gt lt div class text slate text sm line clamp mb gt It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout lt div gt lt div class text right gt lt a class text sm font medium text indigo hover text indigo focus visible outline none focus visible ring focus visible ring indigo transition colors duration ease out href gt Read more amp gt lt a gt lt div gt lt div gt lt article gt lt div gt lt div gt lt div gt ConclusionsHopefully you have enjoyed this tutorial and learned a thing or two that you can apply to your next project to take advantage of tabs to enhance the quality of your interface design Keep reading if you need to build something similar for Next js or Vue 2023-07-19 09:03:08
海外TECH DEV Community Anyone using Fiverr? https://dev.to/pulimoodan/anyone-using-fiverr-1p9l Anyone using Fiverr Is there anyone working with Fiverr as a freelance developer or designer I used to be a freelancer at Fiverrr before I ended up in a job Only worked with a bunch of clients and hard some bad and good experiences Share your experience with Fiverr or other freelancing platforms 2023-07-19 09:03:06
海外TECH Engadget 'Babylon 5' is finally coming to Blu-ray https://www.engadget.com/babylon-5-is-finally-coming-to-blu-ray-093539925.html?src=rss x Babylon x is finally coming to Blu rayThe good news keeps coming for all Babylon fans The entire series is coming to Blu ray just a few months after sharing that an animated feature length film is in the works The th anniversary release will include all episodes of its five season run and its pilot TV movie The Gathering Show creator J Michael Straczynski shared a celebratory tweet directed at fans stating quot YOU WANTED IT YOU ASKED FOR IT AND IT S FINALLY HAPPENED quot ATTENTION BABYLON FANS YOU WANTED IT YOU ASKED FOR IT AND IT S FINALLY HAPPENED To celebrate B s th Anniversary the Complete Babylon series will be released ON BLU RAY December Pre orders can be placed STARTING TODAY via the retailer of your choice Huzzah pic twitter com OfIIfaーJ Michael Straczynski straczynski July Straczynski s series followed the inhabitants of a rd century Earth Alliance space station set up to mediate peace between five powerful empires Its initial production wasn t the highest quality ーto say the least ーjumping between acted scenes and blurry CGI frames But in Warner Bros Home Entertainment released Babylon Remastered to stream on what was then called HBO Max and as a digital download on iTunes and Amazon The original camera negatives were scanned in K and then downscaled to HD with a clean up and color correction to boot The CGI sequences were upscaled to HD and the show has been available to watch in its original ever since The Blu ray release will be quot fully remastered in HD quot which could be the update or a newer version Babylon s Blu ray edition is now available to pre order for and will be released in the US and Canada on December th This article originally appeared on Engadget at 2023-07-19 09:35:39
海外科学 NYT > Science How the World’s Two Largest Polluters, U.S. and China, Stack Up https://www.nytimes.com/2023/07/19/climate/us-china-climate-issues.html How the World s Two Largest Polluters U S and China Stack UpFrom gas emissions to electric vehicles here is how the world s two biggest economies ーand polluters ーcompare on taking steps to confront climate change 2023-07-19 09:25:54
海外ニュース Japan Times latest articles Foreign visitors to Japan soar as summer holiday season approaches https://www.japantimes.co.jp/news/2023/07/19/national/japan-tourism-bounce-back/ Foreign visitors to Japan soar as summer holiday season approachesPreliminary figures showed that foreign visitors visited Japan in the six months from January which is of what it was in the same 2023-07-19 18:10:29
海外ニュース Japan Times latest articles Japan’s personal data commission inspects Digital Agency over My Number woes https://www.japantimes.co.jp/news/2023/07/19/national/digital-agency-inspected-my-number/ Japan s personal data commission inspects Digital Agency over My Number woesThe government s Personal Information Protection Commission has conducted an on site inspection of the Digital Agency over problems involving My Number personal identification numbers 2023-07-19 18:09:37
海外ニュース Japan Times latest articles U.S. soldier in North Korea far from first American to flee to reclusive state https://www.japantimes.co.jp/news/2023/07/19/asia-pacific/north-korea-americans-detained/ U S soldier in North Korea far from first American to flee to reclusive stateNumerous U S citizens ーincluding soldiers tourists journalists and scholars ーhave been detained or crossed into North Korea since the Cold War 2023-07-19 18:07:04
海外ニュース Japan Times latest articles As heat wave bakes Europe, Paris keeps eye on weather models for Olympics https://www.japantimes.co.jp/sports/2023/07/19/olympics/summer-olympics/paris-olympic-organizers-heat/ As heat wave bakes Europe Paris keeps eye on weather models for OlympicsA contingency plan was in place to adjust schedules but there were no plans to change any locations of events a spokesperson for Paris 2023-07-19 18:01:19
ニュース BBC News - Home Interest rates: Big rise less likely after inflation surpise https://www.bbc.co.uk/news/business-66237492?at_medium=RSS&at_campaign=KARANGA england 2023-07-19 09:52:38
ニュース BBC News - Home Benjamin Mendy: Former Manchester City defender signs for Lorient https://www.bbc.co.uk/sport/football/66244696?at_medium=RSS&at_campaign=KARANGA lorient 2023-07-19 09:56:03
ニュース BBC News - Home Daniel Morgan killing: Family agrees Met Police settlement https://www.bbc.co.uk/news/uk-66241903?at_medium=RSS&at_campaign=KARANGA rowley 2023-07-19 09:07:51
ニュース BBC News - Home Dan Wootton: GB News host admits 'errors of judgement' https://www.bbc.co.uk/news/uk-66240304?at_medium=RSS&at_campaign=KARANGA mailonline 2023-07-19 09:31:40
ニュース BBC News - Home Susan Hall selected as Tory London mayoral candidate https://www.bbc.co.uk/news/uk-england-london-66243332?at_medium=RSS&at_campaign=KARANGA daniel 2023-07-19 09:33:17
ニュース BBC News - Home Facebook-owner Meta exec Nick Clegg claims AI 'quite stupid' https://www.bbc.co.uk/news/technology-66238004?at_medium=RSS&at_campaign=KARANGA current 2023-07-19 09:04:41
ニュース BBC News - Home Jaguar Land Rover-owner to spend £4bn on UK battery factory https://www.bbc.co.uk/news/business-66237935?at_medium=RSS&at_campaign=KARANGA somerset 2023-07-19 09:32:31
ニュース BBC News - Home Women's Ashes: How England closed gap on Australia https://www.bbc.co.uk/sport/cricket/66189867?at_medium=RSS&at_campaign=KARANGA ashes 2023-07-19 09:04:59
IT 週刊アスキー TikTok「サブスク限定動画」開始。クリエイターの収益化手段を拡充 https://weekly.ascii.jp/elem/000/004/145/4145925/ tiktok 2023-07-19 18:45:00
IT 週刊アスキー Aurexが誕生50年でブランド刷新。Bluetooth対応カセットプレーヤーなどを発表 https://weekly.ascii.jp/elem/000/004/145/4145909/ aurex 2023-07-19 18:30:00
IT 週刊アスキー オンライン決済サービス「PAY.JP」、チーム管理機能を追加 複数の担当者が管理可能に https://weekly.ascii.jp/elem/000/004/145/4145924/ payjp 2023-07-19 18:30:00
IT 週刊アスキー マイクロソフト、法人向けチャットAI「Bing Chat Enterprise」データ保護を強化 https://weekly.ascii.jp/elem/000/004/145/4145908/ bingchat 2023-07-19 18:25:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)