from api.models import Deleted
from api.handlers import WL_BASE
from librarian.dcparser import BookInfo
+from librarian import WLURI
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from datetime import datetime
finally:
book.xml_file.close()
md = wl_dc_reader(xml)
- return md.getMap()
+ m = md.getMap()
+ if book.parent:
+ m['isPartOf'] = [str(WLURI.from_slug(book.parent.slug))]
+ return m
def record_for_book(self, book, headers_only=False):
meta = None
from django.conf.urls.defaults import *
urlpatterns = patterns('oai.views',
- url(r'^$', 'oaipmh'))
+ url(r'^$', 'oaipmh', name='oaipmh'))
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from django.contrib import admin
+from django.utils.translation import ugettext_lazy as _
from social.models import Cite
class CiteAdmin(admin.ModelAdmin):
- list_display = ['text', 'vip', 'small']
+ list_display = ['text', 'sticky', 'vip', 'small', 'has_image']
+ fieldsets = (
+ (None, {'fields': ('book', 'text', 'small', 'vip', 'link', 'sticky')}),
+ (
+ _('Background'),
+ {'fields': ('image', 'image_shift', 'image_title', 'image_author',
+ 'image_link', 'image_license', 'image_license_link')
+ }
+ )
+ )
+
+ def has_image(self, cite):
+ return bool(cite.image)
+ has_image.description = _('image')
+ has_image.boolean = True
admin.site.register(Cite, CiteAdmin)
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2012-07-19 11:40+0200\n"
-"PO-Revision-Date: 2012-07-16 15:13+0100\n"
-"Last-Translator: Marcin Koziej <marcin@lolownia.org>\n"
+"POT-Creation-Date: 2012-09-06 17:09+0200\n"
+"PO-Revision-Date: 2012-09-06 17:10+0100\n"
+"Last-Translator: Radek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
-"|| n%100>=20) ? 1 : 2)\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
+
+#: admin.py:16
+msgid "Background"
+msgstr "Obraz tła"
+
+#: admin.py:25
+#: models.py:22
+msgid "image"
+msgstr "obraz"
#: forms.py:23
msgid "Tags (comma-separated)"
#: forms.py:47
msgid "Name of the new shelf"
-msgstr ""
+msgstr "Nazwa nowej półki"
+
+#: models.py:13
+msgid "book"
+msgstr "książka"
#: models.py:14
msgid "text"
msgid "small"
msgstr "mały"
-#: models.py:15
+#: models.py:16
msgid "Make this cite display smaller."
msgstr "Sprawia, że cytat wyświetla się mniejszym fontem."
-#: models.py:16
+#: models.py:17
msgid "VIP"
-msgstr ""
+msgstr "VIP"
-#: models.py:17
+#: models.py:18
+#: models.py:30
msgid "link"
-msgstr ""
+msgstr "odnośnik"
+
+#: models.py:19
+msgid "sticky"
+msgstr "przyklejony"
+
+#: models.py:20
+msgid "Sticky cites will take precedense."
+msgstr "Przyklejone cytaty mają pierwszeństwo."
+
+#: models.py:24
+msgid "shift"
+msgstr "przesunięcie"
+
+#: models.py:25
+msgid "Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%."
+msgstr "Przesunięcie w pionie, w procentach. 0 to wyrównanie do górnej krawędzi, 100 do dolnej. Domyślne jest 50%."
+
+#: models.py:26
+msgid "title"
+msgstr "tytuł"
+
+#: models.py:28
+msgid "author"
+msgstr "autor"
+
+#: models.py:31
+msgid "license name"
+msgstr "nazwa licencji"
+
+#: models.py:33
+msgid "license link"
+msgstr "adres licencji"
+
+#: models.py:37
+msgid "cite"
+msgstr "cytat"
+
+#: models.py:38
+msgid "cites"
+msgstr "cytaty"
#: templates/social/cite_promo.html:6
msgid "recommends"
msgstr "poleca"
-#: templates/social/my_shelf.html:5 templates/social/my_shelf.html.py:11
+#: templates/social/my_shelf.html:5
+#: templates/social/my_shelf.html.py:11
msgid "My shelf"
msgstr "Moja półka"
#: templates/social/my_shelf.html:16
-msgid ""
-"Add works to your shelf by clicking on the star on the page of the work. The "
-"work will then show up on My shelf page."
-msgstr ""
-"Aby dodać pozycję do swojej półki, należy zaznaczyć gwiazdkę znajdującą się "
-"na stronie utworu. Po jej zaznaczeniu publikacja pojawi się w zakładce Moja "
-"półka."
+msgid "Add works to your shelf by clicking on the star on the page of the work. The work will then show up on My shelf page."
+msgstr "Aby dodać pozycję do swojej półki, należy zaznaczyć gwiazdkę znajdującą się na stronie utworu. Po jej zaznaczeniu publikacja pojawi się w zakładce Moja półka."
#: templates/social/sets_form.html:7
msgid "Remove from my shelf"
msgstr "Usuń z mojej półki"
+
--- /dev/null
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Cite.sticky'
+ db.add_column('social_cite', 'sticky',
+ self.gf('django.db.models.fields.BooleanField')(default=False),
+ keep_default=False)
+
+ # Adding field 'Cite.image'
+ db.add_column('social_cite', 'image',
+ self.gf('django.db.models.fields.files.ImageField')(max_length=100, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Cite.image_title'
+ db.add_column('social_cite', 'image_title',
+ self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Cite.image_author'
+ db.add_column('social_cite', 'image_author',
+ self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Cite.image_link'
+ db.add_column('social_cite', 'image_link',
+ self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Cite.image_license'
+ db.add_column('social_cite', 'image_license',
+ self.gf('django.db.models.fields.CharField')(max_length=255, null=True, blank=True),
+ keep_default=False)
+
+ # Adding field 'Cite.image_license_link'
+ db.add_column('social_cite', 'image_license_link',
+ self.gf('django.db.models.fields.URLField')(max_length=200, null=True, blank=True),
+ keep_default=False)
+
+
+ def backwards(self, orm):
+ # Deleting field 'Cite.sticky'
+ db.delete_column('social_cite', 'sticky')
+
+ # Deleting field 'Cite.image'
+ db.delete_column('social_cite', 'image')
+
+ # Deleting field 'Cite.image_title'
+ db.delete_column('social_cite', 'image_title')
+
+ # Deleting field 'Cite.image_author'
+ db.delete_column('social_cite', 'image_author')
+
+ # Deleting field 'Cite.image_link'
+ db.delete_column('social_cite', 'image_link')
+
+ # Deleting field 'Cite.image_license'
+ db.delete_column('social_cite', 'image_license')
+
+ # Deleting field 'Cite.image_license_link'
+ db.delete_column('social_cite', 'image_license_link')
+
+
+ models = {
+ 'catalogue.book': {
+ 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
+ '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
+ 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
+ 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
+ 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
+ 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
+ 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
+ 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
+ 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
+ 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
+ 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
+ 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
+ },
+ 'social.cite': {
+ 'Meta': {'ordering': "('vip', 'text')", 'object_name': 'Cite'},
+ 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']"}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'image_author': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'image_license': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'image_license_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'image_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'image_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'small': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'sticky': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'text': ('django.db.models.fields.TextField', [], {}),
+ 'vip': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['social']
\ No newline at end of file
--- /dev/null
+# -*- coding: utf-8 -*-
+import datetime
+from south.db import db
+from south.v2 import SchemaMigration
+from django.db import models
+
+
+class Migration(SchemaMigration):
+
+ def forwards(self, orm):
+ # Adding field 'Cite.image_shift'
+ db.add_column('social_cite', 'image_shift',
+ self.gf('django.db.models.fields.IntegerField')(null=True, blank=True),
+ keep_default=False)
+
+ # Adding index on 'Cite', fields ['sticky']
+ db.create_index('social_cite', ['sticky'])
+
+
+ # Changing field 'Cite.book'
+ db.alter_column('social_cite', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(to=orm['catalogue.Book'], null=True))
+
+ def backwards(self, orm):
+ # Removing index on 'Cite', fields ['sticky']
+ db.delete_index('social_cite', ['sticky'])
+
+ # Deleting field 'Cite.image_shift'
+ db.delete_column('social_cite', 'image_shift')
+
+
+ # Changing field 'Cite.book'
+ db.alter_column('social_cite', 'book_id', self.gf('django.db.models.fields.related.ForeignKey')(default=0, to=orm['catalogue.Book']))
+
+ models = {
+ 'catalogue.book': {
+ 'Meta': {'ordering': "('sort_key',)", 'object_name': 'Book'},
+ '_related_info': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
+ 'changed_at': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'common_slug': ('django.db.models.fields.SlugField', [], {'max_length': '120'}),
+ 'cover': ('catalogue.fields.EbookField', [], {'max_length': '100', 'null': 'True', 'format_name': "'cover'", 'blank': 'True'}),
+ 'created_at': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'db_index': 'True', 'blank': 'True'}),
+ 'description': ('django.db.models.fields.TextField', [], {'blank': 'True'}),
+ 'epub_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'epub'", 'blank': 'True'}),
+ 'extra_info': ('jsonfield.fields.JSONField', [], {'default': "'{}'"}),
+ 'fb2_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'fb2'", 'blank': 'True'}),
+ 'gazeta_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'html_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'html'", 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'language': ('django.db.models.fields.CharField', [], {'default': "'pol'", 'max_length': '3', 'db_index': 'True'}),
+ 'mobi_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'mobi'", 'blank': 'True'}),
+ 'parent': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'children'", 'null': 'True', 'to': "orm['catalogue.Book']"}),
+ 'parent_number': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
+ 'pdf_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'pdf'", 'blank': 'True'}),
+ 'slug': ('django.db.models.fields.SlugField', [], {'unique': 'True', 'max_length': '120'}),
+ 'sort_key': ('django.db.models.fields.CharField', [], {'max_length': '120', 'db_index': 'True'}),
+ 'title': ('django.db.models.fields.CharField', [], {'max_length': '120'}),
+ 'txt_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'txt'", 'blank': 'True'}),
+ 'wiki_link': ('django.db.models.fields.CharField', [], {'max_length': '240', 'blank': 'True'}),
+ 'xml_file': ('catalogue.fields.EbookField', [], {'default': "''", 'max_length': '100', 'format_name': "'xml'", 'blank': 'True'})
+ },
+ 'social.cite': {
+ 'Meta': {'ordering': "('vip', 'text')", 'object_name': 'Cite'},
+ 'book': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['catalogue.Book']", 'null': 'True', 'blank': 'True'}),
+ 'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
+ 'image': ('django.db.models.fields.files.ImageField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
+ 'image_author': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'image_license': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'image_license_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'image_link': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
+ 'image_shift': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
+ 'image_title': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
+ 'link': ('django.db.models.fields.URLField', [], {'max_length': '200'}),
+ 'small': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
+ 'sticky': ('django.db.models.fields.BooleanField', [], {'default': 'False', 'db_index': 'True'}),
+ 'text': ('django.db.models.fields.TextField', [], {}),
+ 'vip': ('django.db.models.fields.CharField', [], {'max_length': '128', 'null': 'True', 'blank': 'True'})
+ }
+ }
+
+ complete_apps = ['social']
\ No newline at end of file
class Cite(models.Model):
- book = models.ForeignKey(Book)
+ book = models.ForeignKey(Book, verbose_name=_('book'), null=True, blank=True)
text = models.TextField(_('text'))
- small = models.BooleanField(_('small'), default=False, help_text=_('Make this cite display smaller.'))
+ small = models.BooleanField(_('small'), default=False,
+ help_text=_('Make this cite display smaller.'))
vip = models.CharField(_('VIP'), max_length=128, null=True, blank=True)
link = models.URLField(_('link'))
+ sticky = models.BooleanField(_('sticky'), default=False, db_index=True,
+ help_text=_('Sticky cites will take precedense.'))
+
+ image = models.ImageField(_('image'), upload_to='social/cite',
+ null=True, blank=True)
+ image_shift = models.IntegerField(_('shift'), null=True, blank=True,
+ help_text=_(u'Vertical shift, in percents. 0 means top, 100 is bottom. Default is 50%.'))
+ image_title = models.CharField(_('title'), max_length=255,
+ null=True, blank=True)
+ image_author = models.CharField(_('author'),
+ max_length=255, blank=True, null=True)
+ image_link = models.URLField(_('link'), blank=True, null=True)
+ image_license = models.CharField(_('license name'),
+ max_length=255, blank=True, null=True)
+ image_license_link = models.URLField(_('license link'), blank=True, null=True)
class Meta:
ordering = ('vip', 'text')
+ verbose_name = _('cite')
+ verbose_name_plural = _('cites')
def __unicode__(self):
return u"%s: %s…" % (self.vip, self.text[:60])
<blockquote class="cite-body">
<span>{{ cite.text|linebreaksbr|safe }}</span>
</blockquote>
+ {% if cite.book %}
<p class="source mono"><span>{{ cite.book.pretty_title }}</span></p>
+ {% endif %}
</a>
{% else %}
{% if fallback %}
register.filter('likes', likes)
-@register.inclusion_tag('social/cite_promo.html', takes_context=True)
-def cite_promo(context, ctx=None, fallback=False):
- """Choose"""
+@register.assignment_tag(takes_context=True)
+def choose_cite(context, ctx=None):
+ """Choose a cite for main page, for book or for set of tags."""
try:
request = context['request']
assert request.user.is_staff
cites = cites_for_tags([ctx.book_tag()])
else:
cites = cites_for_tags(ctx)
- cite = cites.order_by('?')[0] if cites.exists() else None
+ cite = cites.order_by('-sticky', '?')[0] if cites.exists() else None
+ return cite
+
+@register.inclusion_tag('social/cite_promo.html')
+def render_cite(cite):
return {
'cite': cite,
+ }
+
+
+@register.inclusion_tag('social/cite_promo.html', takes_context=True)
+def cite_promo(context, ctx=None, fallback=False):
+ return {
+ 'cite': choose_cite(context, ctx),
'fallback': fallback,
'ctx': ctx,
}
{% block ogtitle %}{% trans "Wolne Lektury internet library" %}{% endblock %}
{% block body %}
-
- <div id="big-cite">
- {% cite_promo %}
+ <div id="big-cite"{% if cite.image %}
+ style="
+ background-image: url('{{ cite.image.url }}');
+ background-position: 50% {{ cite.image_shift|default_if_none:50 }}%;
+ "{% endif %} >
+ {% render_cite cite %}
</div>
{% spaceless %}
<li><a href="{% url suggest_publishing %}" id="suggest-publishing" class="ajaxable">{% trans "Missing a book?" %}</a></li>
<li><a href="{% url publish_plan %}">{% trans "Publishing plan" %}</a></li>
<li><a href="{% url api %}">API</a></li>
+ <li><a href="{% url oaipmh %}">OAI-PMH</a></li>
<li><a href="{% url lesmianator %}">Leśmianator</a></li>
<li><a href="http://polski.wolnelektury.pl">Materiały do nauki j. polskiego</a></li>
{% block add_footer %}
<p>{% trans "Image used:" %}
-<a href="http://www.flickr.com/photos/lou/430980641/">books about architecture</a>,
-saikofish@Flickr,
-<a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY NC SA</a>.
+{% if cite.image %}
+ {% if cite.image_link %}<a href="{{ cite.image_link }}">{% endif %}
+ {% if cite.image_title %}
+ {{ cite.image_title }}{% else %}
+ untitled{% endif %}{% if cite.image_link %}</a>{% endif %},
+ {% if cite.image_author %}{{ cite.image_author }},{% endif %}
+ {% if cite.image_license_link %}<a href="{{ cite.image_license_link }}">{% endif %}
+ {{ cite.image_license }}
+ {% if cite.image_license_link %}</a>{% endif %}
+{% else %}
+ <a href="http://www.flickr.com/photos/lou/430980641/">books about architecture</a>,
+ saikofish@Flickr,
+ <a href="http://creativecommons.org/licenses/by-nc-sa/2.0/">CC BY NC SA</a>.
+{% endif %}
</p>
{% endblock %}
from ajaxable.utils import AjaxableFormView
from catalogue.models import Book
from ajaxable.utils import placeholdized
+from social.templatetags.social_tags import choose_cite
@never_cache
def main_page(request):
last_published = Book.objects.filter(parent=None).order_by('-created_at')[:4]
+ cite = choose_cite(RequestContext(request))
return render_to_response("main_page.html", locals(),
context_instance=RequestContext(request))
-Subproject commit 8059679abd4a0a2e554457dd6266941a31356f73
+Subproject commit 1ffcf32a8d795681f54bd125ca45e908da5ed3fb