Browse Source

Add icons

master
Norore 1 year ago
parent
commit
836a966a68
6 changed files with 51 additions and 6 deletions
  1. BIN
      app/assets/images/icons.png
  2. +36
    -2
      app/assets/stylesheets/application.sass
  3. +10
    -0
      app/views/application/_footer.erb
  4. +3
    -3
      app/views/application/_headers.erb
  5. +1
    -1
      app/views/config/index.html.erb
  6. +1
    -0
      app/views/layouts/application.html.erb

BIN
app/assets/images/icons.png View File

Before After
Width: 50  |  Height: 100  |  Size: 6.1KB

+ 36
- 2
app/assets/stylesheets/application.sass View File

@@ -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
- 0
app/views/application/_footer.erb View File

@@ -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>

+ 3
- 3
app/views/application/_headers.erb View File

@@ -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>


+ 1
- 1
app/views/config/index.html.erb View File

@@ -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
- 0
app/views/layouts/application.html.erb View File

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

Loading…
Cancel
Save