mirror of
https://github.com/google/styleguide.git
synced 2026-10-28 08:25:21 +08:00
C++: switch to javaguide.css & jsguide.js
Every other HTML guide switched to javaguide.css, so move C++ too. This also fixes good code styling in all HTML pages, and fixes C++ code syntax colorization.
This commit is contained in:
1 parent
d9e89d78b8
commit
b7932bb76b
3 files changed
+326
-314
No files matched your search
+310
-309
File diff suppressed because it is too large.
Load diff
+9
-5
@@ -8,10 +8,13 @@ window.initStyleGuide = function(init) {
|
||||
}
|
||||
// Add the tocDiv at the top.
|
||||
var title = document.getElementsByTagName('h1')[0];
|
||||
var toc = document.createElement('div');
|
||||
toc.id = 'tocDiv';
|
||||
toc.className = 'vertical_toc';
|
||||
title.parentNode.insertBefore(toc, title.nextSibling);
|
||||
var toc = document.querySelector('div#tocDiv');
|
||||
if (toc === null) {
|
||||
toc = document.createElement('div');
|
||||
toc.id = 'tocDiv';
|
||||
toc.className = 'vertical_toc';
|
||||
title.parentNode.insertBefore(toc, title.nextSibling);
|
||||
}
|
||||
|
||||
// If a paragraph starts with (e.g.) "Note:" or "Tip:" then add
|
||||
// that "callout class" to its element.
|
||||
@@ -42,7 +45,8 @@ window.initStyleGuide = function(init) {
|
||||
find('pre > code', function(code) {
|
||||
var pre = code.parentElement;
|
||||
// Internal HTML/CSS & TS style guides do not use prettyprint.
|
||||
if (code.classList.contains('language-css') ||
|
||||
if (code.classList.contains('language-cpp') ||
|
||||
code.classList.contains('language-css') ||
|
||||
code.classList.contains('language-django') ||
|
||||
code.classList.contains('language-html') ||
|
||||
code.classList.contains('language-ts')) {
|
||||
|
||||
@@ -449,6 +449,13 @@ pre.badcode {
|
||||
border-left: 1px inset #a03;
|
||||
}
|
||||
|
||||
pre.good,
|
||||
pre.goodcode {
|
||||
background-color: #e8fff6;
|
||||
border-top: 1px inset #0a3;
|
||||
border-left: 1px inset #0a3;
|
||||
}
|
||||
|
||||
.tip {
|
||||
background-color: #fffbd9;
|
||||
padding: 6px 8px 6px 10px;
|
||||
|
||||
Reference in new issue
Block a user