Skip to content

Commit

Permalink
Remove resume block
Browse files Browse the repository at this point in the history
  • Loading branch information
emdecr committed Feb 20, 2020
1 parent bd426bc commit 5e21a9b
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 26 deletions.
15 changes: 3 additions & 12 deletions app/pages/about/index.vue
Expand Up @@ -5,15 +5,6 @@
<div class="grid">
<div class="content" v-html="page.content.rendered"></div>
<div class="side">
<div class="resume">
<h2>
<a :href="meta._page_resume" target="_blank">
Resume
<!-- <i class="material-icons">description</i> -->
<i class="material-icons">open_in_new</i>
</a>
</h2>
</div>
<div class="skills">
<h2 v-if="meta._page_skills_title !=''" v-html="meta._page_skills_title"></h2>
<h2 v-else>Key Skills</h2>
Expand All @@ -36,8 +27,8 @@
target="_blank"
></a>
<div class="bar-container">
<span class="_bar" :style="{ width: course.course_percent + '%'}"></span>
<span class="_percent">{{course.course_percent + '%'}}</span>
<span class="_bar" :style="{ width: course.course_percent + ' %'}"></span>
<span class="_percent">{{course.course_percent + ' %'}}</span>
</div>
</div>
</li>
Expand Down Expand Up @@ -171,7 +162,7 @@ main {
}
.side {
padding-top: 2.8rem;
padding-top: 2.6rem;
}
.skills,
Expand Down
1 change: 1 addition & 0 deletions data/custom/plugins/mb-blocks/css/blocks.css
Expand Up @@ -51,6 +51,7 @@
font-size: 13px;
letter-spacing: 0;
text-transform: none;
margin: 0;
}
.editor-styles-wrapper .rwmb-group-remove {
color: #a00;
Expand Down
2 changes: 1 addition & 1 deletion data/custom/plugins/mb-blocks/js/blocks.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions data/custom/plugins/mb-blocks/mb-blocks.php
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: MB Blocks
* Plugin URI: https://metabox.io/plugins/mb-blocks/
* Description: Create custom Gutenberg blocks.
* Version: 1.0.16
* Version: 1.1.0
* Author: MetaBox.io
* Author URI: https://metabox.io
* License: GPL2+
Expand Down Expand Up @@ -32,7 +32,7 @@ function mb_blocks_load() {

list( , $url ) = RWMB_Loader::get_path( __DIR__ );
define( 'MB_BLOCKS_URL', $url );
define( 'MB_BLOCKS_VER', '1.0.13' );
define( 'MB_BLOCKS_VER', '1.1.0' );

new MBBlocks\Loader;

Expand Down
13 changes: 12 additions & 1 deletion data/custom/plugins/mb-blocks/src/MetaBox.php
Expand Up @@ -6,6 +6,7 @@ class MetaBox extends \RW_Meta_Box {

public static function normalize( $meta_box ) {
$meta_box = parent::normalize( $meta_box );

$meta_box = wp_parse_args( $meta_box, [
'description' => '',
'icon' => 'schedule',
Expand All @@ -14,6 +15,17 @@ public static function normalize( $meta_box ) {
'supports' => [],
] );

// Block preview.
if ( empty( $meta_box['preview'] ) ) {
return $meta_box;
}
$meta_box['example'] = [
'attributes' => [
'data' => $meta_box['preview'],
],
];
unset( $meta_box['preview'] );

return $meta_box;
}

Expand Down Expand Up @@ -99,7 +111,6 @@ private function preview( $attributes = [] ) {

private function set_block_data( $attributes ) {
$attributes['name'] = $this->id;

$data = isset( $attributes['data'] ) ? $attributes['data'] : [];
$this->storage->set_data( $data );
ActiveBlock::set_block_name( $this->id );
Expand Down
5 changes: 3 additions & 2 deletions data/custom/themes/edc/functions.php
Expand Up @@ -3,12 +3,13 @@
require_once('includes/functions/enqueue-style.php');
require_once('includes/functions/enqueue-script.php');

// Load metabox custom fields
// Load metabox customization
require_once('includes/functions/metabox/cpt-posts.php');
require_once('includes/functions/metabox/cpt-pages.php');
require_once('includes/functions/metabox/cpt-shelf-item.php');
require_once('includes/functions/metabox/cpt-project.php');
require_once('includes/functions/metabox/cpt-read.php');require_once('includes/functions/metabox/mb-settings.php');
require_once('includes/functions/metabox/cpt-read.php');
require_once('includes/functions/metabox/mb-settings.php');

// Load metabox custom blocks
require_once('includes/functions/metabox/blocks/annotation.php');
Expand Down
2 changes: 1 addition & 1 deletion data/custom/themes/edc/header.php
Expand Up @@ -3,7 +3,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no"/>
<link rel="shortcut icon" href="<?php echo get_template_directory_uri();?>/dist/images/favicon.ico" type="image/x-icon">
<!-- <link rel="shortcut icon" href="<?php //echo get_template_directory_uri();?>/dist/images/favicon.ico" type="image/x-icon"> -->
<title><?php bloginfo( 'name' ); ?></title>
<?php wp_head(); ?>
</head>
Expand Down
4 changes: 2 additions & 2 deletions data/custom/themes/edc/includes/functions/enqueue-script.php
Expand Up @@ -5,8 +5,8 @@
*/

function my_scripts() {
wp_enqueue_script('jquery');
wp_enqueue_script('app', get_template_directory_uri() . '/dist/js/app.min.js', array('jquery'), '', true);
// wp_enqueue_script('jquery');
// wp_enqueue_script('app', get_template_directory_uri() . '/dist/js/app.min.js', array('jquery'), '', true);
}

add_action( 'wp_enqueue_scripts', 'my_scripts' );
Expand Down
Expand Up @@ -16,14 +16,26 @@
?>
<div id="<?= $id ?>" class="<?= $classes ?>">
<div class="annotation-text">
<?php mb_the_block_field( 'annotation_text' ) ?>
<?php echo mb_get_block_field( 'annotation_text' ) ?>
</div>
<div class="annotation-body">
<div class="annotation-note">
<?php mb_the_block_field( 'annotation_note' ) ?>
<?php echo mb_get_block_field( 'annotation_note' ) ?>
</div>
<div class="annotation-themes">

<ul>
<?php
$themes = $attribute['data']['annotation_themes'];
if (is_array($themes) || is_object($themes))
{
foreach ($themes as $t)
{
$term = get_term( $t, 'theme' );
?>
<li><?php echo $term->name;?></li>
<?php }
}?>
</ul>
</div>
</div>
</div>
Expand Up @@ -26,7 +26,20 @@ function mb_annotation_callback( $attributes, $is_preview = false, $post_id = nu
<?php mb_the_block_field( 'annotation_note' ) ?>
</div>
<div class="annotation-themes">

<ul>
<?php
$themes = mb_the_block_field( 'annotation_themes' );
echo $themes;
if (is_array($themes) || is_object($themes))
{
foreach ($themes as $t)
{
$term = get_term_by('id', $t, 'theme');
?>
<li>boop</li>
<?php }
}?>
</ul>
</div>
</div>
</div>
Expand All @@ -42,7 +55,7 @@ function mb_annotation_callback( $attributes, $is_preview = false, $post_id = nu
'icon' => 'admin-comments',
'category' => 'layout',
'render_template' => get_template_directory() . '/includes/functions/metabox/blocks/annotation-template.php',
'render_callback' => 'mb_annotation_callback',
// 'render_callback' => 'mb_annotation_callback',
// 'enqueue_style' => get_template_directory_uri() . '/includes/functions/metabox/blocks/annotation.css',
'supports' => [
'align' => ['wide', 'full'],
Expand Down

0 comments on commit 5e21a9b

Please sign in to comment.