mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-28 00:07:57 -05:00
wiki: Replace wiki css with less.
This commit is contained in:
@@ -95,7 +95,7 @@ clean_ini:
|
||||
|
||||
#################### CSS file lists
|
||||
SPRITED_STYLESHEETS += reddit.css compact.css
|
||||
LESS_STYLESHEETS := goldinfo.less
|
||||
LESS_STYLESHEETS := goldinfo.less wiki.less
|
||||
OTHER_STYLESHEETS := reddit-ie6-hax.css reddit-ie7-hax.css mobile.css highlight.css
|
||||
|
||||
#################### Static Files
|
||||
|
||||
@@ -942,94 +942,6 @@ a.author { margin-right: 0.5em; }
|
||||
margin: 5px;
|
||||
}
|
||||
|
||||
.wiki-page-content {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.wiki-page-content .pagelisting {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
padding-left: 25px;
|
||||
}
|
||||
|
||||
.wiki-page-content .description h2 {
|
||||
color: #222;
|
||||
}
|
||||
|
||||
.wiki-page-content .description {
|
||||
padding-bottom: 5px;
|
||||
}
|
||||
|
||||
.wikirevisionlisting .generic-table {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wikititle strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.wikititle {
|
||||
margin-left: 15px;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.wiki-page .md {
|
||||
word-wrap: break-word;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
.wiki-page .fancy-settings .toggle {
|
||||
display: inline-block;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.wiki-page input {
|
||||
margin: 5px;
|
||||
padding: 2px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.wiki-page-content {
|
||||
margin-right: 325px;
|
||||
}
|
||||
.discussionlink {
|
||||
display: inline-block;
|
||||
margin-left: 15px;
|
||||
padding-right: 50px;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.discussionlink a {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
.wikirevisionlisting table tr td {
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
.wiki-page .pagelisting ul {
|
||||
list-style: disc;
|
||||
padding: 2px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#wiki_revision_reason {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.wiki-page .revision {
|
||||
transition: opacity 500ms;
|
||||
-o-transition: opacity 500ms;
|
||||
-ms-transition: opacity 500ms;
|
||||
-moz-transition: opacity 500ms;
|
||||
-webkit-transition: opacity 500ms;
|
||||
}
|
||||
|
||||
.wiki-page .revision.hidden {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.wikiaction-revisions::before {
|
||||
background-image: url(../report.png); /* SPRITE */
|
||||
}
|
||||
@@ -1038,118 +950,6 @@ a.author { margin-right: 0.5em; }
|
||||
background-image: url(../page_white_copy.png); /* SPRITE */
|
||||
}
|
||||
|
||||
.pageactions {
|
||||
display: inline-block;
|
||||
font-size: larger;
|
||||
margin-left: 25px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #8D9CAA;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.wikiaction {
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.wikititle {
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.pageactions .wikiaction {
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.pageactions .wikiaction:hover {
|
||||
background-color: #CEE3F8;
|
||||
}
|
||||
|
||||
.pageactions .wikiaction-current:hover {
|
||||
background-color: #5F99CF;
|
||||
}
|
||||
|
||||
.pageactions .wikiaction-current {
|
||||
color: white;
|
||||
background-color: #5F99CF;
|
||||
}
|
||||
|
||||
/* wiki table of contents */
|
||||
|
||||
.md.wiki > .toc > ul {
|
||||
float: right;
|
||||
padding: 10px 25px;
|
||||
margin-right: 0;
|
||||
border: 1px solid #8D9CAA;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.md.wiki > .toc > ul ul {
|
||||
margin: 4px 0;
|
||||
padding-left: 25px;
|
||||
border-left: 1px dotted #cce;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
/* wiki content */
|
||||
|
||||
.md.wiki p, .md.wiki blockquote {
|
||||
margin: .75em 0;
|
||||
}
|
||||
|
||||
.md.wiki blockquote {
|
||||
padding-left: 1em;
|
||||
}
|
||||
|
||||
.md.wiki h1,
|
||||
.md.wiki h2,
|
||||
.md.wiki h3,
|
||||
.md.wiki h4,
|
||||
.md.wiki h5,
|
||||
.md.wiki h6 {
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
margin-bottom: .25em;
|
||||
margin-top: .5em;
|
||||
}
|
||||
|
||||
.md.wiki h1 {
|
||||
margin-top: .75em;
|
||||
font-size: 2.4em;
|
||||
}
|
||||
|
||||
.md.wiki ul:first-child + h1 {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.md.wiki h2 {
|
||||
margin-top: .75em;
|
||||
font-size: 1.8em;
|
||||
}
|
||||
|
||||
.md.wiki h3 {
|
||||
font-size: 1.6em;
|
||||
}
|
||||
|
||||
.md.wiki h4 {
|
||||
font-size: 1.4em;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.md.wiki h5 {
|
||||
font-size: 1.2em;
|
||||
color: #444;
|
||||
}
|
||||
|
||||
.md.wiki h6 {
|
||||
font-size: 1.05em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
/* organic listing */
|
||||
.organic-listing {
|
||||
border: solid 1px gray;
|
||||
@@ -1357,7 +1157,6 @@ a.author { margin-right: 0.5em; }
|
||||
.md em { font-style: italic; }
|
||||
.md strong em { font-style: italic; font-weight: bold }
|
||||
.md img { display: none }
|
||||
.md.wiki img { display: block }
|
||||
.md ol, .md ul { margin: 10px 2em; }
|
||||
.md ul { list-style: disc outside }
|
||||
.md ol { list-style: decimal outside }
|
||||
|
||||
203
r2/r2/public/static/css/wiki.less
Normal file
203
r2/r2/public/static/css/wiki.less
Normal file
@@ -0,0 +1,203 @@
|
||||
.transition (@prop: all, @time: 1s, @ease: linear) {
|
||||
-webkit-transition: @prop @time @ease;
|
||||
-moz-transition: @prop @time @ease;
|
||||
-o-transition: @prop @time @ease;
|
||||
-ms-transition: @prop @time @ease;
|
||||
transition: @prop @time @ease;
|
||||
}
|
||||
|
||||
.wiki-page {
|
||||
// Main content portion of the wiki pages
|
||||
.wiki-page-content {
|
||||
margin: 15px;
|
||||
margin-right: 325px;
|
||||
|
||||
// Wiki page listing
|
||||
.pagelisting {
|
||||
font-size: 1.2em;
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
padding-left: 25px;
|
||||
ul {
|
||||
list-style: disc;
|
||||
padding: 2px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
// Page action subtitle
|
||||
.description {
|
||||
padding-bottom: 5px;
|
||||
h2 {
|
||||
color: #222;
|
||||
}
|
||||
}
|
||||
|
||||
// Revision listing
|
||||
.wikirevisionlisting {
|
||||
.generic-table {
|
||||
width: 100%;
|
||||
}
|
||||
table tr td {
|
||||
padding-right: 15px;
|
||||
}
|
||||
.revision {
|
||||
.transition(opacity, 500ms);
|
||||
}
|
||||
.revision.hidden {
|
||||
opacity: .5;
|
||||
}
|
||||
}
|
||||
|
||||
// Page content
|
||||
.md {
|
||||
word-wrap: break-word;
|
||||
max-width: none;
|
||||
}
|
||||
|
||||
// Wiki markdown
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
// Wiki table of contents
|
||||
.md.wiki > .toc > ul {
|
||||
float: right;
|
||||
padding: 10px 25px;
|
||||
margin-right: 0;
|
||||
border: 1px solid #8D9CAA;
|
||||
list-style: none;
|
||||
}
|
||||
.md.wiki > .toc > ul ul {
|
||||
margin: 4px 0;
|
||||
padding-left: 25px;
|
||||
border-left: 1px dotted #cce;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
// Page settings
|
||||
.fancy-settings .toggle {
|
||||
display: inline-block;
|
||||
padding-right: 15px;
|
||||
}
|
||||
|
||||
// Reason for revision field
|
||||
#wiki_revision_reason {
|
||||
padding: 2px;
|
||||
margin-left: 0;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
// Save page button, save settings button, etc
|
||||
.wiki_button {
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
// Submit Discussion button
|
||||
.discussionlink {
|
||||
display: inline-block;
|
||||
margin-left: 15px;
|
||||
padding-right: 50px;
|
||||
margin-top: 5px;
|
||||
a {
|
||||
padding-left: 15px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Page title
|
||||
.wikititle {
|
||||
margin-left: 15px;
|
||||
color: #666;
|
||||
display: inline;
|
||||
vertical-align: middle;
|
||||
strong {
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
// Wiki tabs
|
||||
.pageactions {
|
||||
display: inline-block;
|
||||
font-size: larger;
|
||||
margin-left: 25px;
|
||||
border-radius: 5px;
|
||||
border: 1px solid #8D9CAA;
|
||||
vertical-align: middle;
|
||||
.wikiaction {
|
||||
display: inline-block;
|
||||
margin: 2px;
|
||||
padding-top: 2px;
|
||||
padding-bottom: 3px;
|
||||
border-radius: 3px;
|
||||
padding-right: 10px;
|
||||
padding-left: 10px;
|
||||
}
|
||||
.wikiaction:hover {
|
||||
background-color: #CEE3F8;
|
||||
}
|
||||
.wikiaction-current:hover {
|
||||
background-color: #5F99CF;
|
||||
}
|
||||
.wikiaction-current {
|
||||
color: white;
|
||||
background-color: #5F99CF;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
<%def name="stylesheet()">
|
||||
${parent.stylesheet()}
|
||||
${less_stylesheet('wiki.less')}
|
||||
</%def>
|
||||
|
||||
<%def name="actionsbar(actions)">
|
||||
|
||||
@@ -44,5 +44,5 @@
|
||||
<label for="reason">${_("reason for revision")}</label><br/>
|
||||
<input type="text" name="reason" maxlength="256" id="wiki_revision_reason" />
|
||||
<input type="hidden" id="previous" name="previous" value="${thing.previous}" />
|
||||
<br/><br/><input type="submit" value="${_('save page')}" />
|
||||
<br/><br/><input type="submit" class="wiki_button" value="${_('save page')}" />
|
||||
</form>
|
||||
|
||||
@@ -72,5 +72,5 @@
|
||||
</%utils:line_field>
|
||||
%endif
|
||||
|
||||
<input type="submit" onclick="$('#pagesettings').submit()" value="${_('save settings')}" />
|
||||
<input type="submit" class="wiki_button" onclick="$('#pagesettings').submit()" value="${_('save settings')}" />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user