mirror of
https://github.com/doctrine/doctrine-website.git
synced 2026-03-23 22:32:11 +01:00
Apply prettier coding style
This commit is contained in:
@@ -21,17 +21,23 @@ export default function () {
|
|||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$('button[role="tab"]').on('click', function () {
|
$('button[role="tab"]').on('click', function () {
|
||||||
const tabId = $(this).attr('aria-controls');
|
const tabId = $(this).attr('aria-controls');
|
||||||
const tabContent = $('#' + tabId);
|
const tabContent = $('#' + tabId);
|
||||||
|
|
||||||
$(this).closest('[role=tablist]').find('button[role="tab"]')
|
$(this)
|
||||||
.attr('data-active', null)
|
.closest('[role=tablist]')
|
||||||
.attr('aria-selected', 'false');
|
.find('button[role="tab"]')
|
||||||
|
.attr('data-active', null)
|
||||||
|
.attr('aria-selected', 'false');
|
||||||
|
|
||||||
$(this).attr('data-active', 'true').attr('aria-selected', 'true');
|
$(this).attr('data-active', 'true').attr('aria-selected', 'true');
|
||||||
|
|
||||||
$(this).closest('[role=tablist]').parent().find('div[role="tabpanel"]').hide();
|
$(this)
|
||||||
tabContent.show();
|
.closest('[role=tablist]')
|
||||||
|
.parent()
|
||||||
|
.find('div[role="tabpanel"]')
|
||||||
|
.hide();
|
||||||
|
tabContent.show();
|
||||||
});
|
});
|
||||||
|
|
||||||
$('button.copy-to-clipboard').on('click', async function () {
|
$('button.copy-to-clipboard').on('click', async function () {
|
||||||
@@ -42,14 +48,17 @@ export default function () {
|
|||||||
let copyText = '';
|
let copyText = '';
|
||||||
if (copyElement) {
|
if (copyElement) {
|
||||||
const children = Array.from(copyElement.childNodes);
|
const children = Array.from(copyElement.childNodes);
|
||||||
copyText = children.map(node => {
|
copyText = children
|
||||||
if (node.nodeType === Node.TEXT_NODE) {
|
.map((node) => {
|
||||||
return node.textContent;
|
if (node.nodeType === Node.TEXT_NODE) {
|
||||||
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
return node.textContent;
|
||||||
return node.textContent;
|
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
||||||
}
|
return node.textContent;
|
||||||
return '';
|
}
|
||||||
}).filter(Boolean).join('\n');
|
return '';
|
||||||
|
})
|
||||||
|
.filter(Boolean)
|
||||||
|
.join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
await navigator.clipboard.writeText(copyText);
|
await navigator.clipboard.writeText(copyText);
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ export default function (projectSlug, versionSlug, searchBoxSettings) {
|
|||||||
poweredBy: false,
|
poweredBy: false,
|
||||||
reset: false,
|
reset: false,
|
||||||
searchClient: algoliasearch(
|
searchClient: algoliasearch(
|
||||||
'YVYTFT9XMW',
|
'YVYTFT9XMW',
|
||||||
'a6dada5f33f148586b92cc3afefeaaf6'
|
'a6dada5f33f148586b92cc3afefeaaf6',
|
||||||
),
|
),
|
||||||
searchFunction: function (helper) {
|
searchFunction: function (helper) {
|
||||||
if (helper.state.query === '') {
|
if (helper.state.query === '') {
|
||||||
|
|||||||
@@ -643,15 +643,16 @@ a img.card-img-top {
|
|||||||
@import 'railscasts';
|
@import 'railscasts';
|
||||||
@import 'carbonads';
|
@import 'carbonads';
|
||||||
|
|
||||||
pre.code-block-table{
|
pre.code-block-table {
|
||||||
counter-reset: line;
|
counter-reset: line;
|
||||||
}
|
}
|
||||||
code.line{
|
code.line {
|
||||||
counter-increment: line;
|
counter-increment: line;
|
||||||
}
|
}
|
||||||
|
|
||||||
code.empty:before, code.line:before{
|
code.empty:before,
|
||||||
content: " ";
|
code.line:before {
|
||||||
|
content: ' ';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: 38px;
|
width: 38px;
|
||||||
background: #333;
|
background: #333;
|
||||||
@@ -665,19 +666,21 @@ code.line:before {
|
|||||||
content: counter(line);
|
content: counter(line);
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote-label, .footnote-content {
|
.footnote-label,
|
||||||
display: inline;
|
.footnote-content {
|
||||||
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footnote-label {
|
.footnote-label {
|
||||||
vertical-align: super;
|
vertical-align: super;
|
||||||
font-size: .75em;
|
font-size: 0.75em;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.row table:not([width]) {
|
div.row table:not([width]) {
|
||||||
border: 1px solid #dee2e6;
|
border: 1px solid #dee2e6;
|
||||||
|
|
||||||
td, th {
|
td,
|
||||||
|
th {
|
||||||
padding: 0.5em;
|
padding: 0.5em;
|
||||||
border: 1px solid #dee2e6;
|
border: 1px solid #dee2e6;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user