Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Thorsten Eggeling
twentytwenty
Commits
fba11466
Unverified
Commit
fba11466
authored
Dec 10, 2019
by
Thorsten Eggeling
Committed by
GitHub
Dec 10, 2019
Browse files
Add files via upload
parent
a290c7b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
twentytwenty-child/functions.php
0 → 100644
View file @
fba11466
<?php
add_action
(
'wp_enqueue_scripts'
,
'my_theme_enqueue_styles'
);
function
my_theme_enqueue_styles
()
{
wp_enqueue_style
(
'parent-style'
,
get_template_directory_uri
()
.
'/style.css'
);
}
add_filter
(
'body_class'
,
'my_body_classes'
);
function
my_body_classes
(
$classes
)
{
if
(
is_category
()
)
{
$classes
[]
=
'template-full-width'
;
}
if
(
is_archive
()
)
{
$classes
[]
=
'template-full-width'
;
}
if
(
is_page_template
(
'templates/template-software-full-width.php'
))
{
$classes
[]
=
'template-full-width'
;
}
return
$classes
;
}
?>
twentytwenty-child/screenshot.png
0 → 100644
View file @
fba11466
308 KB
twentytwenty-child/style.css
0 → 100644
View file @
fba11466
/*
Theme Name: TwentyTwenty Child
Description: TwentyTwenty Child Theme
Template: twentytwenty
Version: 1.0.0
*/
.entry-content
h2
{
margin
:
1rem
auto
1.5rem
;
}
.singular
.entry-header
{
padding
:
0.5rem
0
;
}
.post-inner
{
padding-top
:
1rem
;
}
.header-inner
{
padding
:
1.15rem
0
;
}
.sidebar
{
font-family
:
NonBreakingSpaceOverride
,
"Hoefler Text"
,
Garamond
,
"Times New Roman"
,
serif
;
}
.info-box
{
width
:
300px
;
background
:
#E9D9B7
;
}
.info-text
{
padding
:
5px
15px
5px
15px
;
}
twentytwenty-child/template-parts/content-software.php
0 → 100644
View file @
fba11466
<?php
/**
* The default template for displaying content
*
* Used for both singular and index.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package WordPress
* @subpackage Twenty_Twenty
* @since 1.0.0
*/
?>
<article
<?php
post_class
();
?>
id=
"post-
<?php
the_ID
();
?>
"
>
<?php
get_template_part
(
'template-parts/entry-header'
);
if
(
!
is_search
()
)
{
get_template_part
(
'template-parts/featured-image'
);
}
?>
<div
class=
"post-inner
<?php
echo
is_page_template
(
'templates/template-full-width.php'
)
?
''
:
'thin'
;
?>
"
>
<div
class=
"entry-content"
>
<div
class=
"wp-block-columns"
>
<div
class=
"wp-block-column"
style=
"flex-basis:66.66%"
>
<?php
if
(
is_search
()
||
!
is_singular
()
&&
'summary'
===
get_theme_mod
(
'blog_content'
,
'full'
)
)
{
the_excerpt
();
}
else
{
the_content
(
__
(
'Continue reading'
,
'twentytwenty'
)
);
}
?>
</div>
<!-- block column -->
<div
class=
"wp-block-column"
style=
"flex-basis:33.33%"
>
<div
class=
"sidebar"
>
<div
class=
"info-box"
>
<div
class=
"info-text"
>
<b>
Betriebssysteme:
</b>
<br/>
<?php
the_field
(
'betriebssysteme'
);
?>
<br/>
<b>
Sprache:
</b>
<br/>
<?php
the_field
(
'sprache'
);
?>
<br/>
<b>
Download:
</b>
<br
/>
<a
href=
"
<?php
the_field
(
'download'
);
?>
"
>
<?php
the_field
(
'download'
);
?>
</a>
<b>
Version:
</b>
<br/>
<?php
the_field
(
'version'
);
?>
<br/>
<b>
Update:
</b>
<br/>
<?php
the_field
(
'update'
);
?>
<br/>
<b>
Softwareart:
</b>
<br/>
<?php
the_field
(
'softwareart'
);
?>
<br/>
<b>
Preis:
</b>
<br/>
<?php
the_field
(
'preis'
);
?>
</div>
<!-- info-text -->
</div>
<!-- info-box -->
</div>
<!-- sidebar -->
</div>
<!-- block column -->
</div>
<!-- block columns -->
</div>
<!-- .entry-content -->
</div>
<!-- .post-inner -->
<div
class=
"section-inner"
>
<?php
wp_link_pages
(
array
(
'before'
=>
'<nav class="post-nav-links bg-light-background" aria-label="'
.
esc_attr__
(
'Page'
,
'twentytwenty'
)
.
'"><span class="label">'
.
__
(
'Pages:'
,
'twentytwenty'
)
.
'</span>'
,
'after'
=>
'</nav>'
,
'link_before'
=>
'<span class="page-number">'
,
'link_after'
=>
'</span>'
,
)
);
edit_post_link
();
// Single bottom post meta.
twentytwenty_the_post_meta
(
get_the_ID
(),
'single-bottom'
);
if
(
is_single
()
)
{
get_template_part
(
'template-parts/entry-author-bio'
);
}
?>
</div>
<!-- .section-inner -->
<?php
if
(
is_single
()
)
{
get_template_part
(
'template-parts/navigation'
);
}
/**
* Output comments wrapper if it's a post, or if comments are open,
* or if there's a comment number – and check for password.
* */
if
(
(
is_single
()
||
is_page
()
)
&&
(
comments_open
()
||
get_comments_number
()
)
&&
!
post_password_required
()
)
{
?>
<div
class=
"comments-wrapper section-inner"
>
<?php
comments_template
();
?>
</div>
<!-- .comments-wrapper -->
<?php
}
?>
</article>
<!-- .post -->
twentytwenty-child/templates/template-software-full-width.php
0 → 100644
View file @
fba11466
<?php
/**
* Template Name: Full-width Software-Template
* Template Post Type: post, page
* Description: Software post template
*/
//acf_form_head();
get_header
();
?>
<main
id=
"site-content"
role=
"main"
>
<?php
if
(
have_posts
()
)
{
while
(
have_posts
()
)
{
the_post
();
get_template_part
(
'template-parts/content-software'
,
get_post_type
()
);
}
}
?>
</main>
<!-- #site-content -->
<?php
get_template_part
(
'template-parts/footer-menus-widgets'
);
?>
<?php
get_footer
();
?>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment