Floating "New topic" button

Hi, im completely newbie here. how can i make “New Topic” button in floating?

example

3 „Gefällt mir“

That appears to be based on the floating button from Material Design Theme

3 „Gefällt mir“

can u please say which theme i have to use?

1 „Gefällt mir“

I can do better than that … I believe this is the CSS (UPDATED):

@mixin buttonShadow {
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.14), 0 4px 8px rgba(0, 0, 0, 0.28);
}

@mixin buttonTransition {
  transition: right 0.5s, bottom 0.5s, border-radius 0.5s, text-indent 0.2s,
    visibility 1s, width 0.2s ease, height 0.5s ease 0.4s, color 0.5s,
    background-color 2s, transform 0.5s;
}

//New Topic Fab
#create-topic.btn-default {
  display: flex;
  align-items: center;
  justify-content: center;
  @include buttonShadow;
  @include buttonTransition;
  padding: 0;
  margin: 0;
  width: 63px;
  height: 63px;
  border-radius: 40px;
  position: fixed;
  bottom: 30px;
  right: 50px;
  z-index: 999;
  background-color: $tertiary;
  color: $secondary;
  white-space: nowrap;
  overflow: hidden;
  .d-icon {
    margin: 0;
  }
  .d-button-label {
    display: inline-block;
    transition: all 0.3s;
    margin: 0 0.25em;
  }

  &:not(:hover):not(:active):not(:focus) {
    .d-button-label {
      opacity: 0;
      width: 0;
      margin: 0;
    }
    .d-icon {
      margin: 0 0.25em;
    }
  }
}

#create-topic.btn-default .fa-plus {
  color: $secondary;
}

#create-topic.btn-default:hover {
  width: 190px;
}
10 „Gefällt mir“

where do i add this? i might be annoying but im new here :neutral_face:

1 „Gefällt mir“

Added a link to the Theme above.

You need to go to Admin-> Customise-> Themes

If adding just the CSS for the button create a Theme Component and edit the CSS for Desktop.

Add the component to an existing Theme.

Beginners guide to Themes here.

Full developers guide here

If all this is just too complex or long winded, just add the Theme I linked above following the Beginners guide :slight_smile:

(PS just fixed the CSS above which was missing some dependencies)

6 „Gefällt mir“

Thank you very much sir, now how to make card view like i show in the screenshot?

1 „Gefällt mir“

I didnt realize the little red ball was the new topic and had to add the code to see

here’s what I had to change

original

modified

Thanks for posting I’ll be playing around with this a bit :wink:

2 „Gefällt mir“

I changed the CSS after shooting from the hip, try it now :slight_smile:

You guys are just too quick! :wink:

(the error is correctly identifying the missing code!)

4 „Gefällt mir“

it worked. just need this more

1 „Gefällt mir“

Updated worked without changing :+1:

2 „Gefällt mir“

That I will leave for your research, there’s a lot of nice CSS there :slight_smile:

You can look around meta for aspects of those changes, you may find a lot of snippets.

You might like to ask the site owner.

I will note that the admin has set this as the setting:

image

1 „Gefällt mir“

same setting. but mine look different

1 „Gefällt mir“

Go through those two guides I link above and search around meta.

1 „Gefällt mir“

i have to pull like i do for plugins?

1 „Gefällt mir“

All explained in the guides :arrow_up:

e.g. Beginner's guide to using Discourse Themes

4 „Gefällt mir“

Snuck in a minute

working to make it an image

bgb

4 „Gefällt mir“

theme applied but i still didn’t get card view style

Edit: i reload the page in new tap and solved :no_mouth:

1 „Gefällt mir“

That’s because it’s a mashup. The Theme in your picture is not identical but I suspect shares the same button code.

You can right click any element and use “Inspect Element” in the browser and it should bring up the developer tools which should give you good insight into the CSS.

1 „Gefällt mir“

Thank you Discourse for hosting the open source forum form me to learn,

I was simply taking a minute to check new threads and found out I needed a new, new topic button

:grin:

edit:

too much fun

bg2

3 „Gefällt mir“