diff --git a/.DS_Store b/.DS_Store index 6d84353..3ff3792 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/g11-m3-2/Bulma CSS.html b/g11-m3-2/Bulma CSS.html new file mode 100644 index 0000000..d82c5ae --- /dev/null +++ b/g11-m3-2/Bulma CSS.html @@ -0,0 +1,1241 @@ + + +
+ + +Transform basic HTML into a fully styled social media website
+A responsive social media platform with:
+Bulma is a free, open-source CSS framework based on Flexbox. It provides ready-to-use frontend components for building modern, responsive websites.
+Unlike some other frameworks, Bulma is pure CSS - it doesn't require JavaScript to function, making it lightweight and easy to use!
+We'll use Git to download our starter template. Follow these steps:
+Let's create a folder for our project:
+If you just installed Git on Windows, close and reopen PowerShell before continuing. This ensures Git commands work properly.
+Now we'll get our starter code:
+Remember to use YOUR ACTUAL NAME in the project name! This helps your teacher identify your work.
+After creating your repository:
+Make sure you're in your project folder, then:
+yourname-social-project/
+├── assets/
+│ └── css/
+│ ├── bulma.min.css # Bulma framework CSS
+│ └── style.css # Your custom CSS
+├── index.html # Your main HTML file
+├── starter_index.html # Your starter HTML template
+└── assets/
+ └── image/
+ └── logo.png # Your logo image
+ In your HTML head section:
+Open starter_index.html in your text editor and add:
+<head>
+ <!-- ... existing code ... -->
+
+ <!-- BULMA LOCAL FILE -->
+ <link rel="stylesheet" href="./assets/css/bulma.min.css">
+
+ <!-- Custom CSS -->
+ <link rel="stylesheet" href="./assets/css/style.css">
+</head>
+ Open starter_index.html in your browser. Right now it won't look different, but we're about to transform it!
+Tip: Use VS Code or another text editor to edit your files. Right-click the file → "Open with" → Choose your editor.
+Your starter navigation looks like this:
+<nav>
+ <div>
+ <div>
+ <a href="#">
+ <div>M</div>
+ <span>Maxy</span>
+ </a>
+ </div>
+ </div>
+</nav>
+ Change it to this (copy and replace):
+<nav class="navbar is-fixed-top has-shadow">
+ <div class="container">
+ <div class="navbar-brand">
+ <a class="navbar-item" href="#">
+ <div class="bg-indigo-600 text-white font-bold text-xl w-10 h-10 rounded-lg flex items-center justify-center mr-2">
+ M
+ </div>
+ <span class="has-text-weight-bold is-size-4">Maxy</span>
+ </a>
+ <a role="button" class="navbar-burger" aria-label="menu">
+ <span aria-hidden="true"></span>
+ <span aria-hidden="true"></span>
+ <span aria-hidden="true"></span>
+ </a>
+ </div>
+ </div>
+</nav>
+ Save your file and refresh the browser. You should now see a professional-looking navigation bar fixed at the top!
+Look for the section containing your content. It probably looks like:
+<section>
+ <div>
+ <div>
+ <!-- Left Sidebar -->
+ <div>...</div>
+ </div>
+ </div>
+</section>
+ Change it to this structure:
+<section class="section" style="padding-top: 80px;">
+ <div class="container">
+ <div class="columns is-variable is-5">
+ <!-- Left Sidebar -->
+ <div class="column is-one-quarter">
+ <div class="card has-text-centered mb-5">
+ <!-- Profile Card -->
+ </div>
+ </div>
+
+ <!-- Main Feed -->
+ <div class="column">
+ <!-- Posts will go here -->
+ </div>
+
+ <!-- Right Sidebar -->
+ <div class="column is-one-quarter">
+ <!-- Suggestions -->
+ </div>
+ </div>
+ </div>
+</section>
+ Save and refresh. Now try resizing your browser window - the layout automatically adjusts for mobile, tablet, and desktop!
+A simple div structure:
+<div>
+ <div>JS</div>
+ <h2>John Smith</h2>
+ <p>@johnsmith</p>
+ <div>
+ <div>
+ <p>Posts</p>
+ <p>245</p>
+ </div>
+ </div>
+</div>
+ Transform it with these classes:
+<div class="card has-text-centered mb-5">
+ <div class="card-content">
+ <div class="post-avatar mx-auto mb-4" style="background-color: #ff5722;">
+ JS
+ </div>
+ <h2 class="title is-5">John Smith</h2>
+ <p class="subtitle is-6 has-text-grey">@johnsmith</p>
+
+ <div class="level is-mobile profile-stats mt-4">
+ <div class="level-item has-text-centered">
+ <div>
+ <p class="heading">Posts</p>
+ <p class="title is-5">245</p>
+ </div>
+ </div>
+ <!-- More stats here -->
+ </div>
+ </div>
+</div>
+ In your style.css file, add this for the avatar:
+In your style.css file, add:
+.maxy-primary {
+ background-color: #3273dc;
+ color: white;
+ border: none;
+}
+
+.maxy-primary:hover {
+ background-color: #2761bb;
+}
+ Bulma has many button variants. Try these:
+Go back to PowerShell/Terminal and save your work:
+Go back to your browser and refresh your Gitea repository page. You should see your updated files!
+Your teacher can now see your beautiful social media platform.
+Now that you have the basics, make it your own!
+Remember to git add, git commit, and git push after each change!
+This saves your work and lets your teacher see your progress.
+Lesson 2: Build Beautiful Websites with Minimal CSS
+Grade 11 Web Development
+Bulma's human-readable classes make it perfect for beginners. It's CSS-only (no JavaScript required) and built with modern Flexbox.
+Bulma uses modifier classes that start with is- or has-
+Change element's appearance
+is-primaryis-largeis-rounded
+ Change element's content
+has-text-whitehas-background-darkhas-text-weight-bold
+ Add classes to this button to make it:
+Solution: class="button is-large is-danger is-rounded is-outlined"
Bulma uses Flexbox for all layouts. The columns and column classes create responsive grids automatically.
Half width
+Auto width
+Auto width
+Create a 4-column layout where:
+Solution: Use is-one-quarter and is-half classes
Bulma includes styled components that work out of the box:
+Card Title
+Card content goes here
+Info Message
+Create a blog homepage with Bulma that includes:
+Next Lesson: Tailwind CSS - Utility-First Approach!
+Already have an account? Login here
{% endblock %} -HTML3EOF +templates/login.html: -cat > templates/login.html << 'HTML4EOF' +html {% extends "base.html" %} {% block title %}Login{% endblock %} @@ -234,21 +254,7 @@ cat > templates/login.html << 'HTML4EOF'Don't have an account? Register here
{% endblock %} -HTML4EOF -2. Create Virtual Environment -bash -python -m venv venv -venv\Scripts\Activate.ps1 -If you get an error: - -bash -Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -venv\Scripts\Activate.ps1 -3. Install Dependencies -bash -pip install flask werkzeug flask-wtf -pip freeze > requirements.txt -4. Run the Application +6. Run the Application bash python app.py Visit: http://127.0.0.1:5000 diff --git a/g11-m3-m3/Lesson 3_ Tailwind CSS - Utility-First Framework.html b/g11-m3-m3/Lesson 3_ Tailwind CSS - Utility-First Framework.html new file mode 100644 index 0000000..a816fc5 --- /dev/null +++ b/g11-m3-m3/Lesson 3_ Tailwind CSS - Utility-First Framework.html @@ -0,0 +1,793 @@ + + + + + +Lesson 3: Utility-First CSS Framework
+Grade 11 Web Development
+Tailwind CSS is the industry standard in modern web development. It provides complete design control while maintaining consistency and performance.
+Unlike traditional frameworks, Tailwind doesn't impose design decisions - it gives you the tools to build exactly what you envision.
+Responsive Column 1
+This adjusts based on screen size
+Responsive Column 2
+Mobile: 1 column, Desktop: 3 columns
+Responsive Column 3
+Built with Tailwind's grid system
+p-4, m-2, mt-8
+ Padding, margin, and gap utilities
+bg-blue-500, text-red-600
+ Background, text, and border colors
+text-lg, font-bold
+ Font size, weight, and alignment
+flex, grid-cols-3
+ Flexbox and Grid utilities
+border, rounded-lg
+ Border styles and radius
+shadow-lg, hover:scale-105
+ Shadows, transitions, transforms
+Convert this traditional CSS to Tailwind utility classes:
+ +p-5 mt-4 bg-emerald-500 text-white rounded-xl font-bold text-center shadow-md border border-emerald-600
+ Try applying these classes to a div element and see the result.
+Tailwind uses a mobile-first approach where styles apply to all screen sizes, then you can override them for larger screens.
+ +sm:text-lg
+ md:flex
+ lg:w-1/2
+ xl:grid-cols-4
+ 2xl:container
+ Create a card component that responds differently on various screen sizes:
+This card should be responsive. On mobile it takes full width, on tablet half width, and on desktop one-third width.
+Resize your browser window to see the responsiveness.
+Based on what you've learned about both frameworks, which would you choose for these projects and why?
+ +Needs to match existing university branding, multiple content editors will maintain it, must be accessible and consistent across all pages.
+Unique data visualization needs, complex interactive components, design system needs to be created from scratch, team of 5 developers.
+Project A: Bulma - Better for maintaining consistent branding across multiple editors
+Project B: Tailwind - Better for custom designs and team collaboration on complex interfaces
+You will enhance a basic blog layout using Tailwind CSS. Start with the provided HTML structure and apply Tailwind utility classes to create a modern, responsive blog.
+ +Apply Tailwind CSS to achieve the following:
+ +Create a responsive navigation bar with logo, links, and mobile hamburger menu.
+Add a hero section with gradient background, centered title, and call-to-action button.
+Create a responsive grid of blog posts (1 column mobile, 2 tablet, 3 desktop).
+Design a footer with social links, copyright, and newsletter signup.
+container mx-auto for centering contentmd: and lg: prefixes for responsive behaviorhover: prefixflex and grid for layouts