js |
JavaScriptタグが付けられた新着投稿 - Qiita |
Denoで使えるNode.jsライブラリ集 |
https://qiita.com/access3151fq/items/53d5c37f19be290a03ad
|
このように、将来的にはNodejsとDenoの互換性が向上すると思いますが、現在でもDenoでNodejs向けのライブラリを使うことはできます。 |
2021-11-06 22:39:39 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
wordpressにて覚えのない<a>タグで囲まれてします現象 |
https://teratail.com/questions/368067?rss=all
|
|
2021-11-06 22:37:06 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
Python 座標面すべての点をリスト化 |
https://teratail.com/questions/368066?rss=all
|
Python座標面すべての点をリスト化座標面例えばxyの平面においてすべての取りうる値をリスト化したいです。 |
2021-11-06 22:33:56 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
pythonで指定した個数のlistに乱数を追加したい |
https://teratail.com/questions/368065?rss=all
|
pythonで指定した個数のlistに乱数を追加したいpythonで、listnbspnbspからの乱数を個listnbspnbspからの乱数を個…listnnbspnbspからの乱数を個というlistを生成し、すべてのlistにおいて番目の要素をにするというプログラムを作成したいのですが、うまく動きませんでした。 |
2021-11-06 22:11:01 |
Program |
[全てのタグ]の新着質問一覧|teratail(テラテイル) |
phpをインストールする際にエラーが発生しました。 |
https://teratail.com/questions/368064?rss=all
|
phpをインストールする際にエラーが発生しました。 |
2021-11-06 22:10:15 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
CSV ファイルを読み込んだら特殊文字がエスケープされた |
https://qiita.com/TatsuyaIsamu/items/e89fefa19d620871acf0
|
Viewで表示したとききちんと改行されてほしかったのでnの部分をうまいこと残してスクレイピングしておいたで、DBに反映させて。 |
2021-11-06 22:50:26 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
shrine っていう名前のテーブルは作れない |
https://qiita.com/TatsuyaIsamu/items/03c5af7537be8166a96d
|
shrineっていう名前のテーブルは作れない開発環境rubyRubyonRails前提管理者画面にrailsadminを使っている本題神社テーブルを作ろうと思ってshrineっていう名前で設計した。 |
2021-11-06 22:34:13 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
user モデルが作成されたときに孫モデルまでビルド |
https://qiita.com/TatsuyaIsamu/items/f92ad8e0a2c20353cfc6
|
userモデルが作成されたときに孫モデルまでビルド以前の続きふわっとやりたかったことが形になったので頑張って言語化開発環境rubyRubyonRailsやりたかったことuserモデルが作成されたときにuserモデルに紐づくrankingモデルとその子モデルのrankingitemモデルまでbuildするこうすることで以下みたいになるテーブルをプロフィールとランキングとで分けることでユーザーとしてはそれぞれを独立した形で変更できる。 |
2021-11-06 22:29:12 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
devise を使いながら user 作成時に関連モデルをビルドする |
https://qiita.com/TatsuyaIsamu/items/a97ae2d911a4e23016d0
|
deviseを使いながらuser作成時に関連モデルをビルドするuserモデルを作ったそしてuserモデルにhasoneのuserintroductionモデルを作った自分的にはuserにuserintroductionをネストさせておいて作成時にビルドさせる形にしたい。 |
2021-11-06 22:21:31 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
ルーティング member でネストする場合としない場合 |
https://qiita.com/TatsuyaIsamu/items/a25076b8809b2e042c58
|
ルーティングmemberでネストする場合としない場合きれいなルーティングで悩んだrankingテーブルがあって、そのrankingテーブルの動的なIDを含むrankingitemコントローラーへのURLを作りたかったrankingitemをmemberで囲ってやるといい感じになった。 |
2021-11-06 22:14:19 |
Linux |
Ubuntuタグが付けられた新着投稿 - Qiita |
Wiresharkでインタフェースが認識されない不具合 |
https://qiita.com/jun4869/items/d6599907683693e7990f
|
Wiresharkでインタフェースが認識されない不具合はじめにCCNA学習のために実機演習を行い、LAN上に流れるパケットを「見える化」するためwiresharkを用いました。 |
2021-11-06 22:04:51 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
コマンドで、S3オブジェクトも削除する方法 |
https://qiita.com/niha28niwa/items/8f58a6a570267d1e1bc2
|
コマンドで、Sオブジェクトも削除する方法AWSの画像データ解決したいこと内容の把握今まではデータベースリセットrailsdbmigrateresetで、保存したデータは全て削除できていた。 |
2021-11-06 22:53:49 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
ネットワークエンジニアからクラウドエンジニアに転職した感想 |
https://qiita.com/liverpool_toki/items/84ef75f05fabe53b713c
|
自分を安売りしないことだけはしないようにしてください。 |
2021-11-06 22:18:27 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
CSV ファイルを読み込んだら特殊文字がエスケープされた |
https://qiita.com/TatsuyaIsamu/items/e89fefa19d620871acf0
|
Viewで表示したとききちんと改行されてほしかったのでnの部分をうまいこと残してスクレイピングしておいたで、DBに反映させて。 |
2021-11-06 22:50:26 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
shrine っていう名前のテーブルは作れない |
https://qiita.com/TatsuyaIsamu/items/03c5af7537be8166a96d
|
shrineっていう名前のテーブルは作れない開発環境rubyRubyonRails前提管理者画面にrailsadminを使っている本題神社テーブルを作ろうと思ってshrineっていう名前で設計した。 |
2021-11-06 22:34:13 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
user モデルが作成されたときに孫モデルまでビルド |
https://qiita.com/TatsuyaIsamu/items/f92ad8e0a2c20353cfc6
|
userモデルが作成されたときに孫モデルまでビルド以前の続きふわっとやりたかったことが形になったので頑張って言語化開発環境rubyRubyonRailsやりたかったことuserモデルが作成されたときにuserモデルに紐づくrankingモデルとその子モデルのrankingitemモデルまでbuildするこうすることで以下みたいになるテーブルをプロフィールとランキングとで分けることでユーザーとしてはそれぞれを独立した形で変更できる。 |
2021-11-06 22:29:12 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
devise を使いながら user 作成時に関連モデルをビルドする |
https://qiita.com/TatsuyaIsamu/items/a97ae2d911a4e23016d0
|
deviseを使いながらuser作成時に関連モデルをビルドするuserモデルを作ったそしてuserモデルにhasoneのuserintroductionモデルを作った自分的にはuserにuserintroductionをネストさせておいて作成時にビルドさせる形にしたい。 |
2021-11-06 22:21:31 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ルーティング member でネストする場合としない場合 |
https://qiita.com/TatsuyaIsamu/items/a25076b8809b2e042c58
|
ルーティングmemberでネストする場合としない場合きれいなルーティングで悩んだrankingテーブルがあって、そのrankingテーブルの動的なIDを含むrankingitemコントローラーへのURLを作りたかったrankingitemをmemberで囲ってやるといい感じになった。 |
2021-11-06 22:14:19 |
海外TECH |
Ars Technica |
Here are the best “early Black Friday” deals we’re seeing this weekend [Updated] |
https://arstechnica.com/?p=1808515
|
airpods |
2021-11-06 13:00:59 |
海外TECH |
MakeUseOf |
10 Client Red Flags Every Freelancer Should Be Aware Of |
https://www.makeuseof.com/client-red-flags-freelancer-be-aware-of/
|
clients |
2021-11-06 13:30:12 |
海外TECH |
DEV Community |
A server-less CI/CD approach for mono-repo micro-frontends |
https://dev.to/aws-builders/a-server-less-cicd-approach-for-mono-repo-micro-frontends-32m6
|
A server less CI CD approach for mono repo micro frontendsThis article provides a CI CD pipeline approach for a GitHub mono repo based micro frontend architecture in AWS leveraging a series of AWS server less services such as AWS CodePipeline CodeBuild and CodeDeploy Micro frontends come with an increase of the complexity of managing the infrastructure which makes it crucial for organizations to carefully invest their time in supporting continuous integration CI continuous deployment CD pipelines and automatic tools that scale along with the organization The proposed approach provides a scalable option for organizations to scale their tech micro frontend ecosystem keep teams autonomous and let them focus on business and early feedback with a fast release cycle Some context Mono and Poly reposBefore diving in the architecture let s mention the main approaches for structuring a micro frontend module Mono repos all the teams work on a single repositoryPoly multi repos each domain specific micro frontend is located in its own repository and owned by a single team This PoC will focus on a hands on detailed and pragmatic CI CD setup based on a mono repo with main branch as source of the pipelines changes For a great overview and detailed comparison I recommend an upcoming book from Luca Mezzalira ArchitectureThe architecture is based on a scenario where a company is implementing micro frontends on a mono GitHub repository and wishes to implement a server less CI CD pipeline in AWS For this PoC the mono repo contains two trivial Angular micro frontends mfe accounts and mfe payments though this model allows you to write each module independently with any framework of choice The scenario involves some steps Developers push their code to the main branch in GitHub which will trigger a push event via GitHub webhooks to an AWS API Gateway responsible to handle the event The API Gateway triggers an AWS Lambda function which authenticates the request analyses the event and based on affected files triggers a pipeline for the micro frontend where the files belong to One or more pipelines start building testing and deployment actions via AWS CodePipeline CodeBuild and CodeDeploy Changes are available in S bucket and exposed on a Cloudfront distribution Lets deep dive in the setup API gateway setupGitHub allows to setup integrations towards its events such as repository pushes via webhooks which POST a GitHub event data payload towards an endpoint Let s expose a RESTful API in AWS via API Gateway containing a single POST endpoints as shown below In above screen we use a Lambda integration proxy because our associated “Hello World Lambda will need to access the API Gateway request headers in order to authenticate GitHub upcoming requests With the API in place let s create the webhook GitHub Webhook setupOnce the API Gateway has been deployed in a stage it is time to create a GitHub webhook refer to this intuitive guide Important provide a secret to make sure that our Lambda can accept requests only coming from the webhook more on this later The integration is ready Pushing a file to the repository will result in a “Hello world message triggered by the Lambda which can be seen under its stream logs in Cloudwatch Let s now update Lambda code to make sure that we support CI CD for any micro frontends in your repo Micro frontend strategy on Lambda setupThe ultimate goal of the Lambda function is that given a GitHub push event containing repo commits then it triggers one or more pipelines for any affected micro frontend Let s look in details at below gist First Lambda authenticates requests only coming from the GitHub webhook by validating the SHA request header via a HMAC security check using the crypto module This check is based on the secret defined in the GitHub webhook earlier and also stored in AWS Secret Manager follow this tutorial Lambda will access the secret in a secure way via the IAM action secretsmanager GetSecretValueOnce validated the payload is used to infer which micro frontends have been affected by extracting its name from the added modified and removed files from the commits list If any micro frontend has changed we trigger a new build in AWS CodePipeline which will build and deploy the micro frontend For simplicity the pipeline is called the same as the micro frontend which is going to build The AWS SDK client library requires an IAM role allowing codepipeline StartPipelineExecution action to access the resourceOverall Lambda code can be seen here Now it is time to create the pipeline itself which is part of the next section Code Pipeline setupThe creation of a Code Pipeline in AWS involves many steps and concepts so I will try to keep it simple Code Pipeline helps to automate release pipelines for fast and reliable application and infrastructure updates Each steps here called stages perform actions on the involved build artifacts I will look into how Create the pipeline by choosing some settingsAdd a Source stage answering the question “from where does the code to build come from Add a Build stage “how do I build the source code you just provided Add a Deploy stage “how and where do I deploy the build artifact you just provided The main idea will be to isolate each CodePipeline and CodeBuild project to give flexibility and ownership to each team to manage that process within the team Optimizations such as reuse of pipelines for similar projects and CloudFormation template are out of scope Create pipeline by choosing settingsFirst create a pipeline by providing a name matching the building micro frontend and default settings as shown below Source StageThis stage links the source code to be processed with Code Pipeline We will connect CodePipeline with our GitHub repo by clicking the Connect button and initiating a wizard At the end of the wizard as shown below you will be able to access your GitHub repo aladevlearning microfrontends pipeline in my case to select the main branchto unselect the Start pipeline on source code changes as we want to have it handled by the Lambda functionand click Next to proceed to the next stage Above steps can be seen in below gif Build StageThis stage is responsible to build the source received in previous stage It will create or reuse an existing CodeBuild project which instructs the pipeline on how to run the build via a builspec yml file where CodeBuild will practically make the buildIn regards to buildspec yml we can decide whether having a common file for all micro frontends or having one for each of them This highly depends on whether all micro frontends adhere to same framework of choice and same build test steps By keeping them separate you give each team independence on how to build it at the cost of slightly more complex overview on build process and governance For our micro frontend the file looks like below A buildspec yaml consists of intuitive phases for installing prepping the environment building the code and instructing how to structure the artifacts After getting the micro frontend name from the pipeline initiator the file installs dependencies and zips the final artifact which will be deployed to S bucket specified in the Deploy section See this guide for more details Finally the building process requires an environment aka machine where to run Above gif shows how CodeBuild configuration is based on a build environment which represents a combination of operating system programming language runtime and tools that are used to run a build We also selected a specific buildspec yml file location as each micro frontend could differ in terms of build process and pipeline e g one could be an Angular project and another be a React one or both still using same framework but being built with different steps Once the Code build project is setup we set the build provider to be Code Build we select the newly created Code Build project mfe accounts build and continue to the final stage Build project created let s move to the final stage of CodePipeline Deploy StageFinally we want to deploy our artifact on S In order to do that we need to create S buckets where the artifact will be independently deployed As CodeBuild will zip the built artifact we check the Extract file before deploy settings and set the Canned ACL to public read given we want to be able to see the deployed artifacts in S That s great Your code is now deployed in S which allows to associate it with a CloudFront distribution for better deployment Above steps for the CodePipeline should be repeated for any micro frontend This level of redundancy will allow each team to be independent and autonomous tweak their CI CD to ResultUpon push to repository affecting the micro frontend containing the change one or more code pipelines will start Successful pipelines will look like this The deployed artifact is located under the specified S bucket Associated with a Cloudfront distribution our deployed micro frontend will look as this Full code can be found here Summary and ideasThis article went in depth to provide a minutes setup to make a seamless CI CD pipeline for a mono repo based frontend architecture This should be seen as a workable though initial approach which can be explored in so many ways proving yet again how great and creative is to build things in AWS Some ideas could be Have different pipelines to cover different needs such as different framework test suite integration and functional testing multi stage environment etc…publish artifacts in different AWS Accounts one for test and one for production to keep isolation and security in place Extend approach for feature branch CI CD where you could created branch deployments for early prototyping and feedback without blocking the main branch Make the above as a CloudFormation template This is a must to elevate this approach and consistently repeat it for any micro frontend CloudFront invalidation step If interested in adding CloudFront in the pipeline a cache invalidation step via a Lambda function may be necessary to make sure all latest changes are correctly propagated to the consumers or maybe AWS will take it as feedback and expose it as this seems a pretty used pattern ReferencesComplete CI CD with AWS CodeCommit AWS CodeBuild AWS CodeDeploy and AWS CodePipeline Amazon Web…Building Micro Frontends the book |
2021-11-06 13:39:33 |
海外TECH |
DEV Community |
Rapid Microservices Development in .NET. An introduction. |
https://dev.to/nikiforovall/rapid-microservices-development-in-net-an-introduction-jl2
|
Rapid Microservices Development in NET An introduction TL DRLearn how to speed up microservices development process by using set of predefined templates and practices See Problem StatementThe way we develop software is built around the idea of high velocity and readiness to change and adapt to the market s requirements This approach brings up the next questions How to successfully contribute to the existing code base How to not break something in meantime How do we reduce the learning curve of an existing solution Actually all you need to do is to write clean understandable and open for modification code The actual craft of writing code is honed through years of learning and making mistakes Component level design is important and you can benefit from good predefined solution templates something like Clean Architecture gives you a good starting point Also if you feel like your project has some complex domain you might want to incorporate DDD in the mix Personally I find it really useful because it facilitates communication between developers and domain experts It is easier to map code snippets to domain and project requirements Frequent changes increase the possibility of bugs as software engineers we deal with it by extensively testing a codebase At first glance you might think writing tests is an additional effort that prevents you from shipping some valuable and urgent features But in practice it is actually another way around you want to invest in a testing toolkit to save future self from some nasty bugs Also tests serve as live documentation and enable refactoring My suggestion is to be practical about it don t try to get coverage by writing tons of useless unit tests determine what is the best in a given context Simply write tests my dude Clean code reduces the cognitive load and overall complexity of a codebase In my opinion for rapid development you need somewhat consistency for technical decisions It is a good idea to use common frameworks libraries tools and even cross cutting concerns code just make sure it doesn t introduce additional coupling and unnecessary complexity ProposalLuckily there is the remedy Rapid Microservices Development RMD remedy got it As an organization responsible for developing microservices solutions you want to build reusable components so it will be easy to create a new microservice from the scratch Creating project templates is a well known approach and it is quite simple Rapid microservice development is a goal and templates might be a viable solution just be mindful about the goal Templates FamilyI ve created a set of project templates that provides you information of how you might organize microservices solutions yourself Note each template might be used individually outside of microservices development context Feedback is highly appreciated All you need to do is to install it via running the command dotnet new install NikiforovAll CleanArchitecture Templates Once installed you can see a list of templates by running dotnet new l na These templates matched your input na Template Name Short Name Language Tags Build Project Template na bu bash build project Template Clean Architecture Template na ca C CleanArchitecture DDD Template Event Sourcing Template na es C EventSourcing CleanArchitecture DDD Template Gateway Template na ga C gateway Template Name Alias Repository Status Build Project na bu N A Clean Architecture Template na ca Event Sourcing Template na bu Gateway na ga Build projectIn this blog post I will show you how to create a one of the components yourself The responsibility of build project is a starting project of any developer The main goal is to have zero configuration required to get the project up and running this is really important and people will say thank you for that Build project consists of something like Scripts to pull code base and latest changes from the remotes Scripts to manage infrastructure used during development All you need to do is to run docker compose service service to run the system locally This is really useful Projects assets something like architecture documentation postman collection to speed up manual developer testing guidelines etc I will explain the anatomy of the build project from the template in a moment But first we need to generate one dotnet new na bu n MyFirstBuildProject dry runFile actions would have been taken Create env Create gitignore Create vscode settings json Create assets http gateway projects http Create assets http naca projects http Create assets http naes projects http Create build docker postgres init sql Create build execute tests sh Create build generate report sh Create build run services sh Create build setup infrastructure sh Create docker compose local infrastructure yml Create docker compose tests override yml Create docker compose tests yml Create docker compose override yml Create docker compose yml Create docker images txt Create README md Create routes conf json Create scripts generate report sh Create scripts git clone all sh Create scripts git pull all sh Create scripts git summary gitignore Create scripts git summary git summary sh Create scripts git summary README md Create scripts git summary screenshot png Create scripts open in browser sh dotnet new na bu n MyFirstBuildProjectThe template Build Project Template was created successfully As you can see we have scripts some tools and scripts to manage build project build commands to build start and test the solution assets project artifactsdocker compose yml docker compose local infrastructure yml docker compose override yml run system locallydocker compose tests yml docker compose tests override yml run tests locallyThe template pulls three other predefined templates na ca na es na ga You can change that Let s clone microservices from the na bu template scripts git clone all sh Cloning repository na ca Cloning into na ca remote Enumerating objects done remote Counting objects done remote Compressing objects done remote Total delta reused delta pack reused Receiving objects Receiving objects KiB KiB s done Resolving deltas done Cloning repository na es Cloning into na es remote Enumerating objects done remote Counting objects done remote Compressing objects done remote Total delta reused delta pack reused RReceiving objects KiB MiB s done Resolving deltas done Updating files done Cloning repository na ga Cloning into na ga remote Enumerating objects done remote Counting objects done remote Compressing objects done remote Total delta reused delta pack reused Receiving objects KiB MiB s done Resolving deltas done Check the current state of the solution scripts git summary git summary shRepository Branch Remote State d dev MyFirstBuildProject main d dev MyFirstBuildProject na ca main origin d dev MyFirstBuildProject na es main origin d dev MyFirstBuildProject na ga main originNow we can build and run the solution build run services sh startCreating network myfirstbuildproject default with the default driverCreating volume myfirstbuildproject rabbitmqdata nikiforovall with local driverCreating volume myfirstbuildproject postgresdata nikiforovall with local driverCreating volume myfirstbuildproject seq nikiforovall with local driver Use docker scan to run Snyk tests against images to find vulnerabilities and learn how to fix themCreating seq doneCreating myfirstbuildproject postgres doneCreating myfirstbuildproject rabbitmq doneCreating myfirstbuildproject naga gateway doneCreating myfirstbuildproject naes api doneCreating myfirstbuildproject naes worker doneCreating myfirstbuildproject naca worker doneCreating myfirstbuildproject naca api doneContainers starting in backgroundFor log info run services sh infoThe system is up and running screenshot from awesome Now we can use code from assets folder to test things out Create a project in Clean Architecture service created from na ca templatePOST http localhost ca projectsContent Type application json name Clean Architecture Tasks colourCode FFFFFF Get projectsGET http localhost ca projects Create a project in Event Sourcing service created from na es templatePOST http localhost es projectsContent Type application json name Event Sourcing Tasks colourCode FF Get projectsGET http localhost es projects SummaryI encourage you to continue the investigation of the codebase on your own You may find some inspiration or good practices there are hidden gems Let me know if you want to see a review of one of the components in the comments Reference |
2021-11-06 13:17:10 |
海外TECH |
DEV Community |
Create a modal with React! |
https://dev.to/ziratsu/create-a-modal-with-react-176e
|
Create a modal with React Hey fellow creators Let s create an awesome modal with React If you prefer to watch the video version it s right here Here s the source code for you Let s start building Create your component In the Modal js file create a component that ll use useState Add a const with modal and setModal making sure the state is false to begin with so that the modal doesn t show upon opening the website import React useState from react import Modal css export default function Modal const modal setModal useState false return lt gt lt gt Create a button that ll trigger the pop up Add a button inside of the return with an onClick parameter that ll trigger the function we ll create in a second return lt gt lt button onClick toggleModal className btn modal gt Open lt button gt lt gt Here s the function when you click on the button it ll change the state from false to true or the other way around const toggleModal gt setModal modal Create the modal Create the content of your modal with the appropriate classnames for your css and make sure not to forget to add the onClick functions that ll trigger the opening or closing of your modal lt div className modal gt lt div onClick toggleModal className overlay gt lt div gt lt div className modal content gt lt h gt Hello Modal lt h gt lt p gt Lorem ipsum dolor sit amet consectetur adipisicing elit Provident perferendis suscipit officia recusandae eveniet quaerat assumenda id fugit dignissimos maxime non natus placeat illo iusto Sapiente dolorum id maiores dolores Illum pariatur possimus quaerat ipsum quos molestiae rem aspernatur dicta tenetur Sunt placeat tempora vitae enim incidunt porro fuga ea lt p gt lt button className close modal onClick toggleModal gt CLOSE lt button gt lt div gt lt div gt Render the modal conditionally Add the curly brackets and your condition so that the modal only shows if the state is true that is if you ve clicked on the open button modal amp amp lt div className modal gt lt div onClick toggleModal className overlay gt lt div gt lt div className modal content gt lt h gt Hello Modal lt h gt lt p gt Lorem ipsum dolor sit amet consectetur adipisicing elit Provident perferendis suscipit officia recusandae eveniet quaerat assumenda id fugit dignissimos maxime non natus placeat illo iusto Sapiente dolorum id maiores dolores Illum pariatur possimus quaerat ipsum quos molestiae rem aspernatur dicta tenetur Sunt placeat tempora vitae enim incidunt porro fuga ea lt p gt lt button className close modal onClick toggleModal gt CLOSE lt button gt lt div gt lt div gt Now as you can see there are two ways for you to close the modal either by clicking on the close button of course or by clicking on the overlay One last thing Imagine there s a text below your open button For a better user experience you don t want this long paragraph to scroll down when the modal is open To prevent that you need to add a condition so that if the modal is opened then the scrolling will not be possible body active modal overflow y hidden if modal document body classList add active modal else document body classList remove active modal Try with the full code and you ll see by yourself that it s now fixed Make sure to check out the CSS file as well Have fun experimenting and make sure to check out my other tutorials Come and take a look at my Youtube channel See you soon Enzo |
2021-11-06 13:11:42 |
海外科学 |
NYT > Science |
Infrastructure Bill Makes First Major U.S. Investment in Climate Resilience |
https://www.nytimes.com/2021/11/06/climate/infrastructure-bill-climate.html
|
Infrastructure Bill Makes First Major U S Investment in Climate ResilienceThe measure includes billion to help communities prepare for the new age of extreme fires floods storms and droughts that scientists say are worsened by human caused climate change |
2021-11-06 13:46:22 |
海外科学 |
NYT > Science |
Young Women Are Leading Climate Protests. Guess Who Runs Global Talks? |
https://www.nytimes.com/2021/11/06/climate/climate-summit-glasgow-protests.html
|
Young Women Are Leading Climate Protests Guess Who Runs Global Talks There s a stark gender and generation gap at the Glasgow summit and the two sides have very different views on what constitutes “urgent action |
2021-11-06 13:03:35 |
海外科学 |
NYT > Science |
Over 40 Countries Pledge to End Use of Coal Power at COP26 |
https://www.nytimes.com/2021/11/04/climate/cop26-coal-climate.html
|
copthe |
2021-11-06 13:08:26 |
海外科学 |
NYT > Science |
Greta Thunberg, at COP26, Says Talks Are Becoming a ‘Greenwash Campaign’ |
https://www.nytimes.com/2021/11/04/climate/greta-thunberg-cop26.html
|
Greta Thunberg at COP Says Talks Are Becoming a Greenwash Campaign Ms Thunberg and other activists also spoke about the critical role that young women have played in pressuring world leaders to take action on climate change |
2021-11-06 13:07:35 |
ニュース |
BBC News - Home |
Ex-PM John Major: Government handling of Paterson case shameful |
https://www.bbc.co.uk/news/uk-59188972?at_medium=RSS&at_campaign=KARANGA
|
paterson |
2021-11-06 13:18:55 |
ニュース |
BBC News - Home |
Suspending parts of NI Protocol would be 'stupid' |
https://www.bbc.co.uk/news/uk-northern-ireland-59190547?at_medium=RSS&at_campaign=KARANGA
|
protocol |
2021-11-06 13:12:17 |
ニュース |
BBC News - Home |
Australia close on T20 World Cup semis by beating West Indies |
https://www.bbc.co.uk/sport/cricket/59189806?at_medium=RSS&at_campaign=KARANGA
|
indies |
2021-11-06 13:28:28 |
LifeHuck |
ライフハッカー[日本版] |
歩きたくなる! カシオとアシックスが開発したウォーキングアプリが凄い【今日のライフハックツール】 |
https://www.lifehacker.jp/2021/11/243678lht-walkmetrix.html
|
walkmetrix |
2021-11-06 22:05:00 |
サブカルネタ |
ラーブロ |
中華そば 四つ葉@ラーメンWalkerキッチン(ところざわサクラタウン) 「淡口醤油」 |
http://feedproxy.google.com/~r/rablo/~3/X8UCJ46R9eU/single_feed.php
|
kadokawa |
2021-11-06 13:21:05 |
サブカルネタ |
ラーブロ |
傑作魯肉飯(ケッサクルーローハン)@昭島市【2021新店】<豚骨牛肉ラーメン> |
http://feedproxy.google.com/~r/rablo/~3/ODy78eq9f64/single_feed.php
|
傑作魯肉飯ケッサクルーローハン昭島市【新店】lt豚骨牛肉ラーメンgt訪問日メニュー豚骨牛肉ラーメン味塩コメント今日紹介するのは、拝島駅南口からすぐの所に月日にオープンした魯肉飯をメインにした台湾料理のお店「傑作魯肉飯」。 |
2021-11-06 13:14:36 |
北海道 |
北海道新聞 |
柔道GS、大吉と寺田が決勝へ 堀川は3位決定戦に |
https://www.hokkaido-np.co.jp/article/608795/
|
男女 |
2021-11-06 22:10:00 |
北海道 |
北海道新聞 |
COP26開催地で連日デモ 温暖化対策の公平求める |
https://www.hokkaido-np.co.jp/article/608794/
|
国連気候変動枠組み条約 |
2021-11-06 22:07:00 |
北海道 |
北海道新聞 |
レバンガ2連敗 宇都宮に70―93 |
https://www.hokkaido-np.co.jp/article/608793/
|
連敗 |
2021-11-06 22:02:00 |
コメント
コメントを投稿