Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
barbaburns committed Oct 9, 2024
2 parents 70e80be + 32e0cf1 commit fec5779
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,20 @@ document.addEventListener("DOMContentLoaded", function(){

let linkList = ''
let anchors = document.getElementById("anchors")
let titles = document.querySelectorAll(".content > h1, .content > h2, .content > h3, .content > h4, .content > h5, .content > h6")
let titles = document.querySelectorAll(".content h1, .content h2, .content h3, .content h4, .content h5, .content h6")

if (anchors && titles) {
titles.forEach((title, index) => {
let content = title.innerText.replace(/<[^>]+>/g, '')
let id = `${index}-section`

title.setAttribute("id", `${id}`)

linkList += `<li><a href="#${id}">${content}</a></li>`

});

anchors.innerHTML = linkList
}

})
})
42 changes: 40 additions & 2 deletions themes/midia-ninja-theme/assets/scss/6-pages/_p-page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,44 @@
}
}

#cmplz-document p {
font-size: 1rem;
.privacy-policy,
.page-termos-e-condicoes {

ol {
padding-left: 24px;

a {
color: #262626;
}
}

.sidebar-page {
margin-bottom: 4rem;
}

@media (min-width: 992px) {
.sidebar-page {
width: 30%;
}

.content {
width: 57%;
float: right;
}
}
}

.page-termos-e-condicoes {

#app .container .row {
margin-top: 1.5rem;
}

.page-title {
margin-top: 0;
}

#cmplz-document p {
font-size: 1rem;
}
}
9 changes: 3 additions & 6 deletions themes/midia-ninja-theme/page-anchor.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

$post_id = get_the_ID();
$subtitle = get_post_meta($post_id, 'subtitulo', true);
$titulo_tag = get_post_meta($post_id, 'titulo_tag', true);

?>
$titulo_tag = get_post_meta($post_id, 'titulo_tag', true); ?>

<div class="index-wrapper page-with-title">
<div class="container">
Expand All @@ -22,14 +20,13 @@
?>
<div class="row">
<div class="col-md-3 sidebar-page">


<?php if ( is_page('perguntas-frequentes') ) :?>
<p class="anchor-title"><?= __('What is Mídia Ninja', 'ninja') ?></p>
<?php elseif( is_page('documentacao') ) : ?>
<p class="anchor-title"><?= __('Topics', 'ninja') ?></p>
<?php endif;?>
<ul id="anchors"></ul>
<h2 class="page-title"><?php the_title();?></h2>
<ol id="anchors"></ol>
</div>
<div class="col-md-9 content">
<?php the_content() ?>
Expand Down

0 comments on commit fec5779

Please sign in to comment.