Browse Source

Add icons

master
Norore 3 years ago
parent
commit
836a966a68
  1. BIN
      app/assets/images/icons.png
  2. 38
      app/assets/stylesheets/application.sass
  3. 10
      app/views/application/_footer.erb
  4. 6
      app/views/application/_headers.erb
  5. 2
      app/views/config/index.html.erb
  6. 1
      app/views/layouts/application.html.erb

BIN
app/assets/images/icons.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

38
app/assets/stylesheets/application.sass

@ -39,9 +39,10 @@ header
li
float: left
padding: 14px 16px
padding: 1rem 2rem
list-style-type: none
border-right: 1px solid $border-color-base
display: inline
&:last-child
border-right: none
@ -50,7 +51,26 @@ header
background-color: darken($header-bg-color-contrast, 25%)
&.active
background-color: $header-bg-color-contrast
a
text-align: center
span
display: inline-block
width: 25px
height: 25px
margin-right: .5rem
#changes
background: image-url("icons.png") 0 0
#changes:hover
background: image-url("icons.png") -25px 0
#sites
background: image-url("icons.png") 0 -25px
#sites:hover
background: image-url("icons.png") -25px -25px
#config
background: image-url("icons.png") 0 -50px
#config:hover
background: image-url("icons.png") -50px -50px
a
color: $background-base
@ -60,6 +80,7 @@ header
color: $background-base
text-decoration: none
main
h1
color: $h1-text-color
@ -97,6 +118,19 @@ main
ul.hidden
display: none
.sites
margin: .2rem 0
.sites button
padding: 0
width: 25px
height: 25px
background: image-url("icons.png") 0 -75px
background-color: #e3e3e3
border-radius: .1rem
.sites button:hover
background: image-url("icons.png") -75px -75px
nav.tabs-menu
margin: 0 1.2rem
color: $link-color

10
app/views/application/_footer.erb

@ -0,0 +1,10 @@
<footer class="mam">
<div>
Icons made by <a href="https://www.flaticon.com/authors/roundicons" title="Roundicons">Roundicons</a>
from <a href="https://www.flaticon.com/" title="Flaticon">www.flaticon.com</a> is licensed by
<a href="http://creativecommons.org/licenses/by/3.0/" title="Creative Commons BY 3.0" target="_blank">CC 3.0 BY</a>.
</div>
<div>
Icons modified and adaptated by <a href="https://norore.fr" title="Norore">Norore</a>.
</div>
</footer>

6
app/views/application/_headers.erb

@ -3,13 +3,13 @@
<nav>
<ul>
<li>
<%= link_to 'Changes', diffs_path %>
<span id="changes"> </span><%= link_to 'Changes', diffs_path %>
</li>
<li>
<%= link_to 'Sites', sites_path %>
<span id="sites"> </span><%= link_to 'Sites', sites_path %>
</li>
<li>
<%= link_to 'Config', config_index_path %>
<span id="config"> </span><%= link_to 'Config', config_index_path %>
</li>
</ul>
</nav>

2
app/views/config/index.html.erb

@ -44,7 +44,7 @@
<% end %>
<% unless group.sites.empty? %>
<ul class="sites">
<li><%= t(:list_of) %> <%= group.sites.count %> sites: <button>+</button></li>
<li><%= t(:list_of) %> <%= group.sites.count %> sites: <button></button></li>
<ul class="hidden">
<% group.sites.order(:name, :url).each do |site| %>
<li><%= link_to (site.name || site.url), site %></li>

1
app/views/layouts/application.html.erb

@ -14,6 +14,7 @@
<main role="main" class="pam">
<%= yield %>
</main>
<%= render partial: 'footer' %>
<%= javascript_include_tag 'application' %>
</body>
</html>

Loading…
Cancel
Save