“。hamlet”文件中的^ {…}是什么意思

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

在此“ .hamlet”代码中,我想知道^{copyright}行的含义是什么>

$doctype 5
<html>
    <head>
        <title>#{pageTitle} - My Site
        <link rel=stylesheet href=@{Stylesheet}>
    <body>
        <h1 .page-title>#{pageTitle}
        <p>Here is a list of your friends:
        $if null friends
            <p>Sorry, I lied, you don't have any friends.
        $else
            <ul>
                $forall Friend name age <- friends
                    <li>#{name} (#{age} years old)
        <footer>^{copyright}

在此“ .hamlet”代码中,我想知道^ {copyright}第$ doctype 5行的含义是什么

#{pageTitle}-我的站点<link rel="...">
haskell yesod shakespeare-text
1个回答
0
投票

您被链接的示例可能会有些混乱,因为您在任何地方都看不到copyright功能。 copyright只是另一个功能。您可以使用^{..}功能将另一个小部件嵌入其中。这个例子可能对您有帮助:

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