Commit 7b46944d authored by Curtis Adam's avatar Curtis Adam

Replace Markdown with Markdeep

parent 555569d4
......@@ -22,7 +22,8 @@
<meta name="msapplication-TileColor" content="#3d9c19">
<meta name="theme-color" content="#484848">
<meta name="google-site-verification" content="rN3x14QkdqbdL3gcMmu8uzuqQ7mvfWaWME3bmM0ShNY" />
<script>window.markdeepOptions = {mode: 'html', detectMath: false};</script>
<script src="https://casual-effects.com/markdeep/latest/markdeep.min.js"></script>
<script src="https://js.braintreegateway.com/v2/braintree.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
......
......@@ -5,7 +5,6 @@ import {Cards} from "../../api/cards.js";
import {CollegesCourses} from "../../api/colleges_courses.js";
import {Leitner} from "../../api/learned.js";
import {Session} from "meteor/session";
import {Showdown} from 'meteor/markdown';
import {MeteorMathJax} from 'meteor/mrt:mathjax';
import * as lib from '/client/lib.js';
import {getAuthorName} from "../../api/cardsetUserlist.js";
......@@ -479,23 +478,15 @@ Template.registerHelper("getMaximumText", function (text) {
return text;
});
const converter = new Showdown.converter({
simplifiedAutoLink: true,
strikethrough: true,
tables: true
});
const helper = new MeteorMathJax.Helper({
useCache: true,
transform: function (x) {
x = x.split("\n");
x = lib.parseGithubFlavoredMarkdown(x);
return lib.setLightBoxes(converter.makeHtml(x));
return lib.setLightBoxes(window.markdeep.format(x, true));
}
});
Template.registerHelper('mathjax', helper.getTemplate());
MeteorMathJax.sourceUrl = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js';
MeteorMathJax.sourceUrl = 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.4/MathJax.js';
MeteorMathJax.defaultConfig = {
config: ["TeX-AMS-MML_HTMLorMML.js"],
jax: ["input/TeX", "input/MathML", "output/HTML-CSS", "output/NativeMML", "output/PreviewHTML"],
......
......@@ -7,6 +7,7 @@ BrowserPolicy.content.allowFontDataUrl();
BrowserPolicy.content.allowOriginForAll('https://*.google-analytics.com');
BrowserPolicy.content.allowOriginForAll('https://*.youtube.com');
BrowserPolicy.content.allowOriginForAll('https://*.vimeo.com');
BrowserPolicy.content.allowOriginForAll('https://*.mxpnl.com');
BrowserPolicy.content.allowOriginForAll('https://*.zendesk.com');
BrowserPolicy.content.allowOriginForAll('https://*.braintreegateway.com');
......@@ -17,5 +18,6 @@ BrowserPolicy.content.allowOriginForAll('https://cdnjs.cloudflare.com');
BrowserPolicy.content.allowOriginForAll('https://fonts.googleapis.com');
BrowserPolicy.content.allowOriginForAll('https://fonts.gstatic.com');
BrowserPolicy.content.allowOriginForAll('https://dict.tu-chemnitz.de');
BrowserPolicy.content.allowOriginForAll('https://casual-effects.com');
BrowserPolicy.content.allowImageOrigin('*');
......@@ -1481,7 +1481,7 @@ Template.flashcards.events({
}
},
"click .box": function (evt) {
if (Session.get('activeEditMode') !== 2 && Session.get('activeEditMode') !== 3 && ($(evt.target).data('type') !== "cardNavigation") && ($(evt.target).data('type') !== "cardImage")) {
if (Session.get('activeEditMode') !== 2 && Session.get('activeEditMode') !== 3 && ($(evt.target).data('type') !== "cardNavigation") && ($(evt.target).data('type') !== "cardImage") && !$(evt.target).closest('a')) {
if (isEditMode() && !Session.get('fullscreen')) {
turnCard(true);
} else {
......
......@@ -389,22 +389,6 @@ img.cardside {
p {
margin: 0;
}
.lightbox-img {
img {
width: 100%;
max-width: 375px;
position: static;
display: block;
z-index: 20;
}
.emojiImage {
position: unset;
width: auto;
display: initial;
}
}
hr {
display: block;
......@@ -471,7 +455,7 @@ img.cardside {
}
}
.cardtext h5, .editorHeader {
.cardtext > h5, .editorHeader {
margin: 0;
padding-top: 15px;
padding-bottom: 5px;
......
......@@ -711,11 +711,6 @@ button:disabled {
margin: auto;
}
.cardContent .lightbox-img img {
width: unset !important;
display: unset !important;
}
.lightbox-container {
text-align: center;
}
......@@ -863,6 +858,7 @@ th {
.info-tab h1 {
font-size: $font_size_info_h1;
margin: 0;
padding-top: 0;
}
.info-tab h2 {
......
......@@ -11,9 +11,7 @@
</div>
<span id="slogan">
<h2 class="pull-left">ORGANIZE.</h2>
<h2 class="pull-left lmargin">LEARN.</h2>
<h2 class="pull-left lmargin">REMEMBER.</h2>
<h2 class="pull-left">ORGANIZE. LEARN. REMEMBER.</h2>
</span>
<br>
<a href="about" class="btn btn-lg btn-raised btn-success">{{_
......
......@@ -19,39 +19,31 @@ $color_fuscous_gray_approx: rgb(85, 85, 84);
}
#slogan {
display: inline-block;
text-align: left;
color: $color_thm_orange !important;
.lmargin {
margin-left: 20px;
}
h2 {
padding-top: 0;
@media (max-width: 414px) {
font-size: 14px;
font-weight: bold;
}
}
h2 {
@media (min-width: 415px) and (max-width: 767px) {
font-size: 20px;
font-weight: bold;
}
}
h2 {
@media (min-width: 768px) and (max-width: 1023px) {
font-size: 42px;
font-weight: bold;
}
}
h2 {
@media (min-width: 1024px) {
font-size: 55px;
font-weight: bold;
}
}
}
#login {
......@@ -88,19 +80,19 @@ $color_fuscous_gray_approx: rgb(85, 85, 84);
min-height: 84px;
background-color: transparent;
}
}
.item {
height: 300px;
}
.item {
height: 300px;
}
.item img {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
.item img {
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
}
#tag-cloud-container {
......
......@@ -5760,6 +5760,11 @@
"integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=",
"dev": true
},
"highlightjs": {
"version": "9.10.0",
"resolved": "https://registry.npmjs.org/highlightjs/-/highlightjs-9.10.0.tgz",
"integrity": "sha1-/Km3jdqjsavKidbD7hBa0nCoAZA="
},
"hoek": {
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment