Skip to main content

Website creation, the client understands the meaning and is ready to spend

  Website creation, the client understands the meaning and is ready to spend Creating a website, the client understands the meaning and is ready to spend. What does this mean? Customers are different, some are huffing and puffing but can't afford everything. Others are rich but greedy, but there are those who delve into all the details of website building and promotion. And it's very pleasant to deal with them. For example, you need to fill the site cool and uniquely, they don't skimp on copywriters and rewriters, moreover, they add to them themselves. They think over the entire structure of the resource with the master, where, what and how will be located. They select images, logos and icons. They test and only then give the green light for a full launch of the site. And already in the process they change something. They deal with all popular social networks, or rather their managers. They control reviews in Google My Business. They research search queries in Google Trends...

Why a website needs a dark version, convenience for users

 

Why a website needs a dark version, convenience for users

Have you ever wondered how to make a dark theme for a website? If you have, then this is right, because in order for the user to stay on your website even at night and continue reading the content, you need to create all the conditions for him. Imagine a situation, there is a light-colored website, it is convenient for reading during the day, but at night in the dark, its lightness eats out the eyes, this is the main problem that creates discomfort at night, today we will try to solve this problem and create all the conditions for comfortable reading of the site even at night.

The solution that we will use is not a clutter for the site code, just a few lines of styles, a small script and a button to turn on / off the dark version.

Installing the Dark version for the site will consist of 3 steps:

1. Set the following styles in the CSS style sheet:

html .dark * {
background-color: #1d1c1c !important;
color: #fff!important;
}

2. Install in the global block at the bottom of the site or just before the </body> tag the script:

<script type="text/javascript">
$(function(){
var gun = localStorage.getItem('name') === null || localStorage.getItem('name') === 'false' ? false : true;
$("body").toggleClass("dark", gun);
$(".change").on("click", function() {
$("body").toggleClass("dark");
var gun = $('body').is('.dark');
localStorage.setItem('name', gun);
});});
</script>

3. The last point is to set up a button to turn on/off the dark version, set up the button in a convenient place in the template:

<a type="btn" class="change"><img src="/img/darkthem1.png" alt="Dark theme for the site" title="Dark theme for the site" style="max-width: 20px; margin-top: -3px; cursor: pointer;"></a>

That's it, there's nothing complicated about it, just change the background to dark and make the text white. You can see the result of the dark theme by clicking on the light bulb or crescent icon in the site header.

source of information

Comments

Popular posts from this blog

Website creation, the client understands the meaning and is ready to spend

  Website creation, the client understands the meaning and is ready to spend Creating a website, the client understands the meaning and is ready to spend. What does this mean? Customers are different, some are huffing and puffing but can't afford everything. Others are rich but greedy, but there are those who delve into all the details of website building and promotion. And it's very pleasant to deal with them. For example, you need to fill the site cool and uniquely, they don't skimp on copywriters and rewriters, moreover, they add to them themselves. They think over the entire structure of the resource with the master, where, what and how will be located. They select images, logos and icons. They test and only then give the green light for a full launch of the site. And already in the process they change something. They deal with all popular social networks, or rather their managers. They control reviews in Google My Business. They research search queries in Google Trends...

How to make a site appear more in search results?

  How to make a site appear more in search results? Of course, you need to start with the site working correctly in the Google webmaster account,  search console new name, I like the old one more. The most important things for your resource are the correct robots.txt file and the sitemap, more often it is sitemap.xml or something similar.  Google periodically scans your site for updated information, but you can also manually ask to check any page. But there is a limit on the number, you will be told in your account that the quota has been exceeded. In addition to changing text information and images, when else is it useful to ask for a page check? For example, adding micro markup, changing headings, inserting links to other pages and resources. In addition to the above, it is useful to add these modified pages to social networks, write a note on Google Maps with a mandatory link. Well, and if there is a podcast, YouTube and do something similar there. ...

Why is it important to save a domain and not a website

  Why is it important to save a domain and not a website Just a couple of days ago, my old client's domain was switched off, that is, the name of the site, which is 8 years old. The joke is that the company with this name no longer exists, and there is another one. And like many poorly understood people, the psychological thought immediately in their head is - I don't want a resource with such a name. Let's start with the main thing, only in the dot ua domain zone do you need documents for a trademark. If the site has a different ending, there are no problems, especially since my client only changed the name of the company and the type of activity remained the same. And losing such an old site name is complete nonsense, with such an age. Once I was talking about returning a domain  that was more than 10 years old, and the owner was very worried, moreover, he was ready to overpay, if only they would return it. Now the question is not difficult, pay within a month and ...