History

add chuck logo on the left

terry feng committed 3 years ago

Commit c9bf4e61 parent 5614b4f1 file · +43 −9Browse files

Unified · Split

src/core/ulib_doc.cpp+43−9
@@ -305,8 +305,13 @@ public: · 304 unmodified lines
305305 {
306306 m_outputStr += "<a name=\"top\"/>\n";
307307 m_outputStr += "<div id=\"title\">\n";
308− m_outputStr += "<div class=\"titleL\"><h1><a href=\"./\">ChucK Class Library Reference</a></h1></div>\n";
309− m_outputStr += "<div class=\"titleR\"><h1>&nbsp;&nbsp;<span style=\"color:black\">/</span>&nbsp;&nbsp;" + m_title + "</h1></div>\n";
308+ m_outputStr += "<div class=\"titleL\">\n";
309+ m_outputStr += "<div style=\"display: flex; align-items: center;\">";
310+ m_outputStr += "<div class=\"inline titlelogo\"><a href=\"https://chuck.stanford.edu/\" target=\"_blank\"><img src=\"https://chuck.stanford.edu/doc/images/chuck-logo2023w.png\" /> </div>";
311+ m_outputStr += "<div class=\"inline\"><h1><a href=\"./\">ChucK Class Library Reference</a></h1></div>\n";
312+ m_outputStr += "<div class=\"inline gray\"><h1>&nbsp;&nbsp;<span style=\"color:black\">/</span>&nbsp;&nbsp;" + m_title + "</h1></div>\n";
313+ m_outputStr += "</div>\n";
314+ m_outputStr += "</div>\n";
310315 m_outputStr += "</div>\n"; // #title
311316 }
312317
@@ -662,8 +667,12 @@ string CKDocHTMLOutput::renderIndex( const string & title, const vector<CKDocGro · 349 unmodified lines
662667 sout << "</head>\n";
663668 sout << "<body>\n";
664669 sout << "<div id=\"title\">\n";
665− sout << "<div class=\"titleL\"><h1>" << title << "</h1></div>\n";
666− sout << "<div class=\"titleR\"><h1>&nbsp;</h1></div>\n";
670+ sout << "<div class=\"titleL\">\n";
671+ sout << "<div style=\"display: flex; align-items: center;\">";
672+ sout << "<div class=\"inline titlelogo\"><a href=\"https://chuck.stanford.edu/\" target=\"_blank\"><img src=\"https://chuck.stanford.edu/doc/images/chuck-logo2023w.png\" /> </div>";
673+ sout << "<div class=\"inline\"><h1>" << title << "</h1></div>\n";
674+ sout << "</div>\n";
675+ sout << "</div>\n";
667676 sout << "</div>\n";
668677 sout << "<div id=\"body\">\n";
669678
@@ -1705,7 +1714,7 @@ a\n\ · 1035 unmodified lines
17051714 left: 0;\n\
17061715 right: 0;\n\
17071716 border-bottom: 1px solid black;\n\
1708− padding: 1em 2em;\n\
1717+ padding: 0.5em 2em;\n\
17091718 margin-bottom: 1.5em;\n\
17101719 background-color: white;\n\
17111720 float: left;\n\
@@ -1716,15 +1725,40 @@ a\n\ · 4 unmodified lines
17161725 {\n\
17171726 float: left;\n\
17181727 width: auto;\n\
1719− clear: none;\n\
1728+ /* vertically center */\n\
1729+ line-height: 48px;\n\
1730+ height: 48px;\n\
17201731 }\n\
17211732 \n\
1733+.gray\n\
1734+{\n\
1735+ color: gray;\n\
1736+}\n\
1737+\n\
1738+.inline\n\
1739+{\n\
1740+ display: inline;\n\
1741+}\n\
1742+\n\
1743+\n\
17221744 .titleR\n\
17231745 {\n\
1724− /* float: right; */\n\
1725− width: auto;\n\
1746+ float: right;\n\
1747+ width: initial;\n\
17261748 clear: none;\n\
1727− color: gray;\n\
1749+}\n\
1750+\n\
1751+.titleLogo\n\
1752+{\n\
1753+ width: 48px;\n\
1754+ height: 48px;\n\
1755+ padding-right: 8px;\n\
1756+}\n\
1757+\n\
1758+.titleLogo img\n\
1759+{\n\
1760+ width: 48px;\n\
1761+ height: 48px;\n\
17281762 }\n\
17291763 \n\
17301764 h1\n\

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t