Browse Source

Merge branch 'config' into allow_ogg_embed

pull/40/head
towards-a-new-leftypol 3 years ago
committed by GitHub
parent
commit
c098c5bf40
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      inc/instance-config.php
  2. 7
      js/youtube.js
  3. 1
      stylesheets/dark.css
  4. 2
      templates/themes/catalog/catalog.html
  5. 2
      templates/themes/categories/frames.html
  6. 2
      templates/themes/categories/news.html

3
inc/instance-config.php

@ -321,7 +321,7 @@ $config['stylesheets']['TempDarkRed'] = 'temp_dark_red.css';
$config['stylesheets']['AnonsDarkRed'] = 'anons_dark_red.css';
$config['stylesheets']['BunkerLike'] = 'bunker_like.css';
$config['default_stylesheet'] = array('Jungle', $config['stylesheets']['Jungle']);
$config['default_stylesheet'] = array('Dark Red', $config['stylesheets']['Dark Red']);
/*
* ====================
* Javascript
@ -372,6 +372,7 @@ $config['youtube_js_html']
. '<img style="width:255px;height:190px;" src="/vi/$2/0.jpg" class="post-image"/>'
. '</a></div>';
$config['ogg_embed_html']
= '<figure><audio controls src="$1">'
. 'Your browser does not support the'

7
js/youtube.js

@ -29,16 +29,21 @@ onready(function(){
function addEmbedButton(index, videoNode) {
videoNode = $(videoNode);
var contents = videoNode.contents();
var videoId = videoNode.data('video');
var span = $("<span>[Embed]</span>");
var embedNode = $('<iframe style="float:left;margin: 10px 20px" type="text/html" '+
'width="360" height="270" src="//www.youtube.com/embed/' + videoId +
'?autoplay=1&html5=1" allowfullscreen frameborder="0"/>');
span.click(function() {
videoNode.click(function(e) {
e.preventDefault();
if (span.text() == ON){
videoNode.append(contents);
embedNode.remove();
span.text(OFF);
} else{
contents.detach();
videoNode.append(embedNode);
span.text(ON);
}

1
stylesheets/dark.css

@ -20,7 +20,6 @@ body {
}
h1
{
font-family: 'lain', tahoma;
letter-spacing: -2px;
font-size: 20pt;
text-align: center;

2
templates/themes/catalog/catalog.html

@ -63,7 +63,7 @@
<div class="thread grid-li grid-size-small">
<a href="{{post.link}}">
{% if post.youtube %}
<img src="//img.youtube.com/vi/{{ post.youtube }}/0.jpg"
<img src="/vi/{{ post.youtube }}/0.jpg"
{% else %}
<img src="{{post.file}}"
{% endif %}

2
templates/themes/categories/frames.html

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}">
<link rel="stylesheet" media="screen" href="/stylesheets/jungle.css">
<link rel="stylesheet" media="screen" href="/stylesheets/dark_red.css">
<style type="text/css">
.sidebar {
width: 200px;

2
templates/themes/categories/news.html

@ -5,7 +5,7 @@
<h1>{{ settings.title }}</h1>
<div class="subtitle">{{ settings.subtitle }}</div>
<link rel="stylesheet" media="screen" href="{{ config.url_stylesheet }}">
<link rel="stylesheet" media="screen" href="/stylesheets/jungle.css">
<link rel="stylesheet" media="screen" href="/stylesheets/dark_red.css">
</header>
<div class="ban">

Loading…
Cancel
Save