- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我目前在 Squarespace 6 中使用 Flatiron 模板。画廊中的每张图片目前都显示图片、标题和图片下方的 -view-。我希望将 -view- 更改为每个画廊元素所特有的不同名称(具体来说是一个城市)。
其中一个网格项的源代码是这样的:
<script>
Y.use('squarespace-ui-base', function(Y) {
Y.one(".project-item .meta h1").plug(Y.Squarespace.TextShrink);
});
</script>
<!-- Main Grid -->
<div id="grid" data-collection-id="53ebab59e4b0c8271c405596">
<div class="item">
<a href="/diesel-pop-up-brooklyn-nyc/" data-dynamic-load data-dynamic-receiver="#detail_53ee8134e4b020d5c7faa7b3" >
<div class="wrapper">
<div class="project-title">
<h2>DIESEL POP-UP</h2>
<h3>— view —</h3>
</div>
</div>
<img class="thumbnail loading" data-src="http://static.squarespace.com/static/52937e51e4b006a2894ed2fb/t/540e3941e4b0438c2051340c/1410218366032/2.jpg" data-image="http://static.squarespace.com/static/52937e51e4b006a2894ed2fb/t/540e3941e4b0438c2051340c/1410218366032/2.jpg" data-image-dimensions="480x642" data-image-focal-point="0.5,0.5" alt="2.jpg" data-load="false" />
<noscript><img src="http://static.squarespace.com/static/52937e51e4b006a2894ed2fb/t/540e3941e4b0438c2051340c/1410218366032/2.jpg?format=original"></noscript>
</a>
</div>
我曾尝试在自定义 CSS 部分中使用它(只是为了尝试定位一个元素),但它只影响图像链接到的页面,而不是图像本身。
.project-item[data-dynamic-href='/diesel-pop-up-brooklyn-nyc/'] {
background-color: red;
是否有可以针对每个单独元素的代码?
最佳答案
前往:页面>设置>高级> header 注入(inject)(索引页)
然后粘贴以下内容:
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script>
$(document).ready(function () {
$(".item:nth-child(1) h3").text("1st item");
$(".item:nth-child(2) h3").text("2nd item");
$(".item:nth-child(3) h3").text("3rd item");
$(".item:nth-child(4) h3").text("4th item");
});
</script>
很酷。现在您可以将引号(第 1、2、3、4 项)中的文本更改为您想要替换“ View ”的任何文本。如果索引中的画廊超过 4 个,您可以复制一行并将其粘贴到下方,但只需确保将第 n 个子元素从 (4) 增加到 (5)。
希望对您有所帮助!
关于css - 定位单个画廊元素 - Squarespace Flatiron 模板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25796833/
是否可以在 flatiron/director 中创建带有可选参数的路由? var router = Router({ 'order' : function(){ // cre
我目前在 Squarespace 6 中使用 Flatiron 模板。画廊中的每张图片目前都显示图片、标题和图片下方的 -view-。我希望将 -view- 更改为每个画廊元素所特有的不同名称(具体来
我尝试运行 https://github.com/flatiron/director#client-side熟悉director.js 的示例。 我无法在客户端设置 flatiron 模块。 在我的
类似于 this question ,“我正在寻找每个框架的优缺点,以及为什么一个框架比另一个框架特别有用”(但主要是 Flatiron 必须提供的,因为 Express 在该问题中已经非常详细)。
我正在使用 Node.js 和 Flatiron,我想创建一个半简单的 HTTP 应用程序。 documentation来自 Flatiron 网站的文章很好地描述了每个组件,但不一定描述如何构建新的
我开始使用 Flatiron 作为网络应用程序的工具集进行设置。 我正在将director与app.plugins.http一起使用,并且似乎无法弄清楚如何为静态文件和404创建“包罗万象”的路由 -
有没有办法在 Flatiron 框架中使用 HTTPS 连接? 更新:HTTPS 服务器示例在 github 上可用现在。 最佳答案 引用 docs 看起来 https 可以添加为一个选项,应该是这样
我刚开始看 plates ,因为很多人都在谈论它。 有一些带有少量 html 片段的板示例,但不是真正成熟的模板文件。所以我想知道如何将布局特别是分成一个 layout.html 文件,并将内容分发到
所以,我刚开始使用 flatironjs 和“plates”。我试图弄清楚如何拥有一个主布局模板,然后是一个将内容加载到主布局模板中的部分模板,类似于 expressjs 的做法...... 对于 e
我在这里查看文档 http://flatironjs.org/创建应用程序框架。指定的命令是, flatiron create 但我没有看到“类型”的任何值。我尝试了 http 但它没有用。任何意
我是使用 node.js 进行服务器端编程的新手。我现在正在将一个小型网络应用程序与它粘在一起,并让通常的启动学习去做。以下代码有效。但我很想知道从表单上传简单文件并将其放入 aws s3 是否或多或
是否可以在 express.js 中使用 Flatiron 的 resourcefull (ODM)? 最佳答案 是的。 您需要使用 express 的资源路由器项目,https://github.c
我想在Flatiron中实现认证授权堆栈(使用 Flatiron、Resourceful 和 Restful)。我想要求用户在尝试更改资源时具有必要的权限。在 Restful 自述文件中,有一个 no
此问题与:flatiron-director / core-pages SPA with route specific js functions & default route直接相关。我确信该解决方
以simple example来自 Union,我想知道在哪里可以放置通常在 app.configure 中的配置代码,例如 passport.js : app.configure(function(
我在测试 flatiron 时遇到问题cli app与 Mocha . 我想测试的命令行命令会创建一个目录并使用 app.log.info 记录成功。 这是要测试的代码(./lib/commands/
我有一个 Flatiron 应用程序,现在需要对其进行扩展以处理图像的多部分/表单数据上传。 如何在 Flatiron 应用程序中处理文件上传? union/director 似乎忽略了 multip
faltiron的restful有区别吗和 node-restify ? 最佳答案 restful 获取使用 resourceful 创建的资源并自动为它们生成 RESTful 路由(类似于 Rail
来自express.js,想给flatiron尝试一个小项目。但是,有一些小问题使我无法真正取得进展。 var flatiron = require('flatiron') , session =
在发布这个问题时,我想出了答案,但我会在这里发布,以防它帮助其他人,也许有人可以帮助解决发生的原因。 当我运行时: sudo npm install -g grunt 它的最后一部分说: /usr/b
我是一名优秀的程序员,十分优秀!