grid固定宽度

master
xaoxuu 4 years ago
parent 741daa5e12
commit 4e8deda07d
  1. 2
      layout/_widget/grid.ejs
  2. 11
      source/css/_layout/sidebar.styl

@ -2,7 +2,7 @@
<section class="widget <%- item.class %> <%- page.widget_style %> <%- page.widget_platform %>">
<%- partial('header', {item: item}) %>
<div class='content'>
<div class="grid navigation">
<div class="grid navigation<%- item.fixed ? ' fixed' : '' %>">
<% (item.rows||[]).forEach(function(row){ %>
<a class="flat-box" title="<%- url_for(row.url) %>" href="<%- url_for(row.url) %>"
<% if (row.rel) { %>

@ -270,6 +270,17 @@
color: $color-theme
border: 1px solid $color-theme
&.fixed a
width: "calc(100%/3 - 0 * %s)" % $gap
@media screen and (max-width: $device-tablet)
width: "calc(100%/6 - 0 * %s)" % $gap
@media screen and (max-width: $device-mobile)
width: "calc(100%/5 - 0 * %s)" % $gap
@media screen and (max-width: $device-mobile-l)
width: "calc(100%/4 - 0 * %s)" % $gap
@media screen and (max-width: $device-mobile-m)
width: "calc(100%/3 - 0 * %s)" % $gap

Loading…
Cancel
Save