Selaa-palkki sijoittuu etusivun hakuosion alaosaan. Organisaatiot voivat nostaa palkkiin omia kiinnostavia aineistoja. 

  • Selaa-palkki saadaan käyttöön kopioimalla oheinen template kansioon themes/custom/templates/search/home. Tiedoston nimeksi browsebar.phtml

 

<!-- START of: finna - search/browsebar.phtml -->
<div class="browsebar">
    <div class="container">
        <div class="browse-link text-center hidden-xs"><a href="Content/organisations"><i class="iconlabel finna-logo"></i><?=$this->transEsc('finna_material_providers')?></a></div>
        <nav class="navbar">
            <span class="browsebar-title"><?=$this->translate('Browse')?></span>
            <div class="wrapper resize-drag nav-wrapper">
                <ul class="nav navbar-nav nav-ul">
                    <li><a class="iconlabel format-1imageimage" href="Search/Results?lookfor=&amp;type=AllFields&amp;filter%5B%5D=~format%3A%220%2FImage%2F%22&amp;filter%5B%5D=online_boolean%3A1"><?=$this->transEsc("format_Image_plural")?></a></li>
                    <li><a class="iconlabel cc-license" href="Search/Results?sort=author&amp;limit=50&amp;view=grid&amp;filter%5B%5D=online_boolean%3A%221%22&amp;filter%5B%5D=~usage_rights_str_mv%3A%22usage_B%22&amp;filter%5B%5D=~usage_rights_str_mv%3A%22usage_A%22&amp;type=AllFields"><?=$this->translate('unrestricted_collections');?></a></li>
                    <li><a class="iconlabel finna-street" href="Search/StreetSearch?go=1">Finna Street</a></li>
                    <li><a class="iconlabel format-1journalarticle" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FJournal%2F%22"><?=$this->transEsc("format_Journal_plural")?></a></li>
                    <li><a class="iconlabel format-1physicalobjectother" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FPhysicalObject%2F%22&amp;filter%5B%5D=online_boolean%3A1"><?=$this->transEsc("format_PhysicalObject_plural")?></a></li>
                    <li><a class="iconlabel format-1document" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FDocument%2F%22"><?=$this->transEsc("format_Document_plural")?></a></li>
                    <li><a class="iconlabel format-1videovideo" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FVideo%2F%22"><?=$this->transEsc("format_Video_plural")?></a></li>
                    <li><a class="iconlabel format-1soundrecord" href="Search/Results?type=AllFields&amp;filter%5B0%5D=~format%3A%220%2FSound%2F%22"><?=$this->transEsc("format_Sound/SoundRecording_plural")?></a></li>
                    <li><a class="iconlabel format-1bookbook" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FBook%2F%22"><?=$this->transEsc("format_Book/Book_plural")?></a></li>
                    <li><a class="iconlabel format-manuscript" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FThesis%2F%22&amp;filter%5B%5D=online_boolean%3A1"><?=$this->transEsc("format_Thesis_plural")?></a></li>
                    <li><a class="iconlabel format-1journalarticle" href="Search/Results?type=AllFields&amp;view=grid&amp;filter%5B%5D=online_boolean%3A1&amp;filter%5B%5D=~format%3A%220%2FWorkOfArt%2F%22"><?=$this->transEsc("format_WorkOfArt_plural")?></a></li>
                    <li><a class="iconlabel format-1mapmap" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FMap%2F%22"><?=$this->transEsc("format_Map_plural")?></a></li>
                    <li><a class="iconlabel format-0note" href="Search/Results?type=AllFields&amp;filter%5B%5D=~format%3A%220%2FMusicalScore%2F%22"><?=$this->transEsc("format_MusicalScore_plural")?></a></li>
                    <li><a class="iconlabel format-1placeplace" href="Search/Results?type=AllFields&amp;limit=50&amp;filter%5B%5D=~format%3A%220%2FPlace%2F%22&amp;filter%5B%5D=online_boolean%3A%221%22"><?=$this->transEsc("format_Place_plural")?></a></li>
                </ul>
            </div>
        </nav>
    </div>
</div>
<!-- END of: finna - search/browsebar.phtml -->

Fontawesome-kuvakkeiden käyttö selaa-palkissa

Selaa-palkissa voidaan käyttää myös Fontawesome-kirjaston kuvakkeita. Fontawesome-kuvakkeissa suositellaan käytettävän seuraava html-rakennetta:

<li><a href="Search/Results?filter%5B%5D=%7Eformat%3A%221%2FBook%2FeBook%2F%22&filter%5B%5D=online_boolean%3A%221%22&type=AllFields"><i class="fa fa-lg fa-tablet" aria-hidden="true"></i> <?=$this->translate('E-kirjoja');?></a></li>

Lisäksi seuraava tyylimääritys pitää tehdä custom.less tiedostoon:

.browsebar .nav>li a i.fa {
    margin-right: 0.5em;
}
  • No labels