- 
                Notifications
    
You must be signed in to change notification settings  - Fork 7
 
feat: improve index and show partners pages design #542
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            faria-s
  wants to merge
  27
  commits into
  develop
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
sf/improve-index-and-show-partners-pages-design
  
      
      
   
  
    
  
  
  
 
  
      
    base: develop
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 11 commits
      Commits
    
    
            Show all changes
          
          
            27 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      dadd8d1
              
                feat: partners show pages
              
              
                faria-s d22fb23
              
                fix: partner_card
              
              
                faria-s 707e2ad
              
                refactor: partners index page
              
              
                faria-s c182523
              
                Merge branch 'develop' into sf/improve-index-and-show-partners-pages-…
              
              
                faria-s 942216f
              
                fix: router and icons
              
              
                faria-s aa15c86
              
                Merge branch 'develop' into sf/improve-index-and-show-partners-pages-…
              
              
                faria-s eb1502f
              
                fix: avatar color
              
              
                faria-s 8973aa9
              
                fix: merge conflitct
              
              
                faria-s d7d57a0
              
                fix: remove unused components
              
              
                faria-s 7f2057e
              
                fix: code format
              
              
                faria-s 9feefd7
              
                fix: code format
              
              
                faria-s 96dff8d
              
                fix: new partner button position
              
              
                faria-s 52b4be0
              
                Update lib/atomic_web/components/avatar.ex
              
              
                faria-s acbd1c6
              
                Merge branch 'develop' into sf/improve-index-and-show-partners-pages-…
              
              
                faria-s 588ff9e
              
                fix: format show.ex
              
              
                faria-s d223e31
              
                fix: lint show.ex
              
              
                faria-s 899f830
              
                fix: mobile responsive
              
              
                faria-s 4b8619b
              
                fix: mix format
              
              
                faria-s 735d6d3
              
                Merge branch 'develop' into sf/improve-index-and-show-partners-pages-…
              
              
                faria-s 3391baf
              
                merge develop
              
              
                gxnca 9d86782
              
                fix: pending files
              
              
                gxnca 6e85e7b
              
                refactor: improve partners pages look and structure
              
              
                gxnca 296103d
              
                fix: formating problems
              
              
                gxnca 10857b0
              
                fix: improve benefits list
              
              
                gxnca 3facebd
              
                fix: wrong module attribute
              
              
                gxnca 3c869bf
              
                Merge branch 'develop' into sf/improve-index-and-show-partners-pages-…
              
              
                gxnca 40f88c7
              
                fix: reviewed changes
              
              
                gxnca File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            52 changes: 52 additions & 0 deletions
          
          52 
        
  lib/atomic_web/live/partner_live/components/partner_card.ex
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| defmodule AtomicWeb.PartnerLive.Components.PartnerCard do | ||
| @moduledoc false | ||
| use AtomicWeb, :component | ||
| 
     | 
||
| import AtomicWeb.Components.{Avatar, Gradient} | ||
| 
     | 
||
| attr :partner, :map, required: true | ||
| 
     | 
||
| def partner_card(assigns) do | ||
| ~H""" | ||
| <li class="grid h-full w-full rounded-lg border border-zinc-200 hover:bg-zinc-50"> | ||
| <div class="h-12 w-full"> | ||
| <div class="h-full w-full"> | ||
| <.gradient seed={@partner.id} class="rounded-t-lg" /> | ||
| </div> | ||
| </div> | ||
| 
     | 
||
| <div class="grid w-full"> | ||
| <div class="flex flex-grow px-6"> | ||
| <div class="relative bottom-6 flex"> | ||
| <.avatar color={:light_zinc} class="" name={@partner.name} src={Uploaders.PartnerImage.url({@partner.image, @partner}, :original)} type={:company} size={:xl} /> | ||
| </div> | ||
| <div class="mt-5 px-4"> | ||
| <div class="group relative"> | ||
| <p class="text-md line-clamp-1 text-lg font-semibold leading-6 text-zinc-900"><%= @partner.name %></p> | ||
| <div class="absolute top-full left-14 mt-2 hidden w-max rounded bg-gray-500 p-1 text-sm text-white opacity-100 transition-opacity duration-300 group-hover:block"><%= @partner.name %></div> | ||
| <div class="absolute top-full left-16 mt-1 hidden border-r-4 border-b-4 border-l-4 border-r-transparent border-b-gray-500 border-l-transparent group-hover:block"></div> | ||
| </div> | ||
| <%= if @partner.location do %> | ||
| <div class="z-1 flex items-center gap-x-1 leading-6"> | ||
| <.icon name="hero-map-pin" class="my-1 h-4 w-4 text-zinc-400" /> | ||
| <p class="text-center text-sm text-blue-400"><%= @partner.location.name %></p> | ||
| </div> | ||
| <% end %> | ||
| </div> | ||
| </div> | ||
| <div> | ||
| <p class="overflow-hidden truncate overflow-ellipsis whitespace-normal px-10 pb-10 text-xs leading-5 text-zinc-500"> | ||
| <%= Enum.map(String.split(@partner.benefits, "\n"), fn phrase -> %> | ||
| <%= if String.length(phrase) < 50 do %> | ||
| <%= phrase %><br /> | ||
| <% else %> | ||
| <%= String.slice(phrase, 0..50) <> "..." %> <br /> | ||
| <% end %> | ||
| <% end) %> | ||
| </p> | ||
| </div> | ||
| </div> | ||
| </li> | ||
| """ | ||
| end | ||
| end | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
                              
      
                  AfonsoMartins26 marked this conversation as resolved.
               
          
            Show resolved
            Hide resolved
         | 
            
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.