Skip to content

Commit 4c6143a

Browse files
committed
Merge branch 'master' of github.com:agusmakmun/django-markdown-editor
2 parents ac377b8 + 19617a8 commit 4c6143a

File tree

3 files changed

+20
-16
lines changed

3 files changed

+20
-16
lines changed

martor/extensions/mdx_video.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ def __init__(self, **kwargs):
2020
'yahoo_height': ['351', 'Height for Yahoo! videos'],
2121
'youtube_width': ['560', 'Width for Youtube videos'],
2222
'youtube_height': ['315', 'Height for Youtube videos'],
23+
'youtube_nocookie': [False, 'Use youtube-nocookie.com instead of youtube.com']
2324
}
2425

2526
# Override defaults with user settings
@@ -97,7 +98,10 @@ def handleMatch(self, m):
9798
class Youtube(markdown.inlinepatterns.Pattern):
9899

99100
def handleMatch(self, m):
100-
url = '//www.youtube.com/embed/%s' % m.group('youtubeid')
101+
if self.ext.config['youtube_nocookie'][0]:
102+
url = '//www.youtube-nocookie.com/embed/%s' % m.group('youtubeid')
103+
else:
104+
url = '//www.youtube.com/embed/%s' % m.group('youtubeid')
101105
width = self.ext.config['youtube_width'][0]
102106
height = self.ext.config['youtube_height'][0]
103107
return render_iframe(url, width, height)

martor/static/martor/css/martor.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ body.overflow {
88

99
/* Scroll Bar */
1010
.section-martor ::-webkit-scrollbar-track {
11-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
12-
border-radius: 10px;
13-
background-color: #F5F5F5;
11+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
12+
border-radius: 10px;
13+
background-color: #F5F5F5;
1414
}
1515
.section-martor ::-webkit-scrollbar {
1616
height: 6px;
17-
width: 6px;
18-
background-color: #F5F5F5;
17+
width: 6px;
18+
background-color: #F5F5F5;
1919
}
2020
.section-martor ::-webkit-scrollbar-thumb {
21-
border-radius: 10px;
22-
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
23-
background-color: #555;
21+
border-radius: 10px;
22+
-webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3);
23+
background-color: #555;
2424
}
2525
.ace_scrollbar-v {
2626
cursor: ns-resize;
@@ -90,7 +90,7 @@ form .martor-preview h2,
9090
form .martor-preview h3,
9191
form .martor-preview h4,
9292
form .martor-preview h5,
93-
form .martor-preview h6{margin:20px 0 10px;padding:0;font-weight:bold;-webkit-font-smoothing:antialiased;cursor:text;position:relative;background:none;}
93+
form .martor-preview h6{margin:20px 0 10px;padding:0;font-weight:bold !important;-webkit-font-smoothing:antialiased;cursor:text;position:relative;background:none;}
9494

9595
form .martor-preview h1:hover a.anchor,
9696
form .martor-preview h2:hover a.anchor,
@@ -112,11 +112,11 @@ form .martor-preview h5 code,
112112
form .martor-preview h6 tt,
113113
form .martor-preview h6 code{font-size:inherit}
114114

115-
form .martor-preview h1{font-size:28px;color:#000}
116-
form .martor-preview h2{font-size:24px;border-bottom:1px solid #ccc;color:#000}
117-
form .martor-preview h3{font-size:18px}
118-
form .martor-preview h4{font-size:16px}
119-
form .martor-preview h5{font-size:14px}
115+
form .martor-preview h1{font-size:28px !important;color:#000 !important}
116+
form .martor-preview h2{font-size:24px !important;color:#000 !important}
117+
form .martor-preview h3{font-size:18px !important;}
118+
form .martor-preview h4{font-size:16px !important;}
119+
form .martor-preview h5{font-size:14px !important;text-transform:none !important}
120120
form .martor-preview h6{color:#777;font-size:14px}
121121
form .martor-preview p,
122122
form .martor-preview blockquote,

0 commit comments

Comments
 (0)