]> iEval git - plack-app-gruntmaster.git/commitdiff
Use alternate stylesheets
authorMarius Gavrilescu <marius@ieval.ro>
Tue, 10 Mar 2015 19:09:10 +0000 (21:09 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Tue, 10 Mar 2015 19:09:10 +0000 (21:09 +0200)
js/90-themes.js
tmpl/skel.en

index 1e6fdceb66d996c31291974f5d44412a4abce126..7221ddeac3eb40f7ea1e22255aa5ead6ed84d872 100644 (file)
@@ -1,7 +1,8 @@
 (function(){
        'use strict';
        function set_style(name){
-               $('#stylesheet').attr("href", "/static/css/" + name + ".css");
+               $('link[rel~="stylesheet"]').prop('disabled', true);
+               $('link[title="' + name + '"]').prop('disabled', false);
                localStorage.setItem("theme", name);
        }
 
index 93e07b87142f8b68e5cea212865788296c2c3b67..b713e0e2ec927d4e0eedc70abd530935fb43a382 100644 (file)
@@ -3,7 +3,9 @@
 <meta charset="utf-8">
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 
-<link rel="stylesheet" href="/static/css/cyborg.css" id="stylesheet">
+<link href="/static/css/cyborg.css" title="cyborg" rel="stylesheet">
+<link href="/static/css/slate.css" title="slate" rel="alternate stylesheet">
+<link href="/static/css/readable.css" title="readable" rel="alternate stylesheet">
 <script src="/static/js.js" type="text/javascript" async defer></script>
 
 <body>
This page took 0.033112 seconds and 4 git commands to generate.