-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
132 lines (110 loc) · 6.99 KB
/
front-page.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
// ***************** Esta será la plantilla de la home
// Quitamos el loop (los posts)
remove_action( 'genesis_loop', 'genesis_do_loop' );
remove_filter( 'genesis_attr_content-sidebar-wrap','gmdl_add_markup_class', 10, 2 );
// Quitamos la barra lateral
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Colocamos la widget area "Llamada a la accion"
add_action( 'genesis_after_content', 'jb_mostrar_home_cta' );
function jb_mostrar_home_cta() {
$content_page_link = get_page_link(get_page_by_path( 'content' )->ID);
// The link of the 1st lesson
$first_lesson_link = lco_get_content_structure()[0]->lessons[0]->link;
ob_start();
?>
<div class="lco-home-content">
<h1 class="mdl-typography--display-4"><?= __( 'Learn C Online', LCO_THEME ) ?> </h1>
<h2 class="mdl-typography--display-3"><?= __( 'Learn how to code using C programming right in your browser!', LCO_THEME ) ?> </h2>
<a href="<?= $content_page_link ?>" class="mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--accent">
<?= __('START NOW', LCO_THEME) ?>
</a>
</div>
<div class="lco-home-features-section">
<h3 class="mdl-typography--display-1"><?= __('How LearnC Works', LCO_THEME) ?></h3>
<div class="lco-home-features-container">
<div class="mdl-grid">
<!-- Learn Feature -->
<div class="mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone lco-feature">
<div class="mdl-grid">
<div class="mdl-cell--8-col mdl-cell--6-col-tablet mdl-cell--order-5-tablet mdl-cell--4-col-phone mdl-cell--order-3-phone">
<h5 class="mdl-typography--headline"><?= __('Learn', LCO_THEME) ?></h5>
<div class="lco-feature-text">
<span class="mdl-typography--subheading">
<?= __('Focused on learn by doing with a step by step tutorial that allows you to practice in every lesson.', LCO_THEME) ?>
</span>
</div>
</div>
<div class="mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--order-1-tablet mdl-cell--2-col-phone mdl-cell--order-1-phone lco-feature-image">
<img src="<?= get_stylesheet_directory_uri() . '/img/home-features/learn.svg' ?>" alt="<?= __('Learn by Doing', LCO_THEME)?>"/>
</div>
</div>
</div>
<!-- Beginner Feature -->
<div class="mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone lco-feature">
<div class="mdl-grid">
<div class="mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--2-col-phone lco-feature-image">
<img src="<?= get_stylesheet_directory_uri() . '/img/home-features/beginner.svg' ?>" alt="<?= __('Beginner Friendly', LCO_THEME)?>"/>
</div>
<div class="mdl-cell--8-col mdl-cell--6-col-tablet mdl-cell--4-col-phone">
<h5 class="mdl-typography--headline"><?= __('Beginner', LCO_THEME) ?></h5>
<div class="lco-feature-text">
<span class="mdl-typography--subheading">
<?= __('No need any code experience to start learning with us. We are focus on beginner.', LCO_THEME) ?>
</span>
</div>
</div>
</div>
</div>
</div>
<div class="mdl-grid">
<!-- Practice Feature -->
<div class="mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone lco-feature">
<div class="mdl-grid">
<div class="mdl-cell--8-col mdl-cell--6-col-tablet mdl-cell--order-5-tablet mdl-cell--4-col-phone mdl-cell--order-3-phone">
<h5 class="mdl-typography--headline"><?= __('Practice', LCO_THEME) ?></h5>
<div class="lco-feature-text">
<span class="mdl-typography--subheading">
<?= __('Code directly in the browser with the examples and exercises that you will find in each lesson.', LCO_THEME) ?>
</span>
</div>
</div>
<div class="mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--order-1-tablet mdl-cell--2-col-phone mdl-cell--order-1-phone lco-feature-image">
<img src="<?= get_stylesheet_directory_uri() . '/img/home-features/practice.svg' ?>" alt="<?= __('Practice in your Browser', LCO_THEME)?>"/>
</div>
</div>
</div>
<!-- Track Feature -->
<div class="mdl-cell--6-col mdl-cell--4-col-tablet mdl-cell--4-col-phone lco-feature">
<div class="mdl-grid">
<div class="mdl-cell--4-col mdl-cell--4-col-tablet mdl-cell--2-col-phone lco-feature-image">
<img src="<?= get_stylesheet_directory_uri() . '/img/home-features/track.svg' ?>" alt="<?= __('Track your Progress', LCO_THEME)?>"/>
</div>
<div class="mdl-cell--8-col mdl-cell--6-col-tablet mdl-cell--4-col-phone">
<h5 class="mdl-typography--headline"><?= __('Track', LCO_THEME) ?></h5>
<div class="lco-feature-text">
<span class="mdl-typography--subheading">
<?= __('Keep track of all your progress - lessons watched, units completed and done exercises.', LCO_THEME) ?>
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</div> <!-- feature section -->
<div class="center-elements">
<a href="<?= $first_lesson_link ?>" class="lco-button-c2a-2 mdl-button mdl-js-button mdl-button--raised mdl-js-ripple-effect mdl-button--primary">
<?= __('first lesson', LCO_THEME) ?>
</a>
</div>
<?php
$output = ob_get_contents();
ob_end_clean();
echo $output;
}
// instead of genesis build the section of the page that we need
get_header();
do_action( 'genesis_after_content' );
do_action( 'genesis_after_content_sidebar_wrap' );
get_footer();