Making WordPress.org

Ticket #116: make-theme.diff

File make-theme.diff, 9.0 KB (added by georgestephanis, 12 years ago)
  • wp-content/themes/pub/make/subhead.php

     
     1
     2<nav class="subhead">
     3        <div class="wrapper">
     4                <?php wp_nav_menu( array( 'theme_location' => 'primary', 'container_class' => 'nav-menu' ) ); ?>
     5
     6                <?php if( false && class_exists( 'Jetpack' ) && Jetpack::is_module_active( 'subscriptions' ) ) : ?>
     7                <?php /* @todo: switch this form over to the Jetpack Subscriptions shortcode */ ?>
     8                <?php /* jetpack_do_subscription_form( $args = array() ); */ ?>
     9                <form action="#" method="post">
     10                        <fieldset>
     11                                <label for="signup-email">Get news updates in your email:</label>
     12                                <input type="email" name="email" class="text" id="signup-email" />
     13                                <button type="submit" class="button button-primary">Sign Up</button>
     14                        </fieldset>
     15                </form>
     16                <?php endif; ?>
     17        </div>
     18</nav>
  • wp-content/themes/pub/make/style.css

     
     1/*
     2Theme Name:     Make
     3Theme URI:      http://make.wordpress.org/
     4Description:    Make WordPress
     5Author:         George Stephanis
     6Author URI:     http://stephanis.info/
     7Template:       wp-org-parent
     8Version:        1.0
     9*/
     10
     11html,
     12body {
     13        background: #efefef;
     14}
     15
     16.make-3 .wrapper {
     17        width: auto;
     18        max-width: 960px;
     19}
     20
     21/* === Clearfix === */
     22
     23.wrapper:after {
     24        visibility: hidden;
     25        display: block;
     26        font-size: 0;
     27        content: " ";
     28        clear: both;
     29        height: 0;
     30}
     31.wrapper {
     32        display: inline-block;
     33}
     34/* start commented backslash hack \*/
     35* html .wrapper { height: 1%; }
     36.wrapper { display: block; }
     37/* close commented backslash hack */
     38
     39/* === header.masthead === */
     40
     41header.masthead {
     42        clear: both;
     43        background: rgb(1, 116, 162);
     44        border: 1px solid rgb(6, 122, 166);
     45        border-width: 1px 0;
     46        position: relative;
     47        overflow: hidden;
     48}
     49
     50header.masthead > .wrap {
     51        max-width: 940px;
     52        padding: 30px 10px;
     53        margin: 0 auto;
     54        overflow: hidden;
     55        position: relative;
     56        z-index: 1;
     57}
     58
     59header.masthead img {
     60        float: right;
     61        display: block;
     62        border: 3px solid #fff;
     63        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
     64        margin-left: 40px;
     65        max-width: 98%;
     66        max-width: calc( 100% - 6px );
     67        height: auto;
     68}
     69
     70header.masthead h1 {
     71        font-size: 24px;
     72        line-height: 1.5;
     73        color: #fff;
     74        font-family: 'Open Sans', sans-serif;
     75        font-weight: 100;
     76        margin: 0;
     77}
     78
     79header.masthead h5 {
     80        margin: 20px 0 0;
     81        font-family: 'Open Sans', sans-serif;
     82        font-weight: 300;
     83        color: #fff;
     84        font-size: 16px;
     85        line-height: 1.5;
     86}
     87
     88/* === nav.subhead === */
     89
     90nav.subhead {
     91        background: rgb(51, 51, 51);
     92        border-top: 1px solid #0a4c6b;
     93        border-bottom: 1px solid #003245;
     94        position: relative;
     95}
     96
     97nav.subhead .nav-menu ul {
     98        float: left;
     99        padding: 5px 0;
     100        margin: 0 auto;
     101        font-family: 'Open Sans', sans-serif;
     102        font-weight: 300;
     103        font-size: 16px;
     104}
     105
     106nav.subhead .nav-menu ul li {
     107        display: inline-block;
     108        margin-right: 10px;
     109}
     110
     111nav.subhead .nav-menu ul li a {
     112        color: #fff;
     113        text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.4);
     114        text-decoration: none;
     115        display: inline-block;
     116        padding: 5px 10px;
     117}
     118
     119nav.subhead .nav-menu ul li a:hover {
     120        opacity: 0.8;
     121}
     122
     123nav.subhead .nav-menu ul ul {
     124        display: none;
     125}
     126
     127nav.subhead form {
     128        float: right;
     129        display: block;
     130        padding: 2px 10px 8px;
     131}
     132
     133nav.subhead form fieldset {
     134        display: block;
     135        height: 23px;
     136        padding-bottom: 9px;
     137}
     138
     139nav.subhead form label {
     140        color: #fff;
     141        display: inline-block;
     142        font-size: 14px;
     143        padding: 9px 5px 0;
     144}
     145
     146nav.subhead input[type=email] {
     147        display: inline-block;
     148        background: rgb(18, 18, 18);
     149        border: 0;
     150        border-bottom: 1px solid rgb(78, 78, 78);
     151        color: #aaa;
     152        padding: 5px;
     153        font-size: 12px;
     154        vertical-align: baseline;
     155}
     156
     157nav.subhead button {
     158        display: inline-block;
     159}
     160
     161/* section.get-involved */
     162
     163section.get-involved h2 {
     164        font-family: "Open Sans";
     165        font-weight: 600;
     166        padding-bottom: 0.5em;
     167}
     168
     169section.get-involved h2.section-title {
     170        padding: 20px 10px;
     171}
     172
     173section.get-involved article {
     174        margin: 10px;
     175        padding: 20px;
     176        width: 420px;
     177        width: calc( 100% / 2 - 60px );
     178        font-size: 11pt;
     179        background: #fff;
     180        float: left;
     181        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
     182        -webkit-transition: none 0.4s ease;
     183        -moz-transition: none 0.4s ease;
     184        -ms-transition: none 0.4s ease;
     185        -o-transition: none 0.4s ease;
     186        transition: none 0.4s ease;
     187        -webkit-transition-property: background, box-shadow;
     188        -moz-transition-property: background, box-shadow;
     189        -ms-transition-property: background, box-shadow;
     190        -o-transition-property: background, box-shadow;
     191        transition-property: background, box-shadow;
     192}
     193
     194section.get-involved article:hover {
     195        background: #fcfcfc;
     196        box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.3 );
     197}
     198
     199section.get-involved article:nth-of-type(odd) {
     200        clear: left;
     201}
     202
     203section.get-involved article h2:before {
     204        font-family: 'dashicons';
     205        content: '\f109';
     206        margin-right: 0.4em;
     207        vertical-align: -3px;
     208}
     209
     210section.get-involved article.core          h2:before { content: '\f107'; }
     211section.get-involved article.ui            h2:before { content: '\f100'; }
     212section.get-involved article.mobile        h2:before { content: '\f166'; }
     213section.get-involved article.accessibility h2:before { content: '\f115'; }
     214section.get-involved article.polyglots     h2:before { content: '\f125'; }
     215section.get-involved article.support       h2:before { content: '\f110'; }
     216section.get-involved article.themes        h2:before { content: '\f105'; }
     217section.get-involved article.plugins       h2:before { content: '\f106'; }
     218
     219section.get-involved article.featured-group h2:after {
     220        display: block;
     221        float: right;
     222        content: '\2605';
     223        text-transform: uppercase;
     224}
     225
     226section.get-involved article p {
     227        font-size: 1em;
     228        line-height: 1.3;
     229}
     230
     231section.get-involved article small {
     232        display: block;
     233        font-size: 0.8em;
     234        font-style: italic;
     235        opacity: 0.5;
     236        padding-top: 0.5em;
     237}
     238
     239section.get-involved article small p {
     240        line-height: 1.5;
     241}
     242
     243@media ( max-width: 960px ) {
     244        section.get-involved article {
     245                width: 43%;
     246                width: calc( 100% / 2 - 60px );
     247        }
     248}
     249
     250@media ( max-width: 600px ) {
     251
     252        header.masthead img {
     253                float: none;
     254                margin: 0 auto 10px;
     255        }
     256
     257        nav.subhead ul,
     258        nav.subhead form {
     259                float: none;
     260                text-align: center;
     261        }
     262
     263        nav.subhead form fieldset {
     264                height: auto;
     265        }
     266
     267        nav.subhead form label {
     268                display: block;
     269        }
     270
     271        section.get-involved article {
     272                width: 90%;
     273                width: calc( 100% - 60px );
     274                float: none;
     275        }
     276
     277}
     278
  • wp-content/themes/pub/make/front-page.php

     
     1<?php get_header(); ?>
     2
     3<?php get_template_part( 'masthead' ); ?>
     4
     5<?php get_template_part( 'subhead' ); ?>
     6
     7<section class="get-involved">
     8        <div class="wrapper">
     9                <h2 class="section-title"><?php _e( 'There are many different ways for you to get involved with WordPress:', 'make-wporg' ); ?></h2>
     10
     11                <?php $sites_query = new WP_Query( 'post_type=make_site&posts_per_page=-1' ); ?>
     12                <?php while( $sites_query->have_posts() ) : $sites_query->the_post(); ?>
     13                        <article id="site-<?php the_ID(); ?>" <?php post_class(); ?>>
     14                                <h2><?php the_title(); ?></h2>
     15                                <?php the_excerpt(); ?>
     16                                <?php if ( '1' == get_post_meta( get_the_ID(), 'weekly_meeting', true ) ) : ?>
     17                                        <small>
     18                                                <p><?php printf( __( 'Weekly IRC chats: %s', 'make-wporg' ), get_post_meta( get_the_ID(), 'weekly_meeting_when', true ) ); ?></p>
     19                                                <p><?php echo get_post_meta( get_the_ID(), 'weekly_meeting_where', true ); ?></p>
     20                                        </small>
     21                                <?php endif; ?>
     22                        </article>
     23                <?php endwhile; ?>
     24
     25        </div>
     26</section>
     27
     28<?php get_footer(); ?>
     29 No newline at end of file
  • wp-content/themes/pub/make/masthead.php

     
     1
     2<header class="masthead">
     3        <hgroup class="wrap">
     4                <img src="http://placekitten.com/400/200" width="400" height="200" alt="Placekitten!" />
     5                <h1>Whether you&rsquo;re a budding developer or UX pro, we&rsquo;re always looking for people to join up and help make WordPress even greater.</h1>
     6        </hgroup>
     7</header>
  • wp-content/themes/pub/make/functions.php

     
     1<?php
     2
     3add_action( 'wp_enqueue_scripts', 'make_enqueue_scripts' );
     4function make_enqueue_scripts() {
     5        wp_enqueue_style( 'make-style', get_stylesheet_uri() );
     6}
     7
     8add_action( 'after_setup_theme', 'make_setup_theme' );
     9function make_setup_theme() {
     10        register_nav_menu( 'primary', __( 'Navigation Menu', 'make-wporg' ) );
     11}