MagicMirror² v2.12.0 is available! For more information about this release, check out this topic.

MMM-SpaceX



  • I’m very new to Magic Mirror and javascript development, so I’m very proud to present my first self written module!!

    MMM-SpaceX
    This module will show all recent or future launches based on the SpaceX API.

    I’m still working on expanding the module with additional information and options. If you have nice ideas, then you should certainly pass them on.

    Also, because I’m new to javascript development, don’t hesitate to review my code and give me tips about it.

    Screenshot
    screenshot

    Download
    https://github.com/koxm/MMM-SpaceX


  • Project Sponsor Module Developer

    Nice work, really cool! A couple of ideas…

    • Optional column headings. For those uninitiated, it’s not really obvious what e.g. CRS-20 is.
    • Options whether to show each column, instead of only extrainfo or no extrainfo. Maybe I only want to show date and launch site for example.
    • Countdown column for upcoming launches.


  • @koxm That looks awesome! It looks like you have launch date as the second last column—can that show upcoming launches in ascending order (so soonest to latest?) Can you add in the launch window time?

    I agree with @retroflex that the option to show each column would be nice. Otherwise well done!



  • @retroflex Thanks for the compliment!
    Optional column headings are a great idea. I’m gonna work on it. I will see how I can fit the other features in it.



  • @sonicgoose Thanks!
    Unfortunately the dates for the upcoming launches are not fully maintained in the api. Maybe I can use a different field. I’m going to look at it.



  • @koxm I’ve just installed it and have noticed the table cells are awfully close together, i.e. there is no separation at all between the last two columns, so it appears as 02 Mar 2020 Falcon 9. This is with the module bottom_center. I tried adding a padding to the left and right side of the cells in my custom.css and also added a width to the table in custom.css, but neither seemed to help.



  • @sonicgoose You’re right, it’s pretty close. The stylesheet included only manipulates the td and th. If I test it on my screen on bottom_center, it looks quite fine. This is because of the column header which creates some kind of spacing.
    I’m gonna see if I can make it al little better with the MMM-SpaceX.css.



  • @koxm Is this the api you’re using?



  • Your css style affect other modules table

    instead of

    td {
    	text-align: left;
    	font-size: 0.7em;
    	line-height: 1em;
     }
    
     th {
    	 text-align: left;
    	 font-size: 0.8em;
    	 line-height: 1em;
     }
    

    you could do

    .MMM-SpaceX td {
    	text-align: left;
    	font-size: 0.7em;
    	line-height: 1em;
     }
    
    .MMM-SpaceX  th {
    	 text-align: left;
    	 font-size: 0.8em;
    	 line-height: 1em;
     }
    



Log in to reply