Commit a3945ffc authored by Petr Balga's avatar Petr Balga

Changed gulpfile.js, started top-up template

parent 13b1d7ae
...@@ -4,18 +4,17 @@ var autoprefixer = require('gulp-autoprefixer'); ...@@ -4,18 +4,17 @@ var autoprefixer = require('gulp-autoprefixer');
var browserSync = require('browser-sync').create(); var browserSync = require('browser-sync').create();
gulp.task('sass', function () { gulp.task('sass', function () {
return gulp.src('./scss/*.scss') return gulp.src('./wp-content/themes/CreepyTheme/scss/*.scss')
.pipe(sass()) .pipe(sass())
.pipe(gulp.dest('./css')); .pipe(gulp.dest('./wp-content/themes/CreepyTheme/css'));
}); });
gulp.task('watch', function(){ gulp.task('watch', function(){
browserSync.init({ browserSync.init({
proxy: "localhost/creepy/" proxy: "localhost/creepy/"
}) })
gulp.watch('./wp-content/themes/CreepyTheme/scss/*.scss') //D:\Programs\xampp\htdocs\creepy\wp-content\themes\CreepyTheme gulp.watch('./wp-content/themes/CreepyTheme/scss/*.scss')
.on('change', function(path, stats) { .on('change', function(path, stats) {
return gulp.src('./wp-content/themes/CreepyTheme/scss/*.scss') return gulp.src('./wp-content/themes/CreepyTheme/scss/*.scss')
.pipe(sass()) .pipe(sass())
......
...@@ -169,6 +169,11 @@ body, html { ...@@ -169,6 +169,11 @@ body, html {
text-transform: uppercase; text-transform: uppercase;
float: right; } float: right; }
.top-up {
background-color: #ffd300;
width: 100%;
height: 100%; }
/* Spodní menu */ /* Spodní menu */
footer { footer {
position: absolute; position: absolute;
......
<?php
/**
* Template Name: Basic template
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy Template 1.0
*/
?>
<?php get_header(); ?>
<?php
global $wp_query;
$wp_query->the_post();
?>
<main class="global-page global-bottom">
<div class="grid-container">
<h1 class="underline"><?php echo the_title(); ?></h1>
<div class="basic-page">
<div class="grid-x grid-margin-x">
<div class="cell medium-4">
<button class="button aside-button" data-open-elem="page-aside">Další stránky</button>
<aside class="page-aside" id="page-aside">
<button class="close" data-open-elem="page-aside"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/cross.svg" alt="Křížek"></button>
<ul class="aside-menu">
<li><a class="active" href="#"><?php the_title() ?></a></li>
<?php
$args = array(
'numberposts' => 8,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => get_the_ID(),
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'page',
'post_status' => 'publish',
'suppress_filters' => true
);
$recent_posts = wp_get_recent_posts( $args, ARRAY_A );
foreach ($recent_posts as $postname) { ?>
<?php //print_r($postname); ?>
<li><a href="<?php echo get_the_permalink($postname['ID']) ?>"><?php echo get_the_title($postname['ID']) ?></a></li>
<?php } ?>
</ul>
</aside>
</div>
<div class="cell medium-8">
<?php echo the_content(); ?>
<div class="files grid-x">
<?php
foreach (get_attached_media('') as $file){ ?>
<?php $filetype = $file->post_mime_type; ?>
<div class="cell item">
<div class="grid-x grid-margin-x">
<div class="cell shrink">
<div class="round">
<?php
if(strpos($filetype, 'pdf')) {echo 'PDF';}
else if(strpos($filetype, 'text') !== false) {echo 'TXT';}
else if(strpos($filetype, 'rar') !== false) {echo 'RAR';}
else if(strpos($filetype, 'zip') !== false) {echo 'ZIP';}
else if(strpos($filetype, 'mp4') !== false) {echo 'MP4';}
else if(strpos($filetype, 'png') !== false) {echo 'PNG';}
else if(strpos($filetype, 'mpeg') !== false) {echo 'MPEG';}
else if(strpos($filetype, 'mp3') !== false) {echo 'MP3';}
else if(strpos($filetype, 'doc') !== false) {echo 'doc';}
else if(strpos($filetype, 'wav') !== false) {echo 'WAV';}
else if(strpos($filetype, 'gif') !== false) {echo 'GIF';}
else if(strpos($filetype, 'psd') !== false) {echo 'PSD';}
else if(strpos($filetype, 'svg') !== false) {echo 'SVG';}
else if(strpos($filetype, 'pptx') !== false) {echo 'PPTX';}
?>
</div>
</div>
<div class="cell auto"><span><?php echo $file->post_title; ?></span></div>
<div class="cell shrink"><a class="button primary" href="<?php echo $file->guid; ?>"><span>Stáhnout</span></a></div>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/**
* Template Name: Download template
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy Template 1.0
*/
?>
<?php get_header(); ?>
<main class="global-page global-bottom">
<div class="grid-container">
<h1 class="underline"><?php echo $post->post_title; ?></h1>
<p class="perex"><?php
$content = apply_filters('the_content', $post->post_content);
echo $content;
?></p>
<div class="download-list">
<div class="grid-x grid-margin-x large-up-4 medium-up-2">
<?php
foreach (get_attached_media('application', $post->ID) as $file) {
?>
<div class="cell item"><a class="basic" href="<?php echo $file->guid; ?>"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/document.svg" alt="Dokument">
<h3><?php echo $file->post_title; ?></h3></a></div>
<?php } ?>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/**
* Template Name: Fields template
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy Template 1.0
*/
?>
<?php get_header(); ?>
<?php
global $wp_query;
$wp_query->the_post();
?>
<main class="global-page global-bottom">
<div class="grid-container">
<h1 class="underline"><?php echo the_title(); ?></h1>
<div class="basic-page">
<div class="grid-x grid-margin-x">
<div class="cell medium-4">
<button class="button aside-button" data-open-elem="page-aside">Další stránky</button>
<aside class="page-aside" id="page-aside">
<button class="close" data-open-elem="page-aside"><img src="<?php echo get_template_directory_uri(); ?>/assets/icons/cross.svg" alt="Křížek"></button>
<ul class="aside-menu">
<li><a class="active" href="#"><?php the_title() ?></a></li>
<?php
$args = array(
'numberposts' => 8,
'offset' => 0,
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => get_the_ID(),
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'page',
'post_status' => 'publish',
'suppress_filters' => true
);
$recent_posts = wp_get_recent_posts( $args, ARRAY_A );
foreach ($recent_posts as $postname) { ?>
<?php //print_r($postname); ?>
<li><a href="<?php echo get_the_permalink($postname['ID']) ?>"><?php echo get_the_title($postname['ID']) ?></a></li>
<?php } ?>
</ul>
</aside>
</div>
<div class="cell medium-8">
<?php echo the_content(); ?>
<div class="files grid-x">
<?php
foreach (get_attached_media('') as $file){ ?>
<?php $filetype = $file->post_mime_type; ?>
<div class="cell item">
<div class="grid-x grid-margin-x">
<div class="cell shrink">
<div class="round">
<?php
if(strpos($filetype, 'pdf')) {echo 'PDF';}
else if(strpos($filetype, 'text') !== false) {echo 'TXT';}
else if(strpos($filetype, 'rar') !== false) {echo 'RAR';}
else if(strpos($filetype, 'zip') !== false) {echo 'ZIP';}
else if(strpos($filetype, 'mp4') !== false) {echo 'MP4';}
else if(strpos($filetype, 'png') !== false) {echo 'PNG';}
else if(strpos($filetype, 'mpeg') !== false) {echo 'MPEG';}
else if(strpos($filetype, 'mp3') !== false) {echo 'MP3';}
else if(strpos($filetype, 'doc') !== false) {echo 'doc';}
else if(strpos($filetype, 'wav') !== false) {echo 'WAV';}
else if(strpos($filetype, 'gif') !== false) {echo 'GIF';}
else if(strpos($filetype, 'psd') !== false) {echo 'PSD';}
else if(strpos($filetype, 'svg') !== false) {echo 'SVG';}
else if(strpos($filetype, 'pptx') !== false) {echo 'PPTX';}
?>
</div>
</div>
<div class="cell auto"><span><?php echo $file->post_title; ?></span></div>
<div class="cell shrink"><a class="button primary" href="<?php echo $file->guid; ?>"><span>Stáhnout</span></a></div>
</div>
</div>
<?php } ?>
</div>
</div>
<div class="homepage-boxes global-bottom" style="background-color: rgba(0,0,0,0)!important">
<div class="grid-container">
<div class="grid-x grid-margin-x large-up-3 medium-up-2">
<?php
/* Zaměření a předměty */
$args = array(
'numberposts' => 3,
'offset' => 0,
'category' => 10,
'orderby' => 'post_date',
'order' => 'ASC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' =>'',
'post_type' => 'post',
'post_status' => 'publish',
'suppress_filters' => true
);
$zamereni = wp_get_recent_posts( $args, ARRAY_A );
foreach ($zamereni as $post) { ?>
<div class="cell item"><a class="basic" href="<?php echo get_the_permalink($post['ID']); ?>">
<div class="top">
<div class="image-container"><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>
<div class="text-container">
<h3><?php echo get_the_title($post['ID']); ?></h3>
</div>
</div>
<div class="bottom">
<p><?php echo get_the_excerpt($post['ID']); ?></p>
</div>
<div class="button-container">
<div class="button secondary">Více</div>
</div></a></div>
<?php } ?>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/**
* Template Name: Team template
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy Template 1.0
*/
?>
<?php get_header(); ?>
<main class="global-page global-bottom">
<div class="grid-container">
<h1 class="underline"><?php echo $post->post_title; ?></h1>
<p class="perex"><?php
$content = apply_filters('the_content', $post->post_content);
echo $content;
?></p>
<div class="team-list">
<div class="grid-x grid-margin-x medium-up-2">
<?php
$ucitele = get_posts(array('post_type' => 'team', 'orderby' => 'date', 'order' => 'ASC','numberposts' => -1));
foreach($ucitele as $ucitel) { ?>
<div class="cell item">
<div class="top">
<div class="grid-x grid-margin-x">
<div class="cell large-shrink">
<div class="image" style="background-image: url(<?php echo get_the_post_thumbnail_url($ucitel->ID); ?>)"></div>
</div>
<div class="cell large-auto text">
<h3><?php echo $ucitel->post_title; ?></h3><a class="basic" href="mailto:<?php echo the_field('team_e-mail', $ucitel->ID); ?>"><?php echo the_field('team_e-mail', $ucitel->ID); ?></a>
</div>
</div>
</div>
<hr>
<div class="bottom">
<p><?php echo $ucitel->post_content; ?></p>
</div>
</div>
<?php } ?>
</div>
</div>
</div>
</main>
<?php get_footer(); ?>
\ No newline at end of file
<?php
/**
* Template Name: Top-Up template
*
* @package Creepy
* @subpackage Creepy Theme
* @since Creepy Template 1.0
*/
?>
<?php get_header(); ?>
<!-- div container opened in header.php -->
<div class='top-up'>
</div>
<!-- div container closed in footer.php -->
<?php get_footer(); ?>
\ No newline at end of file
...@@ -208,9 +208,10 @@ body, html { ...@@ -208,9 +208,10 @@ body, html {
} }
} }
.topup { .top-up {
background-color: $yellow;
width: 100%;
height: 100%;
} }
......
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