Skip to content

Commit

Permalink
fixed responsive with issue typecho#74
Browse files Browse the repository at this point in the history
update grid system
  • Loading branch information
fen committed Nov 18, 2013
1 parent f86646b commit 3873bff
Show file tree
Hide file tree
Showing 32 changed files with 56 additions and 54 deletions.
22 changes: 9 additions & 13 deletions admin/css/grid.css
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
* Bento Grid System
* Source: https://github.com/fenbox/bento
* Version: 1.2.5
* Update: 2013.11.02
* Version: 1.2.7
* Update: 2013.11.15
*/
.col-group [class*="col-"] {
.colgroup [class*="col-"] {
float: left;
min-height: 1px;
padding-right: 10px;
Expand All @@ -13,8 +13,8 @@
-moz-box-sizing: border-box;
box-sizing: border-box; }

.col-group [class*="push-"],
.col-group [class*="pull-"] {
.colgroup [class*="push-"],
.colgroup [class*="pull-"] {
position: relative; }

/*
Expand Down Expand Up @@ -218,13 +218,9 @@
.col-tb-push-12 {
left: 100%; }

.col-group {
.colgroup {
margin-right: -10px;
margin-left: -10px; } }
.col-group .col-group {
margin-right: -10px;
margin-left: -10px; }

/*
* Desktop and up
*/
Expand Down Expand Up @@ -558,10 +554,10 @@
/*
* Clearfix
*/
.clearfix, .col-group {
.clearfix, .colgroup {
zoom: 1; }
.clearfix:before, .col-group:before, .clearfix:after, .col-group:after {
.clearfix:before, .colgroup:before, .clearfix:after, .colgroup:after {
content: " ";
display: table; }
.clearfix:after, .col-group:after {
.clearfix:after, .colgroup:after {
clear: both; }
3 changes: 3 additions & 0 deletions admin/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,9 @@ button {
.typecho-install .typecho-install-body input {
width: 100%; }

.typecho-install-body .typecho-option li {
margin: 1em 0; }

/**
* 欢迎界面
*/
Expand Down
2 changes: 1 addition & 1 deletion admin/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="main">
<div class="container typecho-dashboard">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12 col-tb-3 typecho-dashboard-nav" role="main">
<p class="intro"><?php _e('欢迎使用 Typecho, 您可以使用下面的链接开始您的 Blog 之旅:'); ?></p>

Expand Down
2 changes: 1 addition & 1 deletion admin/manage-comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="main">
<div class="colgroup typecho-page-main" role="main">
<div class="col-mb-12 typecho-list">
<ul class="typecho-option-tabs clearfix">
<li<?php if(!isset($request->status) || 'approved' == $request->get('status')): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('manage-comments.php'
Expand Down
2 changes: 1 addition & 1 deletion admin/manage-medias.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="main">
<div class="colgroup typecho-page-main" role="main">
<div class="col-mb-12">

<div class="typecho-list-operate clearfix">
Expand Down
2 changes: 1 addition & 1 deletion admin/manage-metas.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main manage-metas">
<div class="colgroup typecho-page-main manage-metas">
<div class="col-mb-12">
<ul class="typecho-option-tabs clearfix">
<li<?php if(!isset($request->type) || 'category' == $request->get('type')): ?> class="current"<?php endif; ?>><a href="<?php $options->adminUrl('manage-metas.php'); ?>"><?php _e('分类'); ?></a></li>
Expand Down
2 changes: 1 addition & 1 deletion admin/manage-pages.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="main">
<div class="colgroup typecho-page-main" role="main">
<div class="col-mb-12 typecho-list">
<div class="typecho-list-operate clearfix">
<form method="get">
Expand Down
2 changes: 1 addition & 1 deletion admin/manage-posts.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="main">
<div class="colgroup typecho-page-main" role="main">
<div class="col-mb-12 typecho-list">
<div class="typecho-list-operate clearfix">
<form method="get">
Expand Down
2 changes: 1 addition & 1 deletion admin/manage-users.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="main">
<div class="colgroup typecho-page-main" role="main">
<div class="col-mb-12 typecho-list">
<div class="typecho-list-operate clearfix">
<form method="get">
Expand Down
2 changes: 1 addition & 1 deletion admin/media.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12 col-tb-8" role="main">
<?php if ($attachment->attachment->isImage): ?>
<p><img src="<?php $attachment->attachment->url(); ?>" alt="<?php $attachment->attachment->name(); ?>" class="typecho-attachment-photo" /></p>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-discussion.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<?php Typecho_Widget::widget('Widget_Options_Discussion')->form()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-general.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<?php Typecho_Widget::widget('Widget_Options_General')->form()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-permalink.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<?php Typecho_Widget::widget('Widget_Options_Permalink')->form()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<?php Typecho_Widget::widget('Widget_Plugins_Config')->config()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-reading.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<?php Typecho_Widget::widget('Widget_Options_Reading')->form()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/options-theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12">
<ul class="typecho-option-tabs clearfix">
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
Expand Down
2 changes: 1 addition & 1 deletion admin/page-title.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="col-group">
<div class="colgroup">
<div class="typecho-page-title col-mb-12">
<h2><?php echo $menu->title; ?><?php
if (!empty($menu->addLink)) {
Expand Down
2 changes: 1 addition & 1 deletion admin/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12 typecho-list">
<?php Typecho_Widget::widget('Widget_Plugins_List_Activated')->to($activatedPlugins); ?>
<?php if ($activatedPlugins->have() || !empty($activatedPlugins->activatedPlugins)): ?>
Expand Down
2 changes: 1 addition & 1 deletion admin/profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12 col-tb-3">
<p><a href="http://gravatar.com/emails/" title="<?php _e('在 Gravatar 上修改头像'); ?>"><?php echo '<img class="avatar" src="http://www.gravatar.com/avatar/' . md5($user->mail) . '?s=220&r=X' .
'&d=" alt="' . $user->screenName . '" />'; ?></a></p>
Expand Down
19 changes: 7 additions & 12 deletions admin/scss/grid.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* Bento Grid System
* Source: https://github.com/fenbox/bento
* Version: 1.2.5
* Update: 2013.11.02
* Version: 1.2.7
* Update: 2013.11.15
*/

//
Expand All @@ -19,11 +19,11 @@ $screen-desktop: 992px;
$screen-wide: 1200px;

// Column group
.col-group {
.colgroup {
@extend .clearfix;
}

.col-group [class*="col-"] {
.colgroup [class*="col-"] {
float: left;
min-height: 1px;
padding-right: $gutter-width / 2;
Expand All @@ -33,8 +33,8 @@ $screen-wide: 1200px;
box-sizing: border-box;
}

.col-group [class*="push-"],
.col-group [class*="pull-"] {
.colgroup [class*="push-"],
.colgroup [class*="pull-"] {
position: relative;
}

Expand Down Expand Up @@ -91,17 +91,12 @@ $screen-wide: 1200px;
}

// Groups
.col-group {
.colgroup {
margin-right: $gutter-width / -2;
margin-left: $gutter-width / -2;
}
}

.col-group .col-group {
margin-right: $gutter-width / -2;
margin-left: $gutter-width / -2;
}


/*
* Desktop and up
Expand Down
3 changes: 3 additions & 0 deletions admin/scss/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ a.button:hover, a.balloon-button:hover {
.typecho-install .typecho-install-body input {
width: 100%;
}
.typecho-install-body .typecho-option li {
margin: 1em 0;
}


/**
Expand Down
2 changes: 1 addition & 1 deletion admin/theme-editor.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12">
<ul class="typecho-option-tabs clearfix">
<li><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
Expand Down
2 changes: 1 addition & 1 deletion admin/themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12">
<ul class="typecho-option-tabs clearfix">
<li class="current"><a href="<?php $options->adminUrl('themes.php'); ?>"><?php _e('可以使用的外观'); ?></a></li>
Expand Down
2 changes: 1 addition & 1 deletion admin/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12">
<div id="typecho-welcome">
<form action="<?php echo Typecho_Router::url('do', array('action' => 'upgrade', 'widget' => 'Upgrade'),
Expand Down
2 changes: 1 addition & 1 deletion admin/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main" role="form">
<div class="colgroup typecho-page-main" role="form">
<div class="col-mb-12 col-tb-6 col-tb-offset-3">
<?php Typecho_Widget::widget('Widget_Users_Edit')->form()->render(); ?>
</div>
Expand Down
2 changes: 1 addition & 1 deletion admin/welcome.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main">
<div class="colgroup typecho-page-main">
<div class="col-mb-12">
<div id="typecho-welcome" class="message">
<form action="<?php $options->adminUrl(); ?>" method="get">
Expand Down
2 changes: 1 addition & 1 deletion admin/write-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main typecho-post-area" role="form">
<div class="colgroup typecho-page-main typecho-post-area" role="form">
<form action="<?php $options->index('/action/contents-page-edit'); ?>" method="post" name="write_page">
<div class="col-mb-12 col-tb-9" role="main">
<?php if ($page->draft && $page->draft['cid'] != $page->cid): ?>
Expand Down
2 changes: 1 addition & 1 deletion admin/write-post.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="main">
<div class="body container">
<?php include 'page-title.php'; ?>
<div class="col-group typecho-page-main typecho-post-area" role="form">
<div class="colgroup typecho-page-main typecho-post-area" role="form">
<form action="<?php $options->index('/action/contents-post-edit'); ?>" method="post" name="write_post">
<div class="col-mb-12 col-tb-9" role="main">
<?php if ($post->draft && $post->draft['cid'] != $post->cid): ?>
Expand Down
2 changes: 1 addition & 1 deletion install.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ function _u()
</ol>
</div>
<div class="container">
<div class="col-group">
<div class="colgroup">
<div class="col-mb-12 col-tb-8 col-tb-offset-2">
<div class="column-14 start-06 typecho-install">
<?php if (isset($_GET['finish'])) : ?>
Expand Down
2 changes: 1 addition & 1 deletion usr/themes/default/footer.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


</div><!-- end .col-group -->
</div><!-- end .colgroup -->
</div>
</div><!-- end #body -->

Expand Down
6 changes: 3 additions & 3 deletions usr/themes/default/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<header id="header" class="clearfix">
<div class="container">
<div class="col-group">
<div class="colgroup">
<div class="site-name col-mb-12 col-9">
<a id="logo" href="<?php $this->options->siteUrl(); ?>">
<?php if ($this->options->logoUrl): ?>
Expand All @@ -52,12 +52,12 @@
<?php endwhile; ?>
</nav>
</div>
</div><!-- end .col-group -->
</div><!-- end .colgroup -->
</div>
</header><!-- end #header -->
<div id="body">
<div class="container">
<div class="col-group">
<div class="colgroup">



5 changes: 5 additions & 0 deletions usr/themes/default/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,11 @@ img.alignright {
body {
font-size: 81.25%;
}
#nav-menu a {
float: none;
display: inline-block;
margin: 0 -2px;
}
}

@media (max-width: 768px) {
Expand Down

0 comments on commit 3873bff

Please sign in to comment.