Responsive Glass Sidebar using CSS & JavaScript

Поделиться
HTML-код
  • Опубликовано: 13 июн 2024
  • Hello everyone 😊 I'm here again with another CSS tutorial, this time, mixed with JavaScript. If you're looking for a complete Glass Sidebar design using CSS & JS, this video's made for you. I've also considered Responsive Design rules in this project and you will definitely find it useful 😉
    📂 Assets
    Icons: boxicons.com/
    Font: fonts.google.com/
    Background Image: tinyurl.com/5ecc56at
    🔗 Source code
    github.com/hosseinnabi-ir/Res...
    🔔 Subscribe Now!
    / @codewithhossein
    ⏱ Timestamps
    00:00 Glass Sidebar Preview
    00:58 Sidebar Logo Elements
    01:13 General Styles
    01:51 Sidebar Glass Effect
    02:55 Sidebar Logo Styles
    04:26 Adding Nav Title & Items
    05:37 Nav Title & Items Styles
    08:25 Adding More Nav Items
    09:37 Sidebar Line Styles
    09:57 Sidebar Closed Mode
    10:27 Adding Toggle Icon
    10:47 Toggle Icon Styles
    10:58 Sidebar Opened Mode
    15:00 Enabling Toggling using JS
    16:58 Sidebar Items Click Effect
    18:11 Thanks For Watching :)
    🎵 Music
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Track: Ikson - Anywhere [Official]
    Music provided by Ikson®
    Listen: • #66 Anywhere (Official)
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Track: BEAUZ & JVNA - Crazy [NCS Release]
    Music provided by NoCopyrightSounds.
    Watch: • BEAUZ & JVNA - Crazy |...
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Track: Jordan Schor & Harley Bird - Home
    Music provided by NoCopyrightSounds.
    Watch: • Jordan Schor & Harley ...
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Song: Levianth & Axol - Remember (feat. The Tech Thieves)
    Music provided by NoCopyrightSounds
    Free Download/Stream: ncs.io/remember
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Track: Lost Sky - Where We Started (feat. Jex)
    Music provided by NoCopyrightSounds.
    Watch: • Lost Sky - Where We St...
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Thanks for watching, I appreciate it 🙏
    Made with 💗 by Hossein

Комментарии • 148

  • @snackboy
    @snackboy Год назад +1

    Absolutely love these tutorials! Thank you for being willing to share your code.

  • @kiddhkane
    @kiddhkane Год назад

    The design is really cool and modern. Good job man.

  • @samannoyb
    @samannoyb Год назад +8

    You are really cool bro! You always reply to people's comments, and simultaneously make awesome projects!! Keep it up!

    • @CodeWithHossein
      @CodeWithHossein  Год назад +3

      Thanks, so are you 😊 If people appreciate me for my work or even criticize it to watch better content next time, anyways, it means a lot to me and gonna appreciate them back ❤

  • @kamuystreams941
    @kamuystreams941 Год назад +2

    Was able to get all issues fixed! thank you for the amazing tutorial. Currently messing with it a little to customize it a little more!

    • @CodeWithHossein
      @CodeWithHossein  Год назад +1

      Glad you enjoyed the tutorial, it's my pleasure 😊❤
      While you're making it customized, you can add glass border to sidebar items on hover, I actually forgot that 😅

    • @kamuystreams941
      @kamuystreams941 Год назад

      @@CodeWithHossein ooo ill have to look into that!

  • @Develandia
    @Develandia Год назад

    Great job! Congrats!

  • @how_to_tutorial0
    @how_to_tutorial0 Год назад +1

    I've been following you since you had 10k subscribers, I don't know why you're getting so few views. you deserve a lot bro😁🔥

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Thank you so much brother, It's a pleasure having you in my channel ❤

  • @manavsheth3516
    @manavsheth3516 Год назад

    you win my subscription bro it literally cleared my all doubts !

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      It's a pleasure to have you by my side 😊❤
      I haven't been active on YT for a while, and that's why I'm answering too late.
      I would sincerely apologize 🙏

  • @enzog_9591
    @enzog_9591 Год назад

    Wow , that's awesome 🥰
    Love from Italy 💚🤍❤

  • @shortyshorty9762
    @shortyshorty9762 Год назад

    It's a great tutorial.
    Thank you very much for that

  • @KaranSingh-ro6li
    @KaranSingh-ro6li Год назад +1

    Oh ! Bro truly loved it ...

  • @mrfrontend1
    @mrfrontend1 Год назад +1

    Your videos gives the real satisfaction
    Keep Growing
    Love from Nepal❤️

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Glad you think so, however I'm not satisfied yet 😅
      Love Nepal & its nature 💚

  • @erelshinzhin5224
    @erelshinzhin5224 Год назад

    That looks so sick dude

  • @isratjahananika6462
    @isratjahananika6462 Год назад

    😳Wow! What a desing

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Glad you liked it, code along with the video and enjoy developing professional designs 😎🤞

  • @MDTalha-vt9bi
    @MDTalha-vt9bi Год назад

    This video is great bro

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      It's very kind of you, glad you enjoyed 😊🌹

  • @ruslansergeyuvic
    @ruslansergeyuvic Год назад

    Wow omg nice video, very wll my dear friend 🥰♥️

  • @dev-araujo
    @dev-araujo Год назад

    Amazing 🔥🔥

  • @vivekgupta309
    @vivekgupta309 Год назад

    super nice !!!

  • @tuantranvan8807
    @tuantranvan8807 Год назад

    Wow so beatifull

  • @alekxsander
    @alekxsander Год назад +11

    It turned out magnificent! Congratulations. However, I would change one thing in future versions, when you resize the photo it does not gradually increase smoothly, it practically jumps from the previous size to the new size, stuttering. I wish you the best of luck with your channel!

    • @CodeWithHossein
      @CodeWithHossein  Год назад +1

      Thank YOU for pointing out this important tip 😊❤

    • @natAndresx
      @natAndresx Год назад +1

      @@CodeWithHossein excellent observation, thanks for mentioning. What solution do you think could be applied?

  • @benhumble3718
    @benhumble3718 Год назад

    You are the best💪

  • @nolowcode
    @nolowcode Год назад

    wow 😮

  • @HICjump
    @HICjump Год назад

    Grafana 9 uses the same concept. Nice video!

  • @OPGAMER-kh1or
    @OPGAMER-kh1or Год назад

    Op or what 🔥🔥👍

  • @chintavishnuvardhan8379
    @chintavishnuvardhan8379 Год назад +1

    ♥️ SUPER BRO

  • @2ru2pacFan
    @2ru2pacFan Год назад

    🔥 😍

  • @shoaibgamingop2171
    @shoaibgamingop2171 Год назад

    Nice bro

  • @farzadhashemi
    @farzadhashemi Год назад

    خیلی نابی بود ممنون

  • @juaniaguero8417
    @juaniaguero8417 Год назад +1

    HI! Im from Argentina and i watch your videos 3 months ago, you so cool!!
    I have a great question for you hahah, what is the name of this VS Code theme???
    Im waiting for you answer!!! Thanks you very much

  • @PHPRunnerTipsAndTricks
    @PHPRunnerTipsAndTricks Год назад +9

    This is a fantastic tutorial. And it is important that developers know how to do this. But in the real world it is all about productivity. There are code generators that do exactly this allowing the developer to focus on something more important. I use code generators not because I don't know how to code it, but to deliver a product to the customer much faster. Now don't get this twisted. I like this tutorial but will never use it as I can complete an entire project using the same time if not less.

    • @jamesoneill1945
      @jamesoneill1945 Год назад +1

      Lol real world dunno what world you live in but its not based in reality

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks Год назад +2

      @@jamesoneill1945 All I am saying is that the customer does not care if you coded the sidebar yourself or not. They do care about how quickly you can deliver the project. And that is a real-world fact.

    • @johnsnow2809
      @johnsnow2809 Год назад +2

      @@PHPRunnerTipsAndTricks And when it breaks for the client on a routine update because you didn’t do it properly, your client will either have to reach back out to you or, most likely, decide not to work with you anymore.

    • @PHPRunnerTipsAndTricks
      @PHPRunnerTipsAndTricks Год назад +1

      @@johnsnow2809Correct. Can it not break if you designed it yourself? Of course, it can. In that case the client will have to phone you too and potentially not go back to you. What are you talking about?

    • @tasheemthedream4199
      @tasheemthedream4199 Год назад +1

      @@johnsnow2809 i think the point he is making is that you should know how to do it, use a generator to put it in quick and then briefly go over it to make sure everything is right. saving you some time. not just paste the code in and hit export

  • @TheCure1.
    @TheCure1. Год назад

    hello Hussein, I TRIED BUT THE ICONS ARE NOT SHOWING ON THE PREVIEW, i can only see them on the console. Is that OK?

  • @m.h2xgaming961
    @m.h2xgaming961 Год назад

    wow

  • @pritesh_2564u
    @pritesh_2564u Год назад

    I have added box shadow property to navbar but other contain overlap with it. How can I make navbar sticky?
    I have also tried z index property but it's not working

    • @CodeWithHossein
      @CodeWithHossein  Год назад +2

      In this case, z-index does not work without position: absolute;
      Add either position of absolute or fixed (If you want it to be sticky) and you may need left: 0; as well 🤔

  • @saumyaagrawal2227
    @saumyaagrawal2227 Год назад

    its not working for me it is giving me an error in script.js file [Uncaught TypeError: Cannot read properties of null (reading 'addEventListener']

  • @sphinx_z
    @sphinx_z Год назад

    Thanks a lot! pure sexy CSS

  • @KINTUALEXLADWONG
    @KINTUALEXLADWONG Год назад

    What are some of the Extensions you are using sir?

  • @PHPRunnerTipsAndTricks
    @PHPRunnerTipsAndTricks Год назад +1

    @CodeWithHossein Can I please share this tutorial with my subscribers? It is such a good example of how to do this and I believe that most of them can learn a lot from you. Please?

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      You can send its link to your audience, so they can learn from me 😊❤

  • @KINTUALEXLADWONG
    @KINTUALEXLADWONG Год назад

    Was coding along, but mine doesn't hide the navbar doesn't animate on hover as yours

  • @ghostrider6115
    @ghostrider6115 Год назад

    Thank You Brothers For Your Amazing Videos which give us helps. May Allah Bless You ❤❤❤❤❤❤❤❤

  • @sshfoxbr2867
    @sshfoxbr2867 Год назад +2

    Seria da hora uma narração no fundo explicando as propriedades

    • @dablioze
      @dablioze Год назад +2

      Aí o vídeo teria 40min+

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      I'll be grateful if you could ask in English 🙏

    • @pedrexik
      @pedrexik Год назад

      @@CodeWithHossein He said: "A narration in the background explaining the properties" according to Google Translate.

  • @burmikee
    @burmikee Год назад

    and the content is part of the menu?

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      No 😅 Just some animated texts added while editing...

  • @arkprince9413
    @arkprince9413 Год назад

    i am looking for inspirations for portoflio and this is my sidedbar

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Of course it is 😉 You can comment your portfolio website link down here when it's done!

  • @EveryThing-bd5sx
    @EveryThing-bd5sx Год назад

    Bro please tell me how to add this into blogger template

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      My code is almost ready to use in your project, but if you see there's some issues like not being fixed or something well you can add:
      position: fixed;
      left: 0; // If necessary (To fix the sidebar on the left side of the screen)
      z-index: 1; // If necessary (To place the sidebar over everything else)
      Then it's also important to note that, you have customize it for your own website, add or delete some sidebar items!
      Finally try to write some scripts to handle clicks, like when the user taps on Account your content on the right side moves into Account part. I think I'd handled clicks, you just need to write the rest for scrolling the page by clicking on items...
      Feel free to ask if you've got any other question 😊❤

  • @__________HolySpirit__________

    I just recently made something pretty nice using album cover art is there a way for me to send it to you

  • @x0lfm4n
    @x0lfm4n Год назад

    hi, nice tutorial but I would still need the ability to scroll because I have extended my bar a little bit

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Hmm it's okay, sometimes we get inspirations from others but the final project becomes even better than the original one 😊

  • @dontfool
    @dontfool Год назад +1

    I did everything and it worked but the js (navItems(active) isn’t working 🥺

    • @KINTUALEXLADWONG
      @KINTUALEXLADWONG Год назад

      Same thing here

    • @CodeWithHossein
      @CodeWithHossein  Год назад +1

      That part was a little complicated, check it out again and lemme know when you've fixed it 😁

    • @dontfool
      @dontfool Год назад +1

      @@CodeWithHossein ok sir🙌🤲

    • @dontfool
      @dontfool Год назад

      @@CodeWithHossein can u please recommend a crushed js tutorial for beginners to me?

    • @dontfool
      @dontfool Год назад

      @@CodeWithHossein with that one I don’t understand 💔🥺

  • @vivoichsan1208
    @vivoichsan1208 Год назад

    Do you have responsive HTML CSS and JS only

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Responsive what ? 🤔

    • @vivoichsan1208
      @vivoichsan1208 Год назад

      @@CodeWithHossein tutorial simple responsive just use java script and CSSA

  • @JriffYoutube
    @JriffYoutube Год назад

    so, how to fill the content?

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      You just need to put your content on the right side of the website, and handle clicks so when the users click on an item in your sidebar, it scrolls down/up onto that part of your website 😉

  • @rezaqesff5981
    @rezaqesff5981 Год назад

    good luck

  • @noyonahmedjalal
    @noyonahmedjalal Год назад +1

    Where are ur from?

  • @YOOPER420
    @YOOPER420 Год назад

    How about just CSS?

  • @snipiba
    @snipiba Год назад

    bro,... just small changes... logo size change to percentual with max-width, then you dont need to change sizes in two classes... and second thing... inner loop instead of querySelector of only nav-item.active to remove class active is overhauling loop to check X items in loop for nothing...

  • @jkljn79po
    @jkljn79po Год назад

    Do you know any platform to learn languages?

    • @CodeWithHossein
      @CodeWithHossein  Год назад +1

      The best resource is always the official docs of that language you're considering, BUT not every beginner can do it at start point.
      If you have a limited knowledge about the language, then I personally recommend taking action with crash courses on YT. You can find a full course? That's insane 👌
      May I ask what language you wanna learn?!

    • @jkljn79po
      @jkljn79po Год назад

      @@CodeWithHossein not only one language.
      I want to learn java and c+ before heading to study the course

    • @CodeWithHossein
      @CodeWithHossein  Год назад +1

      @@jkljn79po Alright, I would suggest you to start with Java and its beginner course in Mosh channel. Shall I find it for you?!

    • @jkljn79po
      @jkljn79po Год назад

      @@CodeWithHossein yes thank for the time

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      @@jkljn79po My pleasure🌻Here you go...
      ruclips.net/video/eIrMbAQSU34/видео.html

  • @agungpermana1534
    @agungpermana1534 Год назад

    How to /*--??

  • @IIDreamy
    @IIDreamy Год назад

    Are you from iran?

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Yup ❤🤍💚

    • @IIDreamy
      @IIDreamy Год назад

      @@CodeWithHossein بیا بگلم عشقم

    • @IIDreamy
      @IIDreamy Год назад

      @@CodeWithHossein چطوری داش خوبی؟
      فرانت اند هات گاده عالی مینوازی

    • @IIDreamy
      @IIDreamy Год назад

      @@CodeWithHossein با چه اپی ادیت میزنی ویدیوهاتو کیفیت بالایی دارن.

  • @theviralguy2022
    @theviralguy2022 Год назад +1

    Are you?

  • @ThaoMeoTV
    @ThaoMeoTV Год назад

    You're beautiful

  • @henxed
    @henxed Год назад

    People using firefox are crying :D
    p.s. backdoor-filter: blur still doesn't work by default

  • @JAMALGOVING
    @JAMALGOVING Год назад

    يا زلمة هات شرح بالعربي بربك

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      People usually suppose that I'm an Arab based on my name, BUT sorry to say that I'm not...
      I understand a little bit, like بربک means for god's sake, right? 😂
      So I can't speak, maybe just share some tutorials in English!
      کیف حالک بالمناسبته؟ 😊

    • @JAMALGOVING
      @JAMALGOVING Год назад

      @@CodeWithHossein Lol Thank You Your Videos Is Very Cool Thanks

  • @zetaDirective
    @zetaDirective Год назад

    Lost me at * {}

    • @zetaDirective
      @zetaDirective Год назад

      Keep up the good work tho'

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      Thank you, I will 🔥

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      I don't when exactly I'm gonna publish my full course, But I think about it everyday 😉

  • @pingfan
    @pingfan Год назад

  • @rashidbinzaiyed7149
    @rashidbinzaiyed7149 Год назад

    How to use the GitHub? I created an account on that, it's been the 3rd year, and i don't even understand and know how to use it...!

    • @CodeWithHossein
      @CodeWithHossein  Год назад

      May I ask what is your purpose of having the account?! 🤔

    • @rashidbinzaiyed7149
      @rashidbinzaiyed7149 Год назад

      @@CodeWithHossein I was about to create a responsive website and its Android app for our business purposes, but I can't understand anything about the GitHub platform... any helps?