I've gone through all the template .php, .css, .xml files but I can't find the link to a google font that I don't need and want to stop from calling.
I'm sure it must be buried in the many, many files that Joomla combines to build the webpage.
Site is Joomla, latest version. Template is Favourite. Font I want to kill from loading is Google "Lato"
https://rcidaky.com
The fonts that are loaded depend on what is selected in the template settings.
The default font in the template settings is Lato:
It doesn't look like there is an option to disable loading a Google font in the template settings.
The code that loads the fonts is located in the template file at /templates/favourite/index.php at line 78:
<!-- GOOGLE FONT -->
<!-- navigation -->
<link href='//fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+',$this->params->get('nav_google_font'));?>:<?php echo ($this->params->get('nav_google_font_weight')); ?><?php echo str_replace('normal', '',$this->params->get('nav_google_font_style'));?>' rel='stylesheet' type='text/css' />
<!-- titles -->
<link href='//fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+',$this->params->get('titles_google_font'));?>:<?php echo ($this->params->get('titles_google_font_weight')); ?><?php echo str_replace('normal', '',$this->params->get('titles_google_font_style'));?>' rel='stylesheet' type='text/css' />
<!-- text logo -->
<link href='//fonts.googleapis.com/css?family=<?php echo str_replace(' ', '+',$this->params->get('text_logo_google_font'));?>:<?php echo ($this->params->get('text_logo_google_font_weight')); ?><?php echo str_replace('normal', '',$this->params->get('text_logo_google_font_style'));?>' rel='stylesheet' type='text/css' />
<!-- default -->
<link href="//fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css" />
I was able to find this code by downloading the template install file, expanding the ZIP file to a local folder and then searching the files for occurrences of "googleapis".
The only two files where this string occurs are the template index.php file and the templateDetails.xml file.
I'm pretty sure the above code is what you are looking for.
An alternative solution (which doesn't involve editing the code) might be to use a suitable plugin such as JMG Disable Google Font.
Related
I downloaded my laravel project from live serve (shared hosting) to local hosting because I want to make some changed in the code. I added a new index.php file to the public folder and run composer update and composer install commands and managed to run the project on local server (I use Laragon server on windwos). However, the project can not upload the resource. The resource are located in the public floder and linked using {{asset}} function and {{assetversion}} methods. Honestly, I do not know about the use of version. The code in like that
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/fontawesome.css{{assetVersion()}} ">
<link rel="stylesheet" href="{{asset('public/backend/css/themify-icons.css')}}{{assetVersion()}}"/>
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/flaticon.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/nice-select.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme') }}/css/notification.css{{assetVersion()}}">
<link rel="stylesheet" href="{{ asset('public/frontend/infixlmstheme/css/mega_menu.css') }}">
When I check the path in chrom dev tools, the link points to the right folder (except the version in not in the file name). such as
<link rel="stylesheet" href="http://127.0.0.1:8000/public/frontend/infixlmstheme/css/fontawesome.css?v=5.0.0 ">
and the folder in with same path starting from public.
However, the recourse is not connected and the error massage is shown in the attached image fro chrom dev tools.
I appreciate you help guys and thank you in advance for your time and expertise.
I have assempution the error is from {{assetversion}} but I could not find the version in the file name. I do not know a lot about the frontend how the asset version work.
I'm doing a little website for me with Laravel 8.0.
Inside home.blade.php, I have this : <link rel="stylesheet" href="{{ asset('css/header.css') }}">
But when I go to my browser, no css in my page. Inside the developper tools, it says <link rel="stylesheet" href="http://localhost/css/header_site.css">.
I have all my css inside the public/assets/css folder.
I also used the VirtualHost inside httpd-vhosts.conf where I do DocumentRoot "C:/xampp/htdocs/my-project/public".
Cordially
Try configuring the assets url in the .env file. ASSET_URL=http://localhost/assets/. Then do {{asset('css/header.css')}}
I install Twitter Bootstrap using composer and can easily include the CSS like this:
<link href="{{ URL::asset('css/app.css') }}" rel="stylesheet">
However, when I install Font Awesome using composer in the same way, I don't see any CSS files added to that folder. The one CSS file created by Font Awesome is in /app/vendor/components/font-awesome.
How do I include the downloaded Font Awesome CSS into HTML?
Thank you.
Just put the downloaded css file inside public/css/ directory and add following line in your view file.
<link rel="stylesheet" href="{{ asset('css/font-awesome.min.css') }}">
And, Make sure your directory structure should like this:
public/css/font-awesome.min.css
public/fonts/
So that, icon will be displayed properly.
In Laravel, I’ve in public/css/app.css the following:
body { background: "red"; }
It’s linked to my layout like this:
<link rel="stylesheet" href="/css/app.css" media="screen" title="no title" charset="utf-8">
But when I go to the home page, the style isn’t applied to the body. I checked the source and the CSS file is there!
I removed the cache but nothing happened. This problem start after I added version() to elixir but after that I removed all the build folder, now I can’t get the style working.
When you use version() in elixir the filename changes. You can add following helper
<link rel="stylesheet" href="{{ elixir('css/app.css') }}">
this will always return the correct file name.
Refer to the documentation for versioning and cache busting.
Also make sure you run the gulp command again since you deleted the build folder.
I think you need to use asset to refer/link to files in public folder
<link rel="stylesheet" href="{{asset('/css/app.css')}}" media="screen" title="no title" charset="utf-8">
You should write this. This is Laravel predefined Function
{{ HTML::style('css/app.css'); }}
I have some trouble to access root dir files when using subdomains:
My css files located in css dir in the root.
If i use url "my-site.com/css/file.css" - everything okay
If i use url "en.my-site.com/css/file.css" - 404 error
How can i fix it? I don't want to hardcode path to all my css and js files.
Thanks
try this for for loading all images, styles, js
<link rel="stylesheet" href="<?php echo site_url('css/file.css'); ?>">
don't forgot to create directory in your main CI folder.
if you not able to get that like this:
<link rel="stylesheet" href="<?php echo base_url(); ?>css/file.css">
you have a server problems and it is not Codeigniter related ;)