Comments (3)
Same issue here. I ended up getting rid of the firesize and using a pure CSS solution for center-cropping, described here on StackOverflow (the 2nd one). Note that you need to add background-size: cover;
to the .center-cropped
CSS for it to work correctly. You can see it working correctly on my blog. So we end up with:
// partials/loop.hbs
function homepagePostThumbnail (imgUrl) {
thumbnailContainer.innerHTML = '<div class="center-crop" style="background-image: url(\'' + imgUrl + '\')">'
+ '<img src="'+imgUrl+'" height="150" alt="{{title}}" /></div>';
}
/* assets/css/main.css */
.post-thumbnail .center-crop {
max-width: 250px;
height: 150px;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
overflow: hidden;
}
/* Set the image to fill its parent and make transparent */
.post-thumbnail .center-crop img {
min-height: 100%;
min-width: 100%;
/* IE 8 */
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
/* IE 5-7 */
filter: alpha(opacity=0);
/* modern browsers */
opacity: 0;
}
This workaround is obviously trading-off some bandwidth and page load speed but I can live with that.
from mnml-ghost-theme.
Thanks for the heads up @tewen and @vickychijwani — I should have seen this coming when Assembly folded, since Firesize wasn’t profitable yet.
There aren’t any good hosted alternatives for Firesize, so for now I’ve just commented out that part and added a 160px max-height. I hope to find another on-the-fly image resizing API, or host my own, soon — or else go for a solution like Vicky’s.
Sorry for the outage :)
P.S. For anyone who’s hosting on Heroku, it seems if you push an updated theme without updating the theme's version number in package.json, it won’t change; took me a few pushes to figure this out, but I’ve bumped the version number so here so it shouldn’t be a problem.
from mnml-ghost-theme.
@curiositry Thanks so much. Love the responsivity. You guys are doing great stuff.
from mnml-ghost-theme.
Related Issues (20)
- Feature req: Add support for the code injections HOT 5
- /about and /contact pages HOT 7
- Suggestion: shorten the duration of the menu animation HOT 2
- Math rendering display mode HOT 4
- Default Paragraph Spacing Too Small HOT 4
- Markdown Header Rework Suggestions HOT 2
- Hamburger Menu Overlapping Title Text On Narrow Screens HOT 1
- No margin-top for headings HOT 2
- Let me know if I can help :-p HOT 2
- Unable to add About, Contact, w/o modifying source HOT 1
- Change the orange color HOT 1
- Theme translations HOT 6
- YouTube widget is shrunk with the latest MNML theme HOT 2
- Prism integration - how to fix code blocks size? HOT 3
- Paragraph margins on the post page are not visually the same as in the editor HOT 1
- This theme is invalid and cannot be activated HOT 2
- Consider MathJax instead of KaTeX (or make it selectable) HOT 1
- Cannot get secondary navigation at the bottom of page to show up HOT 3
- 3rd party code should not exist in this repository. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mnml-ghost-theme.