Skip to content

Commit c2f81df

Browse files
committed
Initialie Liste an Materialien eingetragen; Aufgeräumt.
1 parent 86d561d commit c2f81df

19 files changed

+69
-599
lines changed
File renamed without changes.

css/prism.css

Lines changed: 37 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,21 @@
1-
/* http://prismjs.com/download.html?themes=prism-solarizedlight&languages=markup+css+clike+javascript+python&plugins=file-highlight */
2-
/*
3-
Solarized Color Schemes originally by Ethan Schoonover
4-
http://ethanschoonover.com/solarized
5-
6-
Ported for PrismJS by Hector Matos
7-
Website: https://krakendev.io
8-
Twitter Handle: https://twitter.com/allonsykraken)
9-
*/
10-
11-
/*
12-
SOLARIZED HEX
13-
--------- -------
14-
base03 #002b36
15-
base02 #073642
16-
base01 #586e75
17-
base00 #657b83
18-
base0 #839496
19-
base1 #93a1a1
20-
base2 #eee8d5
21-
base3 #fdf6e3
22-
yellow #b58900
23-
orange #cb4b16
24-
red #dc322f
25-
magenta #d33682
26-
violet #6c71c4
27-
blue #268bd2
28-
cyan #2aa198
29-
green #859900
30-
*/
1+
/* http://prismjs.com/download.html?themes=prism&languages=markup+css+clike+javascript+python&plugins=file-highlight */
2+
/**
3+
* prism.js default theme for JavaScript, CSS and HTML
4+
* Based on dabblet (http://dabblet.com)
5+
* @author Lea Verou
6+
*/
317

328
code[class*="language-"],
339
pre[class*="language-"] {
34-
color: #657b83; /* base00 */
10+
color: black;
11+
background: none;
12+
text-shadow: 0 1px white;
3513
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
3614
text-align: left;
3715
white-space: pre;
3816
word-spacing: normal;
3917
word-break: normal;
4018
word-wrap: normal;
41-
4219
line-height: 1.5;
4320

4421
-moz-tab-size: 4;
@@ -53,42 +30,51 @@ pre[class*="language-"] {
5330

5431
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
5532
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
56-
background: #073642; /* base02 */
33+
text-shadow: none;
34+
background: #b3d4fc;
5735
}
5836

5937
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
6038
code[class*="language-"]::selection, code[class*="language-"] ::selection {
61-
background: #073642; /* base02 */
39+
text-shadow: none;
40+
background: #b3d4fc;
41+
}
42+
43+
@media print {
44+
code[class*="language-"],
45+
pre[class*="language-"] {
46+
text-shadow: none;
47+
}
6248
}
6349

6450
/* Code blocks */
6551
pre[class*="language-"] {
6652
padding: 1em;
6753
margin: .5em 0;
6854
overflow: auto;
69-
border-radius: 0.3em;
7055
}
7156

7257
:not(pre) > code[class*="language-"],
7358
pre[class*="language-"] {
74-
background-color: #fdf6e3; /* base3 */
59+
background: #f5f2f0;
7560
}
7661

7762
/* Inline code */
7863
:not(pre) > code[class*="language-"] {
7964
padding: .1em;
8065
border-radius: .3em;
66+
white-space: normal;
8167
}
8268

8369
.token.comment,
8470
.token.prolog,
8571
.token.doctype,
8672
.token.cdata {
87-
color: #93a1a1; /* base1 */
73+
color: slategray;
8874
}
8975

9076
.token.punctuation {
91-
color: #586e75; /* base01 */
77+
color: #999;
9278
}
9379

9480
.namespace {
@@ -102,38 +88,41 @@ pre[class*="language-"] {
10288
.token.constant,
10389
.token.symbol,
10490
.token.deleted {
105-
color: #268bd2; /* blue */
91+
color: #905;
10692
}
10793

10894
.token.selector,
10995
.token.attr-name,
11096
.token.string,
11197
.token.char,
11298
.token.builtin,
113-
.token.url,
11499
.token.inserted {
115-
color: #2aa198; /* cyan */
100+
color: #690;
116101
}
117102

118-
.token.entity {
119-
color: #657b83; /* base00 */
120-
background: #eee8d5; /* base2 */
103+
.token.operator,
104+
.token.entity,
105+
.token.url,
106+
.language-css .token.string,
107+
.style .token.string {
108+
color: #a67f59;
109+
background: hsla(0, 0%, 100%, .5);
121110
}
122111

123112
.token.atrule,
124113
.token.attr-value,
125114
.token.keyword {
126-
color: #859900; /* green */
115+
color: #07a;
127116
}
128117

129118
.token.function {
130-
color: #b58900; /* yellow */
119+
color: #DD4A68;
131120
}
132121

133122
.token.regex,
134123
.token.important,
135124
.token.variable {
136-
color: #cb4b16; /* orange */
125+
color: #e90;
137126
}
138127

139128
.token.important,
@@ -147,3 +136,4 @@ pre[class*="language-"] {
147136
.token.entity {
148137
cursor: help;
149138
}
139+

material.js renamed to js/material.js

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* Created by me on 23.05.16.
33
*/
44

5-
var CodoKa = {
6-
URL_PREFIX: "", //https://raw.githubusercontent.com/coderdojoka/Materialien/master/Python/
5+
var CodoKaMaterial = {
6+
URL_PREFIX: "https://raw.githubusercontent.com/coderdojoka/Materialien/master/Python/",
77
materialIndex: {
88
tags: {},
99
level: {},
@@ -22,16 +22,25 @@ var CodoKa = {
2222
this.$searchResultsList = this.$searchResults.find("> ul");
2323
this.$viewerContent = this.$viewer.find('#content');
2424
this.$btnBack = this.$viewer.find('#btn_back').click(function () {
25-
CodoKa.showMaterials();
25+
CodoKaMaterial.showMaterials();
2626
});
2727

28-
$.getJSON("material_index.json", function (data) {
29-
CodoKa.materialIndex = data;
28+
$.getJSON("python_material_index.json", function (data) {
29+
CodoKaMaterial.materialIndex = data;
3030

31-
CodoKa._gen_categories(CodoKa.materialIndex.categories, CodoKa.$materials.find(">ul").empty(), 2);
31+
CodoKaMaterial._gen_categories(CodoKaMaterial.materialIndex.categories, CodoKaMaterial.$materials.find(">ul").empty(), 2);
3232
});
3333
},
3434

35+
parseQueryString: function (val) {
36+
var result = "Not found", tmp = [];
37+
location.search.substr(1).split("&").forEach(function (item) {
38+
tmp = item.split("=");
39+
if (tmp[0] === val) result = decodeURIComponent(tmp[1]);
40+
});
41+
return result;
42+
},
43+
3544
showMaterials: function () {
3645
this.$materials.show();
3746
this.$viewer.hide();
@@ -45,7 +54,7 @@ var CodoKa = {
4554

4655
this.$viewerContent.empty().append("<span>Lade...</span>");
4756

48-
$.get(CodoKa.URL_PREFIX + entry.uri).done(function (data) {
57+
$.get(CodoKaMaterial.URL_PREFIX + entry.uri).done(function (data) {
4958

5059
var content = '<h2>' + entry.name + '</h2><div>' + entry.desc + '</div>';
5160
if (entry.type === "html") {
@@ -80,7 +89,7 @@ var CodoKa = {
8089

8190
$li.click(function () {
8291
console.log(entry);
83-
CodoKa.showViewer(entry);
92+
CodoKaMaterial.showViewer(entry);
8493
});
8594
})();
8695

@@ -97,9 +106,9 @@ var CodoKa = {
97106
var $ele = $('<li class="e_cat"></li>').append($header).append($('<ul></ul>'));
98107

99108
if (cat.hasOwnProperty("categories")) {
100-
CodoKa._gen_categories(cat["categories"], $ele.find('ul'), Math.min(4, level + 1));
109+
CodoKaMaterial._gen_categories(cat["categories"], $ele.find('ul'), Math.min(4, level + 1));
101110
} else {
102-
CodoKa._gen_entries(cat["entries"], $ele.find('ul'));
111+
CodoKaMaterial._gen_entries(cat["entries"], $ele.find('ul'));
103112
}
104113

105114
$parent.append($ele);
@@ -113,7 +122,7 @@ var CodoKa = {
113122

114123
query = query.trim().toLowerCase();
115124
if (query.length == 0) {
116-
CodoKa.showMaterials();
125+
CodoKaMaterial.showMaterials();
117126
return;
118127
}
119128

@@ -129,13 +138,13 @@ var CodoKa = {
129138
self.$searchResultsList.append($(this).parent().clone(true, true));
130139
}
131140
});
132-
if(this.$searchResultsList.children().length == 0){
141+
if (this.$searchResultsList.children().length == 0) {
133142
self.$searchResultsList.append("Keine Treffer gefunden :(");
134143
}
135144
}
136145
};
137146

138147
$(function () {
139-
CodoKa.init();
148+
CodoKaMaterial.init();
140149
});
141150

less/convert.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env bash
22

3-
lessc mat2.less ../mat2.css --verbose
3+
lessc material_viewer.less ../css/material_viewer.css --verbose

mat_theme.css

Lines changed: 0 additions & 31 deletions
This file was deleted.

material_python.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
<!-- Custom CSS -->
2323
<link href="css/coderdojoka.css" rel="stylesheet">
2424
<link href="css/material.css" rel="stylesheet">
25-
<link href="mat2.css" rel="stylesheet">
26-
<link href="prism.css" rel="stylesheet">
27-
28-
25+
<link href="css/material_viewer.css" rel="stylesheet">
2926
<link href="css/prism.css" rel="stylesheet">
3027

3128
<!-- Custom Fonts -->
@@ -70,15 +67,15 @@
7067
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-main-collapse">
7168
<i class="fa fa-bars"></i>
7269
</button>
73-
<span>
70+
<span>
7471
<a class="navbar-brand" href="/">
7572
<img src="img/logo.png" alt="CoderDojo Karlsruhe Logo" class="navbar-brand-logo"/>
7673
<span id="navbar-brand-name-collapse">
7774
<span class="light">CoderDojo</span> Karlsruhe
7875
</span>
7976
</a>
8077
</span>
81-
<span class="navbar-breadcrumb navbar-breadcrumb-sep"><i class="fa fa-angle-double-right"></i>
78+
<span class="navbar-breadcrumb navbar-breadcrumb-sep"><i class="fa fa-angle-double-right"></i>
8279
</span><a class="navbar-breadcrumb page-scroll" href="#page-top">Material</a>
8380
</div>
8481

@@ -179,7 +176,7 @@ <h1>Treffer:</h1>
179176
<script src="js/jquery.easing.min.js"></script>
180177

181178
<!-- Custom Theme JavaScript -->
182-
<script src="material.js"></script>
179+
<script src="js/material.js"></script>
183180

184181
<script src="js/prism.js"></script>
185182

material_theme.html

Lines changed: 0 additions & 46 deletions
This file was deleted.

0 commit comments

Comments
 (0)