IT |
気になる、記になる… |
Microsoft、「Windows Subsystem for Android」のアップデートをDevチャネルで公開 − Android 12.1へのアップデートなど |
https://taisy0.com/2022/05/21/157207.html
|
windowssubsys |
2022-05-21 05:44:45 |
IT |
気になる、記になる… |
「Google Pixel 6a」の開封動画が登場 − 画面内蔵型指紋センサーのデモも |
https://taisy0.com/2022/05/21/157204.html
|
google |
2022-05-21 05:35:42 |
AWS |
lambdaタグが付けられた新着投稿 - Qiita |
Lambda から直接ステータスコードを設定する |
https://qiita.com/GleamingCake/items/3ef4685fac6b78b53358
|
dlerasynceventcontextgtle |
2022-05-21 14:58:26 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
formatの桁数プラスマイナス、カンマとゼロ埋め(カンマと空白)全部詰め込んだ書き方(順番) |
https://qiita.com/tat_aka/items/2846e747bf3e88ef9073
|
format |
2022-05-21 14:15:45 |
python |
Pythonタグが付けられた新着投稿 - Qiita |
エロ動画のシーンを音声から分析するシリーズ 2: 転移学習のチュートリアルをやってみる |
https://qiita.com/c1z/items/31b755ff1167fcd6a7e3
|
yamnet |
2022-05-21 14:06:59 |
js |
JavaScriptタグが付けられた新着投稿 - Qiita |
PG見聞録 ~javascript編 基礎of基礎3~ |
https://qiita.com/yukio113o/items/77078bb6e49c67628f14
|
javascript |
2022-05-21 14:41:27 |
Ruby |
Rubyタグが付けられた新着投稿 - Qiita |
ボイスチャットの開始と終了だけ通知するdiscord bot |
https://qiita.com/tewi_poyoyo/items/6ce29b8b971a12608f8e
|
discordbot |
2022-05-21 14:08:54 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
Lambda から直接ステータスコードを設定する |
https://qiita.com/GleamingCake/items/3ef4685fac6b78b53358
|
dlerasynceventcontextgtle |
2022-05-21 14:58:26 |
AWS |
AWSタグが付けられた新着投稿 - Qiita |
クラウドエンジニア(AWS)の為の基本サービス全容まとめ |
https://qiita.com/Marusoccer/items/d5d6f12f11dc334c9a42
|
cloudtech |
2022-05-21 14:09:18 |
Ruby |
Railsタグが付けられた新着投稿 - Qiita |
ActiveRecordはどのタイミングで実際にクエリを実行しているのか。SQLキャッシュについて。 |
https://qiita.com/NakamuraFumiya3/items/9b8d59496826666b073c
|
activerecord |
2022-05-21 14:22:17 |
技術ブログ |
Developers.IO |
Amazon RedshiftからAmazon Kinesisのストリームデータをニアリアルタイムにインジェストしてみた |
https://dev.classmethod.jp/articles/redshift-materialized-view-streaming-ingestion/
|
amazonkinesis |
2022-05-21 05:53:44 |
技術ブログ |
Developers.IO |
TerraformでS3サーバーアクセスログを有効にする |
https://dev.classmethod.jp/articles/how-to-setup-s3-server-access-logs-by-terraform/
|
amazons |
2022-05-21 05:06:27 |
海外TECH |
DEV Community |
How I created a minimal linktree like page for me in just 2 hours. |
https://dev.to/asheeshh/how-i-created-a-minimal-linktree-like-page-for-me-in-just-2-hours-ncp
|
How I created a minimal linktree like page for me in just hours The PlanI have seen a lot of people using linktree and similar sites where you can create your social links page but I needed something very minimal and clean and thus I decided to make my own social links page NOTE I tried to explain the process as best as I can but I m still a newbie to blogging so please don t mind if it seems weird at some places and let me know where I can improve I d love to hear from you DesignThe design was pretty clear to me a small avatar name bio and all the social links as icons with a cool hover effect I wanted to make it easily customizable if I needed to so I knew I had to implement a config file with all the colors icon list name bio and avatar link It looks like this config js export const config avatar bgColor b textColor ddd iconColor ddd name ashish description solo developer by day overthinker by night links slug github type url link slug discord type hover text asheeshh Note how I m using type hover for discord to distinguish it from other icons keep reading to know the reason Tech StackAs it was just a single page app I decided to use NextJS as I m very comfortable with it at the moment Here are all the frameworks and libraries I used NextJS TailwindReact TooltipReact Hot ToastSimple Icons Creating the AppFirst I quickly started a next project using the beloved command create next app initialized tailwind CSS in the project and installed all the other libraries I needed The next step was to create all the components I needed that are Avatar jsx Icon jsx and IconBar jsx ComponentsAvatar jsx the avatar component in the app Icon jsx individual icon component IconBar jsx the horizontal icon bar component in the app Now let s discuss about the content of these files Here is the code for my Avatar jsx file It s a Next Image Component with tailwind class Avatar jsximport Image from next image export default function Avatar return lt Image src alt Avatar width height className rounded full gt For the Icons I m using Simple Icons as they have a lot of brand icons which was exactly what I needed First I created a file GetIcon js to get the SVG Icon using the slug It looks something like this GetIcon jsimport SimpleIcons from simple icons export default function GetIcon slug const icon SimpleIcons Get slug svg return icon As you can see it returns the lt svg gt lt svg gt tag of the icon as a string The next step was converting the string to a jsx component which is what my Icon jsx component does Icon jsximport GetIcon from libs GetIcon import config from config export default function Icon props return lt div dangerouslySetInnerHTML html GetIcon props icon className w px h px hover scale duration ease in out style fill config iconColor gt lt div gt You can see that I m using config to set the icon color It takes the icon slug as props and passes it to GetIcon which returns the svg as string which is converted to a jsx component by using dangereouslySetInnerHTMLThe last component is IconBar jsx which stacks all the Icons horizontally and returns them as a jsx component IconBar jsximport Icon from Icon import config from config import ReactTooltip from react tooltip import useEffect useState from react import toast Toaster from react hot toast export default function IconBar const isMounted setIsMounted useState false useEffect gt setIsMounted true const handleClick e gt navigator clipboard writeText e target closest data tip dataset tip toast success Copied to clipboard duration const icons config links map icon gt if icon type url return lt div className text center items center cursor pointer key icon slug gt lt a href icon link target blank rel noopener noreferrer gt lt Icon icon icon slug gt lt a gt lt div gt else if icon type hover return lt div className text center items center cursor pointer key icon slug gt lt a data tip icon text key icon slug onClick handleClick gt lt Icon icon icon slug gt lt a gt isMounted amp amp lt ReactTooltip place top type dark effect float gt lt div gt else return return lt div className flex flex wrap w full h full gap justify center items top gt lt Toaster toastOptions style background config textColor gt icons lt div gt I m mapping the array present in my config js file to icons to convert them to lt div gt lt div gt components which is finally used in the returned div which has Also since discord doesn t have an URL but has a tag I used React Tooltip to make a tooltip for the discord icon That s the reason why I had added type hover in discord icon as stated above To show the notification that the discord tag has been copied I used the React Hot Toast library Assembling ComponentsThe final step was to assemble all the components in my index js file to complete the app Here s what it looks like index jsimport Avatar from components Avatar import IconBar from components IconBar import config from config import Head from next head export default function Home return lt div className flex flex col justify center items center w screen h screen p style backgroundColor config bgColor gt lt Head gt lt title gt config name lt title gt lt meta name description content config description gt lt link rel icon href process env NEXT PUBLIC CLOUDIMG TOKEN https process env NEXT PUBLIC CLOUDIMG TOKEN cloudimg io config avatar radius config avatar gt lt Head gt lt div className flex flex col justify center align center w full lg w md w h lg h md h items center gt lt div className w full h full flex flex col justify center items center gt lt Avatar gt lt h className text center text xl font mt style color config textColor gt config name lt h gt lt h className text config textColor text center text md font normal mt style color config textColor gt config description lt h gt lt div className w full h mt lg mt md mt gt lt IconBar gt lt div gt lt div gt lt div gt lt div gt After assembling and a bit of styling using tailwind this is what the App looks like Deploying the appI used vercel to deploy the app as it works best with NextJS and added a custom subdomain to it The site is live at and currently ConclusionThis was the whole process of making the app and it roughly took around hours to make I m already using it as my social link page currently You re free to use it to create your own page if you want to the source code is available under MIT License here Thanks for reading lt |
2022-05-21 05:20:07 |
Apple |
AppleInsider - Frontpage News |
Deals: save $1,000 on Sonance Outdoor Speakers at Best Buy, with streaming powered by Sonos |
https://appleinsider.com/articles/22/05/21/deals-save-1000-on-sonance-outdoor-speakers-at-best-buy-with-streaming-powered-by-sonos?utm_medium=rss
|
Deals save on Sonance Outdoor Speakers at Best Buy with streaming powered by SonosAn incredible deal at off at Best Buy this Sonance Mag Series Channel Outdoor Streaming Sound System powered by Sonos delivers AirPlay and Apple Music support Save on this Sonos Outdoor Speaker Sound System powered by SonosPriced at after a cash discount at Best Buy the Sonance Mag Series Channel Outdoor Streaming Sound System is powered by Sonos The audio system earned an average of stars with user reviews at Best Buy indicating buyers are happy with the audio system Along with AirPlay support the Sonance sound system also works with Apple Music and Spotify Read more |
2022-05-21 05:01:04 |
海外ニュース |
Japan Times latest articles |
Naomi Osaka returns to French Open with conversation about mental health in sports ongoing |
https://www.japantimes.co.jp/sports/2022/05/21/tennis/osaka-mental-health/
|
Naomi Osaka returns to French Open with conversation about mental health in sports ongoingOsaka s stand a year ago sent organizers and brands scrambling to better support their athletes but progress has been incremental |
2022-05-21 14:05:08 |
ニュース |
BBC News - Home |
Russia halts gas supplies to Finland |
https://www.bbc.co.uk/news/world-europe-61524933?at_medium=RSS&at_campaign=KARANGA
|
finlandfinland |
2022-05-21 05:07:25 |
ニュース |
BBC News - Home |
Parliament could burn down any day, says Andrea Leadsom |
https://www.bbc.co.uk/news/uk-politics-61526638?at_medium=RSS&at_campaign=KARANGA
|
andrea |
2022-05-21 05:16:36 |
ニュース |
BBC News - Home |
The Papers: 'Cost of living crunch' and desire to arm Moldova |
https://www.bbc.co.uk/news/blogs-the-papers-61531953?at_medium=RSS&at_campaign=KARANGA
|
moldova |
2022-05-21 05:18:14 |
ニュース |
BBC News - Home |
US PGA Championship: Will Zalatoris opens one-shot lead |
https://www.bbc.co.uk/sport/golf/61531380?at_medium=RSS&at_campaign=KARANGA
|
mcilroy |
2022-05-21 05:20:26 |
北海道 |
北海道新聞 |
22日の予告先発 日本ハムは金子 |
https://www.hokkaido-np.co.jp/article/683655/
|
予告先発 |
2022-05-21 14:10:50 |
コメント
コメントを投稿