如何在 Jekyll Time Machine 主题中使主要内容的容器更宽?

问题描述 投票:0回答:2

我正在 GitHub 上使用 Jekyll Time Machine 主题,并希望使主要内容部分更宽:

https://ieg-dhr.github.io/DigiKAR_Projektseminar/

我已检查 stylesheet.css 文件,但找不到正确的设置。

以下代码似乎与整个页面背景相关,而不是包含文本和图像的“框”:

#container {
  border: 1px solid #2a2a2a;
  background: #ddd url(../images/pattern.png);
  box-shadow: 0 0 5px #b1b1b1;
}

我已在开发人员存储库中发布了一个问题,但到目前为止尚未收到回复。因此,如果有人也使用Time Machine,我非常感谢您的帮助。

编辑:

与我之前使用过的其他主题相反,我通常发现时间机器很难定制。我也在为表格中的列宽而苦苦挣扎。

我的页面的 Github 显示显示了我想要的内容(不同的列大小和表格宽度):

https://github.com/ieg-dhr/DigiKAR_Projektseminar/blob/main/README.md

但是在Time Machine部署中,它们都是一样的:

https://ieg-dhr.github.io/DigiKAR_Projektseminar/

css jekyll github-pages
2个回答
0
投票

Time Machine jekyll 主题将主要内容的宽度设置为

width: 675px;
[1]。我可以在你的 stylesheet.css 中看到将宽度设置为
100%
[2],我相信这可以解析为时间机器的
width: 675px;

我认为您需要编辑 stylesheet.css 以覆盖 Time Machine 主题的宽度。

[1] https://github.com/pages-themes/time-machine/blob/master/_sass/jekyll-theme-time-machine.scss#L37-L40

[2] https://github.com/ieg-dhr/DigiKAR_Projektseminar/blob/main/stylesheets/stylesheet.css#L461-L464


0
投票

我遇到了同样的问题,并在这里寻找解决方案。 在你的 github 站点中,问题是文件名

/assets/css/style.css

应该是

/assets/css/style.scss

https://github.com/pages-themes/time-machine/tree/master#stylesheet

© www.soinside.com 2019 - 2024. All rights reserved.