Skip to content

Commit

Permalink
Merge pull request #15 from twisterarmy/theme-nin-original
Browse files Browse the repository at this point in the history
Theme nin original
  • Loading branch information
D4708 committed May 9, 2021
2 parents 04eeb07 + 4eb5c10 commit 0155fae
Show file tree
Hide file tree
Showing 53 changed files with 8,832 additions and 2 deletions.
6 changes: 6 additions & 0 deletions js/interface_common.js
Original file line number Diff line number Diff line change
Expand Up @@ -2747,6 +2747,12 @@ function changeStyle() {
// we use .ajax because .getScript requires 'unsafe-inline' CSP rule for now, see https://github.com/jquery/jquery/issues/3969
$.ajax({dataType: 'text', url: 'theme_nin/js/theme_option.js'})
.done(function(res) {eval(res);});
} else if (theme === 'nin_original') {
theme = 'nin'; // related to native theme in class definitions, so easiest way to integrate original version
style = 'theme_nin_original/css/style.css';
profile = 'theme_nin_original/css/profile.css';
$.ajax({dataType: 'text', url: 'theme_nin_original/js/theme_option.js'})
.done(function(res) {eval(res);});
} else if (theme === 'calm') {
style = 'theme_calm/css/style.css';
profile = 'theme_calm/css/profile.css';
Expand Down
16 changes: 14 additions & 2 deletions js/twister_io.js
Original file line number Diff line number Diff line change
Expand Up @@ -425,8 +425,20 @@ function getAvatar(peerAlias, img) {
return;

if (peerAlias === 'nobody') {
img.attr('src', ($.Options.theme.val === 'nin') ?
'theme_nin/img/tornado_avatar.png' : 'img/tornado_avatar.png');

var avatar = 'img/tornado_avatar.png';

switch ($.Options.theme.val) {
case 'nin':
avatar = 'theme_nin/img/tornado_avatar.png';
break;
case 'nin_original':
avatar = 'theme_nin_original/img/tornado_avatar.png';
break;
}

img.attr('src', avatar);

return;
}

Expand Down
Binary file added theme_nin_original/css/Symbola.ttf
Binary file not shown.
Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions theme_nin_original/css/fonts/fontello/fontello.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 0155fae

Please sign in to comment.