Skip to content

Commit

Permalink
Rename Bundle HtmlPage->Page for easier import
Browse files Browse the repository at this point in the history
  • Loading branch information
sake92 committed Oct 26, 2023
1 parent 327f680 commit 3aeb2ce
Show file tree
Hide file tree
Showing 15 changed files with 19 additions and 28 deletions.
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ inThisBuild(
publish / skip := true,
scalacOptions ++= Seq(
"-deprecation",
"-Xmax-inlines",
"64",
"-Yretain-trees"
"-Yretain-trees",
"-Wunused:all"
),
resolvers +=
"Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ case class BootstrapBundle(
Navbar: BootstrapNavbarComponents = BootstrapNavbarComponents(),
Panel: BootstrapPanelComponents = BootstrapPanelComponents(),
Classes: BootstrapClassesBundle = BootstrapClassesBundle
) extends Bundle with BootstrapUtilComponents {
) extends Bundle
with BootstrapUtilComponents {

override type HtmlPage = BootstrapPage
override type Page = BootstrapPage

def withForm(Form: BootstrapFormComponents): BootstrapBundle =
copy( Form = Form
)
copy(Form = Form)

def withGrid(Grid: BootstrapGridComponents): BootstrapBundle =
new BootstrapBundle( Grid = Grid)
new BootstrapBundle(Grid = Grid)

def withImage(Image: BootstrapImageComponents): BootstrapBundle =
new BootstrapBundle(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package ba.sake.hepek.bootstrap3.component

import ba.sake.hepek.html.component.UtilComponents
import ba.sake.hepek.plain.component.PlainUtilComponents

trait BootstrapUtilComponents extends PlainUtilComponents
trait BootstrapUtilComponents extends PlainUtilComponents
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,10 @@ case class BulmaBundle(
Navbar: BulmaNavbarComponent = BulmaNavbarComponent(),
Panel: BulmaPanelComponents = BulmaPanelComponents(),
Classes: BulmaClassesBundle = BulmaClassesBundle
) extends Bundle with BulmaUtilComponents {
) extends Bundle
with BulmaUtilComponents {

override type HtmlPage = BulmaPage
override type Page = BulmaPage

def withForm(Form: BulmaFormComponents): BulmaBundle =
new BulmaBundle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ private class BulmaAttributeProvider(context: LinkResolverContext)
attributes.addValue("class", s"title is-${h.getLevel()}")
case _ =>
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ case class PlainBundle(
Navbar: PlainNavbarComponents = PlainNavbarComponents(),
Panel: PlainPanelComponents = PlainPanelComponents(),
Classes: PlainClassesBundle = PlainClassesBundle
) extends Bundle with PlainUtilComponents {
override type HtmlPage = PlainPage
) extends Bundle
with PlainUtilComponents {
override type Page = PlainPage

def withForm(Form: PlainFormComponents): PlainBundle =
new PlainBundle(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import scala.jdk.CollectionConverters.*

import com.vladsch.flexmark.html.HtmlRenderer
import com.vladsch.flexmark.parser.Parser
import com.vladsch.flexmark.util.ast.Node
import com.vladsch.flexmark.util.data.MutableDataSet
import com.vladsch.flexmark.util.misc.Extension
import com.vladsch.flexmark.ext.tables.TablesExtension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ final case class BulmaFormComponents(
inputHelp: Option[String],
isInline: Boolean
): Frag = {
val inputHelpFrag = inputHelp.map(h => span(cls := "help")(h))

def renderCheckBox(cbLabel: String, attrs: Seq[AttrPair]) =
label(cls := "checkbox")(
Expand Down Expand Up @@ -195,7 +194,6 @@ final case class BulmaFormComponents(
inputHelp: Option[String],
isInline: Boolean
): Frag = {
val inputHelpFrag = inputHelp.map(h => span(cls := "help")(h))

def renderRadio(radioLabel: String, attrs: Seq[AttrPair]) =
label(cls := "radio")(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ final case class BulmaNavbarComponent(

val Companion = BulmaNavbarComponent

private val bsBtn = tag("button")(tpe := "button", btnClass)

def toggle =
a(
cls := "navbar-burger burger",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ trait Bundle extends HepekAliases {
def Panel: PanelComponents
def Classes: ClassesBundle

type HtmlPage <: ba.sake.hepek.html.HtmlPage
type Page <: HtmlPage
}
1 change: 0 additions & 1 deletion hepek-docs/src/main/scala/docs/hepek-components/Grid.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import utils.Imports._

object GridSupport extends HepekComponentsDocsPage {


override def pageSettings =
super.pageSettings.withTitle("Grid")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package fixtures.static

import ba.sake.hepek.bootstrap3.statik.BootstrapStaticBundle
import ba.sake.hepek.bulma.statik.BulmaStaticBundle
import ba.sake.hepek.html.StaticBundle
import ba.sake.hepek.html.statik.StaticPage
import ba.sake.hepek.plain.statik.PlainStaticBundle
import ba.sake.hepek.scalatags.all._
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ case class BootstrapStaticBundle(
Classes: BootstrapClassesBundle = BootstrapClassesBundle
) extends StaticBundle
with BootstrapUtilComponents {
override type HtmlPage = BootstrapPage
override type Page = BootstrapPage
override type StaticPage = BootstrapStaticPage

def withForm(Form: BootstrapFormComponents): BootstrapStaticBundle =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case class BulmaStaticBundle(
Classes: BulmaClassesBundle = BulmaClassesBundle
) extends StaticBundle
with BulmaUtilComponents {
override type HtmlPage = BulmaPage
override type Page = BulmaPage
override type StaticPage = BulmaStaticPage

def withForm(Form: BulmaFormComponents): BulmaStaticBundle =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ case class PlainStaticBundle(
) extends StaticBundle
with PlainUtilComponents {

override type HtmlPage = PlainPage
override type Page = PlainPage
override type StaticPage = PlainStaticPage

def withForm(Form: PlainFormComponents): PlainStaticBundle =
Expand Down

0 comments on commit 3aeb2ce

Please sign in to comment.