Skip to content

Commit

Permalink
Fix missing icons
Browse files Browse the repository at this point in the history
  • Loading branch information
hellcp committed Mar 25, 2022
1 parent d44c51b commit bed4672
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 23 deletions.
16 changes: 8 additions & 8 deletions app/controllers/package_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ def image(pkgname, type)
# See https://specifications.freedesktop.org/menu-spec/menu-spec-latest.html
def set_categories
@main_sections = [
{ name: _('Games'), id: 'Games', icon: 'puzzle-outline', categories: ['Game'] },
{ name: _('Development'), id: 'Development', icon: 'code-outline', categories: ['Development'] },
{ name: _('Education & Science'), id: 'Education', icon: 'globe-outline', categories: %w[Education Science] },
{ name: _('Multimedia'), id: 'Multimedia', icon: 'notes-outline', categories: %w[AudioVideo Audio Video] },
{ name: _('Graphics'), id: 'Graphics', icon: 'brush', categories: ['Graphics'] },
{ name: _('Office & Productivity'), id: 'Office', icon: 'document', categories: ['Office'] },
{ name: _('Network'), id: 'Network', icon: 'world-outline', categories: ['Network'] },
{ name: _('System & Utility'), id: 'Tools', icon: 'spanner-outline', categories: %w[Settings System Utility] }
{ name: _('Games'), id: 'Games', icon: 'games', categories: ['Game'] },
{ name: _('Development'), id: 'Development', icon: 'code', categories: ['Development'] },
{ name: _('Education & Science'), id: 'Education', icon: 'education', categories: %w[Education Science] },
{ name: _('Multimedia'), id: 'Multimedia', icon: 'multimedia', categories: %w[AudioVideo Audio Video] },
{ name: _('Graphics'), id: 'Graphics', icon: 'graphics', categories: ['Graphics'] },
{ name: _('Office & Productivity'), id: 'Office', icon: 'office', categories: ['Office'] },
{ name: _('Network'), id: 'Network', icon: 'network', categories: ['Network'] },
{ name: _('System & Utility'), id: 'Tools', icon: 'utils', categories: %w[Settings System Utility] }
]
end
end
2 changes: 1 addition & 1 deletion app/views/download/appliance.erb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<h5><%= v[:flavor] + " " + _("Image:") %></h5>
<a href="https://download.opensuse.org/repositories/<%= @project %>/images/<%= k %>">
<button class="mb-3 mr-3 w-100 btn btn-primary">
<span class="typcn typcn-lg typcn-download"></span>
<%= icon "download" %>
<span><%= k %></span>
</button>
</a>
Expand Down
4 changes: 2 additions & 2 deletions app/views/download/package.erb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<% @data.select {|k,v| v.has_key?(:ymp) && v[:flavor] == flavor}.sort.reverse.each do |k,v|%>
<div class="text-center col">
<a href="<%= v[:ymp] %>"><button class="mb-3 mr-3 w-100 btn btn-primary">
<span class="typcn typcn-lg typcn-download"></span>
<%= icon "download" %>
<span><%= k.gsub('_', '&nbsp;').html_safe %></span>
</button></a>
</div>
Expand Down Expand Up @@ -111,7 +111,7 @@ pacman -Sy <%= repo_name %>/<%= @package %></pre>
<p><%= (_("Packages for %s:") % [("<strong>" + k.gsub('_', '&nbsp;') + "</strong>").html_safe]).html_safe %></p>
<% v[:package].sort.each do |k,v| %>
<a href="<%= v %>"><button class="mb-3 mr-3 w-100 btn btn-primary">
<span class="typcn typcn-lg typcn-download"></span>
<%= icon "download" %>
<span><%= k %></span>
</button></a>
<% end %>
Expand Down
4 changes: 2 additions & 2 deletions app/views/package/_download_rows.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@
<% url = url_for :controller => 'download', :action => 'ymp_without_arch_and_version',
:project => result.first, :repository => result.last.first.repository, :package => @pkgname,
:base => result.last.first.baseproject, :query => @pkgname%>
<a class="btn btn-sm btn-primary" href="<%= url %>"><span class="typcn typcn-flash-outline"></span> <%= _("1 Click Install") %></a>
<a class="btn btn-sm btn-primary" href="<%= url %>"><%= icon "oci", "1.15em" %> <%= _("1 Click Install") %></a>
<% end %>
<% project = result.last.first.fetch("realproject", result.first) %>
<%= link_to download_package_path(project: project, package: @pkgname), class: 'btn btn-sm btn-secondary' do %>
<span class="typcn typcn-download-outline"></span>
<%= icon "download", "1.15em" %>
<%= _('Expert Download') %>
<% end %>

Expand Down
6 changes: 3 additions & 3 deletions app/views/package/explore.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@

<div id="categories" class="row">
<% @main_sections.each do |section| %>
<div class="col-6 col-md-4 col-lg-3 my-3">
<span class="typcn typcn-lg typcn-<%= section[:icon] %>"></span>
<%= link_to section[:name], {:controller => :package, :action => :category, :category => section[:id]}, :class => 'text-body' %>
<div class="col-6 col-md-4 col-lg-3 my-3 d-flex align-items-center">
<%= icon section[:icon], "1.5em" %>
<%= link_to section[:name], {:controller => :package, :action => :category, :category => section[:id]}, :class => 'text-body ml-2' %>
</div>
<% end %>
</div><!-- /#categories -->
Expand Down
4 changes: 2 additions & 2 deletions app/views/package/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@
</div>
<% end %>
<a id="one-click-button" class="btn btn-lg btn-primary" href="<%= url %>">
<span class="typcn typcn-flash-outline"></span>
<%= icon "oci" %>
<%= _("Direct Install") %>
</a>

<%= link_to download_package_path(project: @default_package.project, package: @pkgname), class: 'btn btn-lg btn-secondary' do %>
<span class="typcn typcn-download-outline"></span>
<%= icon "download" %>
<%= _('Expert Download') %>
<% end %>
<% end -%>
Expand Down
10 changes: 5 additions & 5 deletions app/views/search/_find_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
</div>
</div>
<div class="col-md-auto btn-group d-flex">
<button id="search-button" type="submit" class="btn btn-primary ml-auto">
<span class="typcn typcn-lg typcn-zoom-outline"></span>
<%= _("Search") %>
<button id="search-button" type="submit" class="btn btn-primary ml-auto d-flex align-items-center">
<%= icon "search" %>
<span class="ml-1"><%= _("Search") %></span>
</button>
<button id="settings-button" type="button" class="btn btn-secondary mr-auto" data-toggle="modal" data-target="#search-settings">
<span class="typcn typcn-lg typcn-spanner-outline"></span>
<button id="settings-button" type="button" class="btn btn-secondary mr-auto d-flex align-items-center" data-toggle="modal" data-target="#search-settings">
<%= icon "settings" %>
</button>
</div>
</div>
Expand Down

0 comments on commit bed4672

Please sign in to comment.