forked from friendica/friendica-wp-theme
Fix popups and add last news in homepage
- popup submenu item full width and left aligned - minimum width for the popup submenu - popup submenu closer to parent item. should fix popup issues. - images in posts have max-width to 100% - show last news in homepage
This commit is contained in:
parent
6c7b8f98fd
commit
5f63119ef0
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.DS*
|
|
@ -1773,6 +1773,10 @@
|
|||
|
||||
/* Section/Article */
|
||||
|
||||
section.wrapper header p.entry-meta { font-size: 0.8em;}
|
||||
|
||||
section.entry-content img { max-width: 100%; height: auto!important; }
|
||||
|
||||
section.special, article.special {
|
||||
text-align: center;
|
||||
}
|
||||
|
@ -2849,10 +2853,12 @@
|
|||
position: absolute;
|
||||
background-color: #fff;
|
||||
border: 1px solid #5385c1;
|
||||
top: 2.9em;
|
||||
border-top: 1px solid #fff;
|
||||
top: 2.5em;
|
||||
min-width: 100px;
|
||||
}
|
||||
#nav .sub-menu li { padding: 0; line-height: 2em; }
|
||||
#nav .sub-menu a { color: #333; padding: 0.4em; }
|
||||
#nav .sub-menu a { color: #333; padding: 0.4em; width: 100%; text-align: left; }
|
||||
#nav .sub-menu a:hover { color: #fff; background-color: #5385c1; }
|
||||
|
||||
@media screen and (max-width: 980px) {
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
<section class="entry-content">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<span class="image left"><?php the_post_thumbnail(); ?></span>
|
||||
<?php } ?>
|
||||
<?php the_content(); ?>
|
||||
<div class="entry-links"><?php wp_link_pages(); ?></div>
|
||||
</section>
|
||||
|
|
19
entry-home.php
Normal file
19
entry-home.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class("6u 12u$(medium)"); ?>>
|
||||
<?php if (has_post_thumbnail()) {?>
|
||||
<div class="image fit">
|
||||
<img src="<?php the_post_thumbnail_url('medium_large'); ?>" alt="Stack">
|
||||
</div>
|
||||
<?php } ?>
|
||||
<header>
|
||||
<h3 class="entry-title">
|
||||
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark">
|
||||
<?php the_title(); ?>
|
||||
</a>
|
||||
</h3>
|
||||
<?php get_template_part( 'entry', 'meta' ); ?>
|
||||
</header>
|
||||
<?php get_template_part( 'entry', 'summary' ); ?>
|
||||
<footer>
|
||||
<a href="<?php the_permalink(); ?>" class="button special">More</a>
|
||||
</footer>
|
||||
</article>
|
16
entry.php
16
entry.php
|
@ -1,8 +1,12 @@
|
|||
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
|
||||
<header>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php edit_post_link(); ?>
|
||||
<?php if ( !is_search() ) get_template_part( 'entry', 'meta' ); ?>
|
||||
</header>
|
||||
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
|
||||
<?php if ( !is_search() ) get_template_part( 'entry-footer' ); ?>
|
||||
<header>
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<span class="image right"><?php the_post_thumbnail('thumbnail'); ?></span>
|
||||
<?php } ?>
|
||||
<h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" rel="bookmark"><?php the_title(); ?></a></h2> <?php edit_post_link(); ?>
|
||||
<?php if ( !is_search() ) get_template_part( 'entry', 'meta' ); ?>
|
||||
</header>
|
||||
<?php get_template_part( 'entry', ( is_archive() || is_search() ? 'summary' : 'content' ) ); ?>
|
||||
<?php if ( !is_search() ) get_template_part( 'entry-footer' ); ?>
|
||||
</article>
|
||||
<hr style="clear:both;">
|
||||
|
|
|
@ -115,4 +115,65 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<hr>
|
||||
<!-- Four -->
|
||||
<?php
|
||||
$args = array(
|
||||
'post_type' => "post"
|
||||
);
|
||||
$the_query = new WP_Query( $args );
|
||||
?>
|
||||
|
||||
<section id="four" class="wrapper special">
|
||||
<div class="inner">
|
||||
<header class="align-center">
|
||||
<h2>Last News</h2>
|
||||
</header>
|
||||
<div class="row">
|
||||
<!-- article 1 -->
|
||||
<?php
|
||||
if ($the_query->have_posts()) {
|
||||
$the_query->the_post();
|
||||
get_template_part( 'entry', 'home' );
|
||||
}
|
||||
?>
|
||||
<div class="6u 12u$(medium)">
|
||||
<!-- article 2-5 -->
|
||||
<div class="row">
|
||||
<?php
|
||||
if ($the_query->have_posts()) {
|
||||
$the_query->the_post();
|
||||
get_template_part( 'entry', 'home' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($the_query->have_posts()) {
|
||||
$the_query->the_post();
|
||||
get_template_part( 'entry', 'home' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="flex flex-2">
|
||||
<?php
|
||||
if ($the_query->have_posts()) {
|
||||
$the_query->the_post();
|
||||
get_template_part( 'entry', 'home' );
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
if ($the_query->have_posts()) {
|
||||
$the_query->the_post();
|
||||
get_template_part( 'entry', 'home' );
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
</div>
|
||||
</section>
|
||||
<?php wp_reset_query(); ?>
|
||||
<?php get_footer(); ?>
|
||||
|
|
BIN
screenshot.png
BIN
screenshot.png
Binary file not shown.
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 203 KiB |
|
@ -4,7 +4,7 @@ Theme URI: http://github.com/friendica/wordpress-theme
|
|||
Author: Friendica
|
||||
Author URI: http://friendica.com/
|
||||
Description: This is the theme for Friendica main site.<br>Based on https://templated.co/theory
|
||||
Version: 1.0.0
|
||||
Version: 1.0.2
|
||||
License: GNU General Public License
|
||||
License URI: https://www.gnu.org/licenses/gpl.html
|
||||
Text Domain: friendica
|
||||
|
|
Loading…
Reference in a new issue