Giter Site home page Giter Site logo

[Q] can I mix items and groups? about homer HOT 3 CLOSED

wsw70 avatar wsw70 commented on August 15, 2024
[Q] can I mix items and groups?

from homer.

Comments (3)

wsw70 avatar wsw70 commented on August 15, 2024 1

If I'm understanding what you mean correctly, than yes it is technically possible to mix groups and standalone items, however there are some downsides.

Example

Thanks a lot for the inspiration @MD023 ! Since I have a horizontal layout, your solution fits perfectly!

image

I may work a bit with the CSS to squeeze some spacing but otherwise it is perfect. Thanks!

from homer.

MD023 avatar MD023 commented on August 15, 2024

Hi again @wsw70!

If I'm understanding what you mean correctly, than yes it is technically possible to mix groups and standalone items, however there are some downsides.

Example

image

config.yml

services:
  - name: "Applications"
    icon: "fas fa-cloud"
    items:
      - name: "Awesome app"
        logo: "assets/tools/sample.png"
        subtitle: "Bookmark example"
        tag: "app"
        keywords: "self hosted reddit"
        url: "https://www.reddit.com/r/selfhosted/"
        target: "_blank" # optional html a tag target attribute
        type: "SecondaryLink"
        SecondaryLinkUrl: "https://google.ca"
        SecondaryLinkTarget: "_blank"
        SecondaryLinkIcon: "fa-solid fa-circle-info fa-xl" 
      - name: "Another one"
        logo: "assets/tools/sample2.png"
        subtitle: "Another application"
        tag: "app"
        url: "#"


  - name: " "
    items:
      - name: "Awesome app"
        logo: "assets/tools/sample.png"
        subtitle: "Bookmark example"
        tag: "app"
        keywords: "self hosted reddit"
        url: "https://www.reddit.com/r/selfhosted/"
        target: "_blank" # optional html a tag target attribute
        type: "SecondaryLink"
        SecondaryLinkUrl: "https://google.ca"
        SecondaryLinkTarget: "_blank"
        SecondaryLinkIcon: "fa-solid fa-circle-info fa-xl" 
      - name: "Another one"
        logo: "assets/tools/sample2.png"
        subtitle: "Another application"
        tag: "app"
        url: "#"

  - name: "Applications"
    icon: "fas fa-cloud"
    items:
      - name: "Awesome app"
        logo: "assets/tools/sample.png"
        subtitle: "Bookmark example"
        tag: "app"
        keywords: "self hosted reddit"
        url: "https://www.reddit.com/r/selfhosted/"
        target: "_blank" # optional html a tag target attribute
        type: "SecondaryLink"
        SecondaryLinkUrl: "https://google.ca"
        SecondaryLinkTarget: "_blank"
        SecondaryLinkIcon: "fa-solid fa-circle-info fa-xl" 
      - name: "Another one"
        logo: "assets/tools/sample2.png"
        subtitle: "Another application"
        tag: "app"
        url: "#"

As you can see you can mix the use of both groups and standalone items, but due to the missing header and logo, the spacing is off. To counter this slightly, and to still allow for both column and list views, you can add - name: " " (just a space between the quotation marks) to the standalone "group".

This allows Homer to recognize the list of items as a group but without the header and logo. This maintains the ability to use the list and column view, but only marginally lowers the positioning so it does still appear differently than a group with a header and logo.

You may have to mess around with the ordering of the items to cater it to whatever your needs are, but this is what I was able to test. If I come across a better solution I will be sure to let you know!

from homer.

MD023 avatar MD023 commented on August 15, 2024

@wsw70 Glad to see it worked :)

from homer.

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.