-
Notifications
You must be signed in to change notification settings - Fork 0
/
header.php
70 lines (68 loc) · 2.45 KB
/
header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta content="<?php echo basename("/blocks/linkcard"); ?>" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/modern-normalize.min.css" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/style.css" />
<link rel="stylesheet" href="<?php echo get_template_directory_uri(); ?>/css/icon.css" />
<?php if (is_front_page() || is_home()): ?>
<title><?php bloginfo("name"); ?></title>
<?php elseif (is_singular()): ?>
<title><?php the_title(); ?> | <?php bloginfo("name"); ?></title>
<?php elseif (is_category() || is_tag()): ?>
<title><?php single_cat_title(); ?> | <?php bloginfo("name"); ?></title>
<?php elseif (is_author()): ?>
<title><?php echo get_the_author(); ?> | <?php bloginfo("name"); ?></title>
<?php elseif (is_archive()): ?>
<title><?php echo get_the_archive_title(); ?> | <?php bloginfo("name"); ?></title>
<?php else: ?>
<title><?php the_title(); ?> | <?php bloginfo("name"); ?></title>
<?php endif; ?>
<?php
if (get_theme_mod("or_main_design_googlefonts")): ?>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=<?php
$values = get_theme_mod("or_main_design_googlefonts");
echo str_replace(",", ":wght@400;700&", $values . ",");
?>display=swap" rel="stylesheet">
<?php endif;
wp_head();
?>
</head>
<body>
<header>
<nav>
<h2>
<?php
the_custom_logo();
if (!has_custom_logo()) {
echo '<a href="' .
home_url() .
'" rel="home">' .
get_bloginfo("name") .
"</a>";
}
?>
</h2>
<div class="row-menu">
<?php
$args = [
"container" => false,
];
wp_nav_menu($args);
?>
</div>
<div id="overlay">
<?php wp_nav_menu($args); ?>
</div>
<div id="hamburgerbtn" class="mobile">
<span class="top"></span>
<span class="middle"></span>
<span class="bottom"></span>
</div>
</nav>
</header>