Can I make TypeKits fonts work locally even if I'm not using a webserver (no localhost)? - typekit

I'm just playing around with an index.html file and an accompanying CSS file that I'm viewing in my web browser. How do I allow this to work with TypeKit? I know I can have it work if I have a webserver with localhost running, but in this case I don't.

If you have some working webserver, you can configure the typekit to use that domain, upload the index.html there, and then rip the typekit CSS to use it locally. The fonts are included as data URIs.
To do that, for example, in Chrome: Open the dev tools, go to the network tab, reload the hosted page and look for a CSS file from use.typekit.net (d?abcde2134...). Then copy the data from the preview tab into a local CSS file and you're good to go.

Related

How to export static HTML from Svelte without Surge or Vercel?

I want to publish my Svelte web app to GitHub pages and based my application on the template https://github.com/sveltejs/template. When I run npm run build, public/build/bundle.js is created but no index.html. All the tutorials I found talk about how to deploy Sapper projects, or to use external tools like Vercel and Surge, but is it possible to just build Svelte without any external tools? All I want is a static HTML page that I can copy to GitHub pages.
Edit: See the accepted answer for the general approach, however for non-root-directory-deployment, you still need to make the paths relative. I created a pull request at https://github.com/sveltejs/template/pull/239.
In svelte, index.html is a static file which will import your bundle.js and run it.
index.html is located at /public/index.html while your bundle.js is located at /public/build/bundle.js
in svelte template, index.html imports /build/bundle.js using a script tag to initialize the application.
while deploying, you just need to upload the whole /public folder and everything should be operational.

How to deploy my project to localhost?

I'm working on a website and right now I am using FileZilla to make changes to it. Every time I make a change, I have to re-upload the file to the website through FTP and then wait for it to update online. I want to just deploy my project to localhost so I can get instant results and then just upload the whole project when it's finished. How do I do this? All I have is a set of directories with the files in them.
You really need to use a web/application server such as IIS/Apache.
For PHP projects go for WampServer/XAMPP.Easy to setup and works very well.
(maybe too obvious)
If you are working only static content based on html/css/js you can just edit and view changes directly by opening the local file in your browser and refresh each time.
Furthermore for css and html you can edit your code "live", directly into browser and see changes immidiately.
Another option is to edit files with an editor that supports ftp like notepad++, you can connect via ftp, open and edit files directly from server (like php,html,css,js) because once you save the editor will automatically upload your changes.
Heres a good explanation about notepad++ and ftp plugin.
Localserver
If you work with php (and even only with html/css) the best choise is to run a local server that rappresents a real environment in which your code will run. As said by others XAMPP is a good choise for begginers because of simple installation and management.
XAMPP download
XAMPP tutorial
Once installed put your folder inside C:/xampp/htdocs/yourCodeFolder
Run the xampp control panel and start the Apache server.
Finally navigate with your browser to: http://localhost/yourCodeFolder/

Deactivate/change default favicon in iPlanet 6.0

While there are many questions here about a favicon not showing, I have one that is showing out of nowhere...
If I type in my browser http://localhost, I see the root of the web directory and no favicon.ico is there. Yet an icon shows up on the browser tab. If I type http://localhost/favicon.ico, the browser does show me the icon!
How can http://localhost/favicon.ico return something that does not exist?
I am using an iPlanet server linked to weblogic app container.
I searched for a favicon.ico in my entire web directory and weblogic domain, didn't find any (or rather: some others lying around but not the one I see).
I even searched for the string 'favicon.ico' in domain, web directory and iPlanet directory, in case it is in some configuration file, didn't find anything.
Any hint?
Edit: As pointed out by Sacha below, this is a default icon of the server. I would like to know where in the config it is located, and how to deactivate it. I found how to do that in documentation of iPlanet 7.0, but I am using iPlanet 6.0 and I can't find anything in the doc.
If there is no favicon.ico server displays a default one.It might be a xampp or wamp logo.If you want to customize put yours in your project root directory. Eg:- If your project name is saas put it in saas folder.
If going to localhost/favicon.ico shows you the icon, then it is there. I am not sure why it is not in the directory.
I was also facing the same problem in jBoss server of my jsp project in which the browser was showing by default server icon and there was no favicon.ico in my whole project directory
then i searched for the favicon on the server and it was there so i have remove that file from the server to remove any default favicon from my project.

Symfony 2 without CSS in FF and images in IE on server

I deployed my site to a OVH server with filezilla following the steps in this tutorial http://pilvee.com/blog/deploiement-symfony2/
After deployment I find that my site works fine but without CSS content in FF and Chrome, so when I check in firebug I find all CSS styles are loaded correctly but empty without content,also JS file are loaded with content and all images too.In IE I have the style that works fine but no image is loaded ??I work on Ubuntu and I use a Virtual Machine to use IE...
I published my asset with assets:install web,I almost did everything, I cleared the cache and I changed the access rights of all files, I specify for files => 705, the CSS and JS => 604,finally I put everything to 777 but still no change ...
That get me crazy really,i dont know what i do to get my website work,i thinked about rebuild my website again,I liked symfony 2 before but now I hate it...
An idea?
Are you using assetic to manage your assets ?
$ app/console assetic:dump
Maybe
$ php app/check.php
can tell you more about your host configuration.

Files on my WebDAV mapped drive output rendered files in IDEs instead of actual content

On my mac I mounted a shared drive using WebDAV by going to "Finder > Go > Connect to server".
Now, when I try to view the files using TextWranger or TextEdit I can see the PHP code that I want to edit.
However, if I try to use an IDE like NetBeans/Eclipse/TextMate and create a new project with my shared drive as the "Existing sources" folder I cannot see the PHP code.
Instead I see the HTML output of the files as if I were seeing them through a web browser. Also, if I try to view a file that isn't normally accessibility (a command line script) I see the output as if it were called from the command line.
But a weird thing is if I use TextMate to edit a single file from the shared drive I can see the php code I am trying to edit. It just doesn't work as a project.
Any suggestions or solutions on how I can use an IDE to edit files over WebDAV? And why do my IDEs display the content rendered, instead of the actual file on the file system.
I'm not a specialist at all but I seem to remember that WebDAV clients do send GET requests.
If I'm correct your server may not be able to discriminate between HTTP GET and WebDAV GET thus rendering your .php files. Why this would work that way when working with a project and another way while working with individual files is not clear, though.
Do you get rendered files when you add files to your project manually as well?