Skip to content

Instantly share code, notes, and snippets.

@bachmeil
Last active March 19, 2020 19:23
Show Gist options
  • Save bachmeil/597f2aa611b81cda3a4923246072afd0 to your computer and use it in GitHub Desktop.
Save bachmeil/597f2aa611b81cda3a4923246072afd0 to your computer and use it in GitHub Desktop.
Fossil skin
@import url('https://fonts.googleapis.com/css?family=Roboto&display=swap');
body {
margin: 0 auto;
background-color: white;
font-family: sans-serif;
font-size:14pt;
-moz-text-size-adjust: none;
-webkit-text-size-adjust: none;
-mx-text-size-adjust: none;
}
a {
color: #4183C4;
text-decoration: none;
}
a:hover {
color: #4183C4;
text-decoration: underline;
}
div.forumPosts a:visited {
color: #6A7F94;
}
hr {
color: #eee;
}
.title {
color: #4183C4;
float:left;
font-family: Ubuntu Mono, Consolas, Menlo;
}
.title h1 {
display:inline;
}
.title h1:after {
content: " / ";
color: #777;
font-weight: normal;
}
.content h1 {
font-size: 1.25em;
}
.content h2 {
font-size: 1.15em;
}
.content h3 {
font-size: 1.05em;
font-weight: bold;
}
.section {
font-size: 1em;
font-weight: bold;
background-color: #f5f5f5;
border: 1px solid #d8d8d8;
border-radius: 3px 3px 0 0;
padding: 9px 10px 10px;
margin: 10px 0;
}
.sectionmenu {
border: 1px solid #d8d8d8;
border-radius: 0 0 3px 3px;
border-top: 0;
margin-top: -10px;
margin-bottom: 10px;
padding: 10px;
}
.sectionmenu a {
display: inline-block;
margin-right: 1em;
}
.status {
float:right;
font-size:1em;
font-family: Ubuntu Mono;
padding-top: 7 px;
}
.mainmenu {
font-size:.8em;
clear:both;
/*background:#eaeaea linear-gradient(#fafafa, #eaeaea) repeat-x;*/
/* border:1px solid #eaeaea; */
border-radius:0px;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
z-index: 21; /* just above hbdrop */
border-bottom: 2px solid gray;
/* border-top: 2px solid; */
}
.mainmenu a {
text-decoration:none;
color: #777;
/*border-right:1px solid #eaeaea;*/
}
.mainmenu a.active {
color: brown;
border-bottom:2px solid #D26911;
/* border-right: 1px solid;
border-left: 1px solid; */
background-color: #d4e3b23d;
}
.mainmenu a:hover {
color: orange;
}
div#hbdrop {
background-color: white;
border: 1px solid black;
border-top: white;
border-radius: 0 0 0.5em 0.5em;
display: none;
font-size: 80%;
left: 2em;
width: 90%;
padding-right: 1em;
position: absolute;
z-index: 20; /* just below mainmenu, but above timeline bubbles */
}
.submenu {
font-size: .7em;
padding: 10px;
/*border-bottom: 1px solid #ccc;*/
}
.submenu a, .submenu label {
padding: 10px 11px;
text-decoration:none;
color: #777;
}
.submenu a:hover, .submenu label:hover {
padding: 6px 10px;
border: 1px solid #ccc;
border-radius: 5px;
color: #000;
}
/* 14pt looks nice, 12pt is even nicer, but they're too small for me!
I use 16pt for readability, but I think most people will want 12 or 14 */
.content {
padding-top: 10px;
font-size:14pt;
color: #444;
max-width: 800px;
margin: auto;
font-family: "Roboto", Arial, Helvetica, sans-serif;
}
.udiff, .sbsdiff {
font-size: .85em !important;
overflow: auto;
border: 1px solid #ccc;
border-radius: 5px;
}
.content blockquote {
padding: 0 15px;
}
div.forumHierRoot blockquote, div.forumHier blockquote, div.forumEdit blockquote {
background-color: rgba(65, 131, 196, 0.1);
border-left: 3px solid #254769;
padding: .1em 1em;
}
table.report {
cursor: auto;
border-radius: 5px;
border: 1px solid #ccc;
margin: 1em 0;
}
.report td, .report th {
border: 0;
font-size: .8em;
padding: 10px;
}
.report td:first-child {
border-top-left-radius: 5px;
}
.report tbody tr:last-child td:first-child {
border-bottom-left-radius: 5px;
}
.report td:last-child {
border-top-right-radius: 5px;
}
.report tbody tr:last-child {
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
}
.report tbody tr:last-child td:last-child {
border-bottom-right-radius: 5px;
}
.report th {
cursor: pointer;
}
.report thead+tbody tr:hover {
background-color: #f5f9fc !important;
}
td.tktDspLabel {
width: 70px;
text-align: right;
overflow: hidden;
}
td.tktDspValue {
text-align: left;
vertical-align: top;
background-color: #f8f8f8;
border: 1px solid #ccc;
}
td.tktDspValue pre {
white-space: pre-wrap;
}
span.timelineDetail {
font-size: 90%;
}
.footer {
border-top: 1px solid #ccc;
padding: 10px;
font-size:.7em;
margin-top: 10px;
color: #ccc;
}
div.timelineDate {
font-weight: bold;
white-space: nowrap;
}
span.submenuctrl, span.submenuctrl input, select.submenuctrl {
color: #777;
}
span.submenuctrl {
white-space: nowrap;
}
div.submenu label {
white-space: nowrap;
}
@media screen and (max-width: 600px) {
/* Spacing for mobile */
body {
padding-left: 4px;
padding-right: 4px;
}
.title {
padding-top: 0px;
padding-bottom: 0px;
}
.status {padding-top: 0px;}
.mainmenu a {
padding: 10px 10px;
}
.mainmenu {
padding: 10px;
}
.desktoponly {
display: none;
}
}
@media screen and (min-width: 600px) {
/* Spacing for desktop */
body {
padding-left: 20px;
padding-right: 20px;
}
.title {
padding-top: 10px;
padding-bottom: 10px;
}
.status {padding-top: 7px;}
.mainmenu a {
padding: 10px 20px;
}
.mainmenu {
padding: 10px;
padding-top: 18px;
}
}
@media screen and (max-width: 1200px) {
/* Special declarations for narrow desktop or wide mobile */
.wideonly {
display: none;
}
}
textarea {
font-family: mono;
font-size: 16pt;
border: 1px solid gray;
border-radius: 6px;
padding: 12px;
width: 760px;
}
th {
font-weight: normal;
padding: 8px;
text-align: left;
}
input[type=text] {
border: 1px solid gray;
border-radius: 3px;
padding: 4px;
}
input[type=submit] {
border: 1px solid black;
border-radius: 6px;
padding: 6px;
}
input[type=submit]:hover {
border-color: blue;
}
div.forumSel {
background-color: #f0f9f9;
padding: 10px;
}
timeline-arrowheads: 1
timeline-circle-nodes: 1
timeline-color-graph-lines: 1
white-foreground: 0
<div class="header">
<div class="title"><b>$<project_name>:</b> $<title></div>
<div class="status"><th1>
if {[info exists login]} {
html "Logged in as: $login — <a href='$home/login'>Logout</a>\n"
} else {
html "<a href='$home/login'>Login</a>\n"
}
</th1></div>
</div>
<div class="mainmenu">
<th1>
proc menulink {url name cls} {
upvar current_page current
upvar home home
if {[string range $url 0 [string length $current]] eq "/$current"} {
html "<a href='$home$url' class='active $cls'>$name</a>\n"
} else {
html "<a href='$home$url' class='$cls'>$name</a>\n"
}
}
html "<a id='hbbtn' href='sitemap'>&#10070;</a>"
menulink $index_page Home {}
if {[anycap jor]} {
menulink /timeline Timeline {}
}
if {[hascap oh]} {
menulink /dir?ci=tip Files desktoponly
}
if {[hascap o]} {
menulink /brlist Branches desktoponly
menulink /taglist Tags wideonly
}
if {[anycap 23456] || [anoncap 2] || [anoncap 3]} {
menulink /forum Forum wideonly
}
if {[hascap r]} {
menulink /tktnew New wideonly
}
if {[hascap r]} {
menulink /rptview Tickets wideonly
}
if {[hascap j]} {
menulink /wcontent Wiki wideonly
}
if {[hascap s]} {
menulink /setup Admin {}
} elseif {[hascap a]} {
menulink /setup_ulist Users {}
}
</th1></div>
<div id='hbdrop'></div>
(function() {
var hbButton = document.getElementById("hbbtn");
if (!hbButton) return;
if (!document.addEventListener) {
hbButton.href = "$home/sitemap";
return;
}
var panel = document.getElementById("hbdrop");
if (!panel) return;
if (!panel.style) return;
var panelBorder = panel.style.border;
var panelInitialized = false;
var panelResetBorderTimerID = 0;
var animate = panel.style.transition !== null && (typeof(panel.style.transition) == "string");
var animMS = panel.getAttribute("data-anim-ms");
if (animMS) {
animMS = parseInt(animMS);
if (isNaN(animMS) || animMS == 0)
animate = false;
else if (animMS < 0)
animMS = 400;
}
else
animMS = 400;
var panelHeight;
function calculatePanelHeight() {
panel.style.maxHeight = '';
var es = window.getComputedStyle(panel),
edis = es.display,
epos = es.position,
evis = es.visibility;
panel.style.visibility = 'hidden';
panel.style.position = 'absolute';
panel.style.display = 'block';
panelHeight = panel.offsetHeight + 'px';
panel.style.display = edis;
panel.style.position = epos;
panel.style.visibility = evis;
}
function showPanel() {
if (panelResetBorderTimerID) {
clearTimeout(panelResetBorderTimerID);
panelResetBorderTimerID = 0;
}
if (animate) {
if (!panelInitialized) {
panelInitialized = true;
calculatePanelHeight();
panel.style.transition = 'max-height ' + animMS +
'ms ease-in-out';
panel.style.overflowY = 'hidden';
panel.style.maxHeight = '0';
}
setTimeout(function() {
panel.style.maxHeight = panelHeight;
panel.style.border = panelBorder;
}, 40);
}
panel.style.display = 'block';
document.addEventListener('keydown',panelKeydown,true);
document.addEventListener('click',panelClick,false);
}
var panelKeydown = function(event) {
var key = event.which || event.keyCode;
if (key == 27) {
event.stopPropagation();
panelToggle(true);
}
};
var panelClick = function(event) {
if (!panel.contains(event.target)) {
panelToggle(true);
}
};
function panelShowing() {
if (animate) {
return panel.style.maxHeight == panelHeight;
}
else {
return panel.style.display == 'block';
}
}
function hasChildren(element) {
var childElement = element.firstChild;
while (childElement) {
if (childElement.nodeType == 1)
return true;
childElement = childElement.nextSibling;
}
return false;
}
window.addEventListener('resize',function(event) {
panelInitialized = false;
},false);
hbButton.addEventListener('click',function(event) {
event.stopPropagation();
event.preventDefault();
panelToggle(false);
},false);
function panelToggle(suppressAnimation) {
if (panelShowing()) {
document.removeEventListener('keydown',panelKeydown,true);
document.removeEventListener('click',panelClick,false);
if (animate) {
if (suppressAnimation) {
var transition = panel.style.transition;
panel.style.transition = '';
panel.style.maxHeight = '0';
panel.style.border = 'none';
setTimeout(function() {
panel.style.transition = transition;
}, 40);
}
else {
panel.style.maxHeight = '0';
panelResetBorderTimerID = setTimeout(function() {
panel.style.border = 'none';
panelResetBorderTimerID = 0;
}, animMS);
}
}
else {
panel.style.display = 'none';
}
}
else {
if (!hasChildren(panel)) {
var xhr = new XMLHttpRequest();
xhr.onload = function() {
var doc = xhr.responseXML;
if (doc) {
var sm = doc.querySelector("ul#sitemap");
if (sm && xhr.status == 200) {
panel.innerHTML = sm.outerHTML;
showPanel();
}
}
}
xhr.open("GET", "$home/sitemap?popup");
xhr.responseType = "document";
xhr.send();
}
else {
showPanel();
}
}
}
})();
<script nonce="$nonce">
MathJax = {
tex: {
inlineMath: [['$', '$'], ['$$', '$$']]
},
svg: {
fontCache: 'global'
}
};
</script>
<script nonce="$nonce" type="text/javascript" id="MathJax-script" async
src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js">
</script>
@bachmeil
Copy link
Author

You need to add the nonce thing for Javascript to execute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment