Giter VIP home page Giter VIP logo

lato-rails's People

Contributors

chinshr avatar g33kidd avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

lato-rails's Issues

Fontpath not translated into digest in production

Using Rails 5.1.5:

in _mixin.scss the font-url is defined as "#{$FontPath}/#{FontType}/..." however
sprockets using sass will not translate the path "assets/bold/lato-bold..." into a digest in
production.

The correct path should be "bold/lato-bold...". (without assets and the backslash) in order
to get a digest.

It's hard to find documentation on this, but it's likely a sprockets convention which must be followed.

Font not found in Production with Asset Compilation

First off, thanks for creating this gem.

I am using Semantic-UI-Rails-LESS which defaults to using the Lato font. I am wanting to do development away from the internet so found this project to provide it through the asset pipeline.

I am using version 1.0.5 of lato-rails and have followed the README instructions for how to include it via Sprockets i.e. *= require lato.

It works fine in development, i.e. the font are being served correctly from http://localhost:3000/assets/bold/lato-bold.woff2?v=1.0.0

However, when deploying to production (with asset compilation enabled) the font files cannot be found. The CSS tries to load the font files from https://popin-portraits.herokuapp.com/assets/regular/lato-regular.woff2?v=1.0.0 which doesn't exist. I assume that's because the fingerprint is missing. For example, normal images are served through the asset pipeline have URLs like https://popin-portraits.herokuapp.com/assets/logo-afe2c346aabb349f7b0860664d363b7f1c6477d84ea59d48afbd626365260a85.png.

While the code is private, you can access the login page at https://popin-portraits.herokuapp.com/ and see from the Web Inspector that the fonts are not being loaded.

I don't think it's anything to do with Semantic-UI-Rails-LESS, as the CSS generated by lato-rails seems to be incorrect. See line 1 of the generated CSS. However, I could be wrong.

I have had some experience with defining font-face and I ran into an issue where my .scss needed to use font-url() instead of url() to fix this exact issue. The URL where my custom font is loaded is http://cycling.harris.org.nz/assets/strava-8c03e79c77a5f9d8d09f6b37a8bbc83fb83510ce6135d8962c522db44a758849.ttf?. However, I see that you already use font-url().

Do you have any ideas? I'm now somewhat out of my depth! Again, sorry I can't share the code :(

Pls. Bump

Hi, could you pls. bump the gemspec, such that it supports Rails 5.2?

Best Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.