Commit 14a1b2b5 authored by Petr Balga's avatar Petr Balga

Finalization; When balance not created, show zero; iOS optimalization for...

Finalization; When balance not created, show zero; iOS optimalization for Safari on phones (using iPhone SE);
parent e501e487
<!DOCTYPE html>
<html lang="cs">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link href="<?php echo get_template_directory_uri(); ?>/css/app.min.css" type="text/css" rel="stylesheet">
<script src="/js/webfont.min.js"></script>
<script>
WebFont.load({
google: {
families: ['Open Sans:300,400,500,600,700,800:latin,latin-ext',]
}
});
</script>
<title>404 <?php wp_title("&bull;", "true", "right"); ?> Creative Hill College</title>
<!--Platí jen u 404-->
<meta name="robots" content="noindex">
<meta name="googlebot" content="noindex">
</head>
<body>
<section class="error-page">
<div class="grid-container">
<h1>404</h1>
<h2>Tato stránka neexistuje</h2><a class="button primary" href="/"><span>Hlavní stránka</span></a>
</div>
</section>
</body>
</html>
\ No newline at end of file
<?php
/**
* The template for displaying archive pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy 1.0
*/
get_header();
//global $wp_query;
$category = single_term_title("", false);
$catid = get_cat_ID( $category );
?>
<main class="global-page global-bottom">
<div class="grid-container">
<h1 class="underline"><?php echo single_term_title(); ?></h1>
<p class="perex"><?php echo the_archive_description(); ?></p>
<div class="news-list">
<div class="grid-x grid-margin-x">
<div class="cell medium-8">
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$args = array( 'post_type' => 'post', 'cat' => $catid, 'paged' => $paged );
$wp_query = new WP_Query($args);
while ( have_posts() ) : the_post(); ?>
<?php $zkracenyObsah = substr(get_the_excerpt(), 0, strpos(wordwrap(get_the_excerpt(), 110), "\n")); ?>
<article><a class="basic" href="<?php echo get_the_permalink(); ?>">
<div class="grid-x">
<?php if (empty(get_the_post_thumbnail_url($post->ID))){ ?>
<div class="cell medium-5 image"><img src="<?php echo get_template_directory_uri(); ?>/assets/home/1.jpg" alt="Neznámý obrázek"></div>
<?php } else { ?>
<div class="cell medium-5 image"><img src="<?php echo get_the_post_thumbnail_url($post->ID) ?>" alt="<?php echo get_post_meta(chc_get_image_id(get_the_post_thumbnail_url($post->ID)), '_wp_attachment_image_alt', TRUE); ?>"></div>
<?php } ?>
<div class="cell medium-7 text">
<div class="inner">
<h2><?php echo the_title(); ?></h2>
<p><?php echo $zkracenyObsah . "..."; ?></p>
<div class="bottom"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/clock.svg" alt="Hodiny" width="20">
<time datetime="<?php echo get_the_date('Y-m-d'); ?>"><?php echo get_the_date('d.m.Y'); ?></time>
</div>
</div>
</div>
</div></a></article>
<?php endwhile; ?>
</div>
<div class="cell medium-4">
<aside>
<div class="docs">
<h3>Důležité dokumenty</h3>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-1'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-1')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-1')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-2'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-2')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-2')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-3'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-3')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-3')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-4'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-4')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-4')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-5'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-5')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-5')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-6'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-6')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-6')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-7'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-7')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-7')); ?></a></div> <?php } ?>
<?php if(!empty(get_theme_mod('chc-handful-callout-media-8'))) { ?> <div class="item"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/doc.svg" alt="Ikonka dokumentu"><a href="<?php echo wp_get_attachment_url(get_theme_mod('chc-handful-callout-media-8')); ?>"><?php echo get_the_title(get_theme_mod('chc-handful-callout-media-8')); ?></a></div> <?php } ?>
</div>
</aside>
</div>
</div>
</div>
<div class="pagination">
<ul>
<?php echo paginate_links(array('type' => 'list', 'prev_next' => false)); ?>
</ul>
</div>
</div>
</main>
<?php get_footer(); ?>
\ No newline at end of file
......@@ -127,9 +127,7 @@
background-color: #33a63e; }
.main .middle .term .item .topup {
background-image: url(./../assets/svg/topup2.svg);
-webkit-filter: invert(100%);
filter: invert(100%);
background-color: #a56dff; }
background-color: #ffd300; }
.main .middle .term .item .category {
color: #231f20;
font-size: 18px;
......@@ -324,8 +322,8 @@ footer {
-moz-appearance: none;
appearance: none;
background-repeat: no-repeat;
background-position: right 18px top 22px, 100% 0;
background-size: 12px auto, 48px 54px;
background-position: right 18px top 22px, 101% 0;
background-size: 12px auto, 50px 100%;
padding-left: 20px;
padding-right: 67px;
background-image: url("./../assets/svg/arrow2.svg"), url("./../assets/svg/black-background.svg"); }
......@@ -340,14 +338,16 @@ footer {
color: white;
font-size: 18px;
font-weight: 700;
margin-top: 50px; }
margin-top: 50px;
-webkit-appearance: none; }
.top-up .submit:hover {
cursor: pointer; }
body, html {
background-color: #ffffff;
margin: 0px;
padding: 0px;
margin: 0px !important;
margin-top: 0 !important;
padding: 0px !important;
font-family: "Open Sans",sans-serif; }
.clear {
......@@ -356,11 +356,41 @@ body, html {
/* Container vymezující výšku a šířku */
.container {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 375px;
width: 100%;
height: 812px;
box-shadow: 0px 0px 50px 0px rgba(0, 0, 0, 0.3);
overflow: hidden; }
.not_logged_in {
width: 100%;
height: 812px;
background-color: rgba(0, 0, 0, 0.9);
position: absolute;
z-index: 9999; }
.not_logged_in .info {
text-align: center;
color: white;
margin-top: 80%; }
.not_logged_in .info a {
color: lightblue; }
@media (min-width: 815px) {
.container {
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
width: 375px;
height: 812px; }
.not_logged_in {
width: 375px; } }
/* Safari 7.1+ */
@media not all and (min-resolution: 0.001dpcm) {
@supports (-webkit-appearance: none) {
.dollar__right {
margin-top: 2px;
padding-bottom: 1px; }
.top-up .select__currency {
margin-top: 2px;
height: 89px; } } }
......@@ -16,7 +16,8 @@
<div class='clear'></div>
<p id='info__text'> Your Balance </p>
<?php $user_id = get_current_user_id() ?>
<h3 id='balance'><?php echo get_user_meta($user_id, 'balance', true); ?></h3>
<?php $user_balance = get_user_meta($user_id, 'balance', true); ?>
<h3 id='balance'><?php if(!empty($user_balance)){ echo $user_balance; } else { echo '0'; }; ?></h3>
<div id='eye__icon'></div>
</div>
<div class='middle'>
......
......@@ -2,6 +2,9 @@
/* Load CSS */
function load_css() {
wp_register_style('style', get_template_directory_uri() . '/style.css', array(), false, 'all');
wp_enqueue_style('style');
wp_register_style('customstyle', get_template_directory_uri() . '/css/style.css', array(), false, 'all');
wp_enqueue_style('customstyle');
}
......@@ -119,11 +122,11 @@ function add_transaction($amount, $payment, $action, $category, $title){
function user_login_check() {
if(!is_user_logged_in()){
?>
<div class='not_looged_in' style='width: 375px; height: 812px; background-color: rgba(0,0,0,0.9); position: absolute; z-index: 9999'>
<div class='info' style='text-align: center; color: white; margin-top: 80%;'>
<div class='not_logged_in'>
<div class='info'>
<h1>Hold on!</h1>
<h2>You're not logged in!</h2>
<a href='<?php echo get_admin_url(); ?>' style='color: lightblue;'>Go to login page</a>
<a href='<?php echo get_admin_url(); ?>'>Go to login page</a>
</div>
</div>
<?php
......
<!DOCTYPE html>
<html>
<head>
<?php show_admin_bar(false); ?>
<?php wp_head(); ?>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<?php wp_head(); ?>
<title><?php wp_title("&bull;", "true", "right"); ?>Creepy web</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<link href="https://fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800,800i&display=swap&subset=latin-ext" rel="stylesheet">
<style>html {margin-top: 0!important;}</style>
</head>
<body <?php body_class(); ?>>
<div class='container'>
<?php show_admin_bar(false); ?>
\ No newline at end of file
......@@ -15,8 +15,11 @@
<h2>Top Up</h2>
<h3>Amount to top up in USD</h3>
<form method='post'>
<input type='text' class='dollar' name='usd' value='$0'>
<span class='dollar__right'>USD</span>
<div class='input__jedna'>
<input type='text' class='dollar' name='usd' value='$0'>
<span class='dollar__right'>USD</span>
</div>
<div class='clear'></div>
<a href='#' class='reveal' tabindex='-1'>See Calculations</a>
<div class='transfer'></div>
......
......@@ -147,8 +147,7 @@
}
.topup {
background-image: url(./../assets/svg/topup2.svg);
filter: invert(100%);
background-color: #a56dff;
background-color: $yellow;
}
.category {
color: $darkgray;
......
......@@ -132,8 +132,8 @@
font-weight: 700;
appearance: none;
background-repeat: no-repeat;
background-position: right 18px top 22px, 100% 0;
background-size: 12px auto, 48px 54px;
background-position: right 18px top 22px, 101% 0;
background-size: 12px auto, 50px 100%;
padding-left: 20px;
padding-right: 67px;
background-image: url('./../assets/svg/arrow2.svg'), url('./../assets/svg/black-background.svg');
......@@ -150,6 +150,7 @@
font-size: 18px;
font-weight: 700;
margin-top: 50px;
-webkit-appearance: none;
&:hover{
cursor: pointer;
}
......
......@@ -6,8 +6,9 @@
body, html {
background-color: $white;
margin: 0px;
padding: 0px;
margin: 0px !important;
margin-top: 0 !important;
padding: 0px !important;
font-family: "Open Sans",sans-serif;
}
......@@ -18,11 +19,56 @@ body, html {
/* Container vymezující výšku a šířku */
.container {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 375px;
width: 100%;
height: 812px;
box-shadow: 0px 0px 50px 0px rgba(0,0,0,0.3);
overflow: hidden;
}
.not_logged_in {
width: 100%;
height: 812px;
background-color: rgba(0,0,0,0.9);
position: absolute;
z-index: 9999;
.info {
text-align: center;
color: white;
margin-top: 80%;
a {
color: lightblue;
}
}
}
@media (min-width: 815px) {
.container {
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 375px;
height: 812px;
}
.not_logged_in {
width: 375px;
}
}
/* Safari 7.1+ */
@media not all and (min-resolution:.001dpcm)
{ @supports (-webkit-appearance:none) {
.dollar__right {
margin-top: 2px;
padding-bottom: 1px;
}
.top-up .select__currency {
margin-top: 2px;
height: 89px;
}
}
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment