• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

MMM-MyScoreboard

Scheduled Pinned Locked Moved Sport
277 Posts 60 Posters 414.5k Views 63 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 1 Offline
    1a2a3a
    last edited by Dec 7, 2023, 3:38 PM

    @j-e-f-f how do you reduce the font size of the content? i maanged to reduce them in css but then when the next game appear, the entire thing is back to default.

    these are the 2 css i made but it seems like it doesnt port over to another game…

    .MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.home {
    left: 120px;
    font-size: 0.8rem;
    }
    
    
    .MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.visitor {
    left: 120px;
    font-size: 0.8rem;
    }
    
    S 1 Reply Last reply Dec 7, 2023, 3:43 PM Reply Quote 0
    • S Offline
      sdetweil @1a2a3a
      last edited by sdetweil Dec 7, 2023, 3:57 PM Dec 7, 2023, 3:43 PM

      @1a2a3a said in MMM-MyScoreboard:

      .MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.visitor

      the logic of your css selector clause is

      .MMM-MyScoreboard .box-score.stackedWithLogos.home-team-first .score.visitor
      

      elements in elements with class MMM-MyScoreboard
      AND
      elements with ALL classes specified on the same element

           .box-score.stackedWithLogos.home-team-first 
      
       classes box-score **AND** stackedWithLogos **AND** home-team-first  
      

      AND
      elements with ALL classes specified on the same element

          .score.visitor
      
      classes  score   **AND** visitor
      

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 1 Reply Last reply Dec 7, 2023, 3:49 PM Reply Quote 0
      • 1 Offline
        1a2a3a @sdetweil
        last edited by Dec 7, 2023, 3:49 PM

        @sdetweil i dont understand sam…

        did you mean like this?

        .MMM-MyScoreboard .box-score AND stackedWithLogos AND home-team-first .score AND visitor {
        left: 120px;
        font-size: 0.8rem;
        }
        
        S 1 Reply Last reply Dec 7, 2023, 3:54 PM Reply Quote 0
        • S Offline
          sdetweil @1a2a3a
          last edited by sdetweil Dec 7, 2023, 3:55 PM Dec 7, 2023, 3:54 PM

          @1a2a3a I was specifying the logic of you selector clause

          . means class

          if there are multiple . in a string with no spaces it means
          all these classes MUST be specified on the element explicitly

          so you have some weak ands (with spaces)
          .MMM-MyScoreboard (weak and) .box-score.stackedWithLogos.home-team-first (weak and) .score.visitor

          and some ABSOLUTE ands
          .box-score(ABSOLUTE and).stackedWithLogos(ABSOLUTE and).home-team-first
          all these classes MUST be on the same element
          class=“box-score stackedWithLogos home-team-first”
          and
          .score(ABSOLUTE and).visitor
          class=“score visitor”

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          1 1 Reply Last reply Dec 7, 2023, 4:01 PM Reply Quote 0
          • 1 Offline
            1a2a3a @sdetweil
            last edited by Dec 7, 2023, 4:01 PM

            @sdetweil

            weak? absolute?

            S 1 Reply Last reply Dec 7, 2023, 4:08 PM Reply Quote 0
            • S Offline
              sdetweil @1a2a3a
              last edited by sdetweil Dec 7, 2023, 4:09 PM Dec 7, 2023, 4:08 PM

              @1a2a3a

                <div class="MMM-MyScoreboard"> 
                   <div class="box-score">
                         <div class="stackedWithLogos home-team-first">
                               <div >some text </div>
                   <div class="box-score stackedWithLogos home-team-first>hit the jackpot</div>
               </div>
              

              because your second part of the selector clause has no spaces,
              ALL THREE classes MUST appear in the class= of the element (absolute AND)

              so the element with ‘some text’ will NOT be selectable
              but element WITH all three, hit the jackpot, WILL BE selectable
              (selectable depending on the next 2 classes, which I didn’t show)

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              S 1 2 Replies Last reply Dec 10, 2023, 2:59 PM Reply Quote 0
              • S Offline
                SirFM @sdetweil
                last edited by Dec 10, 2023, 2:59 PM

                I haven’t dove into the code but do you know if the W-L record of the teams could easily be displayed?

                1 Reply Last reply Reply Quote 0
                • 1 Offline
                  1a2a3a @sdetweil
                  last edited by Dec 11, 2023, 5:30 PM

                  @sdetweil I can’t Sam, I really can’t. Spent 3 days trying to get this and cron job for schedule on off on Wayland. Managed to get cron to work finally, but no dice on this.

                  S 1 Reply Last reply Dec 11, 2023, 5:37 PM Reply Quote 0
                  • S Offline
                    sdetweil @1a2a3a
                    last edited by sdetweil Dec 11, 2023, 5:44 PM Dec 11, 2023, 5:37 PM

                    @1a2a3a i understand… open the developers window on the MM browser (best to use the PC browser)

                    ctrl-shift-i

                    select the elements tab
                    select the pointer in the top left of the elements tab
                    move the mouse pointer over the MM web page contents to you get to the MMM-MyScoreboard module, all the content should be highlighted
                    click mouse

                    in the developers window, the (selected by click) module content will be shown
                    with all the classes and explicit attributes attached…

                    see this topic with screen shots to help see my post here
                    https://forum.magicmirror.builders/post/90135

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • 1 Offline
                      1a2a3a
                      last edited by 1a2a3a Dec 23, 2023, 12:54 PM Dec 23, 2023, 12:47 PM

                      anyone having issue with the module? its not showing anything now despite games being on.

                      getting something like this in the dev mode

                      M-MyScoreboard] Updating Scores
                      module.js:367 Parameter mismatch in module.hide: callback is not an optional parameter!
                      main.js:671 module tries to update the DOM without being displayed.

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 24
                      • 25
                      • 26
                      • 27
                      • 28
                      • 27 / 28
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy