kandi background
Explore Kits

Calligraphy | Custom fonts in Android the easy way... | User Interface library

 by   chrisjenx Java Version: v2.2.0 License: Apache-2.0

 by   chrisjenx Java Version: v2.2.0 License: Apache-2.0

Download this library from

kandi X-RAY | Calligraphy Summary

Calligraphy is a Java library typically used in User Interface applications. Calligraphy has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has medium support. You can download it from GitHub, Maven.
Custom fonts in Android an OK way. Are you fed up of Custom Views to set fonts? Or traversing the ViewTree to find TextViews? Yeah me too. ![alt text](https://github.com/chrisjenx/Calligraphy/raw/master/screenshot.png "ScreenShot Of Font Samples").
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • Calligraphy has a medium active ecosystem.
  • It has 8623 star(s) with 1116 fork(s). There are 218 watchers for this library.
  • It had no major release in the last 12 months.
  • There are 82 open issues and 307 have been closed. On average issues are closed in 435 days. There are 11 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of Calligraphy is v2.2.0
Calligraphy Support
Best in #User Interface
Average in #User Interface
Calligraphy Support
Best in #User Interface
Average in #User Interface

quality kandi Quality

  • Calligraphy has 0 bugs and 0 code smells.
Calligraphy Quality
Best in #User Interface
Average in #User Interface
Calligraphy Quality
Best in #User Interface
Average in #User Interface

securitySecurity

  • Calligraphy has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • Calligraphy code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
Calligraphy Security
Best in #User Interface
Average in #User Interface
Calligraphy Security
Best in #User Interface
Average in #User Interface

license License

  • Calligraphy is licensed under the Apache-2.0 License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
Calligraphy License
Best in #User Interface
Average in #User Interface
Calligraphy License
Best in #User Interface
Average in #User Interface

buildReuse

  • Calligraphy releases are available to install and integrate.
  • Deployable package is available in Maven.
  • Build file is available. You can build the component from source.
  • Installation instructions, examples and code snippets are available.
  • Calligraphy saves you 570 person hours of effort in developing the same functionality from scratch.
  • It has 1331 lines of code, 109 functions and 30 files.
  • It has medium code complexity. Code complexity directly impacts maintainability of the code.
Calligraphy Reuse
Best in #User Interface
Average in #User Interface
Calligraphy Reuse
Best in #User Interface
Average in #User Interface
Top functions reviewed by kandi - BETA

kandi has reviewed Calligraphy and discovered the below as its top functions. This is intended to give you an instant insight into Calligraphy implemented functionality, and help decide if they suit your requirements.

  • Called when the view is created .
  • Invoked when the activity is created .
  • Tries to pull the font path from one theme .
  • Creates a custom view .
  • Load a typeface from the specified font manager .
  • Apply the typeface to paint .
  • Click the default button .
  • Override to override on custom view
  • Returns the declared method on a class .
  • AppCompat views .

Calligraphy Key Features

Custom fonts in Android the easy way...

Dependency

copy iconCopydownload iconDownload
dependencies {
    compile 'uk.co.chrisjenx:calligraphy:2.3.0'
}

Usage

copy iconCopydownload iconDownload
<TextView fontPath="fonts/MyFont.ttf"/>

Installation

copy iconCopydownload iconDownload
@Override
public void onCreate() {
    super.onCreate();
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                            .setDefaultFontPath("fonts/Roboto-RobotoRegular.ttf")
                            .setFontAttrId(R.attr.fontPath)
                            .build()
            );
    //....
}

Inject into Context

copy iconCopydownload iconDownload
@Override
protected void attachBaseContext(Context newBase) {
    super.attachBaseContext(CalligraphyContextWrapper.wrap(newBase));
}

Custom font per TextView

copy iconCopydownload iconDownload
<TextView
    android:text="@string/hello_world"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    fontPath="fonts/Roboto-Bold.ttf"/>

Custom font in TextAppearance

copy iconCopydownload iconDownload
<style name="TextAppearance.FontPath" parent="android:TextAppearance">
    <!-- Custom Attr-->
    <item name="fontPath">fonts/RobotoCondensed-Regular.ttf</item>
</style>

Custom font in Styles

copy iconCopydownload iconDownload
<style name="TextViewCustomFont">
    <item name="fontPath">fonts/RobotoCondensed-Regular.ttf</item>
</style>

Custom font defined in Theme

copy iconCopydownload iconDownload
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
    <item name="android:textViewStyle">@style/AppTheme.Widget.TextView</item>
</style>

<style name="AppTheme.Widget"/>

<style name="AppTheme.Widget.TextView" parent="android:Widget.Holo.Light.TextView">
    <item name="fontPath">fonts/Roboto-ThinItalic.ttf</item>
</style>

Multiple Typeface’s per TextView / Spannables

copy iconCopydownload iconDownload
SpannableStringBuilder sBuilder = new SpannableStringBuilder();
sBuilder.append("Hello!") // Bold this
        .append("I use Calligraphy"); // Default TextView font.
// Create the Typeface you want to apply to certain text
CalligraphyTypefaceSpan typefaceSpan = new CalligraphyTypefaceSpan(TypefaceUtils.load(getAssets(), "fonts/Roboto-Bold.ttf"));
// Apply typeface to the Spannable 0 - 6 "Hello!" This can of course by dynamic.
sBuilder.setSpan(typefaceSpan, 0, 6, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
setText(sBuilder, TextView.BufferType.SPANNABLE);

Licence

copy iconCopydownload iconDownload
Copyright 2013 Christopher Jenkins

Modal window not appearing on click

copy iconCopydownload iconDownload
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

vertical alignment of numbers in tikz

copy iconCopydownload iconDownload
\documentclass[tikz, class=scrreprt, fontsize=10pt]{standalone}
\usepackage[T1]{fontenc}                                
\usepackage[t]{libertine}
\usepackage[libertine]{newtxmath}
\usepackage[stretch=10, shrink=10, final]{microtype}
\usepackage[detect-family]{siunitx}
\usepackage{pgfplots}

\usetikzlibrary{shapes, arrows.meta, positioning, calc, decorations.pathreplacing, calligraphy, intersections, backgrounds}
\tikzset{every picture/.style={/utils/exec={\sffamily\normalsize}}}

\definecolor{black}{RGB}{0,0,0}                 % schwarz
\definecolor{dark}{RGB}{215,48,31}              % dunkelrot
\definecolor{orange}{RGB}{252,141,89}           % orange
\definecolor{yellow}{RGB}{253,204,138}          % gelb
\definecolor{light}{RGB}{254,240,217}           % hellgelb
\definecolor{white}{RGB}{255,255,255}           % weiß

\tikzstyle{invisbox} = [rectangle, minimum width = 7cm, draw = black, outer sep = 0, inner sep = 0, text width = 7cm, align = left]
\tikzstyle{numbox}   = [rectangle, minimum width = 2cm, draw = black, outer sep = 0, inner sep = 0, text width = 2cm, align = right]
\tikzstyle{line}     = [solid, line cap = round, line width = 0.05em]


\begin{document}
    \begin{tikzpicture}
        \pgfplotsset{every axis/.append style={
                compat = 1.18,
                width = 12cm,
                height = 10cm,
                ymajorgrids,
                axis y line = left,
                axis x line* = bottom,
                x axis line style = {line width = 1pt, line cap = round, shorten >= -0.75cm},
                y axis line style = {line width = 1pt, line cap = round, -{Triangle[width = 6pt, length = 6pt, round, line width = 1pt]}, shorten >= -0.75cm},
                grid style = {line width = 0.2pt, draw = light, opacity = 0.5, line cap = round},
                legend style = {draw = black, line width = 0.5pt, legend cell align = left, at = {(0.96, 1.02)}, anchor = north east},
                xticklabel = {$\mathsf{\pgfmathprintnumber{\tick}}$},
                yticklabel = {$\mathsf{\pgfmathprintnumber{\tick}}$},
                tick style = {line cap = round, draw = black},
                tick align = inside,
                x tick label style = {
                    align = center,
                    /pgf/number format/.cd,
                    fixed,
                    precision = 2,
                    use comma,
                    1000 sep = {},
                },
                y tick label style = {
                    align = right,
                    /pgf/number format/.cd,
                    fixed,
                    precision = 2,
                    use comma,
                    1000 sep = {},
                },
                /pgfplots/layers/PhDStyle/.define layer set = {
                    axis background, axis grid, axis ticks, main, axis lines, axis tick labels,
                    axis descriptions, axis foreground
                }{/pgfplots/layers/standard},
                set layers  =  PhDStyle
        }}
        \begin{axis}[%
            ymin = 0, ymax = 100,
            ytick = {0, 20, 40, 60, 80, 100},
            symbolic x coords = {2020, 2025, 2030},
            xlabel = {Jahr},
            ylabel = {Marktvolumen (in Milliarden USD)},
            enlarge x limits = {abs = 2cm},
            xtick = data,
            bar width = 2cm,
            rounded corners = 1pt
            ]
            
            \addplot[ybar, fill = none, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   34
                2025,   63
                2030,   84
            };
            
            \addplot[ybar stacked, fill = dark, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   15
                2025,   32
                2030,   43
            };
            
            \addplot[ybar stacked, fill = orange, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   8
                2025,   15
                2030,   18
            };
        
            \addplot[ybar stacked, fill = yellow, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   5
                2025,   5
                2030,   6
            };
    
            \addplot[ybar stacked, fill = light, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   4
                2025,   6
                2030,   9
            };
        
            \addplot[ybar stacked, fill = white, draw = black, area legend, line width = 0.5pt] table[col sep = comma] {%
                x       y
                2020,   3
                2025,   5
                2030,   8
            };
            
        \end{axis}
    
    \draw [line, line width = 1pt] (10cm, 7.071cm) -- (19cm, 7.071cm);
    \draw [line] (10cm, 6.398cm)                   -- (19cm, 6.398cm);
    \draw [line] (10cm, 5.64cm)                    -- (19cm, 5.64cm);
    \draw [line] (10cm, 5.135cm)                   -- (19cm, 5.135cm);
    \draw [line] (10cm, 3.62cm)                    -- (19cm, 3.62cm);
    \draw [line, line width = 1pt] (10cm, 0cm)     -- (19cm, 0cm);
    
    \node [invisbox, minimum height = 0.673cm] at (13.5cm, 6.7345cm) (text1) {OS and Middleware};
    \node [invisbox, minimum height = 0.758cm] at (13.5cm, 6.019cm)  (text2) {\raisebox{-9pt}{Body and Energy}};
    \node [invisbox, minimum height = 0.505cm] at (13.5cm, 5.3875cm) (text3) {Powertrain and Chassis};
    \node [invisbox, minimum height = 1.515cm] at (13.5cm, 4.3755cm) (text4) {\raisebox{-9pt}{Infotainment, Connectivity, Security}};
    \node [invisbox, minimum height = 3.62cm]  at (13.5cm, 1.81cm)   (text5) {\raisebox{-9pt}{Fahrerassistenzsysteme und autonomes Fahren}};
    \node [invisbox, above = 0cm of text1, minimum height = 0.5cm]   (text0) {\textbf{Total}};
    
    \node [numbox, right = 0cm of text0, minimum height = 0.5cm]   {\textbf{\SI{9}{\percent}}};
    \node [numbox, right = 0cm of text1, minimum height = 0.673cm] {\SI{11}{\percent}};
    \node [numbox, right = 0cm of text2, minimum height = 0.758cm] {\SI{10}{\percent}};
    \node [numbox, right = 0cm of text3, minimum height = 0.505cm] {\SI{1}{\percent}};
    \node [numbox, right = 0cm of text4, minimum height = 1.515cm] {\SI{9}{\percent}};
    \node [numbox, right = 0cm of text5, minimum height = 3.62cm]  {\SI{11}{\percent}};
    
    \end{tikzpicture}
\end{document}

How to align the sidebar icon and the logo on the header?

copy iconCopydownload iconDownload
* {
  margin: 0px;
  padding: 0px;
  font-family: 'Raleway-Bold';
}

.container{
  width: 100%;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat:no-repeat;
  background-attachment: fixed;
}

.container .heading {
    overflow: hidden;
    background-color:  #c0392b;
    padding: 30px 20px;
    display: flex;
    align-items: center;
}

.container .heading a {
  float: left;
  color: white;
  text-align: center;
  font-size: 90px;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100%
  transition: =0.2s;
}

i {
    display: inline-block;
    margin-right: 1em;
  }
.sidenav {
    height: 100%;
    width: 0%;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #585756;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 40px;
  }

.sidenav a {
    padding: 8px 8px 8px 25px;
    text-decoration: none;
    font-size: 15px;
    color: #cfc3c3;
    display: block;
    transition: 0.3s;
    letter-spacing: 1px;
    font-weight: 500;
    line-height: 40px;
    border-bottom: 1px solid rgba(150, 153, 151, 0.1);
  }
 
  
.sidenav a:hover {
    color:  #FFFFFF;
  }
  
.sidenav .closebtn {
    position: absolute;
    top: 0px;
    right: 25px;
    font-size: 40px;
    margin-left: 100px;
}

.dropdown-container {
  display: none;
  padding-left: 10px;
}

.fa-caret-down {
  float: right;
  padding: 10px 0px;
}

.active {
  background-color: #c0392b;
}


@media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
  }
<body>

<div class="container">
  <div class="heading">
      <span style="font-size: 30px;cursor:pointer" onclick="openNav()">&#9776;</span>   
      <img src="https://picsum.photos/200/300">
    </div>
<div id="mySidenav" class="sidenav">
          <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
            <ul>
                <li><a href="#"><i class="fas fa-home"></i>Home</a></li>
                <li><a href="#"><i class="fas fa-brain"></i></i>Heisig Method</a></li>
                <li><a href="#"><i class="fas fa-book-reader"></i>Lessons</a></li>
                <li><a href="#"><i class="fas fa-sticky-note"></i></i>Homophones</a></li>
                <li class="dropdown-btn"><a href="#"><i class="fas fa-tools"></i>Tools<i class="fas fa-caret-down"></i></a></li>
                    <ul class="dropdown-container">
                        <li><a href="#">Dictionary</a></li>
                        <li><a href="#">Flashcard</a></li>
                        <li><a href="#">Calligraphy generator</a></li>
                        <li><a href="#">Pinyin Chart (Pronunciation)</a></li>
                    </ul>
                <li><a href="#"><i class="fas fa-address-book"></i>Contact</a></li>
            </ul>
  </div>      
</div>
<script>
  function openNav() {
    document.getElementById("mySidenav").style.width = "250px";
  }
  
  function closeNav() {
    document.getElementById("mySidenav").style.width = "0px";
  }
</script>

<script>
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
    dropdown[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
    });
}
</script>
</body>
-----------------------
* {
  margin: 0px;
  padding: 0px;
  font-family: 'Raleway-Bold';
}

.container{
  width: 100%;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat:no-repeat;
  background-attachment: fixed;
}

.container .heading {
    overflow: hidden;
    background-color:  #c0392b;
    padding: 30px 20px;
    display: flex;
    align-items: center;
}

.container .heading a {
  float: left;
  color: white;
  text-align: center;
  font-size: 90px;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100%
  transition: =0.2s;
}

i {
    display: inline-block;
    margin-right: 1em;
  }
.sidenav {
    height: 100%;
    width: 0%;
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    background-color: #585756;
    overflow-x: hidden;
    transition: 0.5s;
    padding-top: 40px;
  }

.sidenav a {
    padding: 8px 8px 8px 25px;
    text-decoration: none;
    font-size: 15px;
    color: #cfc3c3;
    display: block;
    transition: 0.3s;
    letter-spacing: 1px;
    font-weight: 500;
    line-height: 40px;
    border-bottom: 1px solid rgba(150, 153, 151, 0.1);
  }
 
  
.sidenav a:hover {
    color:  #FFFFFF;
  }
  
.sidenav .closebtn {
    position: absolute;
    top: 0px;
    right: 25px;
    font-size: 40px;
    margin-left: 100px;
}

.dropdown-container {
  display: none;
  padding-left: 10px;
}

.fa-caret-down {
  float: right;
  padding: 10px 0px;
}

.active {
  background-color: #c0392b;
}


@media screen and (max-height: 450px) {
    .sidenav {padding-top: 15px;}
    .sidenav a {font-size: 18px;}
  }
<body>

<div class="container">
  <div class="heading">
      <span style="font-size: 30px;cursor:pointer" onclick="openNav()">&#9776;</span>   
      <img src="https://picsum.photos/200/300">
    </div>
<div id="mySidenav" class="sidenav">
          <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
            <ul>
                <li><a href="#"><i class="fas fa-home"></i>Home</a></li>
                <li><a href="#"><i class="fas fa-brain"></i></i>Heisig Method</a></li>
                <li><a href="#"><i class="fas fa-book-reader"></i>Lessons</a></li>
                <li><a href="#"><i class="fas fa-sticky-note"></i></i>Homophones</a></li>
                <li class="dropdown-btn"><a href="#"><i class="fas fa-tools"></i>Tools<i class="fas fa-caret-down"></i></a></li>
                    <ul class="dropdown-container">
                        <li><a href="#">Dictionary</a></li>
                        <li><a href="#">Flashcard</a></li>
                        <li><a href="#">Calligraphy generator</a></li>
                        <li><a href="#">Pinyin Chart (Pronunciation)</a></li>
                    </ul>
                <li><a href="#"><i class="fas fa-address-book"></i>Contact</a></li>
            </ul>
  </div>      
</div>
<script>
  function openNav() {
    document.getElementById("mySidenav").style.width = "250px";
  }
  
  function closeNav() {
    document.getElementById("mySidenav").style.width = "0px";
  }
</script>

<script>
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
    dropdown[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
    });
}
</script>
</body>
-----------------------
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
  });
}

function openNav() {
  document.getElementById("mySidenav").style.width = "250px";
}

function closeNav() {
  document.getElementById("mySidenav").style.width = "0px";
}
* {
  margin: 0px;
  padding: 0px;
  font-family: 'Raleway-Bold';
}

.container {
  width: 100vw;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.container .heading {
  /* EDITED HERE */
  display: flex;
  justify-content: space-between;
  width: 100%;
  /* TILL HERE */
  overflow: hidden;
  background-color: #c0392b;
  padding: 30px 20px;
}

.container .heading a {
  float: left;
  color: white;
  text-align: center;
  font-size: 90px;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100% transition:=0.2s;
}

i {
  display: inline-block;
  margin-right: 1em;
}

.sidenav {
  height: 100%;
  width: 0%;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #585756;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 40px;
}

.sidenav a {
  padding: 8px 8px 8px 25px;
  text-decoration: none;
  font-size: 15px;
  color: #cfc3c3;
  display: block;
  transition: 0.3s;
  letter-spacing: 1px;
  font-weight: 500;
  line-height: 40px;
  border-bottom: 1px solid rgba(150, 153, 151, 0.1);
}

.sidenav a:hover {
  color: #FFFFFF;
}

.sidenav .closebtn {
  position: absolute;
  top: 0px;
  right: 25px;
  font-size: 40px;
  margin-left: 100px;
}

.dropdown-container {
  display: none;
  padding-left: 10px;
}

.fa-caret-down {
  float: right;
  padding: 10px 0px;
}

.active {
  background-color: #c0392b;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }
  .sidenav a {
    font-size: 18px;
  }
}
<div class="container">
  <div class="heading">
    <span style="font-size: 30px;cursor:pointer" onclick="openNav()">&#9776;</span>
    <img src="https://picsum.photos/30/30">
  </div>
  <div id="mySidenav" class="sidenav">
    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
    <ul>
      <li><a href="#"><i class="fas fa-home"></i>Home</a></li>
      <li><a href="#"><i class="fas fa-brain"></i>Heisig Method</a></li>
      <li><a href="#"><i class="fas fa-book-reader"></i>Lessons</a></li>
      <li><a href="#"><i class="fas fa-sticky-note"></i></i>Homophones</a></li>
      <li class="dropdown-btn"><a href="#"><i class="fas fa-tools"></i>Tools<i class="fas fa-caret-down"></i></a></li>
      <ul class="dropdown-container">
        <li><a href="#">Dictionary</a></li>
        <li><a href="#">Flashcard</a></li>
        <li><a href="#">Calligraphy generator</a></li>
        <li><a href="#">Pinyin Chart (Pronunciation)</a></li>
      </ul>
      <li><a href="#"><i class="fas fa-address-book"></i>Contact</a></li>
    </ul>
  </div>
</div>
-----------------------
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
  });
}

function openNav() {
  document.getElementById("mySidenav").style.width = "250px";
}

function closeNav() {
  document.getElementById("mySidenav").style.width = "0px";
}
* {
  margin: 0px;
  padding: 0px;
  font-family: 'Raleway-Bold';
}

.container {
  width: 100vw;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.container .heading {
  /* EDITED HERE */
  display: flex;
  justify-content: space-between;
  width: 100%;
  /* TILL HERE */
  overflow: hidden;
  background-color: #c0392b;
  padding: 30px 20px;
}

.container .heading a {
  float: left;
  color: white;
  text-align: center;
  font-size: 90px;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100% transition:=0.2s;
}

i {
  display: inline-block;
  margin-right: 1em;
}

.sidenav {
  height: 100%;
  width: 0%;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #585756;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 40px;
}

.sidenav a {
  padding: 8px 8px 8px 25px;
  text-decoration: none;
  font-size: 15px;
  color: #cfc3c3;
  display: block;
  transition: 0.3s;
  letter-spacing: 1px;
  font-weight: 500;
  line-height: 40px;
  border-bottom: 1px solid rgba(150, 153, 151, 0.1);
}

.sidenav a:hover {
  color: #FFFFFF;
}

.sidenav .closebtn {
  position: absolute;
  top: 0px;
  right: 25px;
  font-size: 40px;
  margin-left: 100px;
}

.dropdown-container {
  display: none;
  padding-left: 10px;
}

.fa-caret-down {
  float: right;
  padding: 10px 0px;
}

.active {
  background-color: #c0392b;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }
  .sidenav a {
    font-size: 18px;
  }
}
<div class="container">
  <div class="heading">
    <span style="font-size: 30px;cursor:pointer" onclick="openNav()">&#9776;</span>
    <img src="https://picsum.photos/30/30">
  </div>
  <div id="mySidenav" class="sidenav">
    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
    <ul>
      <li><a href="#"><i class="fas fa-home"></i>Home</a></li>
      <li><a href="#"><i class="fas fa-brain"></i>Heisig Method</a></li>
      <li><a href="#"><i class="fas fa-book-reader"></i>Lessons</a></li>
      <li><a href="#"><i class="fas fa-sticky-note"></i></i>Homophones</a></li>
      <li class="dropdown-btn"><a href="#"><i class="fas fa-tools"></i>Tools<i class="fas fa-caret-down"></i></a></li>
      <ul class="dropdown-container">
        <li><a href="#">Dictionary</a></li>
        <li><a href="#">Flashcard</a></li>
        <li><a href="#">Calligraphy generator</a></li>
        <li><a href="#">Pinyin Chart (Pronunciation)</a></li>
      </ul>
      <li><a href="#"><i class="fas fa-address-book"></i>Contact</a></li>
    </ul>
  </div>
</div>
-----------------------
var dropdown = document.getElementsByClassName("dropdown-btn");
var i;

for (i = 0; i < dropdown.length; i++) {
  dropdown[i].addEventListener("click", function() {
    this.classList.toggle("active");
    var dropdownContent = this.nextElementSibling;
    if (dropdownContent.style.display === "block") {
      dropdownContent.style.display = "none";
    } else {
      dropdownContent.style.display = "block";
    }
  });
}

function openNav() {
  document.getElementById("mySidenav").style.width = "250px";
}

function closeNav() {
  document.getElementById("mySidenav").style.width = "0px";
}
* {
  margin: 0px;
  padding: 0px;
  font-family: 'Raleway-Bold';
}

.container {
  width: 100vw;
  height: 100vh;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;
}

.container .heading {
  /* EDITED HERE */
  display: flex;
  justify-content: space-between;
  width: 100%;
  /* TILL HERE */
  overflow: hidden;
  background-color: #c0392b;
  padding: 30px 20px;
}

.container .heading a {
  float: left;
  color: white;
  text-align: center;
  font-size: 90px;
  font-weight: bold;
  position: fixed;
  top: 0;
  width: 100% transition:=0.2s;
}

i {
  display: inline-block;
  margin-right: 1em;
}

.sidenav {
  height: 100%;
  width: 0%;
  position: fixed;
  z-index: 1;
  top: 0;
  left: 0;
  background-color: #585756;
  overflow-x: hidden;
  transition: 0.5s;
  padding-top: 40px;
}

.sidenav a {
  padding: 8px 8px 8px 25px;
  text-decoration: none;
  font-size: 15px;
  color: #cfc3c3;
  display: block;
  transition: 0.3s;
  letter-spacing: 1px;
  font-weight: 500;
  line-height: 40px;
  border-bottom: 1px solid rgba(150, 153, 151, 0.1);
}

.sidenav a:hover {
  color: #FFFFFF;
}

.sidenav .closebtn {
  position: absolute;
  top: 0px;
  right: 25px;
  font-size: 40px;
  margin-left: 100px;
}

.dropdown-container {
  display: none;
  padding-left: 10px;
}

.fa-caret-down {
  float: right;
  padding: 10px 0px;
}

.active {
  background-color: #c0392b;
}

@media screen and (max-height: 450px) {
  .sidenav {
    padding-top: 15px;
  }
  .sidenav a {
    font-size: 18px;
  }
}
<div class="container">
  <div class="heading">
    <span style="font-size: 30px;cursor:pointer" onclick="openNav()">&#9776;</span>
    <img src="https://picsum.photos/30/30">
  </div>
  <div id="mySidenav" class="sidenav">
    <a href="javascript:void(0)" class="closebtn" onclick="closeNav()">&times;</a>
    <ul>
      <li><a href="#"><i class="fas fa-home"></i>Home</a></li>
      <li><a href="#"><i class="fas fa-brain"></i>Heisig Method</a></li>
      <li><a href="#"><i class="fas fa-book-reader"></i>Lessons</a></li>
      <li><a href="#"><i class="fas fa-sticky-note"></i></i>Homophones</a></li>
      <li class="dropdown-btn"><a href="#"><i class="fas fa-tools"></i>Tools<i class="fas fa-caret-down"></i></a></li>
      <ul class="dropdown-container">
        <li><a href="#">Dictionary</a></li>
        <li><a href="#">Flashcard</a></li>
        <li><a href="#">Calligraphy generator</a></li>
        <li><a href="#">Pinyin Chart (Pronunciation)</a></li>
      </ul>
      <li><a href="#"><i class="fas fa-address-book"></i>Contact</a></li>
    </ul>
  </div>
</div>
-----------------------
.container {
  position : flex; 
  align-items: center; 
  justify-content: space-around
}

Set format view Export PDF using MPDF in codeigniter

copy iconCopydownload iconDownload
<img src="img.jpg" style="float: left; margin: #Negative margin# " />

Initialize object for unicode fonts

copy iconCopydownload iconDownload
>>> import unicodedata
>>> unicodedata.name(chr(0x1d5a0))
'MATHEMATICAL SANS-SERIF CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL SANS-SERIF CAPITAL A")
'𝖠'
>>> unicodedata.name(chr(0x1d504))
'MATHEMATICAL FRAKTUR CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL FRAKTUR CAPITAL A")
'𝔄'
import unicodedata
import string


def charset(script: str, font: str, style: str, case: str):
    features = ["MATHEMATICAL"]
    # TODO: use script
    assert font in MathAlphanumeric.supported_fonts(), f"invalid font {font!r}"
    features.append(font.upper())
    assert style in MathAlphanumeric.supported_style(), f"invalid style {style!r}"
    if style != "normal":
        if font == "fraktur":
            features.insert(-1, style.upper())  # "bold" must be before "fraktur"
        elif font in ("monospace", "double-struck"):
            pass  # it has only one style, and it is implicit
        else:
            features.append(style.upper())
    assert case in MathAlphanumeric.supported_case(), f"invalid case {case!r}"
    features.append("CAPITAL" if case == "upper" else "SMALL")
    return tuple(unicodedata.lookup(" ".join(features + [letter]), ) for letter in string.ascii_uppercase)


if __name__ == '__main__':
    print("".join(charset("latin", "sans-serif", "bold", "lower")))
    # 𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇
    print("".join(charset("latin", "fraktur", "bold", "upper")))
    # 𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅
    print("".join(charset("latin", "monospace", "bold", "upper")))
    # 𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉
    print("".join(charset("latin", "double-struck", "bold", "upper")))
    # KeyError: "undefined character name 'MATHEMATICAL DOUBLE-STRUCK CAPITAL C'"
>>> unicodedata.name("𝔅")  # the letter copied from the Wikipedia page
'MATHEMATICAL FRAKTUR CAPITAL B'
>>> unicodedata.name("ℭ")  # same, but for C
'BLACK-LETTER CAPITAL C'
-----------------------
>>> import unicodedata
>>> unicodedata.name(chr(0x1d5a0))
'MATHEMATICAL SANS-SERIF CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL SANS-SERIF CAPITAL A")
'𝖠'
>>> unicodedata.name(chr(0x1d504))
'MATHEMATICAL FRAKTUR CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL FRAKTUR CAPITAL A")
'𝔄'
import unicodedata
import string


def charset(script: str, font: str, style: str, case: str):
    features = ["MATHEMATICAL"]
    # TODO: use script
    assert font in MathAlphanumeric.supported_fonts(), f"invalid font {font!r}"
    features.append(font.upper())
    assert style in MathAlphanumeric.supported_style(), f"invalid style {style!r}"
    if style != "normal":
        if font == "fraktur":
            features.insert(-1, style.upper())  # "bold" must be before "fraktur"
        elif font in ("monospace", "double-struck"):
            pass  # it has only one style, and it is implicit
        else:
            features.append(style.upper())
    assert case in MathAlphanumeric.supported_case(), f"invalid case {case!r}"
    features.append("CAPITAL" if case == "upper" else "SMALL")
    return tuple(unicodedata.lookup(" ".join(features + [letter]), ) for letter in string.ascii_uppercase)


if __name__ == '__main__':
    print("".join(charset("latin", "sans-serif", "bold", "lower")))
    # 𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇
    print("".join(charset("latin", "fraktur", "bold", "upper")))
    # 𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅
    print("".join(charset("latin", "monospace", "bold", "upper")))
    # 𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉
    print("".join(charset("latin", "double-struck", "bold", "upper")))
    # KeyError: "undefined character name 'MATHEMATICAL DOUBLE-STRUCK CAPITAL C'"
>>> unicodedata.name("𝔅")  # the letter copied from the Wikipedia page
'MATHEMATICAL FRAKTUR CAPITAL B'
>>> unicodedata.name("ℭ")  # same, but for C
'BLACK-LETTER CAPITAL C'
-----------------------
>>> import unicodedata
>>> unicodedata.name(chr(0x1d5a0))
'MATHEMATICAL SANS-SERIF CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL SANS-SERIF CAPITAL A")
'𝖠'
>>> unicodedata.name(chr(0x1d504))
'MATHEMATICAL FRAKTUR CAPITAL A'
>>> unicodedata.lookup("MATHEMATICAL FRAKTUR CAPITAL A")
'𝔄'
import unicodedata
import string


def charset(script: str, font: str, style: str, case: str):
    features = ["MATHEMATICAL"]
    # TODO: use script
    assert font in MathAlphanumeric.supported_fonts(), f"invalid font {font!r}"
    features.append(font.upper())
    assert style in MathAlphanumeric.supported_style(), f"invalid style {style!r}"
    if style != "normal":
        if font == "fraktur":
            features.insert(-1, style.upper())  # "bold" must be before "fraktur"
        elif font in ("monospace", "double-struck"):
            pass  # it has only one style, and it is implicit
        else:
            features.append(style.upper())
    assert case in MathAlphanumeric.supported_case(), f"invalid case {case!r}"
    features.append("CAPITAL" if case == "upper" else "SMALL")
    return tuple(unicodedata.lookup(" ".join(features + [letter]), ) for letter in string.ascii_uppercase)


if __name__ == '__main__':
    print("".join(charset("latin", "sans-serif", "bold", "lower")))
    # 𝗮𝗯𝗰𝗱𝗲𝗳𝗴𝗵𝗶𝗷𝗸𝗹𝗺𝗻𝗼𝗽𝗾𝗿𝘀𝘁𝘂𝘃𝘄𝘅𝘆𝘇
    print("".join(charset("latin", "fraktur", "bold", "upper")))
    # 𝕬𝕭𝕮𝕯𝕰𝕱𝕲𝕳𝕴𝕵𝕶𝕷𝕸𝕹𝕺𝕻𝕼𝕽𝕾𝕿𝖀𝖁𝖂𝖃𝖄𝖅
    print("".join(charset("latin", "monospace", "bold", "upper")))
    # 𝙰𝙱𝙲𝙳𝙴𝙵𝙶𝙷𝙸𝙹𝙺𝙻𝙼𝙽𝙾𝙿𝚀𝚁𝚂𝚃𝚄𝚅𝚆𝚇𝚈𝚉
    print("".join(charset("latin", "double-struck", "bold", "upper")))
    # KeyError: "undefined character name 'MATHEMATICAL DOUBLE-STRUCK CAPITAL C'"
>>> unicodedata.name("𝔅")  # the letter copied from the Wikipedia page
'MATHEMATICAL FRAKTUR CAPITAL B'
>>> unicodedata.name("ℭ")  # same, but for C
'BLACK-LETTER CAPITAL C'

How can I draw a curly brace under my matrix to describe my columns using Nicematrix and TikZ?

copy iconCopydownload iconDownload
\documentclass{article}
\usepackage{nicematrix}
\usepackage{tikz}
\usepackage[utf8]{inputenc}

\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{amsthm}
\usetikzlibrary{patterns}
\usetikzlibrary{matrix,decorations.pathreplacing}
\usetikzlibrary{decorations.pathreplacing,calligraphy}

\title{Fairness}
\author{someone}
\date{May 2021}

\begin{document}

\maketitle

\section{Introduction}

\NiceMatrixOptions{code-for-first-row = \color{red},
    code-for-first-col = \color{blue},
    code-for-last-row = \color{green},
    code-for-last-col = \color{magenta}}

$\begin{pNiceMatrix}%
[margin,
name=mymatrix,
first-row,
first-col,
%code-for-first-row = \mathbf{\alph{jCol}} ,
%code-for-first-col = \mathbf{\arabic{iRow}} ,
nullify-dots,
xdots/line-style=loosely dotted,
code-after = {\begin{tikzpicture}[decoration={calligraphic brace, mirror, amplitude=6pt,raise=2pt}]
                \draw[decorate,thick] (mymatrix-6-1.south west) -- (mymatrix-6-4.south east) node[midway,yshift=-2em]{a};
                \draw[decorate,thick] (mymatrix-6-5.south west) -- (mymatrix-6-8.south east) node[midway,yshift=-2em]{x};
                \end{tikzpicture}}
]
&        1             & 2           & \Cdots    & k         & k+1          & k+2          & \Cdots  & m          \\
1        & a_{(1,1)}   & a_{(1,2)}   & \Cdots    & a_{(1,k)} & x_{(1,k+1)}  & x_{(1,k+2)}  & \Cdots  & x_{(1,m)}  \\
2        & a_{(2,1)}   & a_{(2,2)}   & \Cdots    & a_{(2,k)} & x_{(2,k+1)}  & x_{(2,k+2)}  & \Cdots  & x_{(2,m)}  \\
3        & a_{(3,1)}   & a_{(3,2)}   & \Cdots    & a_{(3,k)} & x_{(3,k+1)}  & x_{(3,k+2)}  & \Cdots  & x_{(3,m)}  \\
\Vdots   & \Vdots      & \Ddots      & \Cdots    & \Vdots    & \Vdots       & \Ddots       & \Cdots  & \Vdots     \\
&        &             & \Cdots      &           &           &              & \Cdots       &         &            \\
n        & a_{(n,1)}   & a_{(n,2)}   & \Cdots    & a_{(n,k)} & x_{(n,k+1)}  & x_{(n,k+2)}  & \Cdots  & x_{(n,m)}
%\CodeAfter \SubMatrix{\{}{1-1}{3-1}{.}[left-xshift=0.5em]
\end{pNiceMatrix}$

\end{document}

want to add multiple videoview in single page

copy iconCopydownload iconDownload
videoView.start();
videoView.setVideoURI(uri);
-----------------------
videoView.start();
videoView.setVideoURI(uri);

Moving from fragment to activity giving error

copy iconCopydownload iconDownload
View view = inflater.inflate(R.layout.fragment_home, container, false);
beginners = view.findViewById(R.id.beginners) 
beginners.setOnClickListener(new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        startActivity(new Intent(getActivity(),mainpage.class));
                    }
                });

How to redirect from a fragment to next page

copy iconCopydownload iconDownload
@Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View view = inflater.inflate(R.layout.fragment_home, container, false);
        view.findViewById(R.id.your_beginning_text_id).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(new Intent(getActivity(), MainPageActivity.class));
            }
        });
        return view;
    }

Cannot resolve symbol 'SpotsDialog'

copy iconCopydownload iconDownload
implementation 'com.github.d-max:spots-dialog:1.1@arr'
implementation 'com.github.d-max:spots-dialog:1.1@aar'
-----------------------
implementation 'com.github.d-max:spots-dialog:1.1@arr'
implementation 'com.github.d-max:spots-dialog:1.1@aar'

Community Discussions

Trending Discussions on Calligraphy
  • Modal window not appearing on click
  • vertical alignment of numbers in tikz
  • When I migrated to AndroidX I am getting java.lang.RuntimeException: Unable to start activity ComponentInfo
  • How to align the sidebar icon and the logo on the header?
  • Set format view Export PDF using MPDF in codeigniter
  • Initialize object for unicode fonts
  • How can I draw a curly brace under my matrix to describe my columns using Nicematrix and TikZ?
  • want to add multiple videoview in single page
  • Moving from fragment to activity giving error
  • Django- CSS is not working for other pages such as header tags
Trending Discussions on Calligraphy

QUESTION

Modal window not appearing on click

Asked 2022-Feb-07 at 18:18

I'm new to Bootstrap and jQuery and I'm trying to integrate a modal window in my sales website. I copied the modal code from https://getbootstrap.com/docs/4.3/components/modal/ to get a test visualization of how it would look in my project; the only problem is that whenever I click the modal button nothing appears. I heard that this could be an issue with jQuery not being loaded in my code but I don't know how to do this or if it is an issue to begin with. Here is my code:

html

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
    <link rel="stylesheet" href="Project2-2.css" type="text/css">

    <title></title>
  </head>
  <body>
    <!-- Small screen -->

    <!-- Header -->
    <div class="container-fluid">
      <div class="row">
        <div class="col-sm-6 bg-info">
          <br>
          <a href="#" class="my-auto">Wand Shoe Reviver</a>
        </div>
        <div class="col-sm-6 bg-secondary">
          <br>
          <a href="#" class="iconcont" id="img1cont">
            <img src="/Users/mauriceaugust/Documents/Project 2/2931147_user_face_avatar_account_head_icon.png" class="img-fluid" alt="">
          </a>
          <a href="#" class="iconcont">
            <img src="/Users/mauriceaugust/Documents/Project 2/2561381_search_icon.png" class="img-fluid" alt="">
          </a>
          <a href="#" class="iconcont">
            <img src="/Users/mauriceaugust/Documents/Project 2/2703085_bag_cart_ecommerce_shop_icon.png" class="img-fluid" alt="">
          </a>
        </div>
      </div>
    </div>
    <br>

    <!-- Hero image -->
    <div class="container-fluid heroimage">
      <div class="row">
        <div class="col-sm-12 bg-danger">
          <img class="img-fluid" src="/Users/mauriceaugust/Documents/Project 2/leather-air_jordan_1-2-min_2048x-copy.jpeg" alt="">
          <p id="herotext">To Scrub or Not to Scrub? Read more about this heated debate in the Wizard Circle.</p>
        </div>
      </div>
      </div>
    </div>
    <br>
  <!-- Other img -->
  <div class="container-fluid additionalimage">
    <div class="row">
      <div class="col-sm-12">
        <img class="img-fluid" src="/Users/mauriceaugust/Documents/Project 2/1489e901-49a2-42f5-8f5a-fa2afc73f369.92c49142211f2246ea56c38b805f46f1.jpeg" alt="">
        <p class="additonalimgtext">The Tools of the Trade - Get the ultimate kit now!</p>
      </div>
    </div>
  </div>
  <br>
  <!-- Items to buy -->
  <h1 class="eco-friendlyh1">Cleaners</h1>
  <p class="eco-friendlyp">Eco-friendly, concentrated cleaners for your most calling cleaning needs</p>
  <div class="container-fluid itemstobuycont">
    <div class="row">
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/Sole-Revive-PDP-1.jpeg" alt="Sole Reviver" class="img-fluid">
        <p>Potion no1 Wipes - </p>
        <p>$10</p>

      </div>
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/Wipes.jpeg" alt="Cleaning Wipes" class="img-fluid">
      </div>
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/Cleaningrag.jpeg" alt="Cleaning Rag" class="img-fluid">
      </div>
    </div>

    <div class="row">
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/pwtw-bleach-1.jpeg" alt="Bleach" class="img-fluid">
      </div>
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/Detergent.jpeg" alt="Detergent" class="img-fluid">
      </div>
      <div class="col-sm-4">
        <img src="/Users/mauriceaugust/Documents/Project 2/sneaker-laundry-bag.jpeg" alt="Laundry-Bag" class="img-fluid">
      </div>
    </div>
  </div>

  <!-- Test modal -->

  <!-- Button trigger modal -->
  <button type="button" class="btn btn-primary" data-toggle="modal" data-target="#exampleModal">
    Launch demo modal
  </button>

  <!-- Modal -->
  <div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">Modal title</h5>
          <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">
          ...
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
          <button type="button" class="btn btn-primary">Save changes</button>
        </div>
      </div>
    </div>
  </div>
  <br>
  <br>
  <br>
  <br>
  <br>
  
  <!-- Footer -->
  <div class="container-fluid footercontainer">
    <div class="row">

    </div>
  </div>
    


    <script type="text/javascript" src="project2-2.js">
    </script> -->
  </body>
</html>

CSS

@font-face {
  src: url("/Users/mauriceaugust/Downloads/vampire-calligraphy-font/VampireCalligraphy-GgoA.ttf");
  font-family: vampire;
}

*{
  box-sizing: border-box;
  --primary-color: #fe7e6d;
  --secondary-color: #4C0070;
  --main-font: "GTWalsheim","Arial";
  font-family: var(--main-font);
}
html, body{
  height: 100%;
}

/* Header */
.container-fluid{
  border: solid black;
  height: 10%;
}
.align-middle{
  border: solid black;
}
.row{
  height: 100%;
}
.my-auto{
  border: solid black;
  color: white;
  font-size: 1.3em;
}
.col-sm-6{
  height: 100%;

}
.iconcont{
  display: inline-block;
  width: 30px;
  height: 27px;
  border: solid black;

  margin-left: 6%;

}

.iconcont img{
  height: 100%;
  width: 100%;
}

#img1cont{
  margin-left: 120px;
}

/* Hero image */
.heroimage, .additionalimage{
  height: 40%;
}
.col-sm-12{
  height: 100%;
}
.col-sm-12 img{
  height: 100%;
  width: 100%;
}
#herotext, .additonalimgtext{
  position: absolute;
  border: solid black;
  top: 0%;
  background-color: white;
  width: 40%;
  left: 30%;
  top: 50%;
  transform: translateY(-50%);
  text-align: center;
  padding: 1%;
}

/* Items to buy*/
.itemstobuycont{
  height: 60%;
}
.itemstobuycont .row{
  border: solid red;
  height: 50%;
}
.eco-friendlyh1, .eco-friendlyp{
  text-align: center;
}
.col-sm-4{
  border: solid black;
  text-align:center;
}
.col-sm-4 p{
  font-size: 0.5em;
  border: solid black;
  display: inline-block;
}
/* Footer */
.footercontainer{
  height: 20%;
}

ANSWER

Answered 2022-Feb-07 at 18:18

You have imported only the CSS of Bootstrap 4.

The modal uses also Javascript.

Therefore, you need to import the JS of Bootstrap 4 along with jQuery and Popper.

Add the following lines to your code, before the import of your project's js file.

<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>

Source https://stackoverflow.com/questions/71023274

Community Discussions, Code Snippets contain sources that include Stack Exchange Network

Vulnerabilities

No vulnerabilities reported

Install Calligraphy

Define your default font using CalligraphyConfig, in your Application class in the #onCreate() method.

Support

For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

DOWNLOAD this Library from

Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

Explore Related Topics

Share this Page

share link
Compare User Interface Libraries with Highest Quality
Compare User Interface Libraries with Highest Security
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
over 430 million Knowledge Items
Find more libraries
Reuse Solution Kits and Libraries Curated by Popular Use Cases

Save this library and start creating your kit

  • © 2022 Open Weaver Inc.