-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix logo, slider upload and display problems #20
Conversation
</section> | ||
); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is all this file marked as changed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. It's github.
In footer.js changed 1 line:
const footerLogoUrl =
themeSettings.footer_logo_url && themeSettings.footer_logo_url.length > 0
? storeSettings.assetsBaseURL + '/assets/images/' + themeSettings.footer_logo_url
: settings.logo;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. There's an option to ignore whitespaces in Diff settings.
Wouldn't it be more clear with template literals? Something like this:
${storeSettings.assetsBaseURL}/assets/images/${themeSettings.footer_logo_url}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. But i'm waiting for approve all of 3 PR. We can change this string in the further commits, when this PR will be merged to the main code.
I test it on my local machine with ubuntu and i'm happy now with cezerin2 separated repos.
Now i have all working as i want (product images in admin and storefron, slider images in admin and storfront, logo in admin and storefront).
But you need to test all of 3 Pull Requests to take this work as expected.
cezerin2, cezerin2-admin, cezerin2-store changes.
Logos, sliders, products images uploading and displaying correctly at admin and the store now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I'm going to test these also, as i was just struggling to fix the assets on store/admin! Good job!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All changes made based on product images that displayed at storefront. As you can see storefront and product images at the storefront - all url came from api localhost:3001/content/images/...
On this base we made slider images and logo images at storefront and admin.
For me all works fine (installation from source code, not docker installation)
theme/src/components/homeSlider.js
Outdated
</div> | ||
); | ||
|
||
const HomeSlider = ({ images, settings }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
settings is not used, i think it can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removed
theme/src/components/homeSlider.js
Outdated
@@ -55,6 +56,7 @@ const HomeSlider = ({ images }) => { | |||
|
|||
HomeSlider.propTypes = { | |||
images: PropTypes.arrayOf(PropTypes.shape({})) | |||
//settings: PropTypes.shape({}).isRequired |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment can be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removed
theme/src/containers/index.js
Outdated
ogDescription={pageDetails.meta_description} | ||
/> | ||
|
||
<HomeSlider images={themeSettings.home_slider} settings={settings} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The settings
prop can be removed from here too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
config store.production.js should have env based variables. so that easy for docker too
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this setting also needs to be removed.. because API server should send the assets full path
Fix for issue #17