Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding plugin folder for the project. #276

Merged
merged 1 commit into from
Mar 15, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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%;
}