-
Notifications
You must be signed in to change notification settings - Fork 2
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
Modernize repo, before converting to ihp-cms-starter #42
Merged
Merged
Changes from all commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
810a615
Modernize elements
amitaibu 078d44a
More work
amitaibu b11a836
Revert "More work"
amitaibu 85560f1
Add StyleGuide page
amitaibu d55ca01
More copy/ paste
amitaibu 5bb23b6
fix types
amitaibu 0d2901e
More copy
amitaibu 8b3e83b
More work
amitaibu dc24893
fix compile
amitaibu 1b10ab4
Add CTA
amitaibu d8bbf2d
More CTA
amitaibu 1ff0e1a
Add markdown
amitaibu e4895bf
Use markdown
amitaibu f7b8294
Start add quote trait
amitaibu 43965fe
Fixes
amitaibu 0313a51
docs
amitaibu 8fa4162
rename
amitaibu 616cec5
renderTitleAndElement
amitaibu a3a601d
containers
amitaibu f073db3
Use jQuery
amitaibu a48d68b
More work
amitaibu cef0394
Try to copy style guide files
amitaibu 205b49e
use static file
amitaibu 15befe2
Use static image
amitaibu c0a2c7a
more work
amitaibu 7e04034
Theme CTA
amitaibu d7354df
Overhaul Link and Button
amitaibu 4658b96
button Action
amitaibu 9c74cd7
cta to use button
amitaibu 182deae
Wire CTA element
amitaibu 5c15ef6
Simplify
amitaibu 5f68839
Wore quote
amitaibu ed89371
Ctas
amitaibu 4456695
minor
amitaibu 80d0dc9
Remove files
amitaibu 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 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 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 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,78 @@ | ||
module Application.Helper.Icons where | ||
|
||
import IHP.ViewPrelude | ||
|
||
{-| Heroicons - Pencil | ||
-} | ||
edit :: Html | ||
edit = [hsx| | ||
<svg title="Edit" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="bg-white w-10 h-10 p-2 rounded-lg stroke-orange-400 hover:stroke-orange-600"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L6.832 19.82a4.5 4.5 0 01-1.897 1.13l-2.685.8.8-2.685a4.5 4.5 0 011.13-1.897L16.863 4.487zm0 0L19.5 7.125" /> | ||
</svg> | ||
|] | ||
|
||
{-| Heroicons - Trash | ||
-} | ||
delete :: Html | ||
delete = [hsx| | ||
<svg title="Delete" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="bg-white w-10 h-10 p-2 rounded-lg stroke-black hover:stroke-gray-500"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /> | ||
</svg> | ||
|] | ||
|
||
|
||
{-| Heroicons - Clock | ||
-} | ||
clock :: Html | ||
clock = [hsx| | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 stroke-text-pp-blue"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /> | ||
</svg> | ||
|] | ||
|
||
{-| Heroicons - Plus Circle | ||
-} | ||
add :: Html | ||
add = [hsx| | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 stroke-text-black"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /> | ||
</svg> | ||
|] | ||
|
||
{-| Heroicons - Bars-2 | ||
-} | ||
bars :: Html | ||
bars = [hsx| | ||
<svg title="Click to drag and drop" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" data-slot="icon" class="w-6 h-6"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5" /> | ||
</svg> | ||
|] | ||
|
||
{-| Heroicons - Eye | ||
-} | ||
view :: Html | ||
view = [hsx| | ||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="bg-white w-10 h-10 p-2 rounded-lg stroke-orange-400 hover:stroke-orange-600"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M2.036 12.322a1.012 1.012 0 010-.639C3.423 7.51 7.36 4.5 12 4.5c4.638 0 8.573 3.007 9.963 7.178.07.207.07.431 0 .639C20.577 16.49 16.64 19.5 12 19.5c-4.638 0-8.573-3.007-9.963-7.178z" /> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M15 12a3 3 0 11-6 0 3 3 0 016 0z" /> | ||
</svg> | ||
|] | ||
|
||
{-| Heroicons - arrows-up-down | ||
-} | ||
arrowsUpDown :: Html | ||
arrowsUpDown = [hsx| | ||
<svg title="Re-order" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" data-slot="icon" class="bg-white w-10 h-10 p-2 rounded-lg stroke-orange-400 hover:stroke-orange-600"> | ||
<path stroke-linecap="round" stroke-linejoin="round" d="M3 7.5 7.5 3m0 0L12 7.5M7.5 3v13.5m13.5 0L16.5 21m0 0L12 16.5m4.5 4.5V7.5" /> | ||
</svg> | ||
|] | ||
|
||
{-| https://iconmonstr.com/quote-3-svg/ | ||
-} | ||
quotationSign :: Html | ||
quotationSign = [hsx| | ||
<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" class="fill-gray-300"> | ||
<path d="M9.983 3v7.391c0 5.704-3.731 9.57-8.983 10.609l-.995-2.151c2.432-.917 3.995-3.638 3.995-5.849h-4v-10h9.983zm14.017 0v7.391c0 5.704-3.748 9.571-9 10.609l-.996-2.151c2.433-.917 3.996-3.638 3.996-5.849h-3.983v-10h9.983z"/> | ||
</svg> | ||
|
||
|] |
This file contains 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 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 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 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,9 @@ | ||
module Web.Controller.StyleGuide where | ||
|
||
import Web.Controller.Prelude | ||
import Web.View.StyleGuide.Index | ||
|
||
instance Controller StyleGuideController where | ||
action StyleGuideAction = do | ||
render IndexView { .. } | ||
|
This file contains 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,41 @@ | ||
module Web.Element.Button where | ||
|
||
import Web.Controller.Prelude | ||
import Web.Element.Types | ||
import Web.View.Prelude | ||
|
||
-- RenderButton | ||
|
||
render :: RenderButton -> Html | ||
render record@RenderButton {text, url, isPrimary} = | ||
renderButtonHelper url text isPrimary | ||
|
||
|
||
-- Button to Action | ||
|
||
renderButtonAction :: (HasPath controller) => controller -> Text -> Html | ||
renderButtonAction action text = | ||
renderButtonHelper (pathTo action) text False | ||
|
||
|
||
renderButtonPrimaryAction :: (HasPath controller) => controller -> Text -> Html | ||
renderButtonPrimaryAction action text = | ||
renderButtonHelper (pathTo action) text True | ||
|
||
|
||
renderButtonHelper :: Text -> Text -> Bool -> Html | ||
renderButtonHelper url text isPrimary = | ||
[hsx| | ||
<div class="inline-block button-wrapper"> | ||
<a class={classes'} href={url}> | ||
<div>{text}</div> | ||
</a> | ||
</div> | ||
|
||
|] | ||
where classes' = classes | ||
[ "flex flex-row items-center gap-x-4 rounded-lg px-6 py-3 text-xl border-2 border-blue-500 hover:bg-blue-600 w-fit" | ||
, ("bg-blue-500 text-white", isPrimary) | ||
, ("text-blue-900 bg-white hover:text-white", not isPrimary) | ||
] | ||
|
This file contains 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,34 @@ | ||
module Web.Element.Cta where | ||
|
||
import Web.View.Prelude | ||
|
||
import Web.Element.Button | ||
import Web.Element.ElementWrap | ||
import Web.Element.Types | ||
|
||
|
||
render :: RenderCta -> Html | ||
render record@RenderCta {title, body, button} = | ||
titleWrapped | ||
++ bodyWrapped | ||
++ Web.Element.Button.render button | ||
|> wrapVerticalSpacing AlignCenter | ||
|> \e -> [hsx|<div class={classes'}>{e}</div>|] | ||
|> wrapContainerNarrow | ||
where | ||
classes' = classes | ||
[ (getBackgroundColor Gray100, True) | ||
, "relative rounded-lg border border-gray-300 w-full h-full overflow-hidden p-6 md:px-8" | ||
] | ||
|
||
titleWrapped = cs title | ||
|> wrapTextResponsiveFontSize TextSize3xl | ||
|> wrapTextCenter | ||
|> wrapTextFontWeight FontWeightBold | ||
|
||
bodyWrapped = body | ||
|> renderMarkdown | ||
|> wrapProse | ||
|
||
|
||
|
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs an issue to fix duplicates of Image styles