Skip to content

Commit

Permalink
標準テンプレートをsimpleからBootstrapに
Browse files Browse the repository at this point in the history
  • Loading branch information
uzulla committed Jan 13, 2014
1 parent f72b79f commit 1c1c242
Show file tree
Hide file tree
Showing 14 changed files with 97 additions and 97 deletions.
File renamed without changes.
6 changes: 3 additions & 3 deletions templates/Post/form.twig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "frame.twig" %}
{% block content %}
{% autoescape true %}
{% include "_Parts/Form.twig" %}
{% endautoescape %}
{% autoescape true %}
{% include "_Parts/Form.twig" %}
{% endautoescape %}
{% endblock %}
6 changes: 3 additions & 3 deletions templates/TimeLine/show.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
{% for post in post_list %}
<div class="postcell">
<div class="body">{{ post.body|nl2br }}</div>
<div>
post by <span class="nickname">{{ post.nickname }}</span> ({{ post.created_at }})
<div class="info">
post by <span class="nickname">{{ post.nickname }}</span>
<span class="date">({{ post.created_at }})</span>
</div>
</div>
<hr>
{% endfor %}

{% include "_Parts/Pager.twig" %}
Expand Down
30 changes: 15 additions & 15 deletions templates/_Parts/Pager.twig
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
{% autoescape true %}
<br>
<div class="text-center">
<ul class="pagination pagination-lg">
{% if page_num > 1 %}
{% if (page_num-1) == 1 %}
<li class="active"><a href="/" class="prev">&laquo;</a></li>
{% else %}
<li class="active"><a href="/page/{{page_num-1}}" class="prev">&laquo;</a></li>
{% endif %}
{% endif %}

{% if page_num > 1 %}
{% if (page_num-1) == 1 %}
<a href="/" class="prev"><前</a>
{% else %}
<a href="/page/{{page_num-1}}" class="prev"><前</a>
{% endif %}
{% endif %}
<li><span class="page-num">{{page_num}}</span></li>

[<span class="page-num">{{page_num}}</span>p]

{% if next_page_is_exist %}
<a href="/page/{{page_num+1}}" class="next">次></a>
{% endif %}

<br>
{% if next_page_is_exist %}
<li class="active"><a href="/page/{{page_num+1}}" class="next">&raquo;</a></li>
{% endif %}
</ul>
</div>
{% endautoescape %}
File renamed without changes.
39 changes: 37 additions & 2 deletions templates/frame.twig
Original file line number Diff line number Diff line change
@@ -1,11 +1,46 @@
{% autoescape true %}
<html>
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<title>Tinitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/vendor/bootstrap/css/bootstrap.min.css">
<link rel="stylesheet" href="/vendor/bootstrap/css/bootstrap-theme.min.css">

<link rel="stylesheet" href="/css/site.css">
</head>
<body>
{% block content %}{% endblock %}

<header class="navbar navbar-inverse bs-docs-nav" role="banner">
<div class="container">
<div class="navbar-header">
<a href="/" class="navbar-brand">Tinitter</a>
</div>
</div>
</header>

<main id="content" role="main">
<div class="container">
<div class="row">
<div class="col-md-3"></div>
<div class="col-md-6">
{% block content %}{% endblock %}
</div>
<div class="col-md-3"></div>
</div>
</div>
</main>

<footer>
<div class="container">
<hr>
<p class="text-center">Powered by PHP</p>
</div>
</footer>

<script src="/vendor/jquery.js"></script>
<script src="/vendor/bootstrap/js/bootstrap.min.js"></script>
</body>
</html>
{% endautoescape %}
6 changes: 0 additions & 6 deletions templates_bootstrap/Post/form.twig

This file was deleted.

19 changes: 0 additions & 19 deletions templates_bootstrap/_Parts/Pager.twig

This file was deleted.

46 changes: 0 additions & 46 deletions templates_bootstrap/frame.twig

This file was deleted.

6 changes: 6 additions & 0 deletions templates_simple/Post/form.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% extends "frame.twig" %}
{% block content %}
{% autoescape true %}
{% include "_Parts/Form.twig" %}
{% endautoescape %}
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
{% for post in post_list %}
<div class="postcell">
<div class="body">{{ post.body|nl2br }}</div>
<div class="info">
post by <span class="nickname">{{ post.nickname }}</span>
<span class="date">({{ post.created_at }})</span>
<div>
post by <span class="nickname">{{ post.nickname }}</span> ({{ post.created_at }})
</div>
</div>
<hr>
{% endfor %}

{% include "_Parts/Pager.twig" %}
Expand Down
File renamed without changes.
19 changes: 19 additions & 0 deletions templates_simple/_Parts/Pager.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% autoescape true %}
<br>

{% if page_num > 1 %}
{% if (page_num-1) == 1 %}
<a href="/" class="prev"><前</a>
{% else %}
<a href="/page/{{page_num-1}}" class="prev"><前</a>
{% endif %}
{% endif %}

[<span class="page-num">{{page_num}}</span>p]

{% if next_page_is_exist %}
<a href="/page/{{page_num+1}}" class="next">次></a>
{% endif %}

<br>
{% endautoescape %}
11 changes: 11 additions & 0 deletions templates_simple/frame.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{% autoescape true %}
<html>
<head>
<meta charset="UTF-8">
<title>Tinitter</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
{% endautoescape %}

0 comments on commit 1c1c242

Please sign in to comment.