Skip to content

Commit

Permalink
Adding plugin folder for the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
mtias committed Mar 15, 2017
1 parent b20d813 commit 6aec48e
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
40 changes: 40 additions & 0 deletions plugin/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?php

/**
* Plugin Name: Gutenberg
* Plugin URI: https://wordpress.github.io/gutenberg/
* Description: Prototyping since 1440. Development plugin for the editor focus in core.
* Version: 0.1
*/

add_action( 'admin_menu', 'gutenberg_menu' );

function gutenberg_menu() {
add_menu_page(
'Gutenberg',
'Gutenberg',
'manage_options',
'gutenberg',
'the_gutenberg_project'
);
}

function gutenberg_scripts_and_styles( $hook ) {
if ( $hook === 'toplevel_page_gutenberg' ) {
wp_enqueue_style( 'gutenberg_css', plugins_url( 'style.css', __FILE__ ) );
}
}
add_action( 'admin_enqueue_scripts', 'gutenberg_scripts_and_styles' );

function the_gutenberg_project() {
?>
<div class="gutenberg">
<section class="gutenberg__editor" contenteditable="true">
<h2>1.0 Is The Loneliest Number</h2>
<p>Many entrepreneurs idolize Steve Jobs. He’s such a <a href=""><span class="space-sep">&nbsp;</span>perfectionist<span class="space-sep-end">&nbsp;</span></a>, they say. Nothing leaves the doors of 1 Infinite Loop in Cupertino without a polish and finish that makes geeks everywhere drool. No compromise!</p>
<img alt="" src="https://cldup.com/HN3-c7ER9p.jpg" />
<p>I like Apple for the opposite reason: they’re not afraid of getting a rudimentary 1.0 out into the world.</p>
</section>
</div>
<?php
}
14 changes: 14 additions & 0 deletions plugin/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.gutenberg {
background: #fff;
margin: -20px 0 0 -20px;
padding: 60px;
}

.gutenberg__editor {
max-width: 700px;
margin: 0 auto;
}

.gutenberg__editor img {
max-width: 100%;
}

0 comments on commit 6aec48e

Please sign in to comment.