Пример #1
0
emit('<ul class="toc">\n');

for x in downloads:
    emit('<li><a href="#%s">%s</a></li>\n' % (x['anchor'], x['label']))

emit('<li><a href="#history">Old Boost Releases</a></li>\n')
emit('<li><a href="#repository">Git Repositories</a></li>\n')
emit('</ul>\n')

for x in downloads:
    emit('<h2 id="%s">%s</h2>' % (x['anchor'], x['label']))
    for entry in x['entries']:
        emit('\n')
        emit('              <h3><span class=\n              "news-title">%s</span></h3>\n\n' % entry.full_title_xml)
        emit('              <p class="news-date">%s</p>\n\n' % entry.web_date())
        emit('              <p class="news-description">\n')
        emit('              <span class="brief"><span class="purpose">%s</span></span></p>\n\n' % entry.purpose_xml)
        emit('<ul class="menu">\n')
        emit('<li>')
        emit('<a href="/%s">Release Notes</a>' % htmlencode(entry.location))
        emit('</li>\n')
        if(entry.download_item):
            emit('<li>')
            emit('<a href="%s">Download</a>' % htmlencode(entry.download_item))
            emit('</li>\n')
        if(entry.documentation):
            emit('<li>')
            emit('<a href="%s">Documentation</a>' % htmlencode(entry.documentation))
            emit('</li>\n')
        emit('</ul>\n')
Пример #2
0
# TODO: This is duplicated from other places, should only be set once?
news = pages.match_pages(['feed/news/*.qbk', 'feed/history/*.qbk|released'], 3)

emit('<div class="directory-item" id="important-downloads">\n');
emit('<h2>Downloads</h2>\n');
emit('<div id="downloads">\n');

for x in downloads:
    label = x['label']
    entries = x['entries']
    emit('<h3>%s</h3>\n' % label)
    emit('<ul>\n')
    for entry in entries:
        emit('<li>')
        emit('<div class="news-title">')
        emit('<a href="/%s">%s</a>' % (htmlencode(entry.location),
            entry.full_title_xml))
        emit('</div>')
        emit('<div class="news-date">')
        emit('<a href="/%s">Release Notes</a>' % (htmlencode(entry.location)))
        if entry.download_item:
            emit(' | ')
            emit('<a href="%s">Download</a>' % (htmlencode(entry.download_item)))
        if entry.documentation:
            emit(' | ')
            emit('<a href="%s">Documentation</a>' % (htmlencode(entry.documentation)))
        emit('</div>')
        if entry.notice_xml:
            if entry.notice_url:
                emit('<div class="news-notice"><a class="news-notice-link" href="%s">%s</a></div>' %
                    (htmlencode(entry.notice_url), entry.notice_xml))
Пример #3
0
from boost_site.util import htmlencode

entries = pages.match_pages(['feed/news/*.qbk', 'feed/history/*.qbk|released'], 5)

emit('<ul class="toc">\n')
emit('                ')
for entry in entries:
    emit('\n')
    emit('                <li><span class=\n                "news-title"><a href="#i%s">%s</a></span></li>\n' % (htmlencode(entry.id), entry.title_xml))
emit('              </ul>')
for entry in entries:
    emit('\n')
    emit('              <h2 class="news-title">\n')
    emit('              <a name="i%s" id="i%s"></a><a href="/%s">%s</a>' % (entry.id, entry.id, htmlencode(entry.location), entry.title_xml))
    emit('</h2>\n\n')
    emit('              <p class="news-date">%s</p>\n\n' % (entry.web_date()))
    emit('              <div class="news-description">\n')
    emit('                <span class="brief"><span class="purpose">%s</span></span>\n' % (entry.purpose_xml))
    emit('              </div>\n\n')
    emit('<ul class="menu">\n')
    emit('<li>')
    emit('<a href="/%s">Release Notes</a>' % htmlencode(entry.location))
    emit('</li>\n')
    if(entry.download_item):
        emit('<li>')
        emit('<a href="%s">Download</a>' % htmlencode(entry.download_item))
        emit('</li>\n')
    if(entry.documentation):
        emit('<li>')
        emit('<a href="%s">Documentation</a>' % htmlencode(entry.documentation))
        emit('</li>\n')
Пример #4
0
from boost_site.util import htmlencode

title = 'Boost Version History'
entries = pages.match_pages(['feed/history/*.qbk|released'])

for entry in entries:
    emit('\n')
    emit(
        '              <h2 class="news-title">\n              <a name="i%s" id="i%s"></a><a href="/%s">%s</a></h2>\n\n'
        % (entry.id, entry.id, htmlencode(entry.location), entry.title_xml))
    emit('              <p class="news-date">%s</p>\n\n' % (entry.web_date()))
    emit('              <div class="news-description">\n')
    emit(
        '                <span class="brief"><span class="purpose">%s</span></span>\n'
        % (entry.purpose_xml))
    emit('              </div>\n\n')
    emit('<ul class="menu">\n')
    emit('<li>')
    emit('<a href="/%s">Release Notes</a>' % htmlencode(entry.location))
    emit('</li>\n')
    if (entry.download_item):
        emit('<li>')
        emit('<a href="%s">Download</a>' % htmlencode(entry.download_item))
        emit('</li>\n')
    if (entry.documentation):
        emit('<li>')
        emit('<a href="%s">Documentation</a>' %
             htmlencode(entry.documentation))
        emit('</li>\n')
    emit('</ul>\n')
Пример #5
0
news = pages.match_pages(['feed/news/*.qbk', 'feed/history/*.qbk|released'], 3)

emit('<div class="directory-item" id="important-downloads">\n')
emit('<h2>Downloads</h2>\n')
emit('<div id="downloads">\n')

for x in downloads:
    label = x['label']
    entries = x['entries']
    emit('<h3>%s</h3>\n' % label)
    emit('<ul>\n')
    for entry in entries:
        emit('<li>')
        emit('<div class="news-title">')
        emit('<a href="/%s">%s</a>' %
             (htmlencode(entry.location), entry.full_title_xml))
        emit('</div>')
        emit('<div class="news-date">')
        emit('<a href="/%s">Release Notes</a>' % (htmlencode(entry.location)))
        if entry.download_item:
            emit(' | ')
            emit('<a href="%s">Download</a>' %
                 (htmlencode(entry.download_item)))
        if entry.documentation:
            emit(' | ')
            emit('<a href="%s">Documentation</a>' %
                 (htmlencode(entry.documentation)))
        emit('</div>')
        if entry.notice_xml:
            if entry.notice_url:
                emit(