This commit is contained in:
Simon Vieille 2018-10-21 00:27:14 +02:00
commit d65d4834dd
Signed by: deblan
GPG Key ID: 03383D15A1D31745
2 changed files with 88 additions and 0 deletions

40
main.js Normal file
View File

@ -0,0 +1,40 @@
try {
(function() {
var inputs = document.querySelectorAll('input[type="text"], input[autofocus], input[placeholder]');
var inputsLength = inputs.length;
for (var u = 0; u < inputsLength; u++) {
inputs[u].blur();
}
var profile = document.querySelector('.profile');
if (profile) {
var currentTab = profile.querySelector('.menu a.item.active');
if (currentTab && currentTab.getAttribute('href').indexOf('tab=activity') !== -1) {
var feeds = profile.querySelector('.feeds');
var news = profile.querySelector('.feeds > .news');
if (feeds && news) {
var iframe = document.createElement('iframe');
iframe.setAttribute('class', 'gitnet-activity-iframe');
iframe.setAttribute('src', 'https://git.deblan.org/index2.php?username=' + document.querySelector('meta[property="og:title"]').getAttribute('content'));
iframe.setAttribute('frameborder', '0');
feeds.insertBefore(iframe, news);
}
}
}
var stylusInterval = window.setInterval(function() {
var stylus = document.querySelector('style.stylus');
if (stylus && !stylus.getAttribute('data-clean')) {
stylus.innerHTML = '';
stylus.setAttribute('data-clean', 1);
window.clearInterval(stylusInterval);
}
}, 100);
})();
} catch(e) {}

48
theme.css Normal file
View File

@ -0,0 +1,48 @@
.ui.top.menu {
color: #fff;
background: #2a2a2e;
}
.ui.top.menu i, .ui.top.menu .sr-mobile-only, .ui.top.menu .mobile-only {
color: #fff;
}
.ui.top.menu .dropdown .item i {
color: #333;
}
.ui.top.menu.main a {
color: #fff;
}
.ui.top.new-menu a.item.active, .ui.top.new-menu a.item:hover {
color: #333 !important;
background: none;
}
.ui.top.tabular a.item.active, .ui.top.tabular a.item:hover {
color: #333 !important;
background: none;
}
.ui.top.menu.main a.item.active, .ui.top.menu.main a.item:hover {
color: #fff !important;
background: #505058;
}
@media screen and (max-width: 767px) {
.header-wrapper .tabs .item.active {
border-bottom: 1px solid #D4D4D5;
border-radius: .28571429rem !important;
}
.gitnet-activity-iframe {
display: none;
}
}
.gitnet-activity-iframe {
border: 0;
width: 100%;
height: 110px;
}