Results 1 to 10 of 1685

Threaded View

  1. #11
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,303
    Plugin Contributions
    1

    Default Re: ZCA Bootstrap Template

    Quote Originally Posted by g2ktcf View Post
    I need to format the tagline for my site in a very specific font. I have both ttf and woff2 files. I created the following

    Code:
    @font-face {
    font-family: "TagLine_font";
    src: url("../fonts/myfont.ttf") format("truetype");
    src: url("../fonts/myfont.woff2") format("woff2"),
    
    }
    The other fonts found in 158a are in an admin directory but I am not sure WHERE to put the two files or exactly how to reference the path within ZC. I am getting a 404 file not found which is logical given that its looking at "localwlc.com/fonts/myfont.woff2"

    Where do these file need to go and how to I reference them properly?

    Thanks
    Chris
    This is my setup,

    put your code in a new file - \includes\templates\YOUR_TEMPLATE\css\stylesheet_font.css, note the path change of 'src: url' and either remove the trailing comma (in red) or change it to a semi-colon.

    Code:
    @font-face {
    font-family: "TagLine_font";
    src: url("/fonts/myfont.ttf") format("truetype");
    src: url("/fonts/myfont.woff2") format("woff2"),
    
    }
    add an index.html file to the /fonts folder

    index.html
    Code:
    <html>
      <head>
        <title></title>
        <meta content="">
        <style></style>
      </head>
      <body></body>
    </html>


    to restrict access to certain filetypes (i.e. fonts) add an .htaccess file to the /fonts folder (you might need to copy over an existing one from another folder and edit it - in windows you cannot create a new file beginning with a dot)

    .htaccess
    Code:
    #
    # @copyright Copyright 2003-2013 Zen Cart Development Team
    # @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
    # @version GIT: $Id: Author: DrByte  Fri May 17 14:29:18 2013 -0400 Modified in v1.5.2 $
    #
    # This is used with Apache WebServers
    #
    # The following blocks direct HTTP requests to all filetypes in this directory recursively, except certain approved exceptions
    # It also prevents the ability of any scripts to run. No type of script, be it PHP, PERL or whatever, can normally be executed if ExecCGI is disabled.
    # Will also prevent people from seeing what is in the dir. and any sub-directories
    #
    # For this to work, you must include either 'All' or at least: 'Limit' and 'Indexes' parameters to the AllowOverride configuration in your apache/conf/httpd.conf file.
    # Additionally, if you want the added protection offered by the OPTIONS directive below, you'll need to add 'Options' to the AllowOverride list, if 'All' is not specified.
    # Example:
    #<Directory "/usr/local/apache/htdocs">
    #  AllowOverride Limit Options Indexes
    #</Directory>
    ###############################
    
    # deny *everything*
    <FilesMatch ".*">
      <IfModule mod_authz_core.c>
        Require all denied
      </IfModule>
      <IfModule !mod_authz_core.c>
        Order Allow,Deny
        Deny from all
      </IfModule>
    </FilesMatch>
    
    # but now allow just *certain* necessary files:
    <FilesMatch "(?i).*\.(otf|ttf|woff|woff2|eot|svg)$" >
      <IfModule mod_authz_core.c>
        Require all granted
      </IfModule>
      <IfModule !mod_authz_core.c>
        Order Allow,Deny
        Allow from all
      </IfModule>
    </FilesMatch>
    
    IndexIgnore */*
    
    
    ## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
    # OPTIONS -Indexes -ExecCGI
    Last edited by simon1066; 24 Mar 2024 at 10:22 AM.
    Simon

 

 

Similar Threads

  1. v155 Clone a Template [Support Thread]
    By lat9 in forum Addon Admin Tools
    Replies: 107
    Last Post: 11 Nov 2024, 08:28 PM
  2. v150 aBagon Template Support Thread
    By VJef in forum Addon Templates
    Replies: 54
    Last Post: 5 Sep 2020, 08:44 PM
  3. v155 ZCA Bootstrap Template 1.0 (BETA)
    By rbarbour in forum Addon Templates
    Replies: 74
    Last Post: 25 Apr 2018, 07:05 PM
  4. TB Sempre Template Support Thread
    By brandonturpin in forum Addon Templates
    Replies: 48
    Last Post: 19 Mar 2015, 06:33 PM
  5. Wallet Template - Support Thread
    By zami in forum Addon Templates
    Replies: 45
    Last Post: 25 Mar 2010, 10:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg