Skip to content

Commit

Permalink
homepage, social list link
Browse files Browse the repository at this point in the history
  • Loading branch information
vBalatroni committed Mar 4, 2021
1 parent 83040f8 commit e99dd23
Show file tree
Hide file tree
Showing 14 changed files with 217 additions and 47 deletions.
Binary file added wp-content/themes/tedx_theme/assets/line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion wp-content/themes/tedx_theme/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,4 +164,11 @@ function ourWidgetsInit(){
));
}

add_action('widgets_init', 'ourWidgetsInit');
add_action('widgets_init', 'ourWidgetsInit');



function get_link_by_slug($slug, $type = 'post'){
$post = get_page_by_path($slug, OBJECT, $type);
return get_permalink($post->ID);
}
20 changes: 20 additions & 0 deletions wp-content/themes/tedx_theme/page-templates/default.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?php
/**
* Template Name: Default
*
*
*/

get_header(); ?>

<div class="content-area">
<div class="container max-width-4 mx-auto mt4 mb4">
<?php while (have_posts()): the_post(); ?>
<div class="">
<?php echo the_content(); ?>
</div>
<?php endwhile; ?>
</div>
</div>

<?php get_footer();
8 changes: 4 additions & 4 deletions wp-content/themes/tedx_theme/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ window.onload = () => {
slidesToShow: 3,
slidesToScroll: 1,
infinite: true,
dots: true

}
},
{breakpoint: 1024,
Expand All @@ -46,7 +46,7 @@ window.onload = () => {
slidesToShow: 2,
slidesToScroll: 1,
infinite: false,
dots: true

}
},
{
Expand All @@ -55,7 +55,7 @@ window.onload = () => {
dots: false,
slidesToShow: 1,
slidesToScroll: 1,
dots: true

}
},
{
Expand All @@ -64,7 +64,7 @@ window.onload = () => {
dots: false,
slidesToShow: 1,
slidesToScroll: 1,
dots: true

}
}
// You can unslick at a given breakpoint now by adding:
Expand Down
2 changes: 0 additions & 2 deletions wp-content/themes/tedx_theme/src/scss/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ body {
color: $c--black;
}



* {
box-sizing: border-box;
}
Expand Down
33 changes: 28 additions & 5 deletions wp-content/themes/tedx_theme/src/scss/preview/_highlights.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,47 @@
}
.preview__wrap-text,
.preview__wrap-text.pr4 {
padding-right: 24rem;

.preview__title{
font-size: $font--150;
text-align: right;
div {
strong {
background-color: white;
color:$c--primary;
background-color: $c--primary;
color: white;
}
}
}
.preview__subtitle {
font-weight: bold;
font-size: $font--120;
color: white;
.subtitle__background {
background-color: white;
color: $c--primary;
}
}
@media screen and (max-width: 640px){
margin-top: 2rem;
margin-left: 11rem;
font-size: 15px;
margin-bottom: 15rem;

.preview__title {
letter-spacing: .6rem;
font-size: $font--140;
}
}
@media screen and (max-width: 400px){
margin-top: 2rem;
margin-left: 3rem;
font-size: 15px;
margin-bottom: 15rem;

.preview__title {
letter-spacing: .6rem;
font-size: $font--150;
}
}

}
.preview__background {
max-height: 100%;
Expand Down
1 change: 1 addition & 0 deletions wp-content/themes/tedx_theme/src/scss/sections/_form.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ body {
@include input-form();
}
textarea {
width: 321px;
resize: none;
padding: 1rem 1.75rem 1rem 1.75rem;
&::placeholder {
Expand Down
72 changes: 71 additions & 1 deletion wp-content/themes/tedx_theme/src/scss/sections/_hero.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,87 @@
/* HERO
----------------------------- */
@import 'preview/highlights';
.homepage--hero {
margin-top: 10rem;
max-width: 45rem;


}

.section__event {

.section__background {
div {
background: $c--lightgray;
}

.section__highlight {
.preview__event-description {
p {
margin: 0;
}
column-count: 2;

@media screen and(max-width: 400px) {
column-count: 1;
}
}
}

}

position: relative;

background-color: $c--lightgray;
h1 {
color: $c--primary;
}

}
.section--hero {
&.section--home-hero {
.contain-image {
max-height: 245px !important;
padding-top: .8rem;


@media screen and (max-width: 640px) {
max-height: 533px !important;
left: -50%;
margin-top: -4rem;
position: absolute;

}

@media screen and (max-width: 400px) {
max-height: 404px !important;
padding-top: -2.2rem;
left: 0%;
transform: translatey(22%);
margin-top: -5rem;
opacity: .3;
position: absolute;
}
}


}
&.section--ted-circle {
background-color: $c--primary;
}

.section__container {

.contain-image {
img {
max-height: calc((100vh - 180px)/2);
}
}
}

.section__line {
overflow: hidden;
.line {
transform: translateX(-50%);
margin-bottom: 5rem;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

input {
@include input-form();
padding-right: 10rem;

}
}
}
1 change: 1 addition & 0 deletions wp-content/themes/tedx_theme/src/scss/utils/_vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ $bar-spacing: .5rem;
/* COLORS
----------------------------- */
$c--navbar: white;
$c--lightgray: #f5f5f5;
$c--navbar-shadow: #C4C4C4;
$c--black: #393939;
$c--primary: #E63822;
Expand Down
10 changes: 6 additions & 4 deletions wp-content/themes/tedx_theme/template-parts/block-social.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?php if(have_rows('footer_social_list','option')): ?>
<?php if(have_rows('footer_social_list','option')):?>
<div class="block block--social-list pb4">
<p class="block__label m0 pb3 pt4"> <?php _e('Privacy Policy', 'tedxcremona')?> </p>
<p class="block__label m0 "> <?php _e('SEGUICI SUI SOCIAL', 'tedxcremona')?> </p>

<p class="block__label m0 pb3 pt4"> <a style="text-decoration: none; color: white;" href="<?php echo esc_url( get_permalink( get_page_by_title( 'Privacy Policy' ) ) );?>"><?php _e('Privacy Policy', 'tedxcremona')?> </a> </p>

<p class="block__label m0 "><?php _e('SEGUICI SUI SOCIAL', 'tedxcremona')?> </p>
<ul class="list-reset">
<?php while(have_rows('footer_social_list','option')): the_row();
$link = get_sub_field('link');
$class = get_sub_field('icon_class');
?>
<li class="block__item ml3 list-reset inline-block ">
<a href="<?php echo $link['url'] ?>" alt="<?php echo $link['title'] ?>">
<a target="_blank" href="<?php echo $link['url'] ?>" alt="<?php echo $link['title'] ?>">
<i class="fab fa-<?php echo $class; ?>"></i>
</a>
</li>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,58 @@
<?php
$line = get_template_directory_uri() . '/assets/line.png';
$highlight = get_sub_field('highlights_reference');
if($highlight):
?>

<section class="section section--hero">
<ul class="section__container m0 pt0 list-reset">
<div>
<?php get_template_part('template-parts/template','common-hero');?>
<div class="homepage--hero container mt4 mx-auto">
<div class="clearfix">
<div class="col col-12 sm-col-6 mb4">
<div class="mx-auto">
<?php get_template_part('template-parts/template','common-hero');?>
</div>
</div>
<div class="col col-6 mx-auto">
<div class=" ">
<section class="section section--hero">
<ul class="section__container m0 pt0 list-reset">
<div>
</div>
<?php foreach( $highlight as $post ):
setup_postdata($post); ?>
<div class="section__item ">
<?php get_template_part('template-parts/preview', 'highlight'); ?>
</div>
<?php endforeach; ?>
</ul>
</section>
</div>
</div>
</div>
<?php foreach( $highlight as $post ):
setup_postdata($post); ?>
<li class="section__item pb4 ">
<?php get_template_part('template-parts/preview', 'highlight'); ?>
</li>
<?php endforeach; ?>
</ul>
<?php wp_reset_postdata(); ?>
</section>
</div>
<div class="clearfix section__event mb4">
<div class=" container section__background col-12 mt3 mb4">
<?php if( have_rows('preview_highlight') ): ?>
<?php while( have_rows('preview_highlight') ): the_row();
$event_title = get_sub_field('title');
$event_description = get_sub_field('description');?>
<div class="section__highlight col-11 sm-col-8 md-col-6 mx-auto">
<div class="preview__event-title center">
<h1><?php echo $event_title; ?></h1>
</div>
<div class="preview__event-description justify">
<?php echo $event_description; ?>
</div>
</div>
<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<?php wp_reset_postdata(); ?>
<div class="section__line" >
<img class="line" src="<?php echo $line; ?>" alt="">
</div>

<?php endif ?>



23 changes: 12 additions & 11 deletions wp-content/themes/tedx_theme/template-parts/preview-highlight.php
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
<?php
$highlight = get_sub_field('highlights_reference');
?>
<div class="preview preview--highlight">
<div class="clearfix preview-background-color">

<div class="container mx-auto preview preview--highlight">
<div class="clearfix ">

<?php if( have_rows('preview_highlight') ): ?>
<?php while( have_rows('preview_highlight') ): the_row();
$title = get_sub_field('text_1');
$subtitle = get_sub_field('text_2');
$bg_image = get_sub_field('image');
$thumbnail = get_the_post_thumbnail();
?>
<div class="pt3 pb4">
<div class="preview__wrap-text right-align pr4">
<div class="">
<div class="preview__wrap-text left-align ">
<div class="preview__title ">
<?php echo $title; ?>
</div>
<div class="preview__subtitle ">
<div class="preview__subtitle left-align ">
<span class="subtitle__background"><?php echo $subtitle; ?></span>
</div>
</div>
</div>
<div class="preview__wrap preview__background ">
<img class="" src="<?php echo get_the_post_thumbnail_url();?>" alt="img">
</div>
</div>

<?php endwhile; ?>
<?php endif; ?>
</div>
</div>
<?php



Loading

0 comments on commit e99dd23

Please sign in to comment.