[geany/www.geany.org] c576dc: Hack: add a temporary color scheme switcher
Enrico Tröger
git-noreply at xxxxx
Sat Jun 1 10:26:45 UTC 2019
Branch: refs/heads/color-fun
Author: Enrico Tröger <enrico.troeger at uvena.de>
Committer: Enrico Tröger <enrico.troeger at uvena.de>
Date: Sat, 01 Jun 2019 10:26:45 UTC
Commit: c576dc2319ca5b913926e4db3843ba8ef1f9d74b
https://github.com/geany/www.geany.org/commit/c576dc2319ca5b913926e4db3843ba8ef1f9d74b
Log Message:
-----------
Hack: add a temporary color scheme switcher
Modified Paths:
--------------
geany/static/css/geany-theme-blue-default.css
geany/static/css/geany-theme-yellow-b4n.css
geany/static/css/geany-theme-yellow-eht16.css
geany/static/css/geany-theme-yellow-gmail.css
geany/templates/skel.html
Modified: geany/static/css/geany-theme-blue-default.css
36 lines changed, 36 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,36 @@
+/* buttons */
+.btn-primary {
+ color: rgb(255, 255, 255);
+ background-color: rgb(66, 139, 202);
+ border-color: rgb(53, 126, 189);
+}
+.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
+ color: rgb(255, 255, 255);
+ background-color:rgb(48, 113, 169);
+ border-color:rgb(40, 94, 142);
+}
+
+/* links */
+a {
+ color: rgb(66, 139, 202);
+}
+a:hover, a:focus {
+ color: rgb(42, 100, 150);
+}
+a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active {
+ border-color: rgb(42, 100, 150);
+}
+
+/* code block*/
+code {
+ color: rgb(66, 139, 202);
+}
+pre {
+ color: rgb(66, 139, 202);
+}
+
+/* homepage icons */
+.feature-icon span {
+ color: white;
+ background-color: rgb(50, 118, 177);
+}
Modified: geany/static/css/geany-theme-yellow-b4n.css
35 lines changed, 35 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,35 @@
+/* buttons */
+.btn-primary {
+ color: black; /* for more readability */
+ background-color: #F5DA2F;
+ border-color: #F0C404;
+}
+.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
+ color: black;
+ background-color:#F0C404;
+ border-color:#F0C404
+}
+
+/* links */
+a {
+ color: #F0AD04;
+}
+a:hover, a:focus {
+ color: #F5DA2F;
+}
+a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active {
+ border-color: #F5DA2F;
+}
+
+/* code block*/
+code {
+ color: #F0AD04;
+}
+pre {
+ color: #F0AD04;
+}
+
+/* homepage icons */
+.feature-icon span {
+ background-color: #F5DA2F;
+}
Modified: geany/static/css/geany-theme-yellow-eht16.css
41 lines changed, 41 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,41 @@
+/*
+ * Main link color: #C8B407 rgb(200, 180, 7)
+ *
+ * Alternate color (borders, background, ...): #8A7C00 rgb(138, 124, 0)
+ */
+
+/* buttons */
+.btn-primary {
+ background-color: rgb(138, 124, 0);
+ border-color: rgb(200, 180, 7);
+ color: rgb(0, 0, 0);
+}
+.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
+ background-color: rgb(200, 180, 7);
+ border-color: rgb(138, 124, 0);
+ color: rgb(0, 0, 0);
+}
+
+/* links */
+a {
+ color: rgb(138, 124, 0);
+}
+a:hover, a:focus {
+ color: rgb(200, 180, 7);
+}
+a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active {
+ border-color: rgb(200, 180, 7);
+}
+
+/* code block*/
+code {
+ color: rgb(138, 124, 0);
+}
+pre {
+ color: rgb(138, 124, 0);
+}
+
+/* homepage icons */
+.feature-icon span {
+ background-color: rgb(200, 180, 7);
+}
Modified: geany/static/css/geany-theme-yellow-gmail.css
41 lines changed, 41 insertions(+), 0 deletions(-)
===================================================================
@@ -0,0 +1,41 @@
+/*
+ * Main link color: #ffb302 rgb(255, 179, 2)
+ *
+ * Alternate color (borders, background, ...): #D29300 rgb(210, 147, 0)
+ */
+
+/* buttons */
+.btn-primary {
+ background-color: rgb(210, 147, 0);
+ border-color: rgb(255, 179, 2);
+ color: rgb(0, 0, 0);
+}
+.btn-primary:hover, .btn-primary:focus, .btn-primary:active, .btn-primary.active, .open > .dropdown-toggle.btn-primary {
+ background-color: rgb(255, 179, 2);
+ border-color: rgb(210, 147, 0);
+ color: rgb(0, 0, 0);
+}
+
+/* links */
+a {
+ color: rgb(210, 147, 0);
+}
+a:hover, a:focus {
+ color: rgb(255, 179, 2);
+}
+a.thumbnail:hover, a.thumbnail:focus, a.thumbnail.active {
+ border-color: rgb(255, 179, 2);
+}
+
+/* code block*/
+code {
+ color: rgb(210, 147, 0);
+}
+pre {
+ color: rgb(210, 147, 0);
+}
+
+/* homepage icons */
+.feature-icon span {
+ background-color: rgb(255, 179, 2);
+}
Modified: geany/templates/skel.html
49 lines changed, 48 insertions(+), 1 deletions(-)
===================================================================
@@ -17,6 +17,12 @@
<link rel="stylesheet" href="{% static "css/bootstrap.css" %}">
<link rel="stylesheet" href="{% static "css/main.css" %}">
<link rel="stylesheet" type="text/css" href="{% static "css/pygments.css" %}">
+
+<link rel="stylesheet" href="{% static "css/geany-theme-blue-default.css" %}" title="default" id="stylesheet">
+<link rel="alternate stylesheet" href="{% static "css/geany-theme-yellow-b4n.css" %}" title="yellow-b4n">
+<link rel="alternate stylesheet" href="{% static "css/geany-theme-yellow-eht16.css" %}" title="yellow-eht16">
+<link rel="alternate stylesheet" href="{% static "css/geany-theme-yellow-gmail.css" %}" title="yellow-gmail">
+
{% block extra_css %}{% endblock %}
{% endcompress %}
@@ -67,7 +73,48 @@
{% include "includes/footer_scripts.html" %}
-{% block footer_js %}{% endblock %}
+{% block footer_js %}
+<script>
+
+ $(document).ready(function () {
+ colorFunDropdown = `
+ <!-- start color fun -->
+ <li class="dropdown">
+ <a href="/contribute/" class="dropdown-toggle" data-toggle="dropdown">
+ Color fun
+ <span class="caret"></span></a>
+ <ul class="dropdown-menu" id="styleswitcher">
+ <li><a data-stylesheet="{% static "css/geany-theme-blue-default.css" %}">Bootstrap Default</a></li>
+ <li><a data-stylesheet="{% static "css/geany-theme-yellow-b4n.css" %}">b4n's yellow</a></li>
+ <li><a data-stylesheet="{% static "css/geany-theme-yellow-eht16.css" %}">eht16's yellow</a></li>
+ <li><a data-stylesheet="{% static "css/geany-theme-yellow-gmail.css" %}">gmail's yellow</a></li>
+ </ul>
+ </li>
+ <!-- end color fun -->
+`;
+ $("ul.nav").append(colorFunDropdown);
+ debugger;
+
+ var currentSheet = document.getElementById("stylesheet"),
+ switcher = document.getElementById("styleswitcher");
+
+ function loadStyle () {
+ currentSheet.href = stylez;
+ }
+
+ switcher.addEventListener("click", function (ev) {
+ var b = ev.target; // button
+
+ if (b && b.hasAttribute("data-stylesheet")) {
+ stylez = b.getAttribute("data-stylesheet");
+ }
+
+ loadStyle();
+ });
+
+ });
+</script>
+{% endblock %}
</body>
</html>
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list