Support for a config defined site image

in #utopian-io7 years ago (edited)

Firefox_Screenshot_2018-02-04T17-31-14.667Z.png

New Features

Site image

I added support for a site image definable in the config theme options. I also added support for the site image to one of the themes.

This was achieved through the creation of a new placeholder, {site-img} for use in templates, and ensuring the code replaces this image with the one defined in the local_config.json file. I optimised the function parseThemeHTML in init.js whilst I did so, to prevent repeating the same conditionals.

To test the code changes were successful I altered the value in my config from:

site-img-config01.png

This produces the page shown in the first screenshot, to:

site-img-config02.png

My currently defined steem avatar image. This changes the image in the footer to:

Firefox_Screenshot_2018-02-04T17-15-47.621Z.png

Commit

Issues

I managed to close issue #21 for adding this feature.

Bug Fixes

Site can now load from a subfolder of webroot.

Whilst developing the above feature on a new set up, I noticed that blockpress wouldn't run when installed in subfolder of the main webroot. I fixed this bug shortly after reporting it, and the latest version will now run from any folder depth. This will allow you to install blockpress to run from http://your.domain/blockpress and not just from http://yourdomain.

This issue was simply some paths for including css styles and the theme templates being relative to the webroot rather than the current folder path. This was solved with the addition of 6 . characters!

Commit

Issue

I raised and closed Issue #25.



Posted on Utopian.io - Rewarding Open Source Contributors

Sort:  

Thank you for the contribution. It has been approved. But for your next contribution please try to add more work instead of few lines which is the case in this post.

You can contact us on Discord.
[utopian-moderator]

I don't mean to question utopian protocols, but I'm curious to know exactly why more work should be done for each contribution. If an issue is small, does it need more than a small solution? Or do you mean that multiple issues should be fixed at once?

@oyvindsabo More work in the sense, 2-3 features or 2-3 bugs which can be completed and then create a post about it, not for 1 bug or 1 feature if those are really small fixes.

Good clarification question.

Thanks for the benefit of the doubt this time. I will take on board your suggestion with regards amount of work to submit next time.

Hey @antonchanning I am @utopian-io. I have just upvoted you!

Achievements

  • Seems like you contribute quite often. AMAZING!

Community-Driven Witness!

I am the first and only Steem Community-Driven Witness. Participate on Discord. Lets GROW TOGETHER!

mooncryption-utopian-witness-gif

Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x

whats good homie? how have you been brother? not sure if you knew but @alchemage and i are hosting a discord server https://discord.gg/gHgZZZ feel free to drop in on us any time. peace. much love.

Oh hi. Been away for a bit due to numerous reasons. Invite has expired already...

Congratulation

Today one year ago you joined SteemIt
Thank you, for making SteemIt great and Steem on for more years to come!

(You are being celebrated here)

Coin Marketplace

STEEM 0.19
TRX 0.15
JST 0.029
BTC 63635.72
ETH 2597.20
USDT 1.00
SBD 2.91