Skip to content

Commit

Permalink
Merge branch 'master' of github.com:deliciousbrains/wp-advanced-excerpt
Browse files Browse the repository at this point in the history
  • Loading branch information
aprea committed May 15, 2014
2 parents 103314d + 0c0ea65 commit bd06efd
Show file tree
Hide file tree
Showing 12 changed files with 122 additions and 111 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.sass-cache
asset/node_modules
40 changes: 40 additions & 0 deletions asset/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
module.exports = function(grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
build: {
files: {
'js/advanced-excerpt.min.js': 'js/advanced-excerpt.js'
}
}
},
compass: {
dist: {
options: {
}
}
},
watch: {
js: {
files: ['js/*'],
tasks: ['uglify']
},
sass: {
files: ['sass/*'],
tasks: ['compass']
},
livereload: {
files: ['js/*.min.js','css/*'],
options: { livereload: true }
}
}
});

grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-contrib-compass');

grunt.registerTask('default', ['uglify','compass']);

};
67 changes: 22 additions & 45 deletions asset/css/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
font-family: Consolas,Monaco,monospace;
}
.advanced-excerpt .sub-options {
margin: 2px 0px 0px 25px;
margin: 4px 0px 0px 20px;
}
.advanced-excerpt .disabled {
color: #999999;
Expand All @@ -31,9 +31,12 @@
position: absolute;
top: 0;
right: 0;
width: 250px;
border: 1px solid #ccc;
width: 292px;
}
.advanced-excerpt #advanced-excerpt-sidebar .inside {
padding: 20px;
border: 1px solid #ccc;
border-bottom: none;
}
.advanced-excerpt #advanced-excerpt-sidebar .author {
padding-bottom: 20px;
Expand Down Expand Up @@ -67,53 +70,13 @@
.advanced-excerpt #advanced-excerpt-sidebar .author p {
margin: 0;
}
.advanced-excerpt #advanced-excerpt-sidebar .video {
position: relative;
display: block;
}
.advanced-excerpt #advanced-excerpt-sidebar .video:before, .advanced-excerpt #advanced-excerpt-sidebar .video:after {
position: absolute;
content: " ";
margin: auto;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
.advanced-excerpt #advanced-excerpt-sidebar .video:before {
width: 60px;
height: 60px;
-webkit-border-radius: 60px;
-moz-border-radius: 60px;
-ms-border-radius: 60px;
-o-border-radius: 60px;
border-radius: 60px;
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
opacity: 0.8;
border: 1px solid #ddd;
background-color: #fff;
z-index: 2;
}
.advanced-excerpt #advanced-excerpt-sidebar .video:after {
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
opacity: 0.8;
border: 20px solid transparent;
border-top-width: 12px;
border-bottom-width: 12px;
border-left-color: #333;
background: transparent;
display: block;
left: 23.4375px;
width: 0px;
height: 0px;
z-index: 3;
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe h2 {
padding: 0;
margin: 0;
margin-bottom: 0.5em;
color: #666;
font-size: 20px;
line-height: 1.2em;
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe h3 {
font-size: 16px;
Expand All @@ -133,13 +96,27 @@
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe .promise {
color: #999;
font-size: 12px;
line-height: 1.4em;
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe .field {
margin-bottom: 1em;
margin-bottom: 0.5em;
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe .field p {
margin-bottom: 0.3em;
}
.advanced-excerpt #advanced-excerpt-sidebar .subscribe .field.submit-button {
margin-bottom: 1em;
}
@media (min--moz-device-pixel-ratio: 1.3), (-o-min-device-pixel-ratio: 2.6 / 2), (-webkit-min-device-pixel-ratio: 1.3), (min-device-pixel-ratio: 1.3), (min-resolution: 1.3dppx) {
.advanced-excerpt #advanced-excerpt-sidebar .wpmdb-banner {
background-image: url(../img/[email protected]);
background-size: 292px 292px;
width: 292px;
height: 292px;
display: block;
}
.advanced-excerpt #advanced-excerpt-sidebar .wpmdb-banner img {
display: none;
}
}
Binary file removed asset/img/[email protected]
Binary file not shown.
Binary file added asset/img/wp-migrate-db-pro.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added asset/img/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions asset/js/advanced-excerpt.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions asset/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"name": "deliciousbrains",
"version": "0.1.0",
"devDependencies": {
"grunt": "^0.4.4",
"grunt-contrib-uglify": "^0.4.0",
"grunt-contrib-watch": "^0.6.0",
"grunt-contrib-compass": "^0.7.2"
}
}
76 changes: 31 additions & 45 deletions asset/sass/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
}

.sub-options {
margin: 2px 0px 0px 25px;
margin: 4px 0px 0px 20px;
}

.disabled {
Expand All @@ -41,9 +41,13 @@
position: absolute;
top: 0;
right: 0;
width: 250px;
border: 1px solid #ccc;
padding: 20px;
width: 292px;

.inside {
padding: 20px;
border: 1px solid #ccc;
border-bottom: none;
}

.author {
padding-bottom: 20px;
Expand Down Expand Up @@ -85,53 +89,14 @@
}
}

.video {
position: relative;
display: block;
$size: 60px;

&:before, &:after {
position: absolute;
content: " ";
margin: auto;
left: 0;
right: 0;
top: 0;
bottom: 0;
}

&:before {
width: $size;
height: $size;
@include border-radius($size);
@include opacity(0.8);
border: 1px solid #ddd;
background-color: #fff;
z-index: 2;
}

&:after {
@include opacity(0.8);
border: $size/3 solid transparent;
border-top-width: $size/5;
border-bottom-width: $size/5;
border-left-color: #333;
background: transparent;
display: block;
left: $size/2.56;
width: 0px;
height: 0px;
z-index: 3;
}
}

.subscribe {
h2 {
padding: 0;
margin: 0;
margin-bottom: 0.5em;
color: #666;
font-size: 20px;
line-height: 1.2em;
}

h3 {
Expand All @@ -157,10 +122,12 @@

.promise {
color: #999;
font-size: 12px;
line-height: 1.4em;
}

.field {
margin-bottom: 1em;
margin-bottom: 0.5em;

p {
margin-bottom: 0.3em;
Expand All @@ -171,6 +138,25 @@
}
}
}

@media (min--moz-device-pixel-ratio: 1.3),
(-o-min-device-pixel-ratio: 2.6/2),
(-webkit-min-device-pixel-ratio: 1.3),
(min-device-pixel-ratio: 1.3),
(min-resolution: 1.3dppx) {

.wpmdb-banner {
background-image: url(../img/[email protected]);
background-size: 292px 292px;
width: 292px;
height: 292px;
display: block;

img {
display: none;
}
}
}
}

}
4 changes: 3 additions & 1 deletion class/advanced-excerpt.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,10 @@ function page_assets() {
$src = $plugins_url . 'asset/css/styles.css';
wp_enqueue_style( 'advanced-excerpt-styles', $src, array(), $version );

$suffix = ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ) ? '' : '.min';

// js
$src = $plugins_url . 'asset/js/advanced-excerpt.js';
$src = $plugins_url . 'asset/js/advanced-excerpt' . $suffix . '.js';
wp_enqueue_script( 'advanced-excerpt-script', $src, array( 'jquery' ), $version, true );
}

Expand Down
4 changes: 2 additions & 2 deletions template/options.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@
<li>
<label id="the-content-no-break-label" for="the-content-no-break" <?php echo ( 1 !== $the_content ) ? 'class="disabled"' : ''; ?>>
<input name="the_content_no_break" type="checkbox" id="the-content-no-break" value="on" <?php echo ( 1 == $the_content_no_break && 1 == $the_content ) ? 'checked="checked"' : ''; ?> <?php echo ( 1 !== $the_content ) ? 'disabled="disabled"' : ''; ?> />
<?php _e( "Only filter <span class='monospaced'>the_content()</span> when there's no break in the post content", 'advanced-excerpt' ); ?>
<?php _e( "Only filter <span class='monospaced'>the_content()</span> when there's no break (&lt;!--more--&gt;) tag) in the post content", 'advanced-excerpt' ); ?>
</label>
</li>
</ul>

<p class="description">
<?php _e( 'Themes may use <code>the_excerpt()</code> for some pages (e.g. search results) and <code>the_content()</code> on others (e.g. blog archives).<br />Depending on your theme and what pages you want this plugin to affect, you may need to adjust these settings.', 'advanced-excerpt' ); ?>
<?php _e( 'Themes may use <code>the_excerpt()</code> for some pages (e.g. search results) and <code>the_content()</code> on others (e.g. blog archives). Depending on your theme and what pages you want this plugin to affect, you may need to adjust these settings.', 'advanced-excerpt' ); ?>
</p>
</td>
</tr>
Expand Down
30 changes: 12 additions & 18 deletions template/sidebar.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<div id="advanced-excerpt-sidebar">
<div class="inside">

<div class="author">
<img src="//www.gravatar.com/avatar/e538ca4cb34839d4e5e3ccf20c37c67b?s=128&amp;d" width="64" height="64" />
<img src="http://www.gravatar.com/avatar/e538ca4cb34839d4e5e3ccf20c37c67b?s=128&amp;d" width="64" height="64" />
<div class="desc">
<h3><?php _e( 'Created &amp; maintained by', 'advanced-excerpt' ); ?></h3>
<h3><?php _e( 'Maintained by', 'advanced-excerpt' ); ?></h3>
<h2>Brad Touesnard</h2>
<p>
<a href="http://profiles.wordpress.org/bradt/" target="_blank"><?php _e( 'Profile', 'advanced-excerpt' ); ?></a>
Expand All @@ -13,32 +14,21 @@
</div>
</div>

<form method="post" action="http://deliciousbrains.createsend.com/t/t/s/virn/" target="_blank" class="subscribe">
<h2><?php _e( 'Pro Version Has Arrived!', 'advanced-excerpt' ); ?></h2>

<a class="video" target="_blank" href="http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=insideplugin&utm_medium=web&utm_campaign=freeplugin#play-intro"><img src="<?php echo plugins_url( 'asset/img/[email protected]', $this->plugin_file_path ); ?>" width="250" height="164" alt="" /></a>

<p class="links">
<a href="http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=insideplugin&utm_medium=web&utm_campaign=freeplugin" target="_blank"><?php _e( 'View Features &rarr;', 'advanced-excerpt' ); ?></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://deliciousbrains.com/wp-migrate-db-pro/pricing/?utm_source=insideplugin&utm_medium=web&utm_campaign=freeplugin" target="_blank"><?php _e( 'View Pricing &rarr;', 'advanced-excerpt' ); ?></a>
</p>
<form method="post" action="http://deliciousbrains.createsend.com/t/t/s/tdiull/" target="_blank" class="subscribe">
<h2><?php _e( 'WordPress Development and Deployment Strategy', 'advanced-excerpt' ); ?></h2>

<?php $user = wp_get_current_user(); ?>

<h3><em><?php _e( 'Get 20% Off!', 'c' ); ?></em></h3>

<p class="interesting">
<?php _e( 'Subscribe to receive news &amp; updates below and we\'ll instantly send you a coupon code to get 20% off any WP Migrate DB Pro license.', 'advanced-excerpt' ); ?>
<?php _e( '<strong>Free pro tips</strong> on advanced WordPress development techniques and deployment strategies.', 'advanced-excerpt' ); ?>
</p>

<div class="field notify-name">
<p><?php _e( 'Your Name', 'advanced-excerpt' ); ?></p>
<input type="text" name="cm-name" value="<?php echo trim( esc_attr( $user->first_name ) . ' ' . esc_attr( $user->last_name ) ); ?>" />
<input type="text" name="cm-name" value="<?php echo trim( esc_attr( $user->first_name ) . ' ' . esc_attr( $user->last_name ) ); ?>" placeholder="<?php _e( 'Your Name', 'advanced-excerpt' ); ?>" />
</div>

<div class="field notify-email">
<p><?php _e( 'Your Email', 'advanced-excerpt' ); ?></p>
<input type="email" name="cm-virn-virn" value="<?php echo esc_attr( $user->user_email ); ?>" />
<input type="email" name="cm-tdiull-tdiull" value="<?php echo esc_attr( $user->user_email ); ?>" placeholder="<?php _e( 'Your Email', 'advanced-excerpt' ); ?>" />
</div>

<div class="field submit-button">
Expand All @@ -50,4 +40,8 @@
</p>
</form>

</div>

<a class="wpmdb-banner" target="_blank" href="http://deliciousbrains.com/wp-migrate-db-pro/?utm_source=advanced-excerpt&utm_medium=plugin&utm_campaign=advanced-excerpt"><img src="<?php echo plugins_url( 'asset/img/wp-migrate-db-pro.jpg', $this->plugin_file_path ); ?>" width="292" height="292" alt="<?php _e( 'WP Migrate DB Pro &mdash; Push and pull your database from one WordPress install to another in 1-click.', 'advanced-excerpt' ); ?>" /></a>

</div>

0 comments on commit bd06efd

Please sign in to comment.