Read the statement by Michael Teeuw here.
MMM-Carousel Pagination Icons
-
@com1cedric is the puck in the free section of icons?
-
@com1cedric i am traveling and dont have my computer out currently, maybe after lunch time.
can you look in the developers window console tab and see if there are any errors
-
@com1cedric also, is this the 1st or second icon you are trying to change?
-
@sdetweil hello, and thank you for your time. It helped me a lot, as it is finally working now…
I had to change “before” with “after” after the ::
.MMM-page-indicator div.module-content div i:nth-child(2)::AFTER {
content: “\f453”;
font-family: FontAwesome;
}So, thank you very much for your help and have a great week-end.
-
@com1cedric I have submitted a PR for MMM-page-indicator which should give more flexibility per page. See example below:
.MMM-page-indicator .fa.indicator.page-2::before { content:"\f005"; color: orange !important; } .MMM-page-indicator .indicator.active-page { animation: pulse 1.2s ease-in-out infinite; }If PR is accepted you should be able to target specific page indicators as shown in example above from custom.css.
You could use this fork in the meanwhile:
MMM-page-indicator -
@mumblebaj you know there has to be one of the icon entries for every page the user defined, right?
-
@sdetweil Not sure if I understand you properly but the other pages would default to the standard circle. The changes I made allows you to target specific pages if you want to change the icon, add animations etc. A little easier to target individuals.
-
@mumblebaj ah, what you meant to say is
.fa.indicator.page-nwhere n is a number for each page found, starting at 0
page-0 for first page
page-1 for second page
etc -
@sdetweil Correct. Although, MMM-page-indicator is 0 based, same as MMM-pages, so page-0 would be page 1 etc.
-
@mumblebaj i updated my post
-
@mumblebaj i will say, i think for humans. 0 based is unfriendly
-
@sdetweil Yeah, i would agree. Changing that logic now may have some repercussions for users already using the module.
-
@mumblebaj page- was never there
-
@sdetweil Yes, that is correct. I added a classname
page-${i}. But the standard code was always zero based and I do not want to update that. It is tied in with MMM-pages and seems like it works with others as well.start() { this.curPage = 0; this.mmmPagesDetected = false; }, -
@sdetweil And just to note, MMM-pages is zero based. This will need to be updated as well. If I understand MMM-Carousel correct, it is also zero based.
-
@mumblebaj one small step!
-
@sdetweil Hello Sam, may I ask you one question about this topic? do you know how it would be possible to show an image stored on the Raspberry or linked from the web, instead of showing an icon from Fontawesome?
-
@com1cedric just point the url() to the file
url('/folder_in_mm_tree/xxx.jpg/png/gif as appropriate')note the MM web server root is ~/MagicMirror
so the files have to be in THAT folder tree
you can LINK files/folders outside into the MM tree with the -->ln<-- commandso, assume you made a
MagicMirror/iconsfolder and in it is
circle.pngthen you could use
url('/icons/circle.png')or
url('http://localhost:mm_port/icons/circle.png') /* not this ONLY works IF the browser is on the SAME MACHINE as MM..*/if not you need the relative(url(‘/…’), OR have to hard code the MM machine address
like thisurl('http://MM_IP_address:mm_port/icons/circle.png')if linked from the web use its complete url path
-
@sdetweil said in MMM-Carousel Pagination Icons:
url(‘/icons/circle.png’)
Thank you very much Sam.
currently, I have the following command (which works well and shows an icon from FontAwesom) in custom.css:
.MMM-page-indicator div.module-content div i:nth-child(7)::after {
content: “\f207”;
font-family: FontAwesome;
color: #FF4433;
}After putting an image called “olympic.png” in the “MagicMirror/icons” folder, it still does not appear if I write:
.MMM-page-indicator div.module-content div i:nth-child(7)::after {
url(‘/icons/olympics.png’);
}Do I habe to still use “content:” before or something else?
PS. sorry for asking, I am quite new in this CSS topic
-
@com1cedric i will test this out and get back
icons are very small images
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login