Skip to content

Commit

Permalink
Services MVP for now
Browse files Browse the repository at this point in the history
  • Loading branch information
skysarwer committed Oct 28, 2022
1 parent d55747d commit 4a09bab
Show file tree
Hide file tree
Showing 2 changed files with 93 additions and 95 deletions.
184 changes: 91 additions & 93 deletions inc/services.php
Original file line number Diff line number Diff line change
@@ -1,104 +1,102 @@
<?php

function evn_render_services() {
function evn_render_service($title, $svg, $content, $tooltip_class) {
$slug = str_replace(' ', '-', strtolower($title));
ob_start(); ?>
<div id="<?php echo $slug;?>" class="service">
<!--- Disable tooltip for now
<button class="tooltip-trigger">
<?php echo $svg; ?>
<h3> <?php echo $title;?> </h3>
</button>
<div class="tooltip <?php echo $tooltip_class;?>">
<h3> <?php echo $title;?> </h3>
<div class="tooltip-content">
<?php echo $svg; ?>
<div>
<?php echo $content; ?>
</div>
</div>
</div>-->
<div class="tooltip-trigger">
<?php echo $svg; ?>
<h3> <?php echo $title;?> </h3>
</div>
</div >
<?php
$content = ob_get_contents();
ob_end_clean();
return $content;
}

function evn_render_services() {

wp_enqueue_style( 'service-icons', get_stylesheet_directory_uri() . '/css/service-icons.css' );

$all_services = array(
'Web Development' => array(
'svg' => evn_webdev_svg(),
'content' => '
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
',
'tooltip_class' => 'd-t d-l m-l m-t',
),
'Web Design' => array(
'svg' => evn_webdesignalt_svg(),
'content' => '
<p>I can work with you to build thorough, high quality designs, informed by your existing brand assets, that integrate seemlessly with your page building workflow.</p>
',
'tooltip_class' => 'd-t d-m m-r m-t',
),
'Interactive Graphics' => array(
'svg' => evn_graphics_svg(),
'content' => '<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>',
'tooltip_class' => 'd-b m-b d-r m-l',
),
'Analytics' => array(
'svg' => evn_analytics_svg(),
'content' => '<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>',
'tooltip_class' => 'd-b m-b m-r d-l',
),
'E-Commerce' => array(
'svg' => evn_ecommerce_svg(),
'content' => '<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>',
'tooltip_class' => 'd-b m-b m-l d-m',
),
'Documentation' => array(
'svg' => evn_documentation_svg(),
'content' => '<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>',
'tooltip_class' => 'd-b m-b m-r d-r',
),
);

ob_start();
?>
<div class="services-cont">

<div id="web-development" class="service">
<button class="tooltip-trigger">
<?php echo evn_webdev_svg(); ?>
<h3> <?php _e('Web Development', 'evn');?> </h3>
</button>
<div class="tooltip d-t d-l m-l m-t">
<h3> <?php _e('Web Development', 'evn');?> </h3>
<div class="tooltip-content">
<?php echo evn_webdev_svg(); ?>
<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>
</div>
</div>
</div >
<div id="web-design" class="service">
<button class="tooltip-trigger">
<?php echo evn_webdesignalt_svg(); ?>
<h3> <?php _e('Web Design', 'evn');?> </h3>
</button>
<div class="tooltip d-t d-m m-r m-t">
<h3> <?php _e('Web Design', 'evn');?> </h3>
<div class="tooltip-content">
<?php echo evn_webdesignalt_svg(); ?>
<div>
<p>I can work with you to build thorough, high quality designs, informed by your existing brand assets, that integrate seemlessly with your page building workflow.</p>
</div>
</div>
</div>
</div >
<div id="interactive-graphics" class="service">
<?php echo evn_graphics_svg(); ?>
<h3> <?php _e('Interactive Graphics', 'evn');?> </h3>
<div class="tooltip d-b m-b d-r m-l">
<h3> <?php _e('Interactive Graphics', 'evn');?> </h3>
<div class="tooltip-content">
<?php echo evn_graphics_svg(); ?>
<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>
</div>
</div>
</div >
<div id="analytics" class="service">
<?php echo evn_analytics_svg(); ?>
<h3> <?php _e('Analytics', 'evn');?> </h3>
<div class="tooltip d-b m-b m-r d-l">
<div class="tooltip-content">
<?php echo evn_analytics_svg(); ?>
<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>
</div>
</div>
</div >
<div id="e-commerce" class="service">
<?php echo evn_ecommerce_svg(); ?>
<h3> <?php _e('E-Commerce', 'evn');?> </h3>
<div class="tooltip d-b m-b m-l d-m">
<h3> <?php _e('E-Commerce', 'evn');?> </h3>
<div class="tooltip-content">
<?php echo evn_ecommerce_svg(); ?>
<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>
</div>
</div>
</div >
<div id="documentation" class="service">
<?php echo evn_documentation_svg(); ?>
<h3> <?php _e('Documentation', 'evn');?> </h3>
<div class="tooltip d-b m-b m-r d-r">
<h3> <?php _e('Documentation', 'evn');?> </h3>
<div class="tooltip-content">
<?php echo evn_documentation_svg(); ?>
<div>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
<p>Hey hey hey hey hey hey hey </p>
</div>
</div>
</div>
</div>
</div>
<?php foreach ($all_services as $service => $data) {
echo evn_render_service($service, $data['svg'], $data['content'], $data['tooltip_class']);
}?>

</div>
<?php
$content = ob_get_contents();
ob_end_clean();
Expand Down
4 changes: 2 additions & 2 deletions sass/css/service-icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
outline: none;

> svg {
outline: 2px dotted $color__accent;
outline-offset: 1px;
// outline: 2px dotted $color__accent;
// outline-offset: 1px;
}

+ .tooltip {
Expand Down

0 comments on commit 4a09bab

Please sign in to comment.