more stuff
This commit is contained in:
parent
4daf30d75a
commit
758d80e817
5 changed files with 36 additions and 16 deletions
|
@ -19,6 +19,16 @@ use Sakura\News\Post;
|
||||||
*/
|
*/
|
||||||
class NewsController extends Controller
|
class NewsController extends Controller
|
||||||
{
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
parent::__construct();
|
||||||
|
|
||||||
|
// pretend these pages don't exist on testii for now
|
||||||
|
if (!config('dev.show_errors')) {
|
||||||
|
throw new HttpRouteNotFoundException;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shows all news posts in any category.
|
* Shows all news posts in any category.
|
||||||
* @return string
|
* @return string
|
||||||
|
|
20
resources/views/yuuno/_layout/metadata.twig
Normal file
20
resources/views/yuuno/_layout/metadata.twig
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
{% set title = title|default(config('general.name')) %}
|
||||||
|
{% set description = description|default(config('general.description')) %}
|
||||||
|
|
||||||
|
<title>{{ title }}</title>
|
||||||
|
<meta name="twitter:title" content="{{ title }}">
|
||||||
|
<meta property="og:title" content="{{ title }}">
|
||||||
|
|
||||||
|
<meta name="description" content="{{ description }}">
|
||||||
|
<meta name="twitter:description" content="{{ description }}">
|
||||||
|
<meta property="og:description" content="{{ description }}">
|
||||||
|
|
||||||
|
<meta name="twitter:card" content="summary">
|
||||||
|
|
||||||
|
<meta property="og:type" content="object">
|
||||||
|
<meta property="og:site_name" content="{{ config('general.name') }}">
|
||||||
|
|
||||||
|
{% if icon is defined %}
|
||||||
|
<meta name="twitter:image:src" content="{{ icon }}">
|
||||||
|
<meta property="og:image" content="{{ icon }}">
|
||||||
|
{% endif %}
|
|
@ -2,18 +2,14 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title>{{ title|default(config('general.name')) }}</title>
|
|
||||||
<meta name="description" content="{{ description|default(config('general.description')) }}">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||||
{% if redirect is defined %}
|
{% include '_layout/metadata.twig' %}
|
||||||
<meta http-equiv="refresh" content="{{ redirectTimeout is defined ? redirectTimeout : '3' }}; URL={{ redirect }}">
|
|
||||||
{% endif %}
|
|
||||||
{{ block('meta') }}
|
|
||||||
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet" type="text/css">
|
||||||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
|
||||||
|
|
||||||
<link href="/css/libs.css" rel="stylesheet" type="text/css">
|
<link href="/css/libs.css" rel="stylesheet" type="text/css">
|
||||||
<link href="/css/yuuno.css" rel="stylesheet" type="text/css">
|
<link href="/css/yuuno.css" rel="stylesheet" type="text/css">
|
||||||
{{ block('css') }}
|
|
||||||
<script src="/js/libs.js" type="text/javascript"></script>
|
<script src="/js/libs.js" type="text/javascript"></script>
|
||||||
<script src="/js/sakura.js" type="text/javascript"></script>
|
<script src="/js/sakura.js" type="text/javascript"></script>
|
||||||
<script src="/js/yuuno.js" type="text/javascript"></script>
|
<script src="/js/yuuno.js" type="text/javascript"></script>
|
||||||
|
|
|
@ -1,11 +1,3 @@
|
||||||
{% extends 'settings/master.twig' %}
|
{% extends 'settings/master.twig' %}
|
||||||
|
|
||||||
{% set category = 'Friends' %}
|
{% set category = 'Friends' %}
|
||||||
|
|
||||||
{% block css %}
|
|
||||||
<style type="text/css">
|
|
||||||
.pagination {
|
|
||||||
float: right;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
|
@ -3,8 +3,10 @@
|
||||||
{% from 'user/profile_macros.twig' import profile_image_changer %}
|
{% from 'user/profile_macros.twig' import profile_image_changer %}
|
||||||
|
|
||||||
{% set title = 'Profile of ' ~ profile.username %}
|
{% set title = 'Profile of ' ~ profile.username %}
|
||||||
|
{% set description = 'Everything you ever wanted to know about ' ~ profile.username ~ '!' %}
|
||||||
|
{% set icon = route('user.avatar', profile.id, true) %}
|
||||||
{% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %}
|
{% set youtubeIsChannelId = profile.youtube|slice(0, 2) == 'UC' and profile.youtube|length == 24 %}
|
||||||
{% set possessiveUsername = profile.username ~ "'" ~ (profile.username[:-1] == 's' ? '' : 's') %}
|
{% set possessiveUsername = profile.username ~ "'" ~ (profile.username[-1:] == 's' ? '' : 's') %}
|
||||||
|
|
||||||
{% if user.perms.viewUserLinks or user.perms.viewUserDetails %}
|
{% if user.perms.viewUserLinks or user.perms.viewUserDetails %}
|
||||||
{% set fields = {
|
{% set fields = {
|
||||||
|
|
Reference in a new issue