I am trying to covert a wordpress website into a simple html/css website but the problem is that whenever I use httrack, it downloads the whole wordpress files making it hard for me to extract the simple html/css files
Is there away to solve that using httrack? or any other method?
in the httrack url list, add the list of pages you actually need. For Example, if the website you wish to extract is abc.com, then instead of just writing abc.com mention the pages you want For Example abc.com/index.php abc.com/about.php
This will reduce the unnecessary files required. Also, the httrack tries to create folder similar to the host. So this is the max that you can do. Inspect Element goes handy while editing these mirrored sites.
Related
I've recently started learning html and for my first project i'm trying to create an image gallery that takes every png file from a directory and frames them on one page.
I've managed to make a very simple gallery that displays the images in a grid pattern but i haven't been able to make it take images straight from a folder without doing it manually.
I'm probably getting ahead of myself with such a project but any help is welcomed.
Current code is on github here:
http://ronsoros.github.io/?f49ef4d23d14e2c204648514729a7d850f62cf13
Welcome to Stackoverflow and the world of web development. You're indeed getting a little ahead of yourself, but that's a great attitude.
To be able to fetch all the images from a folder automatically, you need a programming language. Javascript is one of those programming languages, but Javascript is client side.
Client side means that the code you've written is executed by the users' browser. This means that as long as the user has access to the folder with your images he/she is able to fetch all the images and display them on the webpage. Most servers, the computer your website is hosted on, take security measures to make sure that the user can't access a directory, only the contents. This means that the user cannot know how many images are in the directory.
Javascript is also very slow in doing this, as first the page needs to load; run the javascript; loop over every image in a directory; display them one by one; end the script.
So what you need is PHP, a serverside language. This will be run before the user gets the page, the server executes the code. This means that you have access to the folder containing the images and are able to loop over them, get the images and put them in HTML tags to send to the user with the page.
But PHP needs a lot more than just a .html file, it needs a .php file and your computer or server has to know about PHP and what to do with it.
If you want to learn more about PHP W3Schools has a great guide on the basics of PHP: https://www.w3schools.com/php/
But I recommend sticking with HTML and CSS right now and really try to understand how it works and why it does what it does.
Goodluck!
I run a website for my photography where I have a stories page (http://www.traumantic.com/stories.htm) that is a long list of choices that lead to a sub folder and a gallery of images for that session.
I have an index.htm file in each of those folders that displays the gallery chosen.
I am trying to develop a new format for my pages, and putting it in place means replacing dozens of index.htm files and editing each one for that new format. A boatload of work.
I have noted that a lot of news sites seems to have a method of using a single template for the main body of the page and the elements of the news story are pulled in from another source.
I figured I could do this with XML like I did with my galleries, but I am lost.
I tried creating an XML file in a couple of text folders and then reading that form an HTM file two levels up. Didn't work.
Currently when you click on a link on my stories page, it opens the index.htm file in a sub-folder.
What I want to happen is this.
Clicking on a choice on my stories page launches an html template that reads the details from the folder.
The one html template would be used for all of the different story folders below. Making it far easier to modify the look of my web site quickly.
I'd rather put a ton a of work into designing this system that doing a mass replace and edit project on hundreds of files.
I hope this makes sense to some of you and that you can guide me to some study topics that will help me learn how to do this.
I am seeking advice on places where I can see example of this process.
The simplest option is to use an iframe
https://www.w3schools.com/tags/tag_iframe.asp
<iframe src="/path/to/file.html"></iframe>
Searching "html include" will yield a few guides that have various JavaScript implementations. (e.g., https://www.w3schools.com/howto/howto_html_include.asp)
If you're able to run php, you could use include
https://www.w3schools.com/php/php_includes.asp
But at that point, you might want to consider installing some sort of template engine like twig https://twig.symfony.com/doc/2.x/intro.html
Just as an experiment - I have taken the page source from a webpage I am viewing and copied it into a file on my desktop. When I try to open this file in my browser, I get a jumbled mess with no formatting.
What could the original page have that my copy does not?
Copying the files from original site through Viewsourcepage, you will not get the CSS and JavaScript files. Usually we call CSS and JavaScript from external source so that is the thing you are facing problem here
My best suggestion is if you want to copy the files from original website use Httracker. Download httrack from the website, Install it and use
Sounds like you're missing the stylesheets as well. Stylesheets include the styling (formatting) for the html.
There are probably CSS and/or JS files that are loaded dynamically from where ever you copied the HTML from. But they are probably relative locations, and you didn't copy those files too.
Static web pages will work when you do this. Their content do not change.
A lot of pages nowadays are dynamic and the source changes based on the client side JS code or values from the backend.
There could also be frameworks and a lot of dependancies for that particular page.
Instead of copy/paste manually, you can try some websitedownloader eg. it's an online one https://websitedownloader.io/
I know this is probably a very basic/obvious thing, but I'm new to Shopify and trying to assist a client while a colleague is on vacation. I know what I need to change and how to change it, but not how to access it. When I go to Online Store and click Edit Code, I see all the Liquid, JSON, and even CSS files, but I can't find the HTML file I need to edit, nor can I find any of the HTML I need to edit within the theme.liquid file. The resources I'm finding are all either outdated (there is no "Edit HTML/CSS" option on the dropdown anymore) or unhelpful (like this). I can see the HTML in the console and upon clicking View Page Source, but I don't know how to get to it through Shopify. I feel like I'm losing my mind because this HAS to be very simple and obvious. If someone could please tell me how to access and edit the HTML file on Shopify I would be VERY grateful!
The html files are the liquid files.
There are no actual HTML files since this is a Shopify theme.
Depending on your theme, your files are located in:
theme.liquid - here are the header and footer
templates/*.liquid - all liquid files here are the main templates for the different pages
sections/*.liquid - the files here are usually used on the homepage and other pages as well
snippets/*.liquid - these are the reusable code snippets
So depending on your changes you will need to go through these files and update them for the specific changes.
Please have in mind that these files may be used on multiply pages and if you change one of them there is a possibility that this will affect other pages as well.
Recently I've been tasked with redesigning a website for the current company I'm working at. I've been using weebly to make the site, and then exporting the HTML to be re-hosted on the company's servers.
However, I've noticed that some functionality in weebly's code has stopped working. I imagine this might be due to weebly hosting some elements on their own servers, but this is merely a beginners best guess.
1. The picture for the logo on the banner does not appear once the HTML is rehosted
For comparison, here's the site while hosted on weebly:
http://mjmacoustique.weebly.com/
and the site on the company's servers:
http://www.mjm.qc.ca/redesign2015/
When weebly hosts, the ''MJM'' image should be on the top left and function as a return to home page button when clicked. However, when it's hosted on the company's server, the image is not found.
2. On Firefox, the background image of the home page is replaced with an all black background
When opened in firefox, it fails to load the background image of the main page.
Any help or solutions to these problems would be greatly appreciated.
Thanks.
I can help with question #1: the logo is hosted on weebly's servers, but in the html it's written in a shortcut method like this example: /uploads/2/6/8/5/26851316/1434298489.png"
the easy workaround would be to keep the weebly version of the site working, in in the html change the src value of the missing images to something like this http://mjmacoustique.weebly.com/uploads/2/6/8/5/26851316/1434298489.png
So you haveto add the http://YOURSITE.weebly.com before all the src values of your images.
otherwise, just load all the images you need on a blank page of the site on your servers, copy image urls of those and replace the urls in the html with that.
Hope that helps?
The firefox issue might also be solved if all your src values are linked correctly but I cannot be sure about that.
When I tried exporting a site from weebly, some assets were missing from the zip it produced. This resulted in some images failing to appear because they simply weren't there. I don't know how often this happens (or if it happens only for some sites), but weebly's export feature definitely seems to have bugs.
I worked around this by using wget to recursively fetch the content that weebly was hosting. Then I hand-copied the missing assets (and only the missing assets) from the directory structure saved by wget and merged them into the directory structure from weebly's export zip. This is time-consuming, but necessary since the directory structure fetched by wget includes dynamically-generated content (meta data for weebly's editor, assets with decorated names, etc) that you probably don't want in the content you host elsewhere.