Рефакторинг doxygen, настройа скриптов
This commit is contained in:
@@ -11,6 +11,8 @@ CTestTestfile.cmake
|
||||
_deps
|
||||
CMakeUserPresets.json
|
||||
docs
|
||||
inject.sh
|
||||
|
||||
|
||||
# CLion
|
||||
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
||||
|
||||
@@ -68,7 +68,7 @@ PROJECT_LOGO =
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY =/var/www/neurox.su/docs/
|
||||
OUTPUT_DIRECTORY =/var/www/neurox.su/docs
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create up to 4096
|
||||
# sub-directories (in 2 levels) under the output directory of each output format
|
||||
@@ -1136,7 +1136,7 @@ INPUT_FILTER =
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
FILTER_PATTERNS =*.md=cat
|
||||
|
||||
# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
|
||||
# INPUT_FILTER) will also be used to filter the input files that are used for
|
||||
@@ -1407,7 +1407,9 @@ HTML_EXTRA_STYLESHEET =doxy/extra.css
|
||||
# files will be copied as-is; there are no commands or markers available.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_EXTRA_FILES =
|
||||
HTML_EXTRA_FILES =doxy/fragment_copy.svg,\
|
||||
doxy/jsinject.js,\
|
||||
doxy/injectresize.js
|
||||
|
||||
# The HTML_COLORSTYLE tag can be used to specify if the generated HTML output
|
||||
# should be rendered with a dark or light theme.
|
||||
|
||||
+9
-4
@@ -1,6 +1,4 @@
|
||||
body {
|
||||
width:80vw;
|
||||
margin:auto;
|
||||
background-color: #202028;
|
||||
color:#ccd;
|
||||
}
|
||||
@@ -16,8 +14,11 @@ h3 {
|
||||
h4 {
|
||||
color:#ddc;
|
||||
}
|
||||
#side-nav {
|
||||
margin-left: 10vw;
|
||||
h5 {
|
||||
color:#ddc;
|
||||
}
|
||||
h6 {
|
||||
color:#ddc;
|
||||
}
|
||||
#projectname {
|
||||
color: #d8f;
|
||||
@@ -32,3 +33,7 @@ h4 {
|
||||
font-weight: normal;
|
||||
font-weight: bold;
|
||||
}
|
||||
summary {
|
||||
font-weight: bold;
|
||||
color: #ddc;
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor"><path d="M10.4.5c1.963 0 2.946 0 3.667.442a3 3 0 0 1 .99.99c.443.722.443 1.704.443 3.668v.8l-.007 1.301c-.02 1.139-.104 1.826-.435 2.367l-.097.149c-.236.338-.54.625-.894.842l-.138.078c-.52.267-1.186.338-2.229.357l-.206.001v.205c-.022 1.139-.105 1.826-.436 2.367a2.999 2.999 0 0 1-.99.99c-.542.332-1.23.415-2.368.436l-1.3.007h-.8c-1.841 0-2.82 0-3.529-.364l-.138-.078a2.999 2.999 0 0 1-.894-.842l-.097-.149C.611 13.527.528 12.84.507 11.7L.5 10.4v-.8c0-1.841 0-2.82.364-3.529l.078-.138a3 3 0 0 1 .842-.894l.149-.097c.572-.35 1.31-.422 2.572-.437.014-1.163.075-1.88.36-2.434l.077-.138a3 3 0 0 1 .842-.894l.149-.097C6.654.5 7.636.5 9.6.5h.8zM5.6 5.8c-1.007 0-1.672.002-2.177.05-.486.046-.69.126-.812.2a1.7 1.7 0 0 0-.56.561c-.075.122-.155.326-.201.812-.048.505-.05 1.17-.05 2.177v.8c0 1.007.002 1.672.05 2.177.046.486.126.69.2.812.14.228.333.42.561.56.122.075.326.155.812.201.505.048 1.17.05 2.177.05h.8c1.007 0 1.672-.002 2.177-.05.486-.046.69-.126.812-.2a1.7 1.7 0 0 0 .56-.561c.075-.122.155-.326.201-.812.048-.505.05-1.17.05-2.177v-.8c0-1.007-.002-1.672-.05-2.177-.046-.486-.126-.69-.2-.812a1.7 1.7 0 0 0-.561-.56c-.122-.075-.326-.155-.812-.201-.505-.048-1.17-.05-2.177-.05h-.8zm4-4c-1.007 0-1.672.002-2.177.05-.486.046-.69.126-.812.2a1.7 1.7 0 0 0-.56.561c-.075.122-.155.326-.201.812-.028.293-.039.64-.044 1.077H6.4l1.3.007c1.139.02 1.826.104 2.367.435.404.248.743.587.99.99.443.722.443 1.704.443 3.668v.592a13.38 13.38 0 0 0 1.076-.04c.486-.047.69-.127.812-.202a1.71 1.71 0 0 0 .561-.561c.075-.122.155-.326.201-.812.048-.505.05-1.17.05-2.177v-.8c0-1.007-.002-1.672-.05-2.177-.046-.486-.126-.69-.2-.812a1.7 1.7 0 0 0-.562-.56c-.122-.075-.326-.155-.812-.201-.505-.048-1.17-.05-2.177-.05h-.8z"></path></svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
@@ -0,0 +1,157 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var once=1;
|
||||
function initResizable()
|
||||
{
|
||||
var cookie_namespace = 'doxygen';
|
||||
var sidenav,navtree,content,header,barWidth=6,desktop_vp=768,titleHeight;
|
||||
|
||||
function readSetting(cookie)
|
||||
{
|
||||
if (window.chrome) {
|
||||
var val = localStorage.getItem(cookie_namespace+'_width');
|
||||
if (val) return val;
|
||||
} else {
|
||||
var myCookie = cookie_namespace+"_"+cookie+"=";
|
||||
if (document.cookie) {
|
||||
var index = document.cookie.indexOf(myCookie);
|
||||
if (index != -1) {
|
||||
var valStart = index + myCookie.length;
|
||||
var valEnd = document.cookie.indexOf(";", valStart);
|
||||
if (valEnd == -1) {
|
||||
valEnd = document.cookie.length;
|
||||
}
|
||||
var val = document.cookie.substring(valStart, valEnd);
|
||||
return val;
|
||||
}
|
||||
}
|
||||
}
|
||||
return 250;
|
||||
}
|
||||
|
||||
function writeSetting(cookie, val)
|
||||
{
|
||||
if (window.chrome) {
|
||||
localStorage.setItem(cookie_namespace+"_width",val);
|
||||
} else {
|
||||
var date = new Date();
|
||||
date.setTime(date.getTime()+(10*365*24*60*60*1000)); // default expiration is one week
|
||||
expiration = date.toGMTString();
|
||||
document.cookie = cookie_namespace + "_" + cookie + "=" + val + "; SameSite=Lax; expires=" + expiration+"; path=/";
|
||||
}
|
||||
}
|
||||
|
||||
function resizeWidth()
|
||||
{
|
||||
var windowWidth = $(window).width() + "px";
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
content.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
footer.css({marginLeft:parseInt(sidenavWidth)+"px"});
|
||||
}
|
||||
writeSetting('width',sidenavWidth-barWidth);
|
||||
}
|
||||
|
||||
function restoreWidth(navWidth)
|
||||
{
|
||||
if (visualViewport.width > visualViewport.height) {
|
||||
var windowWidth = $(window).width() + "px";
|
||||
content.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
if (typeof page_layout!=='undefined' && page_layout==1) {
|
||||
footer.css({marginLeft:parseInt(navWidth)+barWidth+"px"});
|
||||
}
|
||||
sidenav.css({width:navWidth + "px"});
|
||||
}
|
||||
}
|
||||
|
||||
function resizeHeight()
|
||||
{
|
||||
var headerHeight = header.outerHeight();
|
||||
var footerHeight = footer.outerHeight();
|
||||
var windowHeight = $(window).height();
|
||||
var contentHeight,navtreeHeight,sideNavHeight;
|
||||
if (typeof page_layout==='undefined' || page_layout==0) { /* DISABLE_INDEX=NO */
|
||||
contentHeight = windowHeight - headerHeight - footerHeight;
|
||||
navtreeHeight = contentHeight;
|
||||
sideNavHeight = contentHeight;
|
||||
} else if (page_layout==1) { /* DISABLE_INDEX=YES */
|
||||
contentHeight = windowHeight - footerHeight;
|
||||
navtreeHeight = windowHeight - headerHeight;
|
||||
sideNavHeight = windowHeight;
|
||||
}
|
||||
content.css({height:contentHeight + "px"});
|
||||
navtree.css({height:navtreeHeight + "px"});
|
||||
sidenav.css({height:sideNavHeight + "px"});
|
||||
if (location.hash.slice(1)) {
|
||||
(document.getElementById(location.hash.slice(1))||document.body).scrollIntoView();
|
||||
}
|
||||
}
|
||||
|
||||
function collapseExpand()
|
||||
{
|
||||
var newWidth;
|
||||
if (sidenav.width()>0) {
|
||||
newWidth=0;
|
||||
}
|
||||
else {
|
||||
var width = readSetting('width');
|
||||
newWidth = (width>250 && width<$(window).width()) ? width : 250;
|
||||
}
|
||||
restoreWidth(newWidth);
|
||||
var sidenavWidth = $(sidenav).outerWidth();
|
||||
writeSetting('width',sidenavWidth-barWidth);
|
||||
}
|
||||
|
||||
header = $("#top");
|
||||
sidenav = $("#side-nav");
|
||||
content = $("#doc-content");
|
||||
navtree = $("#nav-tree");
|
||||
footer = $("#nav-path");
|
||||
$(".side-nav-resizable").resizable({resize: function(e, ui) { resizeWidth(); } });
|
||||
$(sidenav).resizable({ minWidth: 0 });
|
||||
$(window).resize(function() { resizeHeight(); });
|
||||
var device = navigator.userAgent.toLowerCase();
|
||||
var touch_device = device.match(/(iphone|ipod|ipad|android)/);
|
||||
if (touch_device) { /* wider split bar for touch only devices */
|
||||
$(sidenav).css({ paddingRight:'20px' });
|
||||
$('.ui-resizable-e').css({ width:'20px' });
|
||||
$('#nav-sync').css({ right:'34px' });
|
||||
barWidth=20;
|
||||
}
|
||||
var width = readSetting('width');
|
||||
if (width) { restoreWidth(width); } else { resizeWidth(); }
|
||||
resizeHeight();
|
||||
var url = location.href;
|
||||
var i=url.indexOf("#");
|
||||
if (i>=0) window.location.hash=url.substr(i);
|
||||
var _preventDefault = function(evt) { evt.preventDefault(); };
|
||||
$("#splitbar").bind("dragstart", _preventDefault).bind("selectstart", _preventDefault);
|
||||
if (once) {
|
||||
$(".ui-resizable-handle").dblclick(collapseExpand);
|
||||
once=0
|
||||
}
|
||||
$(window).on('load',resizeHeight);
|
||||
}
|
||||
/* @license-end */
|
||||
@@ -0,0 +1,41 @@
|
||||
var isInMobile = false;
|
||||
|
||||
// Создаём экземпляр ResizeObserver с функцией-колбэком
|
||||
const jsinjectObserver = new ResizeObserver((entries) => {
|
||||
for (let entry of entries) {
|
||||
const rect = entry.contentRect; // Размеры контентной области
|
||||
console.log('Новые размеры:', rect.width, 'x', rect.height);
|
||||
|
||||
if (isInMobile) {
|
||||
// Здесь можно выполнять любые действия при изменении размера
|
||||
entry.target.style.borderColor = `hsl(${rect.width % 360}, 50%, 50%)`;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Начинаем наблюдение за конкретным элементом
|
||||
const jsSideNav = document.querySelector('.side-nav');
|
||||
jsinjectObserver.observe(jsSideNav);
|
||||
|
||||
|
||||
function jsinject_init() {
|
||||
let navy = document.getElementById('side-nav');
|
||||
if (visualViewport.width < visualViewport.height) {
|
||||
document.body.style.width = '100%';
|
||||
navy.style.width = '6px';
|
||||
navy.onclick = (function () {
|
||||
if (navy.clientWidth > 6) {
|
||||
navy.style.width = 6;
|
||||
}
|
||||
else {
|
||||
navy.style.width = document.body.clientWidth + 'px';
|
||||
}
|
||||
});
|
||||
isInMobile = true;
|
||||
}
|
||||
else {
|
||||
document.body.style.width = '80%';
|
||||
document.body.style.margin = 'auto';
|
||||
navy.style.left = document.body.clientLeft + 'px';
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user