Skip to content

Commit

Permalink
Add carbon cpm ad unit to documentation sidebar.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwage committed Dec 4, 2018
1 parent 8f50395 commit 7064d40
Show file tree
Hide file tree
Showing 12 changed files with 162 additions and 35 deletions.
6 changes: 6 additions & 0 deletions source/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
{% block content %}
<h2>Page not found</h2>

<div class="row">
<div class="col">
{% include "carbonad-standard.html.twig" %}
</div>
</div>

<p class="lead">The page you are looking for could not be found. Take a look at one of the pages below instead.</p>

<ul>
Expand Down
24 changes: 18 additions & 6 deletions source/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,26 @@ <h1 class="display-4 notranslate">{{ site.title }}</h1>
<a href="{{ site.url }}/projects/dbal.html">Database Abstraction Layer (DBAL)</a> it is
built upon.</p>

<p class="lead">
<a class="btn bg-doctrine-orange text-white btn-lg" href="{{ site.url }}/projects/doctrine-orm/en/current/tutorials/getting-started.html" role="button">Get Started</a>
<a class="btn bg-doctrine-dark-blue text-white btn-lg" href="{{ site.url }}/projects.html" role="button">View Projects</a>
<div class="row">
<div class="col-12">
<a class="btn bg-doctrine-orange text-white btn-lg" href="{{ site.url }}/projects/doctrine-orm/en/current/tutorials/getting-started.html" role="button">Get Started</a>
<a class="btn bg-doctrine-dark-blue text-white btn-lg" href="{{ site.url }}/projects.html" role="button">View Projects</a>
</div>
</div>

<div class="row">
<div class="col-12">
<div class="btn btn-lg tidelift-badge mt-2">
<a href="https://tidelift.com/subscription/pkg/packagist-doctrine-orm?utm_source=packagist-doctrine-orm&utm_medium=website" target="_blank" rel="noopener noreferrer"><img src="{{ get_asset_url('/images/tidelift-icon.png', site.url) }}" class="tidelift-icon" /> <span>Get professional support for Doctrine</span></a>
</div>
</div>
</div>

<div class="btn btn-lg tidelift-badge">
<a href="https://tidelift.com/subscription/pkg/packagist-doctrine-orm?utm_source=packagist-doctrine-orm&utm_medium=website" target="_blank" rel="noopener noreferrer"><img src="{{ get_asset_url('/images/tidelift-icon.png', site.url) }}" class="tidelift-icon" /> <span>Get professional support for Doctrine</span></a>
<div class="row mt-2">
<div class="col">
{% include "carbonad-standard.html.twig" %}
</div>
</p>
</div>
</div>
</div>

Expand Down
71 changes: 71 additions & 0 deletions source/styles/_carbonads.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#carbonads {
display: block;
overflow: hidden;
padding: 10px;
border: 1px dashed #ccc;
font-size: 12px;
max-width: 360px;
margin-bottom: 20px;
line-height: 1.5;
background-color: white;
}

#carbonads span {
position: relative;
display: block;
overflow: hidden;
}

.carbon-img {
float: left;
margin-right: 1em;
}

.carbon-img img {
display: block;
}

.carbon-text {
display: block;
float: left;
max-width: calc(100% - 130px - 1em);
text-align: left;
}

.carbon-poweredby {
color: #cccccc;
position: absolute;
left: 142px;
bottom: 0;
display: block;
font-size: 8px;
font-weight: 600;
text-transform: uppercase;
line-height: 1;
letter-spacing: 1px;
}

@media (max-width: 1200px) {
.sidebar-sticky {
.carbon-img {
float: none;
margin: 0;
}

.carbon-img img {
margin: 0 auto 1em;
}

.carbon-text {
margin-bottom: 1em;
max-width: none;
text-align: center;
}

.carbon-poweredby {
position: relative;
left: auto;
text-align: center;
}
}
}
1 change: 1 addition & 0 deletions source/styles/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -566,3 +566,4 @@ div.jsactive pre {
}

@import 'railscasts';
@import 'carbonads';
19 changes: 13 additions & 6 deletions source/team/contributors.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
<h1>Contributors</h1>

<p class="lead">
In addition to the <a href="{{ site.url }}/team/maintainers.html">core maintainers</a>, Doctrine has received contributions from {{ contributors|length }}
different people from all over the world. Could you be the next contributor? Head on over to the
<a href="{{ site.url }}/contribute/">Contributor Workflow</a> to learn how to
contribute to your favorite Doctrine project today!
</p>
<div class="row">
<div class="col-lg-8 col-sm-12">
<p class="lead">
In addition to the <a href="{{ site.url }}/team/maintainers.html">core maintainers</a>, Doctrine has received contributions from {{ contributors|length }}
different people from all over the world. Could you be the next contributor? Head on over to the
<a href="{{ site.url }}/contribute/">Contributor Workflow</a> to learn how to
contribute to your favorite Doctrine project today!
</p>
</div>
<div class="col-4 d-none d-lg-block">
{% include "carbonad-standard.html.twig" %}
</div>
</div>

{% include "contributors-list.html.twig" with {contributors:contributors} %}
17 changes: 12 additions & 5 deletions source/team/maintainers.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
<h1>Maintainers</h1>

<p class="lead">
Doctrine is maintained by a core group of {{ contributors|length }} developers. Each maintainer has
their own areas of responsibilities and together we are able to keep the various Doctrine projects
moving forward as the PHP ecosystem evolves.
</p>
<div class="row">
<div class="col-lg-8 col-sm-12">
<p class="lead">
Doctrine is maintained by a core group of {{ contributors|length }} developers. Each maintainer has
their own areas of responsibilities and together we are able to keep the various Doctrine projects
moving forward as the PHP ecosystem evolves.
</p>
</div>
<div class="col-4 d-none d-lg-block">
{% include "carbonad-standard.html.twig" %}
</div>
</div>

{% include "maintainers-list.html.twig" with {contributors:contributors} %}
1 change: 1 addition & 0 deletions templates/carbonad-standard.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script async type="text/javascript" src="//cdn.carbonads.com/carbon.js?serve=CK7D553W&placement=wwwdoctrine-projectorg" id="_carbonads_js"></script>
6 changes: 6 additions & 0 deletions templates/layouts/blog-post.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@
{% endif %}
</p>

<div class="row">
<div class="col">
{% include "carbonad-standard.html.twig" %}
</div>
</div>

<hr />

<div>
Expand Down
2 changes: 2 additions & 0 deletions templates/layouts/documentation.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
{% if page.docsPage %}
<nav class="col-md-3 d-sm-block bg-light sidebar sidebar-offcanvas" id="sidebar">
<div class="sidebar-sticky">
{% include "carbonad-standard.html.twig" %}

{% block sidebar '' %}
</div>
</nav>
Expand Down
6 changes: 6 additions & 0 deletions templates/project.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,12 @@

<hr />

<div class="row">
<div class="col">
{% include "carbonad-standard.html.twig" %}
</div>
</div>

{% if project.composerPackageName %}
<h2>Install</h2>

Expand Down
40 changes: 24 additions & 16 deletions templates/team/member.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,35 @@
{{ contributor.github }}
</div>
<div class="card-body">
<img src="{{ contributor.avatarUrl }}" class="rounded float-left mr-5" style="width: 100px;" />
<div class="row">
<div class="col-lg-8 col-sm-12">
<img src="{{ contributor.avatarUrl }}" class="rounded float-left mr-5" style="width: 100px;" />

<strong>
{{ contributor.teamMember.name ?? contributor.github }}
</strong>
<strong>
{{ contributor.teamMember.name ?? contributor.github }}
</strong>

<ul class="list-inline">
{% if contributor.teamMember and contributor.teamMember.twitter %}
<li class="list-inline-item"><a href="https://twitter.com/{{ contributor.teamMember.twitter }}/" target="_blank" rel="noopener noreferrer"><i class="fab fa-twitter mr-2"></i></a></li>
{% endif %}
<ul class="list-inline">
{% if contributor.teamMember and contributor.teamMember.twitter %}
<li class="list-inline-item"><a href="https://twitter.com/{{ contributor.teamMember.twitter }}/" target="_blank" rel="noopener noreferrer"><i class="fab fa-twitter mr-2"></i></a></li>
{% endif %}

{% if contributor.teamMember and contributor.teamMember.website %}
<li class="list-inline-item"><a href="{{ contributor.teamMember.website }}" target="_blank" rel="noopener noreferrer"><i class="fas fa-link mr-2"></i></a></li>
{% endif %}
{% if contributor.teamMember and contributor.teamMember.website %}
<li class="list-inline-item"><a href="{{ contributor.teamMember.website }}" target="_blank" rel="noopener noreferrer"><i class="fas fa-link mr-2"></i></a></li>
{% endif %}

{% if contributor.github %}
<li class="list-inline-item"><a href="https://github.com/{{ contributor.github }}/" target="_blank" rel="noopener noreferrer"><i class="fab fa-github mr-2"></i></a></li>
{% endif %}
</ul>
{% if contributor.github %}
<li class="list-inline-item"><a href="https://github.com/{{ contributor.github }}/" target="_blank" rel="noopener noreferrer"><i class="fab fa-github mr-2"></i></a></li>
{% endif %}
</ul>

{{ contributor.numCommits }} commits <span class="text-success">{{ contributor.numAdditions }} ++</span> <span class="text-danger">{{ contributor.numDeletions }} --</span>
{{ contributor.numCommits }} commits <span class="text-success">{{ contributor.numAdditions }} ++</span> <span class="text-danger">{{ contributor.numDeletions }} --</span>
</div>

<div class="col-4 d-none d-lg-block">
{% include "carbonad-standard.html.twig" %}
</div>
</div>
</div>
</div>

Expand Down
4 changes: 2 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const plugins = () => {
if (!isWatching) {
plugins.push(
new PurgecssPlugin({
whitelistPatterns: [/^ais/],
whitelistPatterns: [/^ais/, /^carbon/],
paths: []
.concat(glob.sync(__dirname + '/templates/**/*.twig'))
.concat(glob.sync(__dirname + '/source/**/*.html'))
Expand Down Expand Up @@ -73,4 +73,4 @@ module.exports = {
filename: 'js/[name].js',
crossOriginLoading: 'anonymous',
}
};
};

0 comments on commit 7064d40

Please sign in to comment.