Skip to content

Commit

Permalink
p3x-robot sunday release 2018-5-13 14:04:39
Browse files Browse the repository at this point in the history
  • Loading branch information
p3x-robot committed May 13, 2018
1 parent c7b185e commit 6f2153a
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ UrlToolkit {

---

[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.12
[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.13

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@



# 🤖 P3X Gitlist v1.1.12
# 🤖 P3X Gitlist v1.1.13

# Description

Expand Down Expand Up @@ -114,7 +114,7 @@ npm run watch

---

[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.12
[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.13

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion artifacts/php-7.2-ubuntu.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ sudo apt upgrade -y

---

[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.12
[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.13

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
2 changes: 1 addition & 1 deletion changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ require('codemirror/mode/yaml/yaml');

---

[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.12
[**GITLIST**](https://pages.corifeus.com/gitlist) Build v1.1.13

[![Like Corifeus @ Facebook](https://img.shields.io/badge/LIKE-Corifeus-3b5998.svg)](https://www.facebook.com/corifeus.software) [![Donate for Corifeus / P3X](https://img.shields.io/badge/Donate-Corifeus-003087.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=QZVM4V6HVZJW6) [![Contact Corifeus / P3X](https://img.shields.io/badge/Contact-P3X-ff9900.svg)](https://www.patrikx3.com/en/front/contact)

Expand Down
14 changes: 13 additions & 1 deletion src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,20 @@ public function __construct(Config $config, $root = null)
$twig->addFilter(new \Twig_SimpleFilter('format_size', array($app, 'formatSize')));
$twig->addFunction(new \Twig_SimpleFunction('avatar', array($app, 'getAvatar')));

$twig->addGlobal('theme', !isset($_COOKIE['gitlist-bootstrap-theme']) ? 'bootstrap-cosmo' : $_COOKIE['gitlist-bootstrap-theme']);
$currentTheme = !isset($_COOKIE['gitlist-bootstrap-theme']) ? 'bootstrap-cosmo' : $_COOKIE['gitlist-bootstrap-theme'];
$themeDark = [
'cyborg',
'darkly',
'slate',
'superhero',
];

$twig->addGlobal('theme_type', !in_array(substr($currentTheme, strlen('bootstrap-')), $themeDark) ? 'p3x-gitlist-light' : 'p3x-gitlist-dark');

$twig->addGlobal('theme', $currentTheme);


$twig->addGlobal('theme_dark', $themeDark);

$twig->addGlobal('version', $pkg['version']);
$twig->addGlobal('gitlist_date_format', $this['date.format']);
Expand Down
4 changes: 2 additions & 2 deletions twig/layout.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
<link rel="stylesheet" type="text/css" href="{{ app.url_subdir }}/webpack/style.css">
<link rel="stylesheet" type="text/css" href="{{ app.url_subdir }}/css/{{ theme }}.css" id="bootstrap-theme">

<script type="text/javascript">window.gitlist = { dark: [], isDark: undefined, viewer: undefined, setTheme: undefined, getThemeCookie: undefined, basepath: '{{ app.url_subdir }}', branch: '{{ branch }}', repo: '{{ repo }}', dateFormat: '{{ gitlist_date_format }}' }</script>
<script type="text/javascript">window.gitlist = { dark: {{ theme_dark |json_encode|raw }}, isDark: undefined, viewer: undefined, setTheme: undefined, getThemeCookie: undefined, basepath: '{{ app.url_subdir }}', branch: '{{ branch }}', repo: '{{ repo }}', dateFormat: '{{ gitlist_date_format }}' }</script>
<script src="{{ app.url_subdir }}/webpack/bundle.js"></script>

</head>

<body>
<body class="{{ theme_type }}">

{% block body %}{% endblock %}
{% block javascripts %}
Expand Down

0 comments on commit 6f2153a

Please sign in to comment.