Convert shared layout of asp.net to html - html

I recently figured that hosting a microsoft webdomain is expencive. Therefore I want to change my website to a simple HTML file with JScript and Css.
Does anyone know how i change this code from the shared-layout of my project to normal HTML code that i can paste into my index page?
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>#ViewBag.Title</title>
#Styles.Render("~/css/style.css")
#Styles.Render("~/Content/css")
#Styles.Render("~/Content/bootstrap.css")
#Styles.Render("~/css/animate.css")
#Styles.Render("~/css/animations.css")
#Styles.Render("~/css/custom.css")
</head>
<body>
#RenderBody()
#Scripts.Render("~/bundles/jquery")
#RenderSection("scripts", required: false)
</body>

Just display any page from your web site in your browser, right click on the page, and select "View page source". Copy and paste that into a new file - the HTML is all there. No need to worry about what the above Render functions do as you are capturing the HTML after it has been rendered! Next add lines to the head section to link each .css file (keeping the same order as in the original script, that's important), and move copies of those files to your new site, and that should be it.

Related

Svelte: CSS not responsive on dynamic route pages

I have a problem that I'm almost sure is because of how I'm building my pages and not just a CSS issue. I am using Tailwind for my website. For my Sveltekit blog, I wanted the xyz.com/projects/some-project URL structure so I created a folder in routes called projects. Inside that I have two files, index.svelte and [project].svelte. Index should contain the listing of all posts and any project should be created at [project]. All this works fine, but the pages that are dynamically created have some weird layout issue that is causing it to not be responsive. For example, you can see how weirdly this page is formatted.
You can visit this page and see it for yourself. My code for this is here.
I read somewhere that I am supposed to use __layout.reset.svelte or something of that sort while creating dynamic routes? Is that what is wrong?
Why are my breakpoints and responsive CSS not working?
The reason I think its a Sveltekit issue is because the dynamic pages are the only pages where this is happening, so I'm assuming there is something wrong in how I've set it up.
Your /src/app.html's <head> section is where the problem is located. Yours is:
<head>
%svelte.head%
</head>
which is missing a critical piece, the <meta name="viewport" content="width=device-width, initial-scale=1" /> tag which is essential for mobile responsiveness.
This is normally present in default SvelteKit projects:
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
%svelte.head%
</head>
I noticed you started your project from a custom template, and indeed that template's /scr/app.html skeleton is missing the above info.
This is something you have to watch out for when using such templates - how they deviate from a standard install and what the impact is for you. My advice is, start from the default, and add pieces knowingly, with full understanding of the incremental changes and full control of your source.

Pelican blog - Verify ownership Bing webmaster

To verify ownership of my blog, the bing webmaster requires one of the following three approaches:
Upload the file "BingSiteAuth.xml" to my website as https://mywebsite/BingSiteAuth.xml
Copy and paste a meta tag in my default webpage e.g. <meta name="msvalidate.01" content="...." />
An example given:
<html>
<head>
<meta name="msvalidate.01" content="...." />
<title>Your SEO optimized title</title>
</head>
<body>
page contents
</body>
</html>
Add CNAME record to DNS
Question:
What would be the easiest approach and what would be the steps for a beginner ?
Note I am using the AboutWilson template in Pelican. Thanks
Sounds like the copy and paste meta tag would be the easiest, i have done it on my blog. All you need to do is go to your theme template directory and paste the required meta tag line in the base.html file in the head section.

Adding a theme to MVC page, can't find css file

Its been a little while by now, that I have been trying to understand MVC. I do understand the basics now and I also noticed, themes or css files can be added to a MVC site. When I try to do this, it seems my CSS file is not being found. This is the head of my _Layout.cshtml code:
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>#ViewBag.Title - Bierownie</title>
<link href="#Url.Content("~/Content/Earthlingtwo/style.css")"
rel="stylesheet" type="text/css" />
</head>
I am not really sure what I should put at the link tag. I noticed that in the other (standard auto-generated(Razor)) _Layout.cshtml file, something like this was being used:
#Styles.Render("~/Content/css")
#Scripts.Render("~/bundles/modernizr")
But it seemed that the code wouldn't understand if I put that same bit of code in the Layout's head, from which I want to use. I also tried to search on the web and I think it had something to do with the config file, although I'm not sure. A red curve would appear beneath Styles and Scripts.
If anyone could tell me how I simply could link a css file in a newly created layout file, I would be able to go further with my MVC site.
I am also not so sure if this question has already been asked and/or solved, so please let me know, as I couldn't find any answers.
As you can see in this picture:
There's a config file which will break the theme. Someone else noticed it and it did cause a problem.
You can just Drag&Drop css file from solution explorer to your layout page.
Bundle uses better. Try this:
ASP.NET - Using Bundle and Minification in ASP.NET MVC 4 and ASP.NET Web Forms 4.5
In your question, the path to style is noted as Content/Earthlingtwo/style.css, where in your graphic it's Content/Earthlingtwo/images/style.css. In the Earthlingtwo folder, is a site.css file Content/Earthlingtwo/Site.css
You need to correct your href to the correct path
<link href="#Url.Content("~/Content/Earthlingtwo/images/style.css")"
rel="stylesheet" type="text/css" />
or
<link href="#Url.Content("~/Content/Earthlingtwo/Site.css")"
rel="stylesheet" type="text/css" />
depending on which is the correct file.

Why I can't develop single html page with linked css or js files?

What is wrong with Chrome? I want to develop just a single html page. Without any server. Just one page. I know that I need web-server for using that page. But I need to just create a short simple html page with linked js and css files. And I can't do this, because chrome is too smart and I get the same error from chrome:
Not allowed to load local resource
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>ACAB</title>
<script type='text/javascript' src="./data_statistic.js"></script>
....

jsf 2 ui:include .html give error "XML Parsing Error: no element found"

I include a header.html (not .xhtml) to my page, but when I preview my page, it give me error "XML Parsing Error: no element found". I do know that it is the tag no properly closed issue, but since my header page is a html file, not a xhtml file, it shouldn't must close the tag, am I right?
If I do close all the meta tag in my header.html, my page is working fine, but I wish to know that is it a must close all the tag properly in html file if I include them in jsf2, thanks.
header.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Header</title>
<meta name="description" content="">
</head>
<body>header content</body>
</html>
welcome1.xhtml
<ui:include src="header.html" />
<p>welcome page</p>
From Oracle's documentation, <ui:include> is used to encapsulate and reuse content among multiple XHTML pages. The src attribute is expected to point to a well-formed XML document. Even if you want to include .html pages, you need to make sure all tags are closed properly.
If you look more closely, you will see the closing <html> tag in you header.html, which should end the HTML document, as you can see in Structure of an HTML document. This way, when you include the file in the final view you break that contract.
In JSF you'd be better off using the templating option of facelets. For example in a master template you can make insert points, like the scripts section, and later define inserted contents in template client pages (final views). Kickoff example can be found in this tutorial by mkyong.