Giter Site home page Giter Site logo

Comments (10)

jakewies avatar jakewies commented on July 20, 2024 1

@kentnek i believe the icons I used were from https://feathericons.com/

from hugo-theme-codex.

jakewies avatar jakewies commented on July 20, 2024

We could definitely support more social icons natively. I've seen examples in the wild of others who have expanded upon what this project includes (github/twitter).

cc @chuxinh - maybe you have some input on how you accomplished this?

from hugo-theme-codex.

kentnek avatar kentnek commented on July 20, 2024

@jakewies oh I thought you were using some ready-made icon packs for the existing GitHub/Twitter icons. I guess I'll use some free "outline social icon packs" for my fork then.

from hugo-theme-codex.

chuxinh avatar chuxinh commented on July 20, 2024

@kentnek The current theme is a bit tedious in terms of adding social icons. My site is achieved by the following:

  • Have a partial of social-icons.html
  • define social icons in the partial like below:
<div class="social-icons">
  <a class="social-icons__icon social-icons__icon--email" href=""></a>
  <a class="social-icons__icon social-icons__icon--twitter" href=""></a>
  <a class="social-icons__icon social-icons__icon--github" href=""></a>
  <a class="social-icons__icon social-icons__icon--instagram" href=""></a>
  <a class="social-icons__icon social-icons__icon--linkedin" href=""></a>
</div>

To render those icons properly, you need to modify or add in the css. I saved all svgs in a file under static/icons

.social-icons__icon--twitter {
  background-image: url("/icons/twitter.svg");
  margin-right: 1rem;
}

And then you can use those partials anywhere needed. Hope that helps!

from hugo-theme-codex.

kentnek avatar kentnek commented on July 20, 2024

@chuxinh oh my problem is actually finding the SVGs. May I know where you obtain the SVGs for other icons?

from hugo-theme-codex.

chuxinh avatar chuxinh commented on July 20, 2024

@kentnek there's a good site for you looking for SVGs: https://www.flaticon.com/
Can use those free one for both personal and commercial use.

from hugo-theme-codex.

kentnek avatar kentnek commented on July 20, 2024

@jakewies oh awesome this is exactly what I need. I'll add in some more icons after finishing the SCSS PR.

from hugo-theme-codex.

jakewies avatar jakewies commented on July 20, 2024

We could open a PR to add some svg icons from feather that cover "most" use cases, and they can be optional based on configuration setup that we decide on.

from hugo-theme-codex.

kentnek avatar kentnek commented on July 20, 2024

^ Yep, I'm also thinking that way.

from hugo-theme-codex.

jakewies avatar jakewies commented on July 20, 2024

Closing with #40

from hugo-theme-codex.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.