Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: TwitchisMental on January 03, 2022, 02:04:09 PM

Title: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 03, 2022, 02:04:09 PM
Remixed Breadcrumb Tutorial

In this tutorial we are going to take the default breadcrumb and knock it up a notch. BAM! elzar.gif

End Result - 
Sub-Board-Topic.png

I am just using a copy of the default theme for this tutorial.

Step 1. We will need to change some CSS. Go to the CSS folder and open the index.css in your favorite text editor. (I use Notepad++)

Step 2a. Add the following to the very top of the index.css.
:root {
  --breadcrumb_color_1: rgb(85, 126, 160); /* Main Color 1 */
  --breadcrumb_color_2: rgb(226, 233, 243); /* Main Color 2 */
  --breadcrumb_bg: rgb(255, 255, 255); /* The middle of the arrow, this needs to be the same color as the background*/
  --breadcrumb_border_color: rgb(221,211,211); /* BreadCrumb Border Color */
}


Step 2b. Find the navigate section -
/* The navigation list (i.e. linktree) */
.navigate_section {
    padding: 3px 0 0 0;
    width: 100%;
}
#main_content_section .navigate_section {
    margin: 4px 0 0 0;
    padding: 0;
}
.navigate_section ul {
    margin: 4px 0 0 0;
    padding: 0 10px;
    font-size: 0.9em;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 2px;
    box-shadow: 0 -2px 2px rgba(0, 0, 0, 0.08);
}
.navigate_section ul li {
    float: left;
    padding-bottom: 3px;
    line-height: 1.1em;
    color: #444;
    text-shadow: 1px 1px 0 #fff;
}
.navigate_section ul li a, .navigate_section ul li em {
    padding: 4px 0 4px;
    margin-top: -4px;
    display: inline-block;
}
.navigate_section ul li span {
    display: inline-block;
    margin-top: 8px;
}
.navigate_section ul li .dividers {
    color: #3f6b8c;
    font: 83.33%/150% Arial, sans-serif;
    padding: 0 2px 0 6px;
}
.navigate_section ul li .board_moderators a {
    padding: 4px 0;
}

.navigate_section a:hover span {
    text-decoration: underline;
}

Replace With

/*The Breadcrumb*/
/*Main class gives border, flexes it up, and sets width */
.navigate_section {
    padding: 0;
    float: left;
    width: 100%;
    list-style: none;
    border: 1px solid var(--breadcrumb_border_color);
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    font-family: sans-serif;
}
#main_content_section .navigate_section {
    margin: 0;
    padding: 0;
}
/*Sets Font-Size*/
.navigate_section ul {
    margin: 0;
    padding: 0;
    font-size: 0.9em;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: var(--breadcrumb_bg);
    background-image: none;
}
/*We don't want the p or span tag to have a margin*/
.navigate_section p {
    margin: 0;
}
.navigate_section ul li span {
    margin-top: 0;
}
/* Fall in line li */
.navigate_section ul li {
    display: inline-flex;
}
/* Don't need these */
.navigate_section ul li .dividers {
    display: none;
}
/*Forming the arrows*/
.navigate_section ul li {
    background-color: var(--breadcrumb_color_1);
    box-sizing: border-box;
    color: var(--breadcrumb_color_2);
    display: inline-flex;
    max-height: 2em;
    padding: .5em 1em .5em 1.5em;
    position: relative;
    text-decoration: none;
    text-shadow: none;
    transition-timing-function: ease-in;
    transition: 0.5s;
    font-weight: 700;
    line-height: 1.1em;
    float: none;
}
.navigate_section ul li:before {
    border-top: 1em solid transparent;
    border-bottom: 1em solid transparent;
    border-left: 1em solid var(--breadcrumb_bg);
    content: "";
    position: absolute;
    top: 0;
    right: -1.25em;
    z-index: 1;
}
.navigate_section ul li:after {
    border-top: 1em solid transparent;
    border-bottom: 1em solid transparent;
    border-left: 1em solid var(--breadcrumb_color_1);
    content: "";
    position: absolute;
    top: 0;
    right: -0.9em;
    transition-timing-function: ease-in;
    transition: 0.5s;
    z-index: 1;
}
/* Colors */
.navigate_section strong {
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li a {
    color: var(--breadcrumb_color_2);
}
.navigate_section ul li a:hover {
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:hover a {
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:hover {
    background-color: var(--breadcrumb_color_2);
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:hover:after {
    border-left-color: var(--breadcrumb_color_2);
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:last-child  {
    background-color: var(--breadcrumb_color_2);
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:last-child a  {
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:last-child::after {
    border-left-color: var(--breadcrumb_color_2);
}

/* Lets Make This Look Better For Mobile */
@media screen and (max-width: 480px) {
.navigate_section {
    font: 1em sans-serif;
    list-style: none;
    border: none;
    display: block;
}
.navigate_section ul {
    display: block;
}
.navigate_section ul li {
    display: block;
    width: max-content;
    margin: 5px 0px 5px 0px;
}
}

Step 2c. If you would like the end to be flat, just change -

.navigate_section ul li:last-child a  {
    color: var(--white);
}
.navigate_section ul li:last-child::after {
    border-left-color: var(--breadcrumb_color_2);
}

to

.navigate_section ul li:last-child a  {   
    color: var(--breadcrumb_color_1);
}
.navigate_section ul li:last-child::after {   
    border: 1px solid transparent;
    border-left: none;
}


Step 3. We need to remove the background being set by a class a bit further down the index.css
Find -
/* If it fits I sits... */
.navigate_section .popup_content, .up_contain {
    background: #fff;
    background-image: linear-gradient(to bottom, #fff 0%, #f1f3f5 95%);
}

Replace With -

/* If it fits I sits... */
.popup_content, .up_contain {
    background: #fff;
    background-image: linear-gradient(to bottom, #fff 0%, #f1f3f5 95%);
}


Step 4. Refresh the page and you should now be seeing -

breadcrumb.png


Step 5. Enjoy your new breadcrumb.


Shoutout to Diego Andrés and Sesquipedalian for their help with sorting out a bug.
Original Idea Came From - https://codepen.io/thallysbezerra/embed/NAyEPB?height=316&theme-id=0&default-tab=result
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Diego Andrés on January 03, 2022, 02:08:19 PM
Very nice, might use it in the future  :P
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Aleksi "Lex" Kilpinen on January 03, 2022, 02:09:48 PM
Have to say, this looks like a cool little trick. Might have to try it out :)
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 03, 2022, 02:14:48 PM
Quote from: Diego Andrés on January 03, 2022, 02:08:19 PMVery nice, might use it in the future  :P
Thank you, I hope you do :).

Quote from: Aleksi on January 03, 2022, 02:09:48 PMHave to say, this looks like a cool little trick. Might have to try it out :)
Thank you, I hope you do too :).
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: d3vcho on January 03, 2022, 02:57:18 PM
Lovely. Thanks a lot!
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Shades. on January 03, 2022, 04:16:51 PM
I love this thanks! 8)
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Mick. on January 03, 2022, 07:12:06 PM
Very cool indeed  8)
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 03, 2022, 08:34:29 PM
Quote from: d3vcho on January 03, 2022, 02:57:18 PMLovely. Thanks a lot!
You're welcome, glad you like it.

Quote from: Shades. on January 03, 2022, 04:16:51 PMI love this thanks! 8)
Glad you like it :).

Quote from: Mick. on January 03, 2022, 07:12:06 PMVery cool indeed  8)
Thank you.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Wellwisher on January 03, 2022, 09:28:07 PM
I can see this having really good practical applications on certain themes. Nice work.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Kindred on January 04, 2022, 10:51:19 AM
nicely done....   implemented in a new theme for 2.1 that I am working on for a site.


note for custom work beyond the Curve/Curve2 theme...
Change all instances of these for the colors to match your theme:
rgb(85, 126, 160) (this is the base background color, the border color and the hover font color)
rgb(226, 233, 243) (this is the base font color and the hover background color)

If you don't change ALL of them consistently, you may get some odd effects.

BTW: To see it  test2.turtleshellprod.com
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Arantor on January 04, 2022, 03:20:19 PM
Nice - I'd done something similar myself recently.

If I can suggest a couple of possible improvements:

First... CSS variables, something akin to this (have not tested)

/*The Breadcrumb*/

/*Main class gives border, font size, and turns off list style*/

.breadcrumb {
  font: 1em sans-serif;
  list-style: none;
  border: 1px solid rgba(221,211,211,1);

  --main-light-color: rgb(226, 233, 243);
  --main-dark-color: rgb(85, 126, 160);
}
/*Flex it up */

.breadcrumb ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}
/*We don't want the p tag to have a margin*/
.breadcrumb p {
  margin: 0;
}

/* Fall in line li */
.breadcrumb li {
  display: inline-flex;
}

/*Forming the arrows*/
.breadcrumb li {
  background-color: var(--main-dark-color);
  box-sizing: border-box;
  color: var(--main-light-color);
  display: inline-flex;
  max-height: 2em;
  padding: .5em 1em .5em 1.5em;
  position: relative;
  text-decoration: none;
  transition-timing-function: ease-in;
  transition: 0.5s;
  font-weight: 700;
}

.breadcrumb li:before {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid #fff;
  content: "";
  position: absolute;
  top: 0;
  right: -1.25em;
  z-index: 1;
}

.breadcrumb li:after {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid var(--main-dark-color);
  content: "";
  position: absolute;
  top: 0;
  right: -0.9em;
  transition-timing-function: ease-in;
  transition: 0.5s;
  z-index: 1;
}

/* Colors */

.breadcrumb strong {
    color: var(--main-dark-color);
}

.breadcrumb li a {
    color: var(--main-light-color);
}

.breadcrumb li a:hover {
    color: var(--main-dark-color);
}

.breadcrumb li:hover a {
    color: var(--main-dark-color);
}

.breadcrumb li:hover {
  background-color: var(--main-light-color);
  color: var(--main-dark-color);
}

.breadcrumb li:hover:after {
  border-left-color: var(--main-light-color);
  color: var(--main-dark-color);
}

.breadcrumb li:last-child  {
    background-color: var(--main-light-color);
    color: var(--main-dark-color);
}

.breadcrumb li:last-child a  {
    color: var(--main-dark-color);
}

.breadcrumb li:last-child::after {
    border-left-color: var(--main-light-color);
}

This way you only have to change two colour definitions to restyle the bulk of it to fit a given theme. I'm not sure about the border around the breadcrumb in general or the white fill on the left, couldn't decide if that should be a variable or not.

The other thing is a bit (lot) more fiddly around laying it out on mobile. It will normally wrap to multiple lines which is a bit annoying.

What I did (not the same markup or styling at this but food for thought) was to have the normal breadcrumb trail on desktop... I'd share a link but the site's not open yet.

Breadcrumb trail 1.PNG

With it collapsing by default on mobile...

Breadcrumb trail 2.png

And using a widget to expand it vertically when called for...

Breadcrumb trail 3.png

Stylewise, well you can see I have Font Awesome loaded but this doesn't make that much odds in the grand scheme of things.

How the toggle is done is by way of an <input type="checkbox"> where the main styling is dropped entirely (appearance: none), then :after is populated with a glyph from Font Awesome and a different glyph is used with :checked on the input box.

The rest of the styling is basically about using :checked as a selector on the input and filtering down the .arrow items thereafter based on 1) a media query and 2) whether or not the checkbox is checked.

It's not a dropin replacement code-wise since SMF doesn't yet have a built in SCSS compiler (I added one to mine), but the relevant styling in case it is of use to anyone:

@media screen and (max-width: 767px) {
.arrowbar {
input ~ .arrow {
display: none;
}

.arrow:first-of-type {
display: block;
}

input:checked ~ .arrow {
display: block;
}

input {
position: absolute;
}

input[type="checkbox"]::after {
content: "\f0c9";
font-family: "Font Awesome 5 Free";
font-weight: 900;
}

.arrow {
padding-left: 50px;
}
}
}
@media screen and (min-width: 768px) {
.arrowbar input {
display: none;
}
}

In case it helps with the relevant placement of the input vs the other elements...

{{#if context.linktree}}
<div class="navigate_section">
<div class="arrowbar">
<input type="checkbox">
{{#each context.linktree}}
<div class="arrow{{#if @last}} active{{/if}}">
{{#if url}}
<a href="{{url}}"><span>{{#if @first}}<i class="fas fa-home fa-fw"></i> {{/if}}{{{name}}}</span></a>
{{else}}
<span>{{{name}}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/if}}

Hopefully this will make sense and can be adapted to SMF.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Diego Andrés on January 04, 2022, 03:31:10 PM
Neat.
I used to hide the rest in a dropdown so it's always accessible, the toggle idea is great.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 04, 2022, 09:06:08 PM
Quote from: Arantor on January 04, 2022, 03:20:19 PMNice - I'd done something similar myself recently.

If I can suggest a couple of possible improvements:

First... CSS variables, something akin to this (have not tested)
Yes this is one of those new things I still need to learn/force myself to use. I have noticed them being used in a few themes. Seems like everything is about saving time nowadays. Noted.

Quote from: Arantor on January 04, 2022, 03:20:19 PMThe other thing is a bit (lot) more fiddly around laying it out on mobile. It will normally wrap to multiple lines which is a bit annoying.

What I did (not the same markup or styling at this but food for thought) was to have the normal breadcrumb trail on desktop... I'd share a link but the site's not open yet.

Breadcrumb trail 1.PNG

With it collapsing by default on mobile...

Breadcrumb trail 2.png

And using a widget to expand it vertically when called for...

Breadcrumb trail 3.png
Oh that is a fantastic idea. I love what you did for mobile view.

Quote from: Arantor on January 04, 2022, 03:20:19 PMStylewise, well you can see I have Font Awesome loaded but this doesn't make that much odds in the grand scheme of things.

How the toggle is done is by way of an <input type="checkbox"> where the main styling is dropped entirely (appearance: none), then :after is populated with a glyph from Font Awesome and a different glyph is used with :checked on the input box.

The rest of the styling is basically about using :checked as a selector on the input and filtering down the .arrow items thereafter based on 1) a media query and 2) whether or not the checkbox is checked.

It's not a dropin replacement code-wise since SMF doesn't yet have a built in SCSS compiler (I added one to mine), but the relevant styling in case it is of use to anyone:

@media screen and (max-width: 767px) {
.arrowbar {
input ~ .arrow {
display: none;
}

.arrow:first-of-type {
display: block;
}

input:checked ~ .arrow {
display: block;
}

input {
position: absolute;
}

input[type="checkbox"]::after {
content: "\f0c9";
font-family: "Font Awesome 5 Free";
font-weight: 900;
}

.arrow {
padding-left: 50px;
}
}
}
@media screen and (min-width: 768px) {
.arrowbar input {
display: none;
}
}

In case it helps with the relevant placement of the input vs the other elements...

{{#if context.linktree}}
<div class="navigate_section">
<div class="arrowbar">
<input type="checkbox">
{{#each context.linktree}}
<div class="arrow{{#if @last}} active{{/if}}">
{{#if url}}
<a href="{{url}}"><span>{{#if @first}}<i class="fas fa-home fa-fw"></i> {{/if}}{{{name}}}</span></a>
{{else}}
<span>{{{name}}}</span>
{{/if}}
</div>
{{/each}}
</div>
</div>
{{/if}}

Hopefully this will make sense and can be adapted to SMF.
I still have so much to learn. Thank you for all of your input :).
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Arantor on January 05, 2022, 01:47:35 PM
Quote from: TwitchisMental on January 04, 2022, 09:06:08 PMSeems like everything is about saving time nowadays. Noted.

Saving time isn't so much the goal here, more saving effort - instead of find/replacing the same colour in a bunch of places, you set it once and just reuse that elsewhere. For Kindred's case for example he'd only need to set the colour once.

I went further down the road and glued in an SCSS parser so I could use variables on a much more extensive basis and have my CSS minified after doing so, but this is not a small change nor for the faint of heart. (It's like an SMF 3.0 level change. But my last site had 6 themes and I wanted to make as much reuse as possible of CSS. When you have SCSS at your control you can do 'include this file' level stuff and variables are everywhere, it made maintaining those so much easier.)

Quote from: TwitchisMental on January 04, 2022, 09:06:08 PMI still have so much to learn. Thank you for all of your input :).

There's always more to learn :) I'm sure you'll be teaching me something soon enough!
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Diego Andrés on January 06, 2022, 10:49:17 PM
I attempted mine today with Arantor's idea
I'd say it's okay for a clueless javascript guy like me

Screenshot_15.png
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 07, 2022, 09:39:33 AM
Quote from: Diego Andrés on January 06, 2022, 10:49:17 PMI attempted mine today with Arantor's idea
I'd say it's okay for a clueless javascript guy like me

Screenshot_15.png
Looks pretty good :).
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Wellwisher on January 07, 2022, 10:14:14 AM
Quote from: Diego Andrés on January 06, 2022, 10:49:17 PMI attempted mine today with Arantor's idea

Defo looks gorgous with the default colour scheme. I would use a location icon instead. Well done.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 08, 2022, 06:38:28 PM
So I have added a small tweak for mobile view, albeit not nearly as cool as what Arantor and Diego have done with theirs XD.

Screenshot -

breadcrumbstack.png

Open up the css file again and just add this below the previously added css.  -

@media screen and (max-width: 767px) {
.breadcrumb {
  font: 1em sans-serif;
  list-style: none;
  border: none;
}

.breadcrumb ul {
  display: block;
}

.breadcrumb li {
  display: block;
  width: max-content;
  margin: 5px 0px 5px 0px;
}
}
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 08, 2022, 06:55:07 PM
Another small tweak for those who are curious. You can make the final section end flat instead. (Similar to Arantor's example above)
 
Screenshot -

breadcrumblast.png

Find

.breadcrumb li:last-child::after {
    border-left-color: rgb(226, 233, 243);
}

Replace with
.breadcrumb li:last-child::after {
    border: 1px solid transparent;
}
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Diego Andrés on January 08, 2022, 07:22:10 PM
Uh yes, I suppose that makes a lot of sense since it's not going anywhere anymore  :laugh:
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on January 08, 2022, 07:24:10 PM
Quote from: Diego Andrés on January 08, 2022, 07:22:10 PMUh yes, I suppose that makes a lot of sense since it's not going anywhere anymore  :laugh:
Works either way, figured I would just give options :D.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Shambles on February 06, 2022, 06:50:25 AM
This is a nice decorative addition to my 2.0.19 forum - thanks for sharing and to others for their input.

2.0.19 using the Sunrise theme.

Can anyone suggest a way to left-align the breadcrumb list? A page source and inspect doesn't give me any clues as to why the spacing is occurring.

https://www.i30ownersclub.com/forum/index.php?board=6.0

(https://i.imgur.com/jkTYHO5.jpg)

Thanks
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Arantor on February 06, 2022, 09:35:47 AM
Add padding-left: 0; to the .breadcrumb definition. A ul by default has some left padding.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Shambles on February 06, 2022, 12:08:53 PM
The padding-left has worked a treat, many thanks.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on February 06, 2022, 12:55:04 PM
Quote from: Shambles on February 06, 2022, 06:50:25 AMThis is a nice decorative addition to my 2.0.19 forum - thanks for sharing and to others for their input.

2.0.19 using the Sunrise theme.

Can anyone suggest a way to left-align the breadcrumb list? A page source and inspect doesn't give me any clues as to why the spacing is occurring.

https://www.i30ownersclub.com/forum/index.php?board=6.0

(https://i.imgur.com/jkTYHO5.jpg)

Thanks
Glad you like it :). Looks like one or two of the classes got the wrong color though.
/*The Breadcrumb*/
.breadcrumb {
  font: 1em sans-serif;
  list-style: none;
  border: 1px solid rgba(221,211,211,1);
  padding-left: 0px;
}

.breadcrumb ul {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
}

.breadcrumb.bc2x {
  font-size: 1em;
}

.breadcrumb p {
  margin: 0;
}

.breadcrumb li {
  display: inline-flex;
}

.breadcrumb li {
  background-color: rgb(255, 97, 32);
  box-sizing: border-box;
  color: rgb(226, 233, 243);
  max-height: 2em;
  padding: .5em 1em .5em 1.5em;
  position: relative;
  text-decoration: none;
  transition-timing-function: ease-in;
  transition: 0.5s;
  font-weight: 700;
}

.breadcrumb li:before {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid rgb(237, 237, 237);
  content: "";
  position: absolute;
  top: 0;
  right: -1.25em;
  z-index: 1;
}

.breadcrumb li:after {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid rgb(255, 97, 32);
  content: "";
  position: absolute;
  top: 0;
  right: -0.9em;
  transition-timing-function: ease-in;
  transition: 0.5s;
  z-index: 1;
}

/* Colors */

.breadcrumb strong {
    color: rgb(255, 97, 32);
}

.breadcrumb li a {
    color: rgb(252, 252, 252);
}

.breadcrumb li a:hover {
    color: rgb(255, 97, 32);
}

.breadcrumb li:hover a {
    color: rgb(255, 97, 32);
}

.breadcrumb li:hover {
  background-color: rgb(252, 252, 252);
  color: rgb(255, 97, 32);
}

.breadcrumb li:hover:after {
  border-left-color: rgb(252, 252, 252);
  color: rgb(255, 97, 32);
}

.breadcrumb li:last-child  {
    background-color: rgb(252, 252, 252);
    color: rgb(255, 97, 32);
}

.breadcrumb li:last-child a  {
    color: rgb(255, 97, 32);
}

.breadcrumb li:last-child::after {
    border-left-color: rgb(252, 252, 252);
}

@media screen and (max-width: 767px) {
.breadcrumb {
  font: 1em sans-serif;
  list-style: none;
  border: none;
}

.breadcrumb ul {
  display: block;
}

.breadcrumb li {
  display: block;
  width: max-content;
  margin: 5px 0px 5px 0px;
}
}

That should make the breadcrumb match the theme that you are using.

Screenshot -
br.png
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Antechinus on February 06, 2022, 03:15:28 PM
Looks nice. I did something very similar to the Elk breadcrumbs, back when that project first started. You should be able to do it on standard 2.1 markup (can't really be done on standard 2.0 markup). I'm currently running this look, live on this site, as CSS overrides in Stylus:

dark_breadcrumbs_stylus.jpg

CSS looks like this:
/* ------------------------------------------------------- */
/*    @LINKTREE
/* ------------------------------------------------------- */
/* ----------------- */
/* Linktree wrapper. */
.navigate_section {
    float: none;
    width: auto;
    margin: 0;
    padding: 2px 0 34px;
}
#main_content_section .navigate_section {
    margin: 0;
    padding: 34px 0 0;
}
@media screen and (max-width: 720px) {
    #main_content_section .navigate_section {
        display: block !important;
    }
}
/* ---------------- */
/* Linktree parent. */
.navigate_section ul {
    position: relative;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: linear-gradient(to top, #1d242c,#13171b 80%);
    border: 1px solid;
    border-color: #1e2429 #1c2126 #29333d;
    box-shadow: none;
}
/* ----------------- */
/* Linktree content. */
.navigate_section li {
    flex: none;
}
.navigate_section li:not(.unread_links) {
    float: none;
    display: inline-block;
    position: relative;
    max-height: 28px;
    margin: 0;
    padding: 0 4px 0 8px;
    color: #8d887c;
    font-size: .75rem;
    line-height: 1.75rem;
    text-shadow: none;
}
.navigate_section .last a {
    font-weight: 700;
    opacity: .9;
}
.navigate_section ul li a,
.navigate_section ul li span,
.navigate_section ul li em {
    margin: 0;
    padding: 0;
}
.navigate_section a span {
    text-decoration: none !important;
}
.navigate_section .dividers {
    display: inline-block;
    vertical-align: bottom;
    position: relative;
    left: -6px;
    width: 16px;
    height: 28px;
    overflow: hidden;
    text-indent: 16px;
}
.navigate_section .dividers::before,
.navigate_section .dividers::after {
    position: absolute;
    top: 0;
    left: 7px;
    display: block;
    width: 1px;
    height: 14px;
    background: #fff3;
    content: '';
    transform: skew(45deg);
}
.navigate_section .dividers::after {
    top: 14px;
    transform: skew(-45deg)
}
.navigate_section a:hover span, .navigate_section a:focus span {
    color: #e8bb7d;
}
.navigate_section li:hover .dividers::before, li:hover .dividers::after {
    background: #e8bb7d;
}

You can see the hover effect on the "Tips and Tricks" link in the screenshot.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Kindred on February 06, 2022, 04:59:28 PM
In 2.1 using only core css markup...  https://test2.turtleshellprod.com/index.php?board=1.0
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on February 06, 2022, 05:12:54 PM
So it seems one thing that I didn't point out is that the small white middle part of the arrow in the breadcrumb. That specific area needs to be changed to the background that is behind the breadcrumb overall.

.breadcrumb li::before {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid #fff; /*Change this color for the middle part of the arrow to match the background of the overall breadcrumb. */
  content: "";
  position: absolute;
  top: 0;
  right: -1.25em;
  z-index: 1;
}


Quote from: Kindred on February 06, 2022, 04:59:28 PMIn 2.1 using only core css markup...  https://test2.turtleshellprod.com/index.php?board=1.0
Honestly I kind of like the double arrow effect that yours gives. However to get the same look as the tutorial, you would need to change the same section mentioned above. Something like below would work -

.breadcrumb li::before {
  border-top: 1em solid transparent;
  border-bottom: 1em solid transparent;
  border-left: 1em solid RGB(27, 96, 31);
  content: "";
  position: absolute;
  top: 0;
  right: -1.25em;
  z-index: 1;
}
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: KittyGalore on March 15, 2022, 03:06:53 PM
Quote from: Antechinus on February 06, 2022, 03:15:28 PMLooks nice. I did something very similar to the Elk breadcrumbs, back when that project first started. You should be able to do it on standard 2.1 markup (can't really be done on standard 2.0 markup). I'm currently running this look, live on this site, as CSS overrides in Stylus:

dark_breadcrumbs_stylus.jpg

CSS looks like this:
/* ------------------------------------------------------- */
/*    @LINKTREE
/* ------------------------------------------------------- */
/* ----------------- */
/* Linktree wrapper. */
.navigate_section {
    float: none;
    width: auto;
    margin: 0;
    padding: 2px 0 34px;
}
#main_content_section .navigate_section {
    margin: 0;
    padding: 34px 0 0;
}
@media screen and (max-width: 720px) {
    #main_content_section .navigate_section {
        display: block !important;
    }
}
/* ---------------- */
/* Linktree parent. */
.navigate_section ul {
    position: relative;
    overflow: visible;
    margin: 0;
    padding: 0;
    background: linear-gradient(to top, #1d242c,#13171b 80%);
    border: 1px solid;
    border-color: #1e2429 #1c2126 #29333d;
    box-shadow: none;
}
/* ----------------- */
/* Linktree content. */
.navigate_section li {
    flex: none;
}
.navigate_section li:not(.unread_links) {
    float: none;
    display: inline-block;
    position: relative;
    max-height: 28px;
    margin: 0;
    padding: 0 4px 0 8px;
    color: #8d887c;
    font-size: .75rem;
    line-height: 1.75rem;
    text-shadow: none;
}
.navigate_section .last a {
    font-weight: 700;
    opacity: .9;
}
.navigate_section ul li a,
.navigate_section ul li span,
.navigate_section ul li em {
    margin: 0;
    padding: 0;
}
.navigate_section a span {
    text-decoration: none !important;
}
.navigate_section .dividers {
    display: inline-block;
    vertical-align: bottom;
    position: relative;
    left: -6px;
    width: 16px;
    height: 28px;
    overflow: hidden;
    text-indent: 16px;
}
.navigate_section .dividers::before,
.navigate_section .dividers::after {
    position: absolute;
    top: 0;
    left: 7px;
    display: block;
    width: 1px;
    height: 14px;
    background: #fff3;
    content: '';
    transform: skew(45deg);
}
.navigate_section .dividers::after {
    top: 14px;
    transform: skew(-45deg)
}
.navigate_section a:hover span, .navigate_section a:focus span {
    color: #e8bb7d;
}
.navigate_section li:hover .dividers::before, li:hover .dividers::after {
    background: #e8bb7d;
}

You can see the hover effect on the "Tips and Tricks" link in the screenshot.
What file is the code here from with the linktree.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Antechinus on March 15, 2022, 03:32:07 PM
It's a custom CSS file that I run in Stylus (a browser extension that can apply your own CSS to any page). The files are in the post linked from my sig (where it says "Dark theme for this site").
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: KittyGalore on March 15, 2022, 03:40:18 PM
Quote from: Antechinus on March 15, 2022, 03:32:07 PMIt's a custom CSS file that I run in Stylus (a browser extension that can apply your own CSS to any page). The files are in the post linked from my sig (where it says "Dark theme for this site").
Ok thanks.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Shades. on March 18, 2022, 05:21:41 AM
Quote from: TwitchisMental on January 03, 2022, 02:04:09 PMStep 7. What about the unread links? Where did they go? I WANT MY UNREAD LINKS!!!
I understand and I got you covered. We can relocate those links to the top bar. Within the same index.template.php file Find -

Code Select Expand
        // Thirdly, alerts
        echo '
                <li>
                    <a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'], '"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
                    <div id="alerts_menu" class="top_menu scrollable"></div>
                </li>';
               
Replace With -

Code Select Expand
        // Thirdly, alerts
        echo '
                <li>
                    <a href="', $scripturl, '?action=profile;area=showalerts;u=', $context['user']['id'], '"', !empty($context['self_alerts']) ? ' class="active"' : '', ' id="alerts_menu_top">', $txt['alerts'], !empty($context['user']['alerts']) ? ' <span class="amt">' . $context['user']['alerts'] . '</span>' : '', '</a>
                    <div id="alerts_menu" class="top_menu scrollable"></div>
                </li>';
               
        // Fourth, the unread buttons
       
        echo '
                <li>
                    <a href="', $scripturl, '?action=unread" title="', $txt['unread_since_visit'], '">', $txt['view_unread_category'], '</a>
                </li>
                <li>
                    <a href="', $scripturl, '?action=unreadreplies" title="', $txt['show_unread_replies'], '">', $txt['unread_replies'], '</a>
                </li>';
This will bring those links to the top bar as you can see here -
No need in this step for SMF version 2.1.1 as pointed out by @TwitchisMental here (https://www.simplemachines.org/community/index.php?topic=581451.msg4116655#msg4116655)! ;)
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Steve on September 08, 2022, 07:40:27 AM
Sorry to bring up an older topic but can this be made into a mod easily?
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 08, 2022, 11:10:06 AM
Quote from: Steve on September 08, 2022, 07:40:27 AMSorry to bring up an older topic but can this be made into a mod easily?
I am sure it could be made into one.  However that would require someone with the knowledge to do so. (It ain't me lol)

Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Steve on September 08, 2022, 12:39:12 PM
That makes two of us.  :P
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 08, 2022, 12:41:53 PM
Quote from: Steve on September 08, 2022, 07:40:27 AMSorry to bring up an older topic but can this be made into a mod easily?

I can have a go at it. Should be easy enough...
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Steve on September 08, 2022, 12:51:07 PM
That would be awesome.  ;D
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 10, 2022, 04:45:14 AM
Quote from: @rjen on September 08, 2022, 12:41:53 PM
Quote from: Steve on September 08, 2022, 07:40:27 AMSorry to bring up an older topic but can this be made into a mod easily?

I can have a go at it. Should be easy enough...

Made a mod package that works. Just want to iron out some stuff that may be improved (tips that were given later) and add something like a license and then figure out how to submit a Mod to the site... may take a few days to sort that out...
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Steve on September 10, 2022, 06:58:32 AM
No worries. I'm just happy you decided to do this.  ;D
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 10, 2022, 12:32:55 PM
Quote from: @rjen on September 10, 2022, 04:45:14 AM
Quote from: @rjen on September 08, 2022, 12:41:53 PM
Quote from: Steve on September 08, 2022, 07:40:27 AMSorry to bring up an older topic but can this be made into a mod easily?

I can have a go at it. Should be easy enough...

Made a mod package that works. Just want to iron out some stuff that may be improved (tips that were given later) and add something like a license and then figure out how to submit a Mod to the site... may take a few days to sort that out...
This should be of some use - https://wiki.simplemachines.org/smf/Category:Package_SDK
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 10, 2022, 01:07:28 PM
Thanks, but building the mod is already done...

Just need to know the exact procedure to submit the mod. I have not searched yet, but I assume it is documented somewhere..
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Doug Heffernan on September 10, 2022, 01:20:15 PM
Quote from: @rjen on September 10, 2022, 01:07:28 PMJust need to know the exact procedure to submit the mod. I have not searched yet, but I assume it is documented somewhere..

Simply upload it to our Customize Section.

https://custom.simplemachines.org/index.php?action=post;type=mod

Make sure that the mod has the license file. Further it would be best if it contained a read me file, a meaningful title, a detailed description and screenshots, if possible.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 10, 2022, 01:25:56 PM
Quote from: @rjen on September 10, 2022, 01:07:28 PMThanks, but building the mod is already done...
Just need to know the exact procedure to submit the mod. I have not searched yet, but I assume it is documented somewhere..
Well for the approval guidelines - https://wiki.simplemachines.org/smf/Customization_approval_guidelines

As far as the actual process of submitting a mod

Go to the customize site > mods > click the new mod button.

Then you just fill out the information and submit. After that it will go through the Cloister Of Trials by the Customization Team :).

Edit: Doug beat me to it lol.


Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 11, 2022, 03:51:17 PM
Ok, Mod package has been submitted...
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Steve on September 11, 2022, 04:28:48 PM
Cool beans.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 13, 2022, 02:43:41 PM
Updated this tutorial to include some of the other tips and to make it easier to customize.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 13, 2022, 03:10:03 PM
I'll just wait for the mod approval and include the changes in the next version
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 14, 2022, 03:01:00 AM
Alright, I have updated the tutorial again.

CSS only now. No template changes needed :).

I should've done this sooner to be honest lol.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 14, 2022, 04:59:10 AM
Quote from: TwitchisMental on September 14, 2022, 03:01:00 AMAlright, I have updated the tutorial again.

CSS only now. No template changes needed :).

I should've done this sooner to be honest lol.

Nice...
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 14, 2022, 07:29:57 AM
Just updated the Mod accordingly. Just one small item nagging me, and that is this little part in the block arrows shining through upon hover...

2022-09-14_132527.jpg

You can see the Mod v2.0 (all css) in action here: https://test.fjr-club.nl/index.php?board=2.0
 
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 14, 2022, 12:21:14 PM
Quote from: @rjen on September 14, 2022, 07:29:57 AMJust updated the Mod accordingly. Just one small item nagging me, and that is this little part in the block arrows shining through upon hover...

2022-09-14_132527.jpg

You can see the Mod v2.0 (all css) in action here: https://test.fjr-club.nl/index.php?board=2.0
 
In your case you still have the old navigate section css classes coming through.

Looks like it is loading the css from both your mods css file and the index.css file. Specifically the float left in navigate_section ul li is causing your issue.(Index.css line 1266)
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 14, 2022, 12:23:58 PM
Yeah, both css are there: in order to make the mod not change any source files I need to load an extra css.

The mod needs to overrule the existing standard css, which is a bit more complex then taking the old css out of the original file...
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: Diego Andrés on September 14, 2022, 12:24:50 PM
For the mod if you load a new css file (to avoid file edits), you can set the order in the arguments of LoadCSSFile, that way you make sure it's after the index.css
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 14, 2022, 12:28:16 PM
Quote from: @rjen on September 14, 2022, 12:23:58 PMYeah, both css are there: in order to make the mod not change any source files I need to load an extra css.

The mod needs to overrule the existing standard css, which is a bit more complex then taking the old css out of the original file...
A quick work around could be just adding -

    line-height: 1.1em;
    float: none;

to the bottom of the navigate_section ul li class in your mod.

-----------------------------

Diego is giving you the better advice though.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 14, 2022, 12:35:32 PM
Quote from: Diego Andrés on September 14, 2022, 12:24:50 PMFor the mod if you load a new css file (to avoid file edits), you can set the order in the arguments of LoadCSSFile, that way you make sure it's after the index.css

That is not the problem: the css is loaded second, but the new css does not overwrite all previously set arguments.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on September 14, 2022, 12:40:47 PM
Quote from: @rjen on September 14, 2022, 12:35:32 PM
Quote from: Diego Andrés on September 14, 2022, 12:24:50 PMFor the mod if you load a new css file (to avoid file edits), you can set the order in the arguments of LoadCSSFile, that way you make sure it's after the index.css

That is not the problem: the css is loaded second, but the new css does not overwrite all previously set arguments.
A quick work around could be just adding -

 
    line-height: 1.1em;
    float: none;

to the bottom of the navigate_section ul li class in your mod.
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: @rjen on September 14, 2022, 04:13:46 PM
Done, and version 2.0 is posted
Title: Re: [SMF 2.1]Remixed Breadcrumb
Post by: TwitchisMental on November 08, 2022, 05:54:58 PM
This has been updated to resolve an issue where the arrows were not always even.

Noticed this thanks to @rjen and his mod version of this tutorial.