mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 05:48:11 -05:00
Feature-flagged new markdown styles.
This commit is contained in:
@@ -86,7 +86,7 @@ clean_ini:
|
||||
|
||||
#################### CSS file lists
|
||||
SPRITED_STYLESHEETS += reddit.less compact.css
|
||||
LESS_STYLESHEETS := wiki.less adminbar.less policies.less markdown.less
|
||||
LESS_STYLESHEETS := wiki.less adminbar.less policies.less markdown.less old-markdown.less
|
||||
OTHER_STYLESHEETS := mobile.css highlight.css
|
||||
|
||||
#################### Static Files
|
||||
|
||||
103
r2/r2/public/static/css/old-markdown.less
Normal file
103
r2/r2/public/static/css/old-markdown.less
Normal file
@@ -0,0 +1,103 @@
|
||||
/* markdown */
|
||||
.md { max-width: 60em; overflow: auto; font-size: small; }
|
||||
.md p, .md h1 { margin: 5px 0}
|
||||
.md h1 { font-weight: normal; font-size: 100%; }
|
||||
.md > * { margin-bottom: 0px }
|
||||
.md strong { font-weight: bold; }
|
||||
.md em { font-style: italic; }
|
||||
.md strong em { font-style: italic; font-weight: bold }
|
||||
.md img { display: none }
|
||||
.md ol, .md ul { margin: 10px 2em; }
|
||||
.md ul { list-style: disc outside }
|
||||
.md ol {
|
||||
list-style: decimal outside;
|
||||
margin-left: 3em;
|
||||
}
|
||||
.md pre { margin: 10px; }
|
||||
.md blockquote, .help blockquote {
|
||||
border-left: 2px solid #369;
|
||||
padding-left: 4px;
|
||||
margin: 5px;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.md td, .md th { border: 1px solid #EEE; padding: 1px 3px; }
|
||||
.md th { font-weight: bold; }
|
||||
.md table { margin: 5px 10px; }
|
||||
.md center { text-align: left; }
|
||||
|
||||
.wiki-page {
|
||||
.wiki-page-content {
|
||||
.md {
|
||||
word-wrap: break-word;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.md.wiki {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
margin-bottom: .25em;
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin-top: .75em;
|
||||
font-size: 2.4em;
|
||||
}
|
||||
|
||||
ul:first-child + h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
margin-top: .75em;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 1.4em;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 1.2em;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 1.05em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
p, .md.wiki blockquote {
|
||||
margin: .75em 0;
|
||||
}
|
||||
|
||||
> .toc > ul {
|
||||
padding: 10px 25px;
|
||||
margin-right: 0;
|
||||
|
||||
ul {
|
||||
padding-left: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,6 +23,7 @@
|
||||
<%namespace file="less.html" import="less_js, less_stylesheet"/>
|
||||
|
||||
<%!
|
||||
from r2.config import feature
|
||||
from r2.lib.template_helpers import add_sr
|
||||
%>
|
||||
<html>
|
||||
@@ -33,7 +34,11 @@
|
||||
}
|
||||
</script>
|
||||
${less_stylesheet("reddit.less")}
|
||||
${less_stylesheet("markdown.less")}
|
||||
%if feature.is_enabled('new_markdown_style'):
|
||||
${less_stylesheet("markdown.less")}
|
||||
%else:
|
||||
${less_stylesheet("old-markdown.less")}
|
||||
%endif
|
||||
${less_js()}
|
||||
</head>
|
||||
<body class="${'expanded' if thing.expanded else ''}" id="inner_toolbar" onload="window.frames[1].focus()">
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
###############################################################################
|
||||
|
||||
<%!
|
||||
from r2.config import feature
|
||||
from r2.lib.template_helpers import add_sr, static, join_urls, class_dict, get_domain
|
||||
from r2.lib.filters import unsafe
|
||||
from r2.lib.pages import SearchForm, ClickGadget, SideContentBox, Login, ListingChooser
|
||||
@@ -45,7 +46,11 @@
|
||||
|
||||
<%def name="global_stylesheets()">
|
||||
${less_stylesheet("reddit.less")}
|
||||
${less_stylesheet("markdown.less")}
|
||||
%if feature.is_enabled('new_markdown_style'):
|
||||
${less_stylesheet("markdown.less")}
|
||||
%else:
|
||||
${less_stylesheet("old-markdown.less")}
|
||||
%endif
|
||||
%if c.site.stylesheet:
|
||||
<link rel="stylesheet" href="${static(c.site.stylesheet)}" type="text/css" >
|
||||
%endif
|
||||
|
||||
@@ -19,13 +19,21 @@
|
||||
## All portions of the code written by reddit are Copyright (c) 2006-2014
|
||||
## reddit Inc. All Rights Reserved.
|
||||
###############################################################################
|
||||
<%!
|
||||
from r2.config import feature
|
||||
%>
|
||||
|
||||
<%namespace file="less.html" import="less_stylesheet"/>
|
||||
<%inherit file="reddit.html"/>
|
||||
|
||||
<%def name="global_stylesheets()">
|
||||
${parent.global_stylesheets()}
|
||||
${less_stylesheet('wiki.less')}
|
||||
${less_stylesheet('markdown.less')}
|
||||
%if feature.is_enabled('new_markdown_style'):
|
||||
${less_stylesheet("markdown.less")}
|
||||
%else:
|
||||
${less_stylesheet("old-markdown.less")}
|
||||
%endif
|
||||
</%def>
|
||||
|
||||
<%def name="actionsbar(actions)">
|
||||
|
||||
Reference in New Issue
Block a user